Release coccinelle-0.1.4
authorCoccinelle <cocci@diku.dk>
Sun, 3 Oct 2010 11:57:33 +0000 (13:57 +0200)
committerRene Rydhof Hansen <rrh@cs.aau.dk>
Sun, 3 Oct 2010 11:57:33 +0000 (13:57 +0200)
** Language:
   - long long added to SmPL

** Documentation:
   - add grammar reference and spatch command line options reference

** Features:
   - can match patterns of the form unsigned T or signed T, where T is a
     metavariable
   - dropped the sizeof_parens isomorphism, which was made redundant by the
     paren isomorphism
   - simple rule generation

** Bugfix:
   - trailing , ; and ) no longer left on a line by themselves
   - better treatment of error exit when the searched for code matches the
     error exit condition.
   - fix incorrect treatment of parentheses in test_exps that could allow +
     code to be added twice
   - don't ask whether iterator names and declarer names should be declared as
     metavariables.
   - slightly better support for expression list metavariables.
   - short and long allowed for array index types in SmPL
   - more restrictions on type inference for pointer arithmetic in SmPL
   - allow isomorphisms to apply when + code is anywhere within all - terms
   - changed order of printing const and volatile
   - allow  eg ... <... in plus code
   - better formatting of generated if/while/etc. code
   - better parse error reporting when the problem is at the end of the file

** Internals:
   - isomorphisms don't apply under signed/unsigned, to prevent the creation
     of things like unsigned signed int.  Need a better solution for this.

280 files changed:
.#Makefile.1.117 [new file with mode: 0644]
.#cocci.ml.1.290 [deleted file]
.cvsignore [deleted file]
.depend
.project [deleted file]
.subdirs [new file with mode: 0644]
Makefile
changes.txt
cocci.ml
cocci.mli
commitmsg
commons/.cvsignore [deleted file]
commons/.depend
commons/Makefile
commons/common.ml
copyright.txt
ctl/.#ctl_engine.ml.1.185 [deleted file]
ctl/.#ctl_engine.ml.1.187 [deleted file]
ctl/.cvsignore [deleted file]
ctl/.depend
ctl/Makefile
ctl/ast_ctl.ml
ctl/ctl_engine.ml
ctl/flag_ctl.ml
ctl/pretty_print_ctl.ml
ctl/test_ctl.ml
ctl/wrapper_ctl.ml
docs/grammar/Makefile [new file with mode: 0644]
docs/grammar/cocci_syntax.tex [new file with mode: 0644]
docs/grammar/examples.tex [new file with mode: 0644]
docs/grammar/grammar.tex [new file with mode: 0644]
docs/options.pdf [new file with mode: 0644]
docs/options.tex [new file with mode: 0644]
docs/spatch.1 [new file with mode: 0644]
engine/.#Makefile.1.49 [deleted file]
engine/.#Makefile.1.50 [deleted file]
engine/.#asttoctl2.ml.1.144 [deleted file]
engine/.#asttoctl2.ml.1.145 [deleted file]
engine/.#asttoctl2.ml.1.147 [deleted file]
engine/.#c_vs_c.ml.1.9 [deleted file]
engine/.#check_reachability.ml.1.18 [deleted file]
engine/.#ctlcocci_integration.ml.1.116 [deleted file]
engine/.#postprocess_transinfo.ml.1.12 [deleted file]
engine/.#pretty_print_engine.ml.1.42 [deleted file]
engine/.cvsignore [deleted file]
engine/.depend
engine/Makefile
engine/asttoctl.ml
engine/asttoctl2.ml
engine/asttomember.ml
engine/c_vs_c.ml
engine/check_exhaustive_pattern.ml
engine/check_reachability.ml
engine/cocci_vs_c.ml
engine/ctlcocci_integration.ml
engine/ctltotex.ml
engine/flag_engine.ml [moved from ctl/.#flag_ctl.ml.1.12 with 66% similarity]
engine/flag_matcher.ml [moved from ctl/.#flag_ctl.ml.1.13 with 65% similarity]
engine/isomorphisms_c_c.ml
engine/lib_engine.ml
engine/lib_matcher_c.ml
engine/main.ml
engine/pattern_c.ml
engine/postprocess_transinfo.ml
engine/pretty_print_engine.ml
engine/sgrep.ml
engine/transformation_c.ml
extra/.cvsignore [deleted file]
extra/.depend
extra/Makefile
flag_cocci.ml
globals/.#config.ml.1.2 [deleted file]
globals/.cvsignore [deleted file]
globals/Makefile
globals/config.ml
globals/flag.ml
main.ml
menhirlib/.cvsignore [deleted file]
menhirlib/Makefile
parsing_c/.cvsignore [deleted file]
parsing_c/.depend
parsing_c/Makefile
parsing_c/ast_c.ml
parsing_c/copyright.txt
parsing_c/cpp_ast_c.ml
parsing_c/orig.mly [new file with mode: 0644]
parsing_c/parsing_hacks.ml
parsing_c/pretty_print_c.ml
parsing_c/pretty_print_c.mli
parsing_c/type_annoter_c.ml
parsing_c/unparse_c.ml
parsing_c/unparse_cocci.ml
parsing_c/unparse_cocci.mli
parsing_c/unparse_hrule.ml
parsing_c/unparse_hrule.mli
parsing_c/visitor_c.ml
parsing_c/visitor_c.mli
parsing_cocci/.#arity.ml.1.81 [deleted file]
parsing_cocci/.#arity.ml.1.82 [deleted file]
parsing_cocci/.#ast0_cocci.ml.1.105 [deleted file]
parsing_cocci/.#ast0_cocci.ml.1.106 [deleted file]
parsing_cocci/.#ast0_cocci.ml.1.107 [deleted file]
parsing_cocci/.#ast0toast.ml.1.132 [deleted file]
parsing_cocci/.#ast0toast.ml.1.133 [deleted file]
parsing_cocci/.#ast_cocci.ml.1.142 [deleted file]
parsing_cocci/.#ast_cocci.ml.1.143 [deleted file]
parsing_cocci/.#check_meta.ml.1.79 [deleted file]
parsing_cocci/.#check_meta.ml.1.80 [deleted file]
parsing_cocci/.#compute_lines.ml.1.85 [deleted file]
parsing_cocci/.#context_neg.ml.1.95 [deleted file]
parsing_cocci/.#context_neg.ml.1.96 [deleted file]
parsing_cocci/.#context_neg.ml.1.97 [deleted file]
parsing_cocci/.#disjdistr.ml.1.20 [deleted file]
parsing_cocci/.#index.ml.1.54 [deleted file]
parsing_cocci/.#insert_plus.ml.1.68 [deleted file]
parsing_cocci/.#insert_plus.ml.1.69 [deleted file]
parsing_cocci/.#iso_pattern.ml.1.136 [deleted file]
parsing_cocci/.#iso_pattern.ml.1.137 [deleted file]
parsing_cocci/.#iso_pattern.ml.1.138 [deleted file]
parsing_cocci/.#iso_pattern.ml.1.144 [deleted file]
parsing_cocci/.#lexer_cocci.mll.1.80 [deleted file]
parsing_cocci/.#parse_aux.ml.1.23 [deleted file]
parsing_cocci/.#parse_cocci.ml.1.162 [deleted file]
parsing_cocci/.#parse_cocci.ml.1.163 [deleted file]
parsing_cocci/.#parse_cocci.ml.1.164 [deleted file]
parsing_cocci/.#parser_cocci_menhir.mly.1.153 [deleted file]
parsing_cocci/.#parser_cocci_menhir.mly.1.155 [deleted file]
parsing_cocci/.#parser_cocci_menhir.mly.1.156 [deleted file]
parsing_cocci/.#pretty_print_cocci.ml.1.127 [deleted file]
parsing_cocci/.#pretty_print_cocci.ml.1.128 [deleted file]
parsing_cocci/.#single_statement.ml.1.51 [deleted file]
parsing_cocci/.#test_exps.ml.1.3 [deleted file]
parsing_cocci/.#type_infer.ml.1.54 [deleted file]
parsing_cocci/.#type_infer.ml.1.55 [deleted file]
parsing_cocci/.#unify_ast.ml.1.70 [deleted file]
parsing_cocci/.#unitary_ast0.ml.1.28 [deleted file]
parsing_cocci/.#unitary_ast0.ml.1.29 [deleted file]
parsing_cocci/.#unparse_ast0.ml.1.107 [deleted file]
parsing_cocci/.#unparse_ast0.ml.1.108 [deleted file]
parsing_cocci/.#unparse_ast0.ml.1.109 [deleted file]
parsing_cocci/.#visitor_ast.ml.1.89 [deleted file]
parsing_cocci/.#visitor_ast.ml.1.90 [deleted file]
parsing_cocci/.#visitor_ast0.ml.1.79 [deleted file]
parsing_cocci/.#visitor_ast0.ml.1.80 [deleted file]
parsing_cocci/.#visitor_ast0.ml.1.81 [deleted file]
parsing_cocci/.cvsignore [deleted file]
parsing_cocci/.depend
parsing_cocci/Makefile
parsing_cocci/arity.ml
parsing_cocci/ast0_cocci.ml
parsing_cocci/ast0_cocci.mli
parsing_cocci/ast0toast.ml
parsing_cocci/ast0toast.mli
parsing_cocci/ast_cocci.ml
parsing_cocci/ast_cocci.mli
parsing_cocci/check_meta.ml
parsing_cocci/comm_assoc.ml
parsing_cocci/compute_lines.ml
parsing_cocci/context_neg.ml
parsing_cocci/data.ml
parsing_cocci/data.mli
parsing_cocci/disjdistr.ml
parsing_cocci/flag_parsing_cocci.ml
parsing_cocci/free_vars.ml
parsing_cocci/free_vars.mli
parsing_cocci/function_prototypes.ml
parsing_cocci/function_prototypes.mli
parsing_cocci/get_constants.ml
parsing_cocci/get_constants2.ml
parsing_cocci/index.ml
parsing_cocci/insert_plus.ml
parsing_cocci/insert_plus.mli
parsing_cocci/iso_compile.ml
parsing_cocci/iso_pattern.ml
parsing_cocci/lexer_cocci.mll
parsing_cocci/lexer_script.mll
parsing_cocci/main.ml
parsing_cocci/merge.ml
parsing_cocci/parse_aux.ml
parsing_cocci/parse_cocci.ml
parsing_cocci/parse_cocci.mli
parsing_cocci/parser_cocci.mly
parsing_cocci/parser_cocci_menhir.ml
parsing_cocci/parser_cocci_menhir.mli
parsing_cocci/parser_cocci_menhir.mly
parsing_cocci/plus.ml
parsing_cocci/pretty_print_cocci.ml
parsing_cocci/semantic_cocci.ml
parsing_cocci/simple_assignments.ml
parsing_cocci/single_statement.ml
parsing_cocci/test_exps.ml
parsing_cocci/top_level.ml
parsing_cocci/type_cocci.ml
parsing_cocci/type_cocci.mli
parsing_cocci/type_infer.ml
parsing_cocci/unify_ast.ml
parsing_cocci/unitary_ast0.ml
parsing_cocci/unitary_ast0.mli
parsing_cocci/unparse_ast0.ml
parsing_cocci/visitor_ast.ml
parsing_cocci/visitor_ast.mli
parsing_cocci/visitor_ast0.ml
parsing_cocci/visitor_ast0.mli
popl/Makefile
popl/ast_popl.ml
popl/asttopopl.ml
popl/insert_befaft.ml
popl/insert_quantifiers.ml
popl/popl.ml
popl/popltoctl.ml
popl/pretty_print_popl.ml
popl09/.#Makefile.1.3 [deleted file]
popl09/.cvsignore [deleted file]
popl09/.depend
popl09/Makefile
popl09/ast_popl.ml
popl09/asttopopl.ml
popl09/flag_popl.ml
popl09/insert_quantifiers.ml
popl09/popl.ml
popl09/popltoctl.ml
popl09/pretty_print_popl.ml
pycaml/.cvsignore [deleted file]
python/.#yes_pycocci.ml.1.1 [deleted file]
python/.cvsignore [deleted file]
python/.depend
python/Makefile
python/coccilib/.cvsignore [deleted file]
python/coccilib/coccigui/.cvsignore [deleted file]
python/coccilib/output.py
python/no_pycocci.ml
python/no_pycocci_aux.ml
python/yes_pycocci.ml
python/yes_pycocci_aux.ml
readme.txt
standard.iso
testing.ml
testing.mli
tests/.cvsignore [deleted file]
tests/bad_define_parse.c [new file with mode: 0644]
tests/bad_define_parse.cocci [new file with mode: 0644]
tests/bad_iso_example.cocci
tests/bad_ptr_print.c [new file with mode: 0644]
tests/bad_ptr_print.cocci [new file with mode: 0644]
tests/bad_ptr_print.res [new file with mode: 0644]
tests/bad_typedef.cocci
tests/compare.res
tests/const_array.res
tests/empty.iso [new file with mode: 0644]
tests/expopt3.res
tests/expopt3_ver1.res
tests/expopt3_ver2.res
tests/file.h [new file with mode: 0644]
tests/km.c
tests/km.res
tests/longlong.c [new file with mode: 0644]
tests/longlong.cocci [new file with mode: 0644]
tests/longlong.res [new file with mode: 0644]
tests/lvalue.res
tests/macro.res
tests/my.h [new file with mode: 0644]
tests/null.cocci
tests/pci_noputm.cocci
tests/rcu2.cocci
tests/retmac.c [new file with mode: 0644]
tests/test_unsigned_meta.c [new file with mode: 0644]
tests/test_unsigned_meta.cocci [new file with mode: 0644]
tests/test_unsigned_meta.res [new file with mode: 0644]
tests/toplevel_struct_modif.cocci
tests/video.cocci
tests/video1.cocci
tests/video1bis.cocci
tests/video2.cocci
tests/video3.cocci
tools/Makefile
tools/distributed/.cvsignore [deleted file]
tools/distributed/Makefile
tools/distributed/spatch_linux.c
tools/distributed/spatch_linux_script
tools/licensify.ml

diff --git a/.#Makefile.1.117 b/.#Makefile.1.117
new file mode 100644 (file)
index 0000000..6e50fe9
--- /dev/null
@@ -0,0 +1,465 @@
+# Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
+# Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
+# This file is part of Coccinelle.
+# 
+# Coccinelle is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, according to version 2 of the License.
+# 
+# Coccinelle is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
+# 
+# The authors reserve the right to distribute this or future versions of
+# Coccinelle under other licenses.
+
+
+#############################################################################
+# Configuration section
+#############################################################################
+
+-include Makefile.config
+
+VERSION=$(shell cat globals/config.ml |grep version |perl -p -e 's/.*"(.*)".*/$$1/;')
+
+##############################################################################
+# Variables
+##############################################################################
+TARGET=spatch
+
+SRC=flag_cocci.ml cocci.ml testing.ml test.ml main.ml
+
+
+ifeq ($(FEATURE_PYTHON),1)
+PYCMA=pycaml/pycaml.cma
+PYDIR=pycaml
+PYLIB=dllpycaml_stubs.so
+# the following is essential for Coccinelle to compile under gentoo (wierd)
+OPTLIBFLAGS=-cclib dllpycaml_stubs.so
+else
+PYCMA=
+PYDIR=
+PYLIB=
+OPTLIBFLAGS=
+endif
+
+
+SYSLIBS=str.cma unix.cma
+LIBS=commons/commons.cma globals/globals.cma\
+     ctl/ctl.cma \
+     parsing_cocci/cocci_parser.cma parsing_c/parsing_c.cma \
+     engine/cocciengine.cma popl09/popl.cma \
+     extra/extra.cma $(PYCMA) python/coccipython.cma
+
+MAKESUBDIRS=commons globals menhirlib $(PYDIR) ctl parsing_cocci parsing_c \
+ engine popl09 extra python
+INCLUDEDIRS=commons commons/ocamlextra globals menhirlib $(PYDIR) ctl \
+ parsing_cocci parsing_c engine popl09 extra python
+
+##############################################################################
+# Generic variables
+##############################################################################
+
+INCLUDES=$(INCLUDEDIRS:%=-I %)
+
+OBJS=    $(SRC:.ml=.cmo)
+OPTOBJS= $(SRC:.ml=.cmx)
+
+EXEC=$(TARGET)
+
+##############################################################################
+# Generic ocaml variables
+##############################################################################
+
+OCAMLCFLAGS= #-g -dtypes # -w A
+
+# for profiling add  -p -inline 0
+# but 'make forprofiling' below does that for you.
+# This flag is also used in subdirectories so don't change its name here.
+OPTFLAGS=
+# the following is essential for Coccinelle to compile under gentoo
+# but is now defined above in this file
+#OPTLIBFLAGS=-cclib dllpycaml_stubs.so
+
+# the OPTBIN variable is here to allow to use ocamlc.opt instead of 
+# ocaml, when it is available, which speeds up compilation. So
+# if you want the fast version of the ocaml chain tools, set this var 
+# or setenv it to ".opt" in your startup script.
+OPTBIN= #.opt
+
+OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS)  $(INCLUDES)
+OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES) 
+OCAMLLEX=ocamllex #-ml # -ml for debugging lexer, but slightly slower
+OCAMLYACC=ocamlyacc -v
+OCAMLDEP=ocamldep #$(INCLUDES)
+OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
+
+# can also be set via 'make static'
+STATIC= #-ccopt -static
+
+# can also be unset via 'make purebytecode'
+BYTECODE_STATIC=-custom
+
+##############################################################################
+# Top rules
+##############################################################################
+all: subdirs
+opt: subdirs.opt
+all.opt: opt
+top: $(EXEC).top
+
+.PHONY: $(MAKESUBDIRS) $(MAKESUBDIRS:%=%.opt)
+
+$(MAKESUBDIRS):
+       $(MAKE) -C $@ OCAMLCFLAGS="$(OCAMLCFLAGS)" all
+
+$(MAKESUBDIRS:%=%.opt):
+       $(MAKE) -C $(@:%.opt=%) OCAMLCFLAGS="$(OCAMLCFLAGS)" all.opt
+
+commons:
+globals:
+menhirlib:
+parsing_cocci:globals menhirlib
+parsing_c:parsing_cocci
+ctl:globals commons
+engine: parsing_cocci parsing_c ctl 
+popl09:engine
+extra: parsing_cocci parsing_c ctl
+pycaml:
+python:pycaml parsing_cocci parsing_c
+
+commons.opt:
+globals.opt:
+menhirlib.opt:
+parsing_cocci.opt:globals.opt menhirlib.opt
+parsing_c.opt:parsing_cocci.opt
+ctl.opt:globals.opt commons.opt
+engine.opt: parsing_cocci.opt parsing_c.opt ctl.opt
+popl09.opt:engine.opt
+extra.opt: parsing_cocci.opt parsing_c.opt ctl.opt
+pycaml.opt:
+python.opt:pycaml.opt parsing_cocci.opt parsing_c.opt
+
+#      set -e; for i in $(MAKESUBDIRS); \
+#      do $(MAKE) -C $$i OCAMLCFLAGS="$(OCAMLCFLAGS)" all; done 
+#
+#rec.opt:
+#      set -e; for i in $(MAKESUBDIRS); \
+#      do $(MAKE) -C $$i OCAMLCFLAGS="$(OCAMLCFLAGS)" all.opt; done 
+clean::
+       set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i clean; done 
+
+configure:
+       ./configure
+
+$(LIBS): $(MAKESUBDIRS)
+$(LIBS:.cma=.cmxa): $(MAKESUBDIRS:%=%.opt)
+
+subdirs: 
+       echo "$(SRC:.ml=.cmi): $(MAKESUBDIRS)" > .subdirs
+       $(MAKE) $(EXEC)
+
+subdirs.opt:
+       echo "$(SRC:.ml=.cmi): $(MAKESUBDIRS:%=%.opt)" > .subdirs
+       $(MAKE) $(EXEC).opt
+
+-include .subdirs
+
+$(OBJS):$(LIBS)
+$(OPTOBJS):$(LIBS:.cma=.cmxa)
+
+$(EXEC): $(LIBS) $(OBJS)
+       $(OCAMLC) $(BYTECODE_STATIC) -o $@ $(SYSLIBS)  $^
+
+$(EXEC).opt: $(LIBS:.cma=.cmxa) $(OPTOBJS) 
+       $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $(OPTLIBFLAGS)  $^
+
+$(EXEC).top: $(LIBS) $(OBJS) 
+       $(OCAMLMKTOP) -custom -o $@ $(SYSLIBS) $^
+
+clean::
+       rm -f $(TARGET) $(TARGET).opt $(TARGET).top
+
+clean::
+       rm -f dllpycaml_stubs.so
+
+
+.PHONY: tools all configure
+
+tools:
+       $(MAKE) -C tools
+clean::
+       $(MAKE) -C tools clean
+
+
+static:
+       rm -f spatch.opt spatch
+       $(MAKE) STATIC="-ccopt -static" spatch.opt
+       cp spatch.opt spatch
+
+purebytecode:
+       rm -f spatch.opt spatch
+       $(MAKE) BYTECODE_STATIC="" spatch
+
+
+##############################################################################
+# Install
+##############################################################################
+
+# don't remove DESTDIR, it can be set by package build system like ebuild
+install: all
+       mkdir -p $(DESTDIR)$(BINDIR)
+       mkdir -p $(DESTDIR)$(LIBDIR)
+       mkdir -p $(DESTDIR)$(SHAREDIR)
+       mkdir -p $(DESTDIR)$(MANDIR)/man1
+       cp spatch $(DESTDIR)$(BINDIR)   
+       cp standard.h $(DESTDIR)$(SHAREDIR)
+       cp standard.iso $(DESTDIR)$(SHAREDIR)
+       cp docs/spatch.1 $(DESTDIR)$(MANDIR)/man1/
+       mkdir -p $(DESTDIR)$(SHAREDIR)/python
+       cp -a python/coccilib $(DESTDIR)$(SHAREDIR)/python
+       cp -f dllpycaml_stubs.so $(DESTDIR)$(LIBDIR)    
+       @echo ""
+       @echo "You can also install spatch by copying the program spatch"
+       @echo "(available in this directory) anywhere you want and"
+       @echo "give it the right options to find its configuration files."
+
+uninstall:
+       rm -f $(DESTDIR)$(BINDIR)/spatch
+       rm -f $(DESTDIR)$(LIBDIR)/dllpycaml_stubs.so
+       rm -f $(DESTDIR)$(SHAREDIR)/standard.h
+       rm -f $(DESTDIR)$(SHAREDIR)/standard.iso
+       rm -rf $(DESTDIR)$(SHAREDIR)/python/coccilib
+       rm -f $(DESTDIR)$(MANDIR)/man1/spatch.1
+
+
+
+version:
+       @echo $(VERSION)
+
+
+##############################################################################
+# Package rules
+##############################################################################
+
+PACKAGE=coccinelle-$(VERSION)
+
+BINSRC=spatch env.sh env.csh standard.h standard.iso \
+       *.txt docs/* \
+       demos/foo.* demos/simple.* 
+#      $(PYLIB) python/coccilib/ demos/printloc.*
+BINSRC2=$(BINSRC:%=$(PACKAGE)/%)
+
+TMP=/tmp
+OCAMLVERSION=$(shell ocaml -version |perl -p -e 's/.*version (.*)/$$1/;')
+
+# Procedure to do first time:
+#  cd ~/release
+#  cvs checkout coccinelle
+#  cd coccinelle
+#  cvs update -d -P
+#  touch **/*
+#  make licensify
+#  remember to comment the -g -dtypes in this Makefile
+
+# Procedure to do each time:
+#  cvs update
+#  ./configure --without-python
+#  make package
+#  make website
+# Check also that run an ocaml in /usr/bin
+
+# To test you can try compile and run spatch from different instances 
+# like my ~/coccinelle, ~/release/coccinelle, and the /tmp/coccinelle-0.X 
+# downloaded from the website. 
+
+# For 'make srctar' it must done from a clean
+# repo such as ~/release/coccinelle. It must also be a repo where 
+# the scripts/licensify has been run at least once. 
+# For the 'make bintar' I can do it from my original repo.
+
+
+package: 
+       make srctar 
+       make bintar 
+       make staticbintar 
+       make bytecodetar
+
+# I currently pre-generate the parser so the user does not have to 
+# install menhir on his machine. I also do a few cleanups like 'rm todo_pos'.
+# You may have first to do a 'make licensify'.
+srctar:
+       make clean
+       cp -a .  $(TMP)/$(PACKAGE)
+       cd $(TMP)/$(PACKAGE); cd parsing_cocci/; make parser_cocci_menhir.ml
+       cd $(TMP)/$(PACKAGE); rm todo_pos
+       cd $(TMP); tar cvfz $(PACKAGE).tgz  --exclude=CVS  $(PACKAGE)
+       rm -rf  $(TMP)/$(PACKAGE)
+
+
+bintar: all
+       rm -f $(TMP)/$(PACKAGE)
+       ln -s `pwd` $(TMP)/$(PACKAGE)
+       cd $(TMP); tar cvfz $(PACKAGE)-bin-x86.tgz --exclude=CVS $(BINSRC2)
+       rm -f $(TMP)/$(PACKAGE)
+
+staticbintar: all.opt
+       rm -f $(TMP)/$(PACKAGE)
+       ln -s `pwd` $(TMP)/$(PACKAGE)
+       make static
+       cd $(TMP); tar cvfz $(PACKAGE)-bin-x86-static.tgz --exclude=CVS $(BINSRC2)
+       rm -f $(TMP)/$(PACKAGE)
+
+# add ocaml version in name ?
+bytecodetar: all
+       rm -f $(TMP)/$(PACKAGE)
+       ln -s `pwd` $(TMP)/$(PACKAGE)
+       make purebytecode
+       cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz --exclude=CVS $(BINSRC2)
+       rm -f $(TMP)/$(PACKAGE)
+
+clean::
+       rm -f $(PACKAGE) 
+       rm -f $(PACKAGE)-bin-x86.tgz 
+       rm -f $(PACKAGE)-bin-x86-static.tgz 
+       rm -f $(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz
+
+
+
+TOLICENSIFY=ctl engine parsing_cocci popl popl09 python
+licensify:
+       ocaml tools/licensify.ml 
+       set -e; for i in $(TOLICENSIFY); do cd $$i; ocaml ../tools/licensify.ml; cd ..; done 
+
+# When checking out the source from diku sometimes I have some "X in the future"
+# error messages.
+fixdates:
+       echo do 'touch **/*.*'
+
+#fixCVS:
+#      cvs update -d -P
+#      echo do 'rm -rf **/CVS'
+
+ocamlversion:
+       @echo $(OCAMLVERSION)
+
+
+##############################################################################
+# Pad specific rules
+##############################################################################
+
+#TOP=/home/pad/mobile/project-coccinelle
+WEBSITE=/home/pad/mobile/homepage/software/project-coccinelle
+
+website:
+       cp $(TMP)/$(PACKAGE).tgz                $(WEBSITE)
+       cp $(TMP)/$(PACKAGE)-bin-x86.tgz        $(WEBSITE)
+       cp $(TMP)/$(PACKAGE)-bin-x86-static.tgz $(WEBSITE)
+       cp $(TMP)/$(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz   $(WEBSITE)
+
+
+#TXT=$(wildcard *.txt)
+syncwiki:
+#      unison ~/public_html/wiki/wiki-LFS/data/pages/ docs/wiki/
+#      set -e; for i in $(TXT); do unison $$i docs/wiki/$$i; done 
+
+darcsweb:
+#      @echo pull from ~/public_html/darcs/c-coccinelle and c-commons and lib-xxx
+
+DARCSFORESTS=commons \
+ parsing_c parsing_cocci engine
+
+update_darcs:
+       darcs pull
+       set -e; for i in $(DARCSFORESTS); do cd $$i; darcs pull; cd ..; done 
+
+#darcs diff -u
+diff_darcs:
+       set -e; for i in $(DARCSFORESTS); do cd $$i; darcs diff -u; cd ..; done 
+
+
+##############################################################################
+# Developer rules
+##############################################################################
+
+test: $(TARGET)
+       ./$(TARGET) -testall
+
+testparsing:
+       ./$(TARGET) -D standard.h -parse_c -dir tests/
+
+
+
+# -inline 0  to see all the functions in the profile. 
+# Can also use the profile framework in commons/ and run your program 
+# with -profile.
+forprofiling:
+       $(MAKE) OPTFLAGS="-p -inline 0 " opt
+
+clean::
+       rm -f gmon.out 
+
+tags:
+       otags -no-mli-tags -r  .
+
+dependencygraph:
+       find  -name "*.ml" |grep -v "scripts" | xargs ocamldep -I commons -I globals -I ctl -I parsing_cocci -I parsing_c -I engine -I popl09 -I extra > /tmp/dependfull.depend
+       ocamldot -lr /tmp/dependfull.depend > /tmp/dependfull.dot
+       dot -Tps /tmp/dependfull.dot > /tmp/dependfull.ps
+       ps2pdf /tmp/dependfull.ps /tmp/dependfull.pdf
+
+##############################################################################
+# Misc rules
+##############################################################################
+
+# each member of the project can have its own test.ml. this file is 
+# not under CVS.
+test.ml: 
+       echo "let foo_ctl () = failwith \"there is no foo_ctl formula\"" \
+         > test.ml
+
+beforedepend:: test.ml
+
+
+#INC=$(dir $(shell which ocaml))
+#INCX=$(INC:/=)
+#INCY=$(dir $(INCX))
+#INCZ=$(INCY:/=)/lib/ocaml
+#
+#prim.o: prim.c
+#      gcc -c -o prim.o -I $(INCZ) prim.c
+
+
+##############################################################################
+# Generic ocaml rules
+##############################################################################
+
+.SUFFIXES: .ml .mli .cmo .cmi .cmx
+
+.ml.cmo:
+       $(OCAMLC)    -c $<
+.mli.cmi:
+       $(OCAMLC)    -c $<
+.ml.cmx:
+       $(OCAMLOPT)  -c $<
+
+.ml.mldepend: 
+       $(OCAMLC) -i $<
+
+clean::
+       rm -f *.cm[iox] *.o *.annot
+
+clean::
+       rm -f *~ .*~ *.exe #*#
+
+beforedepend::
+
+depend:: beforedepend
+       $(OCAMLDEP) *.mli *.ml > .depend
+       set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i depend; done
+
+-include .depend
diff --git a/.#cocci.ml.1.290 b/.#cocci.ml.1.290
deleted file mode 100644 (file)
index 6ab9293..0000000
+++ /dev/null
@@ -1,1470 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-open Common
-
-module CCI = Ctlcocci_integration
-module TAC = Type_annoter_c
-
-(*****************************************************************************)
-(* This file is a kind of driver. It gathers all the important functions 
- * from coccinelle in one place. The different entities in coccinelle are:
- *  - files
- *  - astc
- *  - astcocci
- *  - flow (contain nodes)
- *  - ctl  (contain rule_elems)
- * This file contains functions to transform one in another.
- *)
-(*****************************************************************************)
-
-(* --------------------------------------------------------------------- *)
-(* C related *)
-(* --------------------------------------------------------------------- *)
-let cprogram_of_file file = 
-  let (program2, _stat) = Parse_c.parse_print_error_heuristic file in
-  program2 
-
-let cprogram_of_file_cached file = 
-  let (program2, _stat) = Parse_c.parse_cache file in
-  if !Flag_cocci.ifdef_to_if
-  then 
-    program2 +> Parse_c.with_program2 (fun asts -> 
-      Cpp_ast_c.cpp_ifdef_statementize asts
-    )
-  else program2
-
-let cfile_of_program program2_with_ppmethod outf = 
-  Unparse_c.pp_program program2_with_ppmethod outf
-
-(* for memoization, contains only one entry, the one for the SP *)
-let _hparse = Hashtbl.create 101
-let _hctl = Hashtbl.create 101
-
-(* --------------------------------------------------------------------- *)
-(* Cocci related *)
-(* --------------------------------------------------------------------- *)
-let sp_of_file2 file iso   =
-  Common.memoized _hparse (file, iso) (fun () ->
-    Parse_cocci.process file iso false)
-let sp_of_file file iso    = 
-  Common.profile_code "parse cocci" (fun () -> sp_of_file2 file iso)
-
-
-(* --------------------------------------------------------------------- *)
-(* Flow related *)
-(* --------------------------------------------------------------------- *)
-let print_flow flow = 
-  Ograph_extended.print_ograph_mutable flow "/tmp/test.dot" true
-
-
-let ast_to_flow_with_error_messages2 x =
-  let flowopt = 
-    try Ast_to_flow.ast_to_control_flow x
-    with Ast_to_flow.Error x -> 
-      Ast_to_flow.report_error x;
-      None
-  in
-  flowopt +> do_option (fun flow -> 
-    (* This time even if there is a deadcode, we still have a
-     * flow graph, so I can try the transformation and hope the
-     * deadcode will not bother us. 
-     *)
-    try Ast_to_flow.deadcode_detection flow
-    with Ast_to_flow.Error (Ast_to_flow.DeadCode x) -> 
-      Ast_to_flow.report_error (Ast_to_flow.DeadCode x);
-  );
-  flowopt
-let ast_to_flow_with_error_messages a = 
-  Common.profile_code "flow" (fun () -> ast_to_flow_with_error_messages2 a)
-
-
-(* --------------------------------------------------------------------- *)
-(* Ctl related *)
-(* --------------------------------------------------------------------- *)
-let ctls_of_ast2 ast ua pos =
-  List.map2
-    (function ast -> function (ua,pos) ->
-      List.combine
-       (if !Flag_cocci.popl
-       then Popl.popl ast
-       else Asttoctl2.asttoctl ast ua pos)
-       (Asttomember.asttomember ast ua))
-    ast (List.combine ua pos)
-
-let ctls_of_ast ast ua =
-  Common.profile_code "asttoctl2" (fun () -> ctls_of_ast2 ast ua)
-
-(*****************************************************************************)
-(* Some  debugging functions *)
-(*****************************************************************************)
-
-(* the inputs *)
-
-let show_or_not_cfile2 cfile =
-  if !Flag_cocci.show_c then begin
-    Common.pr2_xxxxxxxxxxxxxxxxx ();
-    pr2 ("processing C file: " ^ cfile);
-    Common.pr2_xxxxxxxxxxxxxxxxx ();
-    Common.command2 ("cat " ^ cfile);
-  end
-let show_or_not_cfile a = 
-  Common.profile_code "show_xxx" (fun () -> show_or_not_cfile2 a)
-
-let show_or_not_cfiles cfiles = List.iter show_or_not_cfile cfiles
-
-
-let show_or_not_cocci2 coccifile isofile = 
-  if !Flag_cocci.show_cocci then begin
-    Common.pr2_xxxxxxxxxxxxxxxxx ();
-    pr2 ("processing semantic patch file: " ^ coccifile);
-    isofile +> (fun s -> pr2 ("with isos from: " ^ s));
-    Common.pr2_xxxxxxxxxxxxxxxxx ();
-    Common.command2 ("cat " ^ coccifile);
-    pr2 "";
-  end
-let show_or_not_cocci a b = 
-  Common.profile_code "show_xxx" (fun () -> show_or_not_cocci2 a b)
-
-
-(* the output *)
-
-let show_or_not_diff2 cfile outfile show_only_minus = 
-  if !Flag_cocci.show_diff then begin
-    match Common.fst(Compare_c.compare_default cfile outfile) with
-      Compare_c.Correct -> () (* diff only in spacing, etc *)
-    | _ ->
-        (* may need --strip-trailing-cr under windows *)
-       pr2 "diff = ";
-
-       let line =
-         match !Flag_parsing_c.diff_lines with
-         | None ->   "diff -u -p " ^ cfile ^ " " ^ outfile
-         | Some n -> "diff -U "^n^" -p "^cfile^" "^outfile in
-       let xs =
-         let res = Common.cmd_to_list line in
-         match (!Flag.patch,res) with
-       (* create something that looks like the output of patch *)
-           (Some prefix,minus_file::plus_file::rest) ->
-             let drop_prefix file =
-               if prefix = ""
-               then "/"^file
-               else
-                 (match Str.split (Str.regexp prefix) file with
-                   [base_file] -> base_file
-                 | _ -> failwith "prefix not found in the old file name") in
-             let diff_line =
-               match List.rev(Str.split (Str.regexp " ") line) with
-                 new_file::old_file::cmdrev ->
-                   if !Flag.sgrep_mode2
-                   then
-                     String.concat " "
-                       (List.rev ("/tmp/nothing" :: old_file :: cmdrev))
-                   else
-                     let old_base_file = drop_prefix old_file in
-                     String.concat " "
-                       (List.rev
-                          (("b"^old_base_file)::("a"^old_base_file)::cmdrev))
-               | _ -> failwith "bad command" in
-             let (minus_line,plus_line) =
-               if !Flag.sgrep_mode2
-               then (minus_file,plus_file)
-               else
-                 match (Str.split (Str.regexp "[ \t]") minus_file,
-                        Str.split (Str.regexp "[ \t]") plus_file) with
-                   ("---"::old_file::old_rest,"+++"::new_file::new_rest) ->
-                     let old_base_file = drop_prefix old_file in
-                     (String.concat " "
-                        ("---"::("a"^old_base_file)::old_rest),
-                      String.concat " "
-                        ("+++"::("b"^old_base_file)::new_rest))
-                 | (l1,l2) ->
-                     failwith
-                       (Printf.sprintf "bad diff header lines: %s %s"
-                          (String.concat ":" l1) (String.concat ":" l2)) in
-             diff_line::minus_line::plus_line::rest
-         |     _ -> res in
-       xs +> List.iter (fun s -> 
-         if s =~ "^\\+" && show_only_minus
-         then ()
-         else pr s)
-  end
-let show_or_not_diff a b c  = 
-  Common.profile_code "show_xxx" (fun () -> show_or_not_diff2 a b c)
-    
-    
-(* the derived input *)
-    
-let show_or_not_ctl_tex2 astcocci ctls =
-  if !Flag_cocci.show_ctl_tex then begin
-    Ctltotex.totex ("/tmp/__cocci_ctl.tex") astcocci ctls;
-    Common.command2 ("cd /tmp; latex __cocci_ctl.tex; " ^
-                    "dvips __cocci_ctl.dvi -o __cocci_ctl.ps;" ^
-                    "gv __cocci_ctl.ps &");
-  end
-let show_or_not_ctl_tex a b  = 
-  Common.profile_code "show_xxx" (fun () -> show_or_not_ctl_tex2 a b)
-    
-    
-    
-let show_or_not_rule_name ast rulenb =
-  if !Flag_cocci.show_ctl_text or !Flag.show_trying or
-    !Flag_cocci.show_transinfo or !Flag_cocci.show_binding_in_out
-  then
-    begin
-      let name =
-       match ast with
-         Ast_cocci.CocciRule (nm, (deps, drops, exists), x, _) -> nm
-       | _ -> i_to_s rulenb in
-      Common.pr_xxxxxxxxxxxxxxxxx ();
-      pr (name ^ " = ");
-      Common.pr_xxxxxxxxxxxxxxxxx ()
-    end
-
-let show_or_not_scr_rule_name rulenb =
-  if !Flag_cocci.show_ctl_text or !Flag.show_trying or
-    !Flag_cocci.show_transinfo or !Flag_cocci.show_binding_in_out
-  then
-    begin
-      let name = i_to_s rulenb in
-      Common.pr_xxxxxxxxxxxxxxxxx ();
-      pr ("script rule " ^ name ^ " = ");
-      Common.pr_xxxxxxxxxxxxxxxxx ()
-    end
-
-let show_or_not_ctl_text2 ctl ast rulenb =
-  if !Flag_cocci.show_ctl_text then begin
-    
-    adjust_pp_with_indent (fun () -> 
-      Format.force_newline();
-      Pretty_print_cocci.print_plus_flag := true;
-      Pretty_print_cocci.print_minus_flag := true;
-      Pretty_print_cocci.unparse ast;
-      );
-    
-    pr "CTL = ";
-    let (ctl,_) = ctl in
-    adjust_pp_with_indent (fun () -> 
-      Format.force_newline();
-      Pretty_print_engine.pp_ctlcocci 
-        !Flag_cocci.show_mcodekind_in_ctl !Flag_cocci.inline_let_ctl ctl;
-      );
-    pr "";
-  end
-let show_or_not_ctl_text a b c =
-      Common.profile_code "show_xxx" (fun () -> show_or_not_ctl_text2 a b c)
-
-
-
-(* running information *)
-let get_celem celem : string = 
-  match celem with 
-      Ast_c.Definition ({Ast_c.f_name = funcs;},_) -> funcs
-    | Ast_c.Declaration
-       (Ast_c.DeclList ([{Ast_c.v_namei = Some ((s, _),_);}, _], _)) -> s
-    | _ -> ""
-
-let show_or_not_celem2 prelude celem = 
-  let (tag,trying) =
-  (match celem with 
-  | Ast_c.Definition ({Ast_c.f_name = funcs;},_) -> 
-      Flag.current_element := funcs;
-      (" function: ",funcs)
-  | Ast_c.Declaration
-      (Ast_c.DeclList ([{Ast_c.v_namei = Some ((s, _),_);}, _], _)) ->
-      Flag.current_element := s;
-      (" variable ",s);
-  | _ ->
-      Flag.current_element := "something_else";
-      (" ","something else");
-  ) in
-  if !Flag.show_trying then pr2 (prelude ^ tag ^ trying)
-  
-let show_or_not_celem a b  = 
-  Common.profile_code "show_xxx" (fun () -> show_or_not_celem2 a b)
-
-
-let show_or_not_trans_info2 trans_info = 
-  if !Flag_cocci.show_transinfo then begin
-    if null trans_info then pr2 "transformation info is empty"
-    else begin
-      pr2 "transformation info returned:";
-      let trans_info =
-        List.sort (function (i1,_,_) -> function (i2,_,_) -> compare i1 i2)
-          trans_info 
-      in
-      indent_do (fun () -> 
-        trans_info +> List.iter (fun (i, subst, re) -> 
-          pr2 ("transform state: " ^ (Common.i_to_s i));
-          indent_do (fun () -> 
-            adjust_pp_with_indent_and_header "with rule_elem: " (fun () -> 
-              Pretty_print_cocci.print_plus_flag := true;
-              Pretty_print_cocci.print_minus_flag := true;
-              Pretty_print_cocci.rule_elem "" re;
-            );
-            adjust_pp_with_indent_and_header "with binding: " (fun () -> 
-              Pretty_print_engine.pp_binding subst;
-            );
-          )
-        );
-      )
-    end
-  end
-let show_or_not_trans_info a  = 
-  Common.profile_code "show_xxx" (fun () -> show_or_not_trans_info2 a)
-
-
-
-let show_or_not_binding2 s binding =
-  if !Flag_cocci.show_binding_in_out then begin
-    adjust_pp_with_indent_and_header ("binding " ^ s ^ " = ") (fun () -> 
-      Pretty_print_engine.pp_binding binding
-    )
-  end
-let show_or_not_binding a b  = 
-  Common.profile_code "show_xxx" (fun () -> show_or_not_binding2 a b)
-
-
-
-(*****************************************************************************)
-(* Some  helper functions *)
-(*****************************************************************************)
-
-let worth_trying cfiles tokens = 
-  (* drop the following line for a list of list by rules.  since we don't
-     allow multiple minirules, all the tokens within a rule should be in
-     a single CFG entity *)
-  let tokens = Common.union_all tokens in
-  if not !Flag_cocci.windows && not (null tokens)
-  then
-   (* could also modify the code in get_constants.ml *)
-    let tokens = tokens +> List.map (fun s -> 
-      match () with 
-      | _ when s =~ "^[A-Za-z_][A-Za-z_0-9]*$" -> 
-          "\\b" ^ s ^ "\\b"
-
-      | _ when s =~ "^[A-Za-z_]" -> 
-          "\\b" ^ s
-
-      | _ when s =~ ".*[A-Za-z_]$" -> 
-          s ^ "\\b"
-      | _ -> s
-
-    ) in
-    let com = sprintf "egrep -q '(%s)' %s" (join "|" tokens) (join " " cfiles)
-    in
-    (match Sys.command com with
-    | 0 (* success *) -> true
-    | _ (* failure *) ->
-       (if !Flag.show_misc
-       then Printf.printf "grep failed: %s\n" com);
-       false (* no match, so not worth trying *)
-    )
-  else true
-
-let check_macro_in_sp_and_adjust tokens = 
-  let tokens = Common.union_all tokens in
-  tokens +> List.iter (fun s -> 
-    if Hashtbl.mem !Parsing_hacks._defs s
-    then begin
-      pr2 "warning: macro in semantic patch was in macro definitions";
-      pr2 ("disabling macro expansion for " ^ s);
-      Hashtbl.remove !Parsing_hacks._defs s
-    end
-  )
-
-
-let contain_loop gopt = 
-  match gopt with
-  | Some g -> 
-      g#nodes#tolist +> List.exists (fun (xi, node) -> 
-        Control_flow_c.extract_is_loop node
-      )
-  | None -> true (* means nothing, if no g then will not model check *)
-
-
-
-let sp_contain_typed_metavar_z toplevel_list_list = 
-  let bind x y = x or y in
-  let option_default = false in
-  let mcode _ _ = option_default in
-  let donothing r k e = k e in
-
-  let expression r k e =
-    match Ast_cocci.unwrap e with
-    | Ast_cocci.MetaExpr (_,_,_,Some t,_,_) -> true
-    | Ast_cocci.MetaExpr (_,_,_,_,Ast_cocci.LocalID,_) -> true
-    | _ -> k e 
-  in
-
-  let combiner = 
-    Visitor_ast.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing
-      donothing expression donothing donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing 
-  in
-  toplevel_list_list +> 
-    List.exists
-    (function (nm,_,rule) ->
-      (List.exists combiner.Visitor_ast.combiner_top_level rule))
-    
-
-let sp_contain_typed_metavar rules =
-  sp_contain_typed_metavar_z 
-    (List.map
-       (function x ->
-        match x with
-          Ast_cocci.CocciRule (a,b,c,d) -> (a,b,c)
-        | _ -> failwith "error in filter")
-    (List.filter
-       (function x ->
-        match x with Ast_cocci.CocciRule _ -> true | _ -> false)
-       rules))
-
-
-
-(* finding among the #include the one that we need to parse
- * because they may contain useful type definition or because
- * we may have to modify them
- * 
- * For the moment we base in part our heuristic on the name of the file, e.g.
- * serio.c is related we think to #include <linux/serio.h> 
- *)
-
-let (includes_to_parse: (Common.filename * Parse_c.program2) list -> 'a) = fun xs ->
-  if !Flag_cocci.no_includes
-  then []
-  else
-    xs +> List.map (fun (file, cs) -> 
-      let dir = Common.dirname file in
-      
-      cs +> Common.map_filter (fun (c,_info_item) -> 
-       match c with
-       | Ast_c.CppTop (Ast_c.Include {Ast_c.i_include = ((x,ii));
-                         i_rel_pos = info_h_pos;})  -> 
-            (match x with
-            | Ast_c.Local xs -> 
-               let f = Filename.concat dir (Common.join "/" xs) in
-             (* for our tests, all the files are flat in the current dir *)
-               if not (Sys.file_exists f) && !Flag_cocci.relax_include_path
-               then
-                 let attempt2 = Filename.concat dir (Common.last xs) in
-                 if not (Sys.file_exists f) && !Flag_cocci.all_includes
-                 then Some (Filename.concat !Flag_cocci.include_path 
-                               (Common.join "/" xs))
-                 else Some attempt2
-               else Some f
-                   
-            | Ast_c.NonLocal xs -> 
-               if !Flag_cocci.all_includes ||
-               Common.fileprefix (Common.last xs) = Common.fileprefix file
-               then 
-                  Some (Filename.concat !Flag_cocci.include_path 
-                          (Common.join "/" xs))
-               else None
-            | Ast_c.Wierd _ -> None
-                 )
-       | _ -> None
-             )
-       )
-      +> List.concat
-      +> Common.uniq
-      
-let rec interpret_dependencies local global = function
-    Ast_cocci.Dep s      -> List.mem s local
-  | Ast_cocci.AntiDep s  ->
-      (if !Flag_ctl.steps != None
-      then failwith "steps and ! dependency incompatible");
-      not (List.mem s local)
-  | Ast_cocci.EverDep s  -> List.mem s global
-  | Ast_cocci.NeverDep s ->
-      (if !Flag_ctl.steps != None
-      then failwith "steps and ! dependency incompatible");
-      not (List.mem s global)
-  | Ast_cocci.AndDep(s1,s2) ->
-      (interpret_dependencies local global s1) &&
-      (interpret_dependencies local global s2)
-  | Ast_cocci.OrDep(s1,s2)  ->
-      (interpret_dependencies local global s1) or
-      (interpret_dependencies local global s2)
-  | Ast_cocci.NoDep -> true
-       
-let rec print_dependencies str local global dep =
-  if !Flag_cocci.show_dependencies
-  then
-    begin
-      pr2 str;
-      let seen = ref [] in
-      let rec loop = function
-         Ast_cocci.Dep s | Ast_cocci.AntiDep s ->
-           if not (List.mem s !seen)
-           then
-             begin
-               if List.mem s local
-               then pr2 (s^" satisfied")
-               else pr2 (s^" not satisfied");
-               seen := s :: !seen
-             end 
-       | Ast_cocci.EverDep s | Ast_cocci.NeverDep s ->
-           if not (List.mem s !seen)
-           then
-             begin
-               if List.mem s global
-               then pr2 (s^" satisfied")
-               else pr2 (s^" not satisfied");
-               seen := s :: !seen
-             end
-       | Ast_cocci.AndDep(s1,s2) ->
-           loop s1;
-           loop s2
-       | Ast_cocci.OrDep(s1,s2)  ->
-           loop s1;
-           loop s2
-       | Ast_cocci.NoDep -> () in
-      loop dep
-    end
-    
-    
-    
-(* --------------------------------------------------------------------- *)
-(* #include relative position in the file *)
-(* --------------------------------------------------------------------- *)
-    
-(* compute the set of new prefixes
- * on 
- *  "a/b/x"; (* in fact it is now a list of string so  ["a";"b";"x"] *)
- *  "a/b/c/x";
- *  "a/x";
- *  "b/x";
- * it would give for the first element 
- *   ""; "a"; "a/b"; "a/b/x"
- * for the second
- *   "a/b/c/x"
- * 
- * update: if the include is inside a ifdef a put nothing. cf -test incl.
- * this is because we dont want code added inside ifdef.
- *)
-
-let compute_new_prefixes xs = 
-  xs +> Common.map_withenv (fun already xs -> 
-    let subdirs_prefixes = Common.inits xs in
-    let new_first = subdirs_prefixes +> List.filter (fun x -> 
-      not (List.mem x already)
-    )
-    in
-    new_first, 
-    new_first @ already
-  ) []
-  +> fst
-
-
-(* does via side effect on the ref in the Include in Ast_c *)
-let rec update_include_rel_pos cs =
-  let only_include = cs +> Common.map_filter (fun c -> 
-    match c with 
-    | Ast_c.CppTop (Ast_c.Include {Ast_c.i_include = ((x,_));
-                     i_rel_pos = aref;
-                     i_is_in_ifdef = inifdef}) ->
-        (match x with
-        | Ast_c.Wierd _ -> None
-        | _ -> 
-            if inifdef 
-            then None
-            else Some (x, aref)
-        )
-    | _ -> None
-  )
-  in
-  let (locals, nonlocals) = 
-    only_include +> Common.partition_either (fun (c, aref)  -> 
-      match c with
-      | Ast_c.Local x -> Left (x, aref)
-      | Ast_c.NonLocal x -> Right (x, aref)
-      | Ast_c.Wierd x -> raise Impossible
-    ) in
-
-  update_rel_pos_bis locals;
-  update_rel_pos_bis nonlocals;
-  cs
-and update_rel_pos_bis xs = 
-  let xs' = List.map fst xs in
-  let the_first = compute_new_prefixes xs' in
-  let the_last  = List.rev (compute_new_prefixes (List.rev xs')) in
-  let merged = Common.zip xs (Common.zip the_first the_last) in
-  merged +> List.iter (fun ((x, aref), (the_first, the_last)) -> 
-    aref := Some 
-      { 
-        Ast_c.first_of = the_first;
-        Ast_c.last_of = the_last;
-      }
-  )
-        
-
-
-
-
-
-(*****************************************************************************)
-(* All the information needed around the C elements and Cocci rules *)
-(*****************************************************************************)
-
-type toplevel_c_info = { 
-  ast_c: Ast_c.toplevel; (* contain refs so can be modified *)
-  tokens_c: Parser_c.token list;
-  fullstring: string;
-
-  flow: Control_flow_c.cflow option; (* it's the "fixed" flow *)
-  contain_loop: bool;
-  
-  env_typing_before: TAC.environment;
-  env_typing_after:  TAC.environment;
-
-  was_modified: bool ref;
-
-  (* id: int *)
-}
-
-type toplevel_cocci_info_script_rule = {
-  scr_ast_rule: string * (string * (string * string)) list * string;
-  language: string;
-  scr_dependencies: Ast_cocci.dependency;
-  scr_ruleid: int;
-  script_code: string;
-}
-
-type toplevel_cocci_info_cocci_rule = {
-  ctl: Lib_engine.ctlcocci * (CCI.pred list list);
-  ast_rule: Ast_cocci.rule;
-  isexp: bool; (* true if + code is an exp, only for Flag.make_hrule *)
-
-  rulename: string;
-  dependencies: Ast_cocci.dependency;
-  (* There are also some hardcoded rule names in parse_cocci.ml:
-   *  let reserved_names = ["all";"optional_storage";"optional_qualifier"] 
-   *)
-  dropped_isos: string list;
-  free_vars:  Ast_cocci.meta_name list;
-  negated_pos_vars:  Ast_cocci.meta_name list;
-  used_after: Ast_cocci.meta_name list;
-  positions: Ast_cocci.meta_name list;
-
-  ruleid: int;
-
-  was_matched: bool ref;
-}
-
-type toplevel_cocci_info = 
-    ScriptRuleCocciInfo of toplevel_cocci_info_script_rule
-  | CocciRuleCocciInfo of toplevel_cocci_info_cocci_rule
-
-type kind_file = Header | Source 
-type file_info = { 
-  fname : string;
-  full_fname : string;
-  was_modified_once: bool ref;
-  asts: toplevel_c_info list;
-  fpath : string;
-  fkind : kind_file;
-}
-
-let g_contain_typedmetavar = ref false 
-
-
-let last_env_toplevel_c_info xs =
-  (Common.last xs).env_typing_after
-
-let concat_headers_and_c (ccs: file_info list) 
-    : (toplevel_c_info * string) list = 
-  (List.concat (ccs +> List.map (fun x -> 
-                                  x.asts +> List.map (fun x' ->
-                                                        (x', x.fname)))))
-
-let for_unparser xs = 
-  xs +> List.map (fun x -> 
-    (x.ast_c, (x.fullstring, x.tokens_c)), Unparse_c.PPviastr
-  )
-
-let gen_pdf_graph () =
-  (Ctl_engine.get_graph_files ()) +> List.iter (fun outfile -> 
-  Printf.printf "Generation of %s%!" outfile;
-  let filename_stack = Ctl_engine.get_graph_comp_files outfile in
-  List.iter (fun filename ->
-    ignore (Unix.system ("dot " ^ filename ^ " -Tpdf  -o " ^ filename ^ ".pdf;"))
-           ) filename_stack;
-  let (head,tail) = (List.hd filename_stack, List.tl filename_stack) in
-    ignore(Unix.system ("cp " ^ head ^ ".pdf " ^ outfile ^ ".pdf;"));
-    tail +> List.iter (fun filename ->
-      ignore(Unix.system ("mv " ^ outfile ^ ".pdf /tmp/tmp.pdf;"));
-      ignore(Unix.system ("pdftk " ^ filename ^ ".pdf /tmp/tmp.pdf cat output " ^ outfile ^ ".pdf"));
-             );
-    ignore(Unix.system ("rm /tmp/tmp.pdf;"));
-    List.iter (fun filename ->
-       ignore (Unix.system ("rm " ^ filename ^ " " ^ filename ^ ".pdf;"))
-           ) filename_stack;
-  Printf.printf " - Done\n")
-
-
-(* --------------------------------------------------------------------- *)
-let prepare_cocci ctls free_var_lists negated_pos_lists
-    used_after_lists positions_list astcocci = 
-
-  let gathered = Common.index_list_1
-      (zip (zip (zip (zip (zip ctls astcocci) free_var_lists)
-                  negated_pos_lists) used_after_lists) positions_list)
-  in
-  gathered +> List.map 
-    (fun ((((((ctl_toplevel_list,ast),free_var_list),negated_pos_list),
-          used_after_list),
-          positions_list),rulenb) -> 
-      
-      let is_script_rule r =
-        match r with Ast_cocci.ScriptRule _ -> true | _ -> false in
-
-      if not (List.length ctl_toplevel_list = 1) && not (is_script_rule ast)
-      then failwith "not handling multiple minirules";
-
-      match ast with
-        Ast_cocci.ScriptRule (lang,deps,mv,code) ->
-          let r = 
-          {
-            scr_ast_rule = (lang, mv, code);
-            language = lang;
-            scr_dependencies = deps;
-            scr_ruleid = rulenb;
-            script_code = code;
-          }
-          in ScriptRuleCocciInfo r
-      | Ast_cocci.CocciRule
-         (rulename,(dependencies,dropped_isos,z),restast,isexp) ->
-          CocciRuleCocciInfo (
-          {
-            ctl = List.hd ctl_toplevel_list;
-            ast_rule = ast;
-           isexp = List.hd isexp;
-            rulename = rulename;
-            dependencies = dependencies;
-            dropped_isos = dropped_isos;
-            free_vars = List.hd free_var_list;
-            negated_pos_vars = List.hd negated_pos_list;
-            used_after = List.hd used_after_list;
-            positions = List.hd positions_list;
-            ruleid = rulenb;
-            was_matched = ref false;
-          })
-    )
-
-
-(* --------------------------------------------------------------------- *)
-
-let build_info_program cprogram env = 
-  let (cs, parseinfos) = Common.unzip cprogram in
-  let (cs, envs) =
-    Common.unzip (TAC.annotate_program env !g_contain_typedmetavar cs) in
-
-  zip (zip cs parseinfos) envs +> List.map (fun ((c, parseinfo), (enva,envb))->
-    let (fullstr, tokens) = parseinfo in
-
-    let flow = 
-      ast_to_flow_with_error_messages c +> Common.map_option (fun flow -> 
-        let flow = Ast_to_flow.annotate_loop_nodes flow in
-
-        (* remove the fake nodes for julia *)
-        let fixed_flow = CCI.fix_flow_ctl flow in
-
-        if !Flag_cocci.show_flow then print_flow fixed_flow;
-        if !Flag_cocci.show_before_fixed_flow then print_flow flow;
-
-        fixed_flow
-      )
-    in
-
-    {
-      ast_c = c; (* contain refs so can be modified *)
-      tokens_c =  tokens;
-      fullstring = fullstr;
-
-      flow = flow;
-
-      contain_loop = contain_loop flow;
-  
-      env_typing_before = enva;
-      env_typing_after = envb;
-
-      was_modified = ref false;
-    }
-  )
-
-
-
-(* Optimisation. Try not unparse/reparse the whole file when have modifs  *)
-let rebuild_info_program cs file isexp = 
-  cs +> List.map (fun c ->
-    if !(c.was_modified)
-    then
-      (match !Flag.make_hrule with
-       Some dir ->
-         Unparse_hrule.pp_program (c.ast_c, (c.fullstring, c.tokens_c))
-           dir file isexp;
-         []
-      |        None ->
-         let file = Common.new_temp_file "cocci_small_output" ".c" in
-         cfile_of_program 
-            [(c.ast_c, (c.fullstring, c.tokens_c)), Unparse_c.PPnormal] 
-            file;
-         
-          (* Common.command2 ("cat " ^ file); *)
-         let cprogram = cprogram_of_file file in
-         let xs = build_info_program cprogram c.env_typing_before in
-         
-          (* TODO: assert env has not changed,
-           * if yes then must also reparse what follows even if not modified.
-           * Do that only if contain_typedmetavar of course, so good opti.
-          *)
-          (* Common.list_init xs *) (* get rid of the FinalDef *)
-         xs)
-    else [c]
-  ) +> List.concat
-
-
-let rebuild_info_c_and_headers ccs isexp =
-  ccs +> List.iter (fun c_or_h -> 
-    if c_or_h.asts +> List.exists (fun c -> !(c.was_modified))
-    then c_or_h.was_modified_once := true;
-  );
-  ccs +> List.map (fun c_or_h -> 
-    { c_or_h with
-      asts = rebuild_info_program c_or_h.asts c_or_h.full_fname isexp }
-  )
-
-
-
-
-
-
-
-let prepare_c files : file_info list = 
-  let cprograms = List.map cprogram_of_file_cached files in
-  let includes = includes_to_parse (zip files cprograms) in
-
-  (* todo?: may not be good to first have all the headers and then all the c *)
-  let all = 
-    (includes +> List.map (fun hpath -> Right hpath))
-    ++
-    ((zip files cprograms) +> List.map (fun (file, asts) -> Left (file, asts)))
-  in
-
-  let env = ref TAC.initial_env in
-
-  let ccs = all +> Common.map_filter (fun x -> 
-    match x with 
-    | Right hpath -> 
-        if not (Common.lfile_exists hpath) 
-        then begin 
-          pr2 ("TYPE: header " ^ hpath ^ " not found"); 
-          None 
-        end
-        else 
-          let h_cs = cprogram_of_file_cached hpath in
-          let info_h_cs = build_info_program h_cs !env in
-          env := 
-            if null info_h_cs
-            then !env
-            else last_env_toplevel_c_info info_h_cs
-          ;
-          Some { 
-            fname = Common.basename hpath;
-            full_fname = hpath;
-            asts = info_h_cs;
-            was_modified_once = ref false;
-            fpath = hpath;
-            fkind = Header;
-          }
-    | Left (file, cprogram) -> 
-        (* todo?: don't update env ? *)
-        let cs = build_info_program cprogram !env in
-        (* we do that only for the c, not for the h *)
-        ignore(update_include_rel_pos (cs +> List.map (fun x -> x.ast_c)));
-        Some { 
-          fname = Common.basename file;
-          full_fname = file;
-          asts = cs;
-          was_modified_once = ref false;
-          fpath = file;
-          fkind = Source;
-        }
-  ) 
-  in
-  ccs        
-
-
-(*****************************************************************************)
-(* Processing the ctls and toplevel C elements *)
-(*****************************************************************************)
-
-(* The main algorithm =~
- * The algorithm is roughly: 
- *  for_all ctl rules in SP
- *   for_all minirule in rule (no more)
- *    for_all binding (computed during previous phase)
- *      for_all C elements
- *         match control flow of function vs minirule 
- *         with the binding and update the set of possible 
- *         bindings, and returned the possibly modified function.
- *   pretty print modified C elements and reparse it.
- *
- * 
- * On ne prends que les newbinding ou returned_any_state est vrai.
- * Si ca ne donne rien, on prends ce qu'il y avait au depart.
- * Mais au nouveau depart de quoi ?  
- * - si ca donne rien apres avoir traité toutes les fonctions avec ce binding ?
- * - ou alors si ca donne rien, apres avoir traité toutes les fonctions 
- *   avec tous les bindings du round d'avant ?
- * 
- * Julia pense qu'il faut prendre la premiere solution.
- * Example: on a deux environnements candidats, E1 et E2 apres avoir traité
- * la regle ctl 1. On arrive sur la regle ctl 2.
- * E1 ne donne rien pour la regle 2, on garde quand meme E1 pour la regle 3.
- * E2 donne un match a un endroit et rend E2' alors on utilise ca pour
- * la regle 3.
- * 
- * I have not to look at used_after_list to decide to restart from
- * scratch. I just need to look if the binding list is empty.
- * Indeed, let's suppose that a SP have 3 regions/rules. If we
- * don't find a match for the first region, then if this first
- * region does not bind metavariable used after, that is if
- * used_after_list is empty, then mysat(), even if does not find a
- * match, will return a Left, with an empty transformation_info,
- * and so current_binding will grow. On the contrary if the first
- * region must bind some metavariables used after, and that we
- * dont find any such region, then mysat() will returns lots of
- * Right, and current_binding will not grow, and so we will have
- * an empty list of binding, and we will catch such a case. 
- *
- * opti: julia says that because the binding is
- * determined by the used_after_list, the items in the list
- * are kind of sorted, so could optimise the insert_set operations.
- *)
-
-
-(* r(ule), c(element in C code), e(nvironment) *)
-
-let rec apply_python_rule r cache newes e rules_that_have_matched
-    rules_that_have_ever_matched =
-  show_or_not_scr_rule_name r.scr_ruleid;
-  if not(interpret_dependencies rules_that_have_matched
-          !rules_that_have_ever_matched r.scr_dependencies)
-  then
-    begin
-      print_dependencies "dependencies for script not satisfied:"
-       rules_that_have_matched
-       !rules_that_have_ever_matched r.scr_dependencies;
-      show_or_not_binding "in environment" e;
-      (cache, (e, rules_that_have_matched)::newes)
-    end
-  else
-    begin
-      let (_, mv, _) = r.scr_ast_rule in
-      if List.for_all (Pycocci.contains_binding e) mv
-      then
-       begin
-         let relevant_bindings =
-           List.filter
-             (function ((re,rm),_) ->
-               List.exists (function (_,(r,m)) -> r = re && m = rm) mv)
-             e in
-         let new_cache =
-           if List.mem relevant_bindings cache
-           then cache
-           else
-             begin
-               print_dependencies "dependencies for script satisfied:"
-                 rules_that_have_matched
-                 !rules_that_have_ever_matched r.scr_dependencies;
-               show_or_not_binding "in" e;
-               Pycocci.build_classes (List.map (function (x,y) -> x) e);
-               Pycocci.construct_variables mv e;
-               let _ = Pycocci.pyrun_simplestring
-                 ("import coccinelle\nfrom coccinelle "^
-                  "import *\ncocci = Cocci()\n" ^
-                  r.script_code) in
-               relevant_bindings :: cache
-             end in
-         if !Pycocci.inc_match
-         then (new_cache, merge_env [(e, rules_that_have_matched)] newes)
-         else (new_cache, newes)
-       end
-      else (cache, merge_env [(e, rules_that_have_matched)] newes)
-    end
-
-and apply_cocci_rule r rules_that_have_ever_matched es (ccs:file_info list ref) =
-  Common.profile_code r.rulename (fun () -> 
-    show_or_not_rule_name r.ast_rule r.ruleid;
-    show_or_not_ctl_text r.ctl r.ast_rule r.ruleid;
-
-    let reorganized_env =
-      reassociate_positions r.free_vars r.negated_pos_vars !es in
-
-    (* looping over the environments *)
-    let (_,newes (* envs for next round/rule *)) =
-      List.fold_left
-       (function (cache,newes) ->
-         function ((e,rules_that_have_matched),relevant_bindings) ->
-           if not(interpret_dependencies rules_that_have_matched
-                    !rules_that_have_ever_matched r.dependencies)
-           then
-             begin
-               print_dependencies
-                 ("dependencies for rule "^r.rulename^" not satisfied:")
-                 rules_that_have_matched
-                 !rules_that_have_ever_matched r.dependencies;
-               show_or_not_binding "in environment" e;
-               (cache,
-                merge_env
-                  [(e +> List.filter (fun (s,v) -> List.mem s r.used_after),
-                    rules_that_have_matched)]
-                  newes)
-             end
-           else
-             let new_bindings =
-               try List.assoc relevant_bindings cache
-               with
-                 Not_found ->
-                   print_dependencies
-                     ("dependencies for rule "^r.rulename^" satisfied:")
-                     rules_that_have_matched
-                     !rules_that_have_ever_matched r.dependencies;
-                   show_or_not_binding "in" e;
-                   show_or_not_binding "relevant in" relevant_bindings;
-
-                   let children_e = ref [] in
-      
-                      (* looping over the functions and toplevel elements in
-                        .c and .h *)
-                   concat_headers_and_c !ccs +> List.iter (fun (c,f) -> 
-                     if c.flow <> None 
-                     then
-                        (* does also some side effects on c and r *)
-                       let processed =
-                         process_a_ctl_a_env_a_toplevel r relevant_bindings
-                           c f in
-                       match processed with
-                       | None -> ()
-                       | Some newbindings -> 
-                           newbindings +> List.iter (fun newbinding -> 
-                             children_e :=
-                               Common.insert_set newbinding !children_e)
-                             ); (* end iter cs *)
-
-                   !children_e in
-             let old_bindings_to_keep =
-               Common.nub
-                 (e +> List.filter (fun (s,v) -> List.mem s r.used_after)) in
-             let new_e =
-               if null new_bindings
-               then
-                 begin
-                 (*use the old bindings, specialized to the used_after_list*)
-                   if !Flag_ctl.partial_match
-                   then
-                     printf
-                       "Empty list of bindings, I will restart from old env";
-                   [(old_bindings_to_keep,rules_that_have_matched)]
-                 end
-               else
-               (* combine the new bindings with the old ones, and
-                  specialize to the used_after_list *)
-                 let old_variables = List.map fst old_bindings_to_keep in
-                 (* have to explicitly discard the inherited variables
-                    because we want the inherited value of the positions
-                    variables not the extended one created by
-                    reassociate_positions. want to reassociate freshly
-                    according to the free variables of each rule. *)
-                 let new_bindings_to_add =
-                   Common.nub
-                     (new_bindings +>
-                      List.map
-                        (List.filter
-                           (fun (s,v) ->
-                             List.mem s r.used_after &&
-                             not (List.mem s old_variables)))) in
-                 List.map
-                   (function new_binding_to_add ->
-                     (List.sort compare
-                        (Common.union_set
-                           old_bindings_to_keep new_binding_to_add),
-                      r.rulename::rules_that_have_matched))
-                   new_bindings_to_add in
-             ((relevant_bindings,new_bindings)::cache,
-              merge_env new_e newes))
-       ([],[]) reorganized_env in (* end iter es *)
-    if !(r.was_matched)
-    then Common.push2 r.rulename rules_that_have_ever_matched;
-
-    es := newes;
-
-    (* apply the tagged modifs and reparse *)
-    if not !Flag.sgrep_mode2
-    then ccs := rebuild_info_c_and_headers !ccs r.isexp
-  )
-
-and merge_env new_e old_e =
-  List.fold_left
-    (function old_e ->
-      function (e,rules) as elem ->
-       let (same,diff) = List.partition (function (e1,_) -> e = e1) old_e in
-       match same with
-         [] -> elem :: old_e
-       | [(_,old_rules)] -> (e,Common.union_set rules old_rules) :: diff
-       | _ -> failwith "duplicate environment entries")
-    old_e new_e
-
-and bigloop2 rs (ccs: file_info list) = 
-  let es = ref [(Ast_c.emptyMetavarsBinding,[])] in
-  let ccs = ref ccs in
-  let rules_that_have_ever_matched = ref [] in
-
-  (* looping over the rules *)
-  rs +> List.iter (fun r -> 
-    match r with
-      ScriptRuleCocciInfo r -> 
-       if !Flag_cocci.show_ctl_text then begin
-          Common.pr_xxxxxxxxxxxxxxxxx ();
-          pr ("script: " ^ r.language);
-          Common.pr_xxxxxxxxxxxxxxxxx ();
-         
-          adjust_pp_with_indent (fun () -> 
-            Format.force_newline();
-            let (l,mv,code) = r.scr_ast_rule in
-           let deps = r.scr_dependencies in
-            Pretty_print_cocci.unparse
-             (Ast_cocci.ScriptRule (l,deps,mv,code)));
-       end;
-
-       if !Flag.show_misc then print_endline "RESULT =";
-
-        let (_, newes) =
-          List.fold_left
-            (function (cache, newes) ->
-              function (e, rules_that_have_matched) ->
-               match r.language with
-                  "python" ->
-                   apply_python_rule r cache newes e rules_that_have_matched
-                     rules_that_have_ever_matched
-               | "test" ->
-                   concat_headers_and_c !ccs +> List.iter (fun (c,_) -> 
-                     if c.flow <> None 
-                     then
-                       Printf.printf "Flow: %s\r\nFlow!\r\n%!" c.fullstring);
-                   (cache, newes)
-               | _ ->
-                    Printf.printf "Unknown language: %s\n" r.language;
-                    (cache, newes)
-                     )
-            ([],[]) !es in
-
-        es := newes;
-    | CocciRuleCocciInfo r ->
-       apply_cocci_rule r rules_that_have_ever_matched es ccs);
-
-  if !Flag.sgrep_mode2
-  then begin
-    (* sgrep can lead to code that is not parsable, but we must
-     * still call rebuild_info_c_and_headers to pretty print the 
-     * action (MINUS), so that later the diff will show what was
-     * matched by sgrep. But we don't want the parsing error message
-     * hence the following flag setting. So this code propably
-     * will generate a NotParsedCorrectly for the matched parts
-     * and the very final pretty print and diff will work
-     *)
-    Flag_parsing_c.verbose_parsing := false;
-    ccs := rebuild_info_c_and_headers !ccs false
-  end;
-  !ccs (* return final C asts *)
-
-and reassociate_positions free_vars negated_pos_vars envs =
-  (* issues: isolate the bindings that are relevant to a given rule.
-     separate out the position variables
-     associate all of the position variables for a given set of relevant
-     normal variable bindings with each set of relevant normal variable
-     bindings.  Goal: if eg if@p (E) matches in two places, then both inherited
-     occurrences of E should see both bindings of p, not just its own.
-     Otherwise, a position constraint for something that matches in two
-     places will never be useful, because the position can always be
-     different from the other one. *)
-   let relevant =
-     List.map
-       (function (e,_) ->
-        List.filter (function (x,_) -> List.mem x free_vars) e)
-       envs in
-   let splitted_relevant =
-     (* separate the relevant variables into the non-position ones and the
-       position ones *)
-     List.map
-       (function r ->
-        List.fold_left
-          (function (non_pos,pos) ->
-            function (v,_) as x ->
-              if List.mem v negated_pos_vars
-              then (non_pos,x::pos)
-              else (x::non_pos,pos))
-          ([],[]) r)
-       relevant in
-   let splitted_relevant =
-     List.map
-       (function (non_pos,pos) ->
-        (List.sort compare non_pos,List.sort compare pos))
-       splitted_relevant in
-   let non_poss =
-     List.fold_left
-       (function non_pos ->
-        function (np,_) ->
-          if List.mem np non_pos then non_pos else np::non_pos)
-       [] splitted_relevant in
-   let extended_relevant =
-     (* extend the position variables with the values found at other identical
-       variable bindings *)
-     List.map
-       (function non_pos ->
-        let others =
-          List.filter
-            (function (other_non_pos,other_pos) ->
-               (* do we want equal? or just somehow compatible? eg non_pos
-              binds only E, but other_non_pos binds both E and E1 *)
-              non_pos = other_non_pos)
-            splitted_relevant in
-        (non_pos,
-         List.sort compare
-           (non_pos @
-            (combine_pos negated_pos_vars
-               (List.map (function (_,x) -> x) others)))))
-       non_poss in
-   List.combine envs
-     (List.map (function (non_pos,_) -> List.assoc non_pos extended_relevant)
-       splitted_relevant)
-
-and combine_pos negated_pos_vars others =
-  List.map
-    (function posvar ->
-      (posvar,
-       Ast_c.MetaPosValList
-        (List.sort compare
-           (List.fold_left
-              (function positions ->
-                function other_list ->
-                  try
-                    match List.assoc posvar other_list with
-                      Ast_c.MetaPosValList l1 ->
-                        Common.union_set l1 positions
-                    | _ -> failwith "bad value for a position variable"
-                  with Not_found -> positions)
-              [] others))))
-    negated_pos_vars
-
-and bigloop a b = 
-  Common.profile_code "bigloop" (fun () -> bigloop2 a b)
-
-
-
-
-
-(* does side effects on C ast and on Cocci info rule *)
-and process_a_ctl_a_env_a_toplevel2 r e c f = 
- indent_do (fun () -> 
-  show_or_not_celem "trying" c.ast_c;
-  Flag.currentfile := Some (f ^ ":" ^get_celem c.ast_c);
-  let (trans_info, returned_any_states, inherited_bindings, newbindings) = 
-    Common.save_excursion Flag_ctl.loop_in_src_code (fun () -> 
-      Flag_ctl.loop_in_src_code := !Flag_ctl.loop_in_src_code||c.contain_loop;
-      
-      (***************************************)
-      (* !Main point! The call to the engine *)
-      (***************************************)
-      let model_ctl  = CCI.model_for_ctl r.dropped_isos (Common.some c.flow) e
-      in CCI.mysat model_ctl r.ctl (r.used_after, e)
-    ) 
-  in
-  if not returned_any_states 
-  then None
-  else begin
-    show_or_not_celem "found match in" c.ast_c;
-    show_or_not_trans_info trans_info;
-    List.iter (show_or_not_binding "out") newbindings;    
-
-    r.was_matched := true;
-
-    if not (null trans_info)
-    then begin
-      c.was_modified := true;
-      try 
-        (* les "more than one var in a decl" et "already tagged token"
-         * font crasher coccinelle. Si on a 5 fichiers, donc on a 5
-         * failed. Le try limite le scope des crashes pendant la
-         * trasformation au fichier concerne. *)
-
-        (* modify ast via side effect *)
-        ignore(Transformation_c.transform r.rulename r.dropped_isos
-                  inherited_bindings trans_info (Common.some c.flow));
-      with Timeout -> raise Timeout | UnixExit i -> raise (UnixExit i)
-    end;
-
-    Some (List.map (function x -> x@inherited_bindings) newbindings)
-  end
- )
-   
-and process_a_ctl_a_env_a_toplevel  a b c f= 
-  Common.profile_code "process_a_ctl_a_env_a_toplevel" 
-    (fun () -> process_a_ctl_a_env_a_toplevel2 a b c f)
-   
-
-
-(*****************************************************************************)
-(* The main function *)
-(*****************************************************************************)
-
-let full_engine2 (coccifile, isofile) cfiles = 
-
-  show_or_not_cfiles  cfiles;
-  show_or_not_cocci   coccifile isofile;
-  Pycocci.set_coccifile coccifile;
-
-  let isofile = 
-    if not (Common.lfile_exists isofile)
-    then begin 
-      pr2 ("warning: Can't find default iso file: " ^ isofile);
-      None
-    end
-    else Some isofile
-  in
-
-  (* useful opti when use -dir *)
-  let (astcocci,free_var_lists,negated_pos_lists,used_after_lists,
-       positions_lists,toks,_) = 
-      sp_of_file coccifile isofile
-  in
-  let ctls = 
-    Common.memoized _hctl (coccifile, isofile) (fun () -> 
-      ctls_of_ast  astcocci used_after_lists positions_lists)
-  in
-
-  let contain_typedmetavar = sp_contain_typed_metavar astcocci in
-
-  (* optimisation allowing to launch coccinelle on all the drivers *)
-  if !Flag_cocci.worth_trying_opt && not (worth_trying cfiles toks)
-  then begin 
-    pr2 ("not worth trying:" ^ Common.join " " cfiles);
-    cfiles +> List.map (fun s -> s, None)
-  end
-  else begin
-
-    if !Flag.show_misc then Common.pr_xxxxxxxxxxxxxxxxx();
-    if !Flag.show_misc then pr "let's go";
-    if !Flag.show_misc then Common.pr_xxxxxxxxxxxxxxxxx();
-
-    g_contain_typedmetavar := contain_typedmetavar;
-
-    check_macro_in_sp_and_adjust toks;
-
-    let cocci_infos =
-      prepare_cocci ctls free_var_lists negated_pos_lists
-       used_after_lists positions_lists astcocci in
-    let c_infos  = prepare_c cfiles in
-
-    show_or_not_ctl_tex astcocci ctls;
-
-    (* ! the big loop ! *)
-    let c_infos' = bigloop cocci_infos c_infos in
-
-    if !Flag.show_misc then Common.pr_xxxxxxxxxxxxxxxxx ();
-    if !Flag.show_misc then pr "Finished";
-    if !Flag_ctl.graphical_trace then gen_pdf_graph ();
-    if !Flag.show_misc then Common.pr_xxxxxxxxxxxxxxxxx();
-
-    c_infos' +> List.map (fun c_or_h -> 
-      if !(c_or_h.was_modified_once)
-      then begin
-        let outfile = Common.new_temp_file "cocci-output" ("-" ^ c_or_h.fname) 
-        in
-
-        if c_or_h.fkind = Header 
-        then pr2 ("a header file was modified: " ^ c_or_h.fname);
-
-        (* and now unparse everything *)
-        cfile_of_program (for_unparser c_or_h.asts) outfile;
-
-        let show_only_minus = !Flag.sgrep_mode2 in
-        show_or_not_diff c_or_h.fpath outfile show_only_minus;
-
-        (c_or_h.fpath, 
-        if !Flag.sgrep_mode2 then None else Some outfile
-        )
-      end
-      else 
-        (c_or_h.fpath, None)
-    );
-  end
-
-let full_engine a b = 
-  Common.profile_code "full_engine" (fun () -> full_engine2 a b)
-
-
-(*****************************************************************************)
-(* check duplicate from result of full_engine *)
-(*****************************************************************************)
-
-let check_duplicate_modif2 xs = 
-  (* opti: let groups = Common.groupBy (fun (a,resa) (b,resb) -> a =$= b) xs *)
-  pr2 ("Check duplication for " ^ i_to_s (List.length xs) ^ " files");
-  let groups = Common.group_assoc_bykey_eff xs in
-  groups +> Common.map_filter (fun (file, xs) -> 
-    match xs with
-    | [] -> raise Impossible
-    | [res] -> Some (file, res)
-    | res::xs -> 
-        match res with 
-        | None -> 
-            if not (List.for_all (fun res2 -> res2 = None) xs)
-            then begin
-              pr2 ("different modification result for " ^ file);
-              None
-            end
-            else Some (file, None)
-        | Some res -> 
-            if not(List.for_all (fun res2 -> 
-              match res2 with
-              | None -> false
-              | Some res2 -> 
-                  let diff = Common.cmd_to_list ("diff -u -b -B "^res^" "^res2)
-                  in
-                  null diff
-            ) xs) then begin
-              pr2 ("different modification result for " ^ file);
-              None
-            end
-            else Some (file, Some res)
-            
-        
-  )
-let check_duplicate_modif a = 
-  Common.profile_code "check_duplicate" (fun () -> check_duplicate_modif2 a)
-
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644 (file)
index 9adde69..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-.depend
-test.ml
-Makefile.config
-spatch
-spatch.opt
diff --git a/.depend b/.depend
dissimilarity index 100%
index 27f9886..b3f20b0 100644 (file)
--- a/.depend
+++ b/.depend
@@ -1,48 +1,6 @@
-cocci.cmi: commons/common.cmi parsing_cocci/ast_cocci.cmi 
-testing.cmi: commons/common.cmi parsing_cocci/ast_cocci.cmi 
-cocci.cmo: parsing_cocci/visitor_ast.cmi parsing_c/unparse_hrule.cmi \
-    parsing_c/unparse_c.cmi parsing_c/type_annoter_c.cmi \
-    engine/transformation_c.cmi python/pycocci.cmo \
-    engine/pretty_print_engine.cmi parsing_cocci/pretty_print_cocci.cmi \
-    popl09/popl.cmi parsing_c/parsing_hacks.cmi parsing_c/parser_c.cmi \
-    parsing_cocci/parse_cocci.cmi parsing_c/parse_c.cmi \
-    commons/ograph_extended.cmi engine/lib_engine.cmo \
-    parsing_c/flag_parsing_c.cmo ctl/flag_ctl.cmo flag_cocci.cmo \
-    globals/flag.cmo engine/ctltotex.cmi engine/ctlcocci_integration.cmi \
-    ctl/ctl_engine.cmi parsing_c/cpp_ast_c.cmi parsing_c/control_flow_c.cmi \
-    parsing_c/compare_c.cmi commons/common.cmi engine/asttomember.cmi \
-    engine/asttoctl2.cmi parsing_c/ast_to_flow.cmi \
-    parsing_cocci/ast_cocci.cmi parsing_c/ast_c.cmo cocci.cmi 
-cocci.cmx: parsing_cocci/visitor_ast.cmx parsing_c/unparse_hrule.cmx \
-    parsing_c/unparse_c.cmx parsing_c/type_annoter_c.cmx \
-    engine/transformation_c.cmx python/pycocci.cmx \
-    engine/pretty_print_engine.cmx parsing_cocci/pretty_print_cocci.cmx \
-    popl09/popl.cmx parsing_c/parsing_hacks.cmx parsing_c/parser_c.cmx \
-    parsing_cocci/parse_cocci.cmx parsing_c/parse_c.cmx \
-    commons/ograph_extended.cmx engine/lib_engine.cmx \
-    parsing_c/flag_parsing_c.cmx ctl/flag_ctl.cmx flag_cocci.cmx \
-    globals/flag.cmx engine/ctltotex.cmx engine/ctlcocci_integration.cmx \
-    ctl/ctl_engine.cmx parsing_c/cpp_ast_c.cmx parsing_c/control_flow_c.cmx \
-    parsing_c/compare_c.cmx commons/common.cmx engine/asttomember.cmx \
-    engine/asttoctl2.cmx parsing_c/ast_to_flow.cmx \
-    parsing_cocci/ast_cocci.cmx parsing_c/ast_c.cmx cocci.cmi 
-main.cmo: testing.cmi parsing_c/test_parsing_c.cmi python/pycocci.cmo \
-    parsing_c/parse_c.cmi extra/kbuild.cmi popl09/flag_popl.cmo \
-    parsing_cocci/flag_parsing_cocci.cmo parsing_c/flag_parsing_c.cmo \
-    engine/flag_matcher.cmo ctl/flag_ctl.cmo flag_cocci.cmo globals/flag.cmo \
-    engine/ctlcocci_integration.cmi globals/config.cmo commons/common.cmi \
-    cocci.cmi 
-main.cmx: testing.cmx parsing_c/test_parsing_c.cmx python/pycocci.cmx \
-    parsing_c/parse_c.cmx extra/kbuild.cmx popl09/flag_popl.cmx \
-    parsing_cocci/flag_parsing_cocci.cmx parsing_c/flag_parsing_c.cmx \
-    engine/flag_matcher.cmx ctl/flag_ctl.cmx flag_cocci.cmx globals/flag.cmx \
-    engine/ctlcocci_integration.cmx globals/config.cmx commons/common.cmx \
-    cocci.cmx 
-testing.cmo: parsing_cocci/pretty_print_cocci.cmi \
-    parsing_cocci/parse_cocci.cmi flag_cocci.cmo globals/flag.cmo \
-    globals/config.cmo parsing_c/compare_c.cmi commons/common.cmi cocci.cmi \
-    testing.cmi 
-testing.cmx: parsing_cocci/pretty_print_cocci.cmx \
-    parsing_cocci/parse_cocci.cmx flag_cocci.cmx globals/flag.cmx \
-    globals/config.cmx parsing_c/compare_c.cmx commons/common.cmx cocci.cmx \
-    testing.cmi 
+cocci.cmo: flag_cocci.cmo cocci.cmi 
+cocci.cmx: flag_cocci.cmx cocci.cmi 
+main.cmo: testing.cmi flag_cocci.cmo cocci.cmi 
+main.cmx: testing.cmx flag_cocci.cmx cocci.cmx 
+testing.cmo: flag_cocci.cmo cocci.cmi testing.cmi 
+testing.cmx: flag_cocci.cmx cocci.cmx testing.cmi 
diff --git a/.project b/.project
deleted file mode 100644 (file)
index 321c5c3..0000000
--- a/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>Coccinelle</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>Ocaml.ocamlMakefileBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>ocaml.ocamlnatureMakefile</nature>
-       </natures>
-</projectDescription>
diff --git a/.subdirs b/.subdirs
new file mode 100644 (file)
index 0000000..b29c734
--- /dev/null
+++ b/.subdirs
@@ -0,0 +1 @@
+flag_cocci.cmi cocci.cmi testing.cmi test.cmi main.cmi: commons globals menhirlib  ctl parsing_cocci parsing_c engine popl09 extra python
index 36cac02..c20c3cf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+# Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 # This file is part of Coccinelle.
 # 
@@ -85,17 +85,17 @@ OPTFLAGS=
 # but is now defined above in this file
 #OPTLIBFLAGS=-cclib dllpycaml_stubs.so
 
-# the OPTBIN variable is here to allow to use ocamlc.opt instead of 
+# the OPTBIN variable is here to allow to use ocamlc.opt instead of
 # ocaml, when it is available, which speeds up compilation. So
-# if you want the fast version of the ocaml chain tools, set this var 
+# if you want the fast version of the ocaml chain tools, set this var
 # or setenv it to ".opt" in your startup script.
 OPTBIN= #.opt
 
 OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS)  $(INCLUDES)
-OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES) 
+OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
 OCAMLLEX=ocamllex #-ml # -ml for debugging lexer, but slightly slower
 OCAMLYACC=ocamlyacc -v
-OCAMLDEP=ocamldep $(INCLUDES)
+OCAMLDEP=ocamldep #$(INCLUDES)
 OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
 
 # can also be set via 'make static'
@@ -107,36 +107,77 @@ BYTECODE_STATIC=-custom
 ##############################################################################
 # Top rules
 ##############################################################################
-all: rec $(EXEC)
-opt: rec.opt $(EXEC).opt
+.PHONY: all all.opt opt top clean configure
+.PHONY: $(MAKESUBDIRS) $(MAKESUBDIRS:%=%.opt)
+
+all:
+       $(MAKE) subdirs
+       $(MAKE) $(EXEC)
+
+opt:
+       $(MAKE) subdirs.opt
+       $(MAKE) $(EXEC).opt
+
 all.opt: opt
 top: $(EXEC).top
 
-rec:
-       set -e; for i in $(MAKESUBDIRS); \
-       do $(MAKE) -C $$i OCAMLCFLAGS="$(OCAMLCFLAGS)" all; done 
-rec.opt:
-       set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i all.opt; done 
+subdirs: $(MAKESUBDIRS)
+subdirs.opt: $(MAKESUBDIRS:%=%.opt)
+
+$(MAKESUBDIRS):
+       $(MAKE) -C $@ OCAMLCFLAGS="$(OCAMLCFLAGS)" all
+
+$(MAKESUBDIRS:%=%.opt):
+       $(MAKE) -C $(@:%.opt=%) OCAMLCFLAGS="$(OCAMLCFLAGS)" all.opt
+
+commons:
+globals:
+menhirlib:
+parsing_cocci:globals menhirlib
+parsing_c:parsing_cocci
+ctl:globals commons
+engine: parsing_cocci parsing_c ctl
+popl09:engine
+extra: parsing_cocci parsing_c ctl
+pycaml:
+python:pycaml parsing_cocci parsing_c
+
+commons.opt:
+globals.opt:
+menhirlib.opt:
+parsing_cocci.opt:globals.opt menhirlib.opt
+parsing_c.opt:parsing_cocci.opt
+ctl.opt:globals.opt commons.opt
+engine.opt: parsing_cocci.opt parsing_c.opt ctl.opt
+popl09.opt:engine.opt
+extra.opt: parsing_cocci.opt parsing_c.opt ctl.opt
+pycaml.opt:
+python.opt:pycaml.opt parsing_cocci.opt parsing_c.opt
+
 clean::
-       set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i clean; done 
+       set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i clean; done
 
-eclipse: depend all
 configure:
        ./configure
 
+$(LIBS): #$(MAKESUBDIRS)
+$(LIBS:.cma=.cmxa): #$(MAKESUBDIRS:%=%.opt)
+
+$(OBJS):$(LIBS)
+$(OPTOBJS):$(LIBS:.cma=.cmxa)
+
 $(EXEC): $(LIBS) $(OBJS)
        $(OCAMLC) $(BYTECODE_STATIC) -o $@ $(SYSLIBS)  $^
 
-$(EXEC).opt: $(LIBS:.cma=.cmxa) $(OPTOBJS) 
+$(EXEC).opt: $(LIBS:.cma=.cmxa) $(OPTOBJS)
        $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $(OPTLIBFLAGS)  $^
 
-$(EXEC).top: $(LIBS) $(OBJS) 
+$(EXEC).top: $(LIBS) $(OBJS)
        $(OCAMLMKTOP) -custom -o $@ $(SYSLIBS) $^
 
 clean::
        rm -f $(TARGET) $(TARGET).opt $(TARGET).top
 
-
 clean::
        rm -f dllpycaml_stubs.so
 
@@ -168,12 +209,14 @@ install: all
        mkdir -p $(DESTDIR)$(BINDIR)
        mkdir -p $(DESTDIR)$(LIBDIR)
        mkdir -p $(DESTDIR)$(SHAREDIR)
-       cp spatch $(DESTDIR)$(BINDIR)   
-       cp -f dllpycaml_stubs.so $(DESTDIR)$(LIBDIR)    
+       mkdir -p $(DESTDIR)$(MANDIR)/man1
+       cp spatch $(DESTDIR)$(BINDIR)
        cp standard.h $(DESTDIR)$(SHAREDIR)
        cp standard.iso $(DESTDIR)$(SHAREDIR)
+       cp docs/spatch.1 $(DESTDIR)$(MANDIR)/man1/
        mkdir -p $(DESTDIR)$(SHAREDIR)/python
        cp -a python/coccilib $(DESTDIR)$(SHAREDIR)/python
+       cp -f dllpycaml_stubs.so $(DESTDIR)$(LIBDIR)
        @echo ""
        @echo "You can also install spatch by copying the program spatch"
        @echo "(available in this directory) anywhere you want and"
@@ -185,6 +228,7 @@ uninstall:
        rm -f $(DESTDIR)$(SHAREDIR)/standard.h
        rm -f $(DESTDIR)$(SHAREDIR)/standard.iso
        rm -rf $(DESTDIR)$(SHAREDIR)/python/coccilib
+       rm -f $(DESTDIR)$(MANDIR)/man1/spatch.1
 
 
 
@@ -200,7 +244,7 @@ PACKAGE=coccinelle-$(VERSION)
 
 BINSRC=spatch env.sh env.csh standard.h standard.iso \
        *.txt docs/* \
-       demos/foo.* demos/simple.* 
+       demos/foo.* demos/simple.*
 #      $(PYLIB) python/coccilib/ demos/printloc.*
 BINSRC2=$(BINSRC:%=$(PACKAGE)/%)
 
@@ -218,28 +262,30 @@ OCAMLVERSION=$(shell ocaml -version |perl -p -e 's/.*version (.*)/$$1/;')
 
 # Procedure to do each time:
 #  cvs update
+#  modify globals/config.ml
+#  cd globals/; cvs commit -m"new version"  (do not commit from the root!)
 #  ./configure --without-python
 #  make package
 #  make website
 # Check also that run an ocaml in /usr/bin
 
-# To test you can try compile and run spatch from different instances 
-# like my ~/coccinelle, ~/release/coccinelle, and the /tmp/coccinelle-0.X 
-# downloaded from the website. 
+# To test you can try compile and run spatch from different instances
+# like my ~/coccinelle, ~/release/coccinelle, and the /tmp/coccinelle-0.X
+# downloaded from the website.
 
 # For 'make srctar' it must done from a clean
-# repo such as ~/release/coccinelle. It must also be a repo where 
-# the scripts/licensify has been run at least once. 
+# repo such as ~/release/coccinelle. It must also be a repo where
+# the scripts/licensify has been run at least once.
 # For the 'make bintar' I can do it from my original repo.
 
 
-package: 
-       make srctar 
-       make bintar 
-       make staticbintar 
+package:
+       make srctar
+       make bintar
+       make staticbintar
        make bytecodetar
 
-# I currently pre-generate the parser so the user does not have to 
+# I currently pre-generate the parser so the user does not have to
 # install menhir on his machine. I also do a few cleanups like 'rm todo_pos'.
 # You may have first to do a 'make licensify'.
 srctar:
@@ -247,21 +293,21 @@ srctar:
        cp -a .  $(TMP)/$(PACKAGE)
        cd $(TMP)/$(PACKAGE); cd parsing_cocci/; make parser_cocci_menhir.ml
        cd $(TMP)/$(PACKAGE); rm todo_pos
-       cd $(TMP); tar cvfz $(PACKAGE).tgz  --exclude=CVS  $(PACKAGE)
+       cd $(TMP); tar cvfz $(PACKAGE).tgz --exclude-vcs $(PACKAGE)
        rm -rf  $(TMP)/$(PACKAGE)
 
 
 bintar: all
        rm -f $(TMP)/$(PACKAGE)
        ln -s `pwd` $(TMP)/$(PACKAGE)
-       cd $(TMP); tar cvfz $(PACKAGE)-bin-x86.tgz --exclude=CVS $(BINSRC2)
+       cd $(TMP); tar cvfz $(PACKAGE)-bin-x86.tgz --exclude-vcs $(BINSRC2)
        rm -f $(TMP)/$(PACKAGE)
 
 staticbintar: all.opt
        rm -f $(TMP)/$(PACKAGE)
        ln -s `pwd` $(TMP)/$(PACKAGE)
        make static
-       cd $(TMP); tar cvfz $(PACKAGE)-bin-x86-static.tgz --exclude=CVS $(BINSRC2)
+       cd $(TMP); tar cvfz $(PACKAGE)-bin-x86-static.tgz --exclude-vcs $(BINSRC2)
        rm -f $(TMP)/$(PACKAGE)
 
 # add ocaml version in name ?
@@ -269,21 +315,21 @@ bytecodetar: all
        rm -f $(TMP)/$(PACKAGE)
        ln -s `pwd` $(TMP)/$(PACKAGE)
        make purebytecode
-       cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz --exclude=CVS $(BINSRC2)
+       cd $(TMP); tar cvfz $(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz --exclude-vcs $(BINSRC2)
        rm -f $(TMP)/$(PACKAGE)
 
 clean::
-       rm -f $(PACKAGE) 
-       rm -f $(PACKAGE)-bin-x86.tgz 
-       rm -f $(PACKAGE)-bin-x86-static.tgz 
+       rm -f $(PACKAGE)
+       rm -f $(PACKAGE)-bin-x86.tgz
+       rm -f $(PACKAGE)-bin-x86-static.tgz
        rm -f $(PACKAGE)-bin-bytecode-$(OCAMLVERSION).tgz
 
 
 
 TOLICENSIFY=ctl engine parsing_cocci popl popl09 python
 licensify:
-       ocaml tools/licensify.ml 
-       set -e; for i in $(TOLICENSIFY); do cd $$i; ocaml ../tools/licensify.ml; cd ..; done 
+       ocaml tools/licensify.ml
+       set -e; for i in $(TOLICENSIFY); do cd $$i; ocaml ../tools/licensify.ml; cd ..; done
 
 # When checking out the source from diku sometimes I have some "X in the future"
 # error messages.
@@ -315,7 +361,7 @@ website:
 #TXT=$(wildcard *.txt)
 syncwiki:
 #      unison ~/public_html/wiki/wiki-LFS/data/pages/ docs/wiki/
-#      set -e; for i in $(TXT); do unison $$i docs/wiki/$$i; done 
+#      set -e; for i in $(TXT); do unison $$i docs/wiki/$$i; done
 
 darcsweb:
 #      @echo pull from ~/public_html/darcs/c-coccinelle and c-commons and lib-xxx
@@ -325,11 +371,11 @@ DARCSFORESTS=commons \
 
 update_darcs:
        darcs pull
-       set -e; for i in $(DARCSFORESTS); do cd $$i; darcs pull; cd ..; done 
+       set -e; for i in $(DARCSFORESTS); do cd $$i; darcs pull; cd ..; done
 
 #darcs diff -u
 diff_darcs:
-       set -e; for i in $(DARCSFORESTS); do cd $$i; darcs diff -u; cd ..; done 
+       set -e; for i in $(DARCSFORESTS); do cd $$i; darcs diff -u; cd ..; done
 
 
 ##############################################################################
@@ -344,14 +390,14 @@ testparsing:
 
 
 
-# -inline 0  to see all the functions in the profile. 
-# Can also use the profile framework in commons/ and run your program 
+# -inline 0  to see all the functions in the profile.
+# Can also use the profile framework in commons/ and run your program
 # with -profile.
 forprofiling:
        $(MAKE) OPTFLAGS="-p -inline 0 " opt
 
 clean::
-       rm -f gmon.out 
+       rm -f gmon.out
 
 tags:
        otags -no-mli-tags -r  .
@@ -366,9 +412,9 @@ dependencygraph:
 # Misc rules
 ##############################################################################
 
-# each member of the project can have its own test.ml. this file is 
+# each member of the project can have its own test.ml. this file is
 # not under CVS.
-test.ml: 
+test.ml:
        echo "let foo_ctl () = failwith \"there is no foo_ctl formula\"" \
          > test.ml
 
@@ -397,7 +443,7 @@ beforedepend:: test.ml
 .ml.cmx:
        $(OCAMLOPT)  -c $<
 
-.ml.mldepend: 
+.ml.mldepend:
        $(OCAMLC) -i $<
 
 clean::
index 9c5ea11..168e038 100644 (file)
@@ -1,5 +1,36 @@
 -*- org -*-
 
+* 0.1.4
+
+** Features: 
+- can match patterns of the form unsigned T or signed T, where T is a
+  metavariable
+- dropped the sizeof_parens isomorphism, which was made redundant by the
+  paren isomorphism
+- simple rule generation
+- long long added to SmPL
+
+** Bugfix:
+- trailing , ; and ) no longer left on a line by themselves
+- better treatment of error exit when the searched for code matches the
+  error exit condition.
+- fix incorrect treatment of parentheses in test_exps that could allow +
+  code to be added twice
+- don't ask whether iterator names and declarer names should be declared as
+  metavariables.
+- slightly better support for expression list metavariables.
+- short and long allowed for array index types in SmPL
+- more restrictions on type inference for pointer arithmetic in SmPL
+- allow isomorphisms to apply when + code is anywhere within all - terms
+- changed order of printing const and volatile
+- allow  eg ... <... in plus code
+- better formatting of generated if/while/etc. code
+- better parse error reporting when the problem is at the end of the file
+
+** Internals: 
+- isomorphisms don't apply under signed/unsigned, to prevent the creation
+  of things like unsigned signed int.  Need a better solution for this.
+
 * 0.1.3
 
 ** Features: 
index 33f9509..1c1c45a 100644 (file)
--- a/cocci.ml
+++ b/cocci.ml
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -228,12 +228,12 @@ let show_or_not_ctl_tex a b  =
     
 let show_or_not_rule_name ast rulenb =
   if !Flag_cocci.show_ctl_text or !Flag.show_trying or
-    !Flag_cocci.show_transinfo or !Flag_cocci.show_binding_in_out
+    !Flag.show_transinfo or !Flag_cocci.show_binding_in_out
   then
     begin
       let name =
        match ast with
-         Ast_cocci.CocciRule (nm, (deps, drops, exists), x, _) -> nm
+         Ast_cocci.CocciRule (nm, (deps, drops, exists), x, _, _) -> nm
        | _ -> i_to_s rulenb in
       Common.pr_xxxxxxxxxxxxxxxxx ();
       pr (name ^ " = ");
@@ -242,7 +242,7 @@ let show_or_not_rule_name ast rulenb =
 
 let show_or_not_scr_rule_name rulenb =
   if !Flag_cocci.show_ctl_text or !Flag.show_trying or
-    !Flag_cocci.show_transinfo or !Flag_cocci.show_binding_in_out
+    !Flag.show_transinfo or !Flag_cocci.show_binding_in_out
   then
     begin
       let name = i_to_s rulenb in
@@ -304,7 +304,7 @@ let show_or_not_celem a b  =
 
 
 let show_or_not_trans_info2 trans_info = 
-  if !Flag_cocci.show_transinfo then begin
+  if !Flag.show_transinfo then begin
     if null trans_info then pr2 "transformation info is empty"
     else begin
       pr2 "transformation info returned:";
@@ -419,7 +419,6 @@ let sp_contain_typed_metavar_z toplevel_list_list =
   let combiner = 
     Visitor_ast.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing
       donothing expression donothing donothing donothing donothing donothing
       donothing donothing donothing donothing donothing 
@@ -435,11 +434,13 @@ let sp_contain_typed_metavar rules =
     (List.map
        (function x ->
         match x with
-          Ast_cocci.CocciRule (a,b,c,d) -> (a,b,c)
+          Ast_cocci.CocciRule (a,b,c,d,_) -> (a,b,c)
         | _ -> failwith "error in filter")
     (List.filter
        (function x ->
-        match x with Ast_cocci.CocciRule _ -> true | _ -> false)
+        match x with
+          Ast_cocci.CocciRule (a,b,c,d,Ast_cocci.Normal) -> true
+        | _ -> false)
        rules))
 
 
@@ -452,32 +453,37 @@ let sp_contain_typed_metavar rules =
  * serio.c is related we think to #include <linux/serio.h> 
  *)
 
-let (includes_to_parse: (Common.filename * Parse_c.program2) list -> 'a) = fun xs ->
-  if !Flag_cocci.no_includes
-  then []
-  else
-    xs +> List.map (fun (file, cs) -> 
-      let dir = Common.dirname file in
-      
-      cs +> Common.map_filter (fun (c,_info_item) -> 
-       match c with
-       | Ast_c.CppTop (Ast_c.Include {Ast_c.i_include = ((x,ii));
-                         i_rel_pos = info_h_pos;})  -> 
-            (match x with
+let (includes_to_parse:
+       (Common.filename * Parse_c.program2) list ->
+        Flag_cocci.include_options -> 'a) = fun xs choose_includes ->
+  match choose_includes with
+    Flag_cocci.I_UNSPECIFIED -> failwith "not possible"
+  | Flag_cocci.I_NO_INCLUDES -> []
+  | x ->
+      let all_includes = x = Flag_cocci.I_ALL_INCLUDES in
+      xs +> List.map (fun (file, cs) -> 
+       let dir = Common.dirname file in
+       
+       cs +> Common.map_filter (fun (c,_info_item) -> 
+         match c with
+         | Ast_c.CppTop
+             (Ast_c.Include
+                {Ast_c.i_include = ((x,ii)); i_rel_pos = info_h_pos;})  -> 
+           (match x with
             | Ast_c.Local xs -> 
                let f = Filename.concat dir (Common.join "/" xs) in
              (* for our tests, all the files are flat in the current dir *)
                if not (Sys.file_exists f) && !Flag_cocci.relax_include_path
                then
                  let attempt2 = Filename.concat dir (Common.last xs) in
-                 if not (Sys.file_exists f) && !Flag_cocci.all_includes
+                 if not (Sys.file_exists f) && all_includes
                  then Some (Filename.concat !Flag_cocci.include_path 
                                (Common.join "/" xs))
                  else Some attempt2
                else Some f
-                   
+
             | Ast_c.NonLocal xs -> 
-               if !Flag_cocci.all_includes ||
+               if all_includes ||
                Common.fileprefix (Common.last xs) = Common.fileprefix file
                then 
                   Some (Filename.concat !Flag_cocci.include_path 
@@ -485,11 +491,9 @@ let (includes_to_parse: (Common.filename * Parse_c.program2) list -> 'a) = fun x
                else None
             | Ast_c.Wierd _ -> None
                  )
-       | _ -> None
-             )
-       )
-      +> List.concat
-      +> Common.uniq
+         | _ -> None))
+       +> List.concat
+       +> Common.uniq
       
 let rec interpret_dependencies local global = function
     Ast_cocci.Dep s      -> List.mem s local
@@ -655,6 +659,7 @@ type toplevel_cocci_info_script_rule = {
 
 type toplevel_cocci_info_cocci_rule = {
   ctl: Lib_engine.ctlcocci * (CCI.pred list list);
+  metavars: Ast_cocci.metavar list;
   ast_rule: Ast_cocci.rule;
   isexp: bool; (* true if + code is an exp, only for Flag.make_hrule *)
 
@@ -670,6 +675,7 @@ type toplevel_cocci_info_cocci_rule = {
   positions: Ast_cocci.meta_name list;
 
   ruleid: int;
+  ruletype: Ast_cocci.ruletype;
 
   was_matched: bool ref;
 }
@@ -727,16 +733,15 @@ let gen_pdf_graph () =
 
 (* --------------------------------------------------------------------- *)
 let prepare_cocci ctls free_var_lists negated_pos_lists
-    used_after_lists positions_list astcocci = 
+    used_after_lists positions_list metavars astcocci = 
 
   let gathered = Common.index_list_1
-      (zip (zip (zip (zip (zip ctls astcocci) free_var_lists)
+      (zip (zip (zip (zip (zip (zip ctls metavars) astcocci) free_var_lists)
                   negated_pos_lists) used_after_lists) positions_list)
   in
   gathered +> List.map 
-    (fun ((((((ctl_toplevel_list,ast),free_var_list),negated_pos_list),
-          used_after_list),
-          positions_list),rulenb) -> 
+    (fun (((((((ctl_toplevel_list,metavars),ast),free_var_list),
+            negated_pos_list),used_after_list),positions_list),rulenb) -> 
       
       let is_script_rule r =
         match r with Ast_cocci.ScriptRule _ -> true | _ -> false in
@@ -756,10 +761,11 @@ let prepare_cocci ctls free_var_lists negated_pos_lists
           }
           in ScriptRuleCocciInfo r
       | Ast_cocci.CocciRule
-         (rulename,(dependencies,dropped_isos,z),restast,isexp) ->
+         (rulename,(dependencies,dropped_isos,z),restast,isexp,ruletype) ->
           CocciRuleCocciInfo (
           {
             ctl = List.hd ctl_toplevel_list;
+            metavars = metavars;
             ast_rule = ast;
            isexp = List.hd isexp;
             rulename = rulename;
@@ -770,6 +776,7 @@ let prepare_cocci ctls free_var_lists negated_pos_lists
             used_after = List.hd used_after_list;
             positions = List.hd positions_list;
             ruleid = rulenb;
+           ruletype = ruletype;
             was_matched = ref false;
           })
     )
@@ -822,27 +829,21 @@ let rebuild_info_program cs file isexp =
   cs +> List.map (fun c ->
     if !(c.was_modified)
     then
-      (match !Flag.make_hrule with
-       Some dir ->
-         Unparse_hrule.pp_program (c.ast_c, (c.fullstring, c.tokens_c))
-           dir file isexp;
-         []
-      |        None ->
-         let file = Common.new_temp_file "cocci_small_output" ".c" in
-         cfile_of_program 
-            [(c.ast_c, (c.fullstring, c.tokens_c)), Unparse_c.PPnormal] 
-            file;
+      let file = Common.new_temp_file "cocci_small_output" ".c" in
+      cfile_of_program 
+        [(c.ast_c, (c.fullstring, c.tokens_c)), Unparse_c.PPnormal] 
+        file;
          
-          (* Common.command2 ("cat " ^ file); *)
-         let cprogram = cprogram_of_file file in
-         let xs = build_info_program cprogram c.env_typing_before in
+      (* Common.command2 ("cat " ^ file); *)
+      let cprogram = cprogram_of_file file in
+      let xs = build_info_program cprogram c.env_typing_before in
          
-          (* TODO: assert env has not changed,
-           * if yes then must also reparse what follows even if not modified.
-           * Do that only if contain_typedmetavar of course, so good opti.
-          *)
-          (* Common.list_init xs *) (* get rid of the FinalDef *)
-         xs)
+      (* TODO: assert env has not changed,
+      * if yes then must also reparse what follows even if not modified.
+      * Do that only if contain_typedmetavar of course, so good opti.
+      *)
+      (* Common.list_init xs *) (* get rid of the FinalDef *)
+      xs
     else [c]
   ) +> List.concat
 
@@ -863,9 +864,9 @@ let rebuild_info_c_and_headers ccs isexp =
 
 
 
-let prepare_c files : file_info list = 
+let prepare_c files choose_includes : file_info list = 
   let cprograms = List.map cprogram_of_file_cached files in
-  let includes = includes_to_parse (zip files cprograms) in
+  let includes = includes_to_parse (zip files cprograms) choose_includes in
 
   (* todo?: may not be good to first have all the headers and then all the c *)
   let all = 
@@ -1057,26 +1058,34 @@ and apply_cocci_rule r rules_that_have_ever_matched es (ccs:file_info list ref)
                    show_or_not_binding "in" e;
                    show_or_not_binding "relevant in" relevant_bindings;
 
-                   let children_e = ref [] in
+                   (* applying the rule *)
+                   (match r.ruletype with
+                     Ast_cocci.Normal ->
+                       let children_e = ref [] in
       
                       (* looping over the functions and toplevel elements in
                         .c and .h *)
-                   concat_headers_and_c !ccs +> List.iter (fun (c,f) -> 
-                     if c.flow <> None 
-                     then
-                        (* does also some side effects on c and r *)
-                       let processed =
-                         process_a_ctl_a_env_a_toplevel r relevant_bindings
-                           c f in
-                       match processed with
-                       | None -> ()
-                       | Some newbindings -> 
-                           newbindings +> List.iter (fun newbinding -> 
-                             children_e :=
-                               Common.insert_set newbinding !children_e)
-                             ); (* end iter cs *)
-
-                   !children_e in
+                       concat_headers_and_c !ccs +> List.iter (fun (c,f) -> 
+                         if c.flow <> None 
+                         then
+                          (* does also some side effects on c and r *)
+                           let processed =
+                             process_a_ctl_a_env_a_toplevel r
+                               relevant_bindings c f in
+                           match processed with
+                           | None -> ()
+                           | Some newbindings -> 
+                               newbindings +> List.iter (fun newbinding -> 
+                                 children_e :=
+                                   Common.insert_set newbinding !children_e)
+                                 ); (* end iter cs *)
+
+                       !children_e
+                   | Ast_cocci.Generated ->
+                       process_a_generated_a_env_a_toplevel r
+                         relevant_bindings !ccs;
+                       []) in
+
              let old_bindings_to_keep =
                Common.nub
                  (e +> List.filter (fun (s,v) -> List.mem s r.used_after)) in
@@ -1335,6 +1344,30 @@ and process_a_ctl_a_env_a_toplevel2 r e c f =
 and process_a_ctl_a_env_a_toplevel  a b c f= 
   Common.profile_code "process_a_ctl_a_env_a_toplevel" 
     (fun () -> process_a_ctl_a_env_a_toplevel2 a b c f)
+
+and process_a_generated_a_env_a_toplevel2 r env = function
+    [cfile] ->
+      let free_vars =
+       List.filter
+         (function
+             (rule,_) when rule = r.rulename -> false
+           | (_,"ARGS") -> false
+           | _ -> true)
+         r.free_vars in
+      let env_domain = List.map (function (nm,vl) -> nm) env in
+      let metavars =
+       List.filter
+         (function md ->
+           let (rl,_) = Ast_cocci.get_meta_name md in
+           rl = r.rulename)
+         r.metavars in
+      if Common.include_set free_vars env_domain
+      then Unparse_hrule.pp_rule metavars r.ast_rule env cfile.full_fname
+  | _ -> failwith "multiple files not supported"
+   
+and process_a_generated_a_env_a_toplevel rule env ccs = 
+  Common.profile_code "process_a_ctl_a_env_a_toplevel" 
+    (fun () -> process_a_generated_a_env_a_toplevel2 rule env ccs)
    
 
 
@@ -1358,13 +1391,13 @@ let full_engine2 (coccifile, isofile) cfiles =
   in
 
   (* useful opti when use -dir *)
-  let (astcocci,free_var_lists,negated_pos_lists,used_after_lists,
+  let (metavars,astcocci,free_var_lists,negated_pos_lists,used_after_lists,
        positions_lists,toks,_) = 
       sp_of_file coccifile isofile
   in
   let ctls = 
     Common.memoized _hctl (coccifile, isofile) (fun () -> 
-      ctls_of_ast  astcocci used_after_lists positions_lists)
+      ctls_of_ast astcocci used_after_lists positions_lists)
   in
 
   let contain_typedmetavar = sp_contain_typed_metavar astcocci in
@@ -1385,10 +1418,19 @@ let full_engine2 (coccifile, isofile) cfiles =
 
     check_macro_in_sp_and_adjust toks;
 
+    
+
     let cocci_infos =
       prepare_cocci ctls free_var_lists negated_pos_lists
-       used_after_lists positions_lists astcocci in
-    let c_infos  = prepare_c cfiles in
+       used_after_lists positions_lists metavars astcocci in
+    let choose_includes =
+      match !Flag_cocci.include_options with
+       Flag_cocci.I_UNSPECIFIED ->
+         if contain_typedmetavar
+         then Flag_cocci.I_NORMAL_INCLUDES
+         else Flag_cocci.I_NO_INCLUDES
+      |        x -> x in
+    let c_infos  = prepare_c cfiles choose_includes in
 
     show_or_not_ctl_tex astcocci ctls;
 
index e47ccee..65934b5 100644 (file)
--- a/cocci.mli
+++ b/cocci.mli
@@ -24,7 +24,8 @@ val check_duplicate_modif :
 (* provides memoization *)
 val sp_of_file :
   filename (* coccifile *)  -> filename option (* isofile *) ->
-  Ast_cocci.rule list * Ast_cocci.meta_name list list list *
+  Ast_cocci.metavar list list * Ast_cocci.rule list *
+      Ast_cocci.meta_name list list list *
       Ast_cocci.meta_name list list list *
       Ast_cocci.meta_name list list list * Ast_cocci.meta_name list list list *
       string list list *
dissimilarity index 96%
index 30c7367..93c8ac9 100644 (file)
--- a/commitmsg
+++ b/commitmsg
@@ -1,18 +1,35 @@
-Release coccinelle-0.1.3
-
-** Features:
-   - help in building the configuration macro file. The -parse_c action
-     now returns the 10 most frequent parsing errors. This give useful
-     hints to extend standard.h.
-
-** Bugfix:
-   - positions no longer allowed on \(, \|, and \)
-   - improved propagation of negation for isos in the presence of parens
-   - convert Todos in flow graph construction to recoverable errors
-   - fixed bug in treatment of when != true and when != false, to allow more
-     than one of them per ...
-   - improve parsing of typedef of function pointer.
-   - improve typing.
-   - parsing and typing support for old style C function declaration.
-   - consider position variables as modifications when optimizing the
-     translation into CTL of function definitions
+Release coccinelle-0.1.4
+
+** Language:
+   - long long added to SmPL
+
+** Documentation:
+   - add grammar reference and spatch command line options reference
+
+** Features:
+   - can match patterns of the form unsigned T or signed T, where T is a
+     metavariable
+   - dropped the sizeof_parens isomorphism, which was made redundant by the
+     paren isomorphism
+   - simple rule generation
+
+** Bugfix:
+   - trailing , ; and ) no longer left on a line by themselves
+   - better treatment of error exit when the searched for code matches the
+     error exit condition.
+   - fix incorrect treatment of parentheses in test_exps that could allow +
+     code to be added twice
+   - don't ask whether iterator names and declarer names should be declared as
+     metavariables.
+   - slightly better support for expression list metavariables.
+   - short and long allowed for array index types in SmPL
+   - more restrictions on type inference for pointer arithmetic in SmPL
+   - allow isomorphisms to apply when + code is anywhere within all - terms
+   - changed order of printing const and volatile
+   - allow  eg ... <... in plus code
+   - better formatting of generated if/while/etc. code
+   - better parse error reporting when the problem is at the end of the file
+
+** Internals:
+   - isomorphisms don't apply under signed/unsigned, to prevent the creation
+     of things like unsigned signed int.  Need a better solution for this.
diff --git a/commons/.cvsignore b/commons/.cvsignore
deleted file mode 100644 (file)
index 0a2d2b3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.depend
-*.cma
index 97cf7ac..7abe8f8 100644 (file)
@@ -53,48 +53,57 @@ ocamlextra/ANSITerminal.cmo: ocamlextra/ANSITerminal.cmi
 ocamlextra/ANSITerminal.cmx: ocamlextra/ANSITerminal.cmi 
 ocamlextra/dumper.cmo: ocamlextra/dumper.cmi 
 ocamlextra/dumper.cmx: ocamlextra/dumper.cmi 
-ocamlextra/dynArray.cmo: ocamlextra/dynArray.cmi 
-ocamlextra/dynArray.cmx: ocamlextra/dynArray.cmi 
+ocamlextra/dynArray.cmo: ocamlextra/enum.cmi ocamlextra/dynArray.cmi 
+ocamlextra/dynArray.cmx: ocamlextra/enum.cmx ocamlextra/dynArray.cmi 
 ocamlextra/enum.cmo: ocamlextra/enum.cmi 
 ocamlextra/enum.cmx: ocamlextra/enum.cmi 
 ocamlextra/setb.cmo: ocamlextra/setb.cmi 
 ocamlextra/setb.cmx: ocamlextra/setb.cmi 
 ocamlextra/suffix_tree.cmo: ocamlextra/suffix_tree.cmi 
 ocamlextra/suffix_tree.cmx: ocamlextra/suffix_tree.cmi 
-ocamlextra/suffix_tree_ext.cmo: ocamlextra/suffix_tree_ext.cmi 
-ocamlextra/suffix_tree_ext.cmx: ocamlextra/suffix_tree_ext.cmi 
-ocollection/oassoc_buffer.cmo: oassoc.cmi common.cmi \
+ocamlextra/suffix_tree_ext.cmo: ocamlextra/dynArray.cmi \
+    ocamlextra/suffix_tree_ext.cmi 
+ocamlextra/suffix_tree_ext.cmx: ocamlextra/dynArray.cmx \
+    ocamlextra/suffix_tree_ext.cmi 
+ocamlextra/dynArray.cmi: ocamlextra/enum.cmi 
+ocollection/oassoc_buffer.cmo: ocamlextra/setb.cmi ocollection/osetb.cmo \
+    ocollection/oassocb.cmo oassoc.cmi common.cmi \
     ocollection/oassoc_buffer.cmi 
-ocollection/oassoc_buffer.cmx: oassoc.cmx common.cmx \
+ocollection/oassoc_buffer.cmx: ocamlextra/setb.cmx ocollection/osetb.cmx \
+    ocollection/oassocb.cmx oassoc.cmx common.cmx \
     ocollection/oassoc_buffer.cmi 
-ocollection/oassocb.cmo: oassoc.cmi common.cmi 
-ocollection/oassocb.cmx: oassoc.cmx common.cmx 
-ocollection/oassocbdb.cmo: oassoc.cmi common.cmi ocollection/oassocbdb.cmi 
-ocollection/oassocbdb.cmx: oassoc.cmx common.cmx ocollection/oassocbdb.cmi 
-ocollection/oassocbdb_string.cmo: oassoc.cmi common.cmi \
-    ocollection/oassocbdb_string.cmi 
-ocollection/oassocbdb_string.cmx: oassoc.cmx common.cmx \
-    ocollection/oassocbdb_string.cmi 
+ocollection/oassocb.cmo: oassoc.cmi ocamlextra/mapb.cmo common.cmi 
+ocollection/oassocb.cmx: oassoc.cmx ocamlextra/mapb.cmx common.cmx 
+ocollection/oassocbdb.cmo: ocollection/oassoc_buffer.cmi oassoc.cmi \
+    ocamlextra/dumper.cmi common.cmi ocollection/oassocbdb.cmi 
+ocollection/oassocbdb.cmx: ocollection/oassoc_buffer.cmx oassoc.cmx \
+    ocamlextra/dumper.cmx common.cmx ocollection/oassocbdb.cmi 
+ocollection/oassocbdb_string.cmo: ocollection/oassoc_buffer.cmi oassoc.cmi \
+    common.cmi ocollection/oassocbdb_string.cmi 
+ocollection/oassocbdb_string.cmx: ocollection/oassoc_buffer.cmx oassoc.cmx \
+    common.cmx ocollection/oassocbdb_string.cmi 
 ocollection/oassocdbm.cmo: oassoc.cmi common.cmi ocollection/oassocdbm.cmi 
 ocollection/oassocdbm.cmx: oassoc.cmx common.cmx ocollection/oassocdbm.cmi 
-ocollection/oassoch.cmo: oassoc.cmi common.cmi 
-ocollection/oassoch.cmx: oassoc.cmx common.cmx 
+ocollection/oassoch.cmo: oassoc.cmi ocamlextra/dumper.cmi common.cmi 
+ocollection/oassoch.cmx: oassoc.cmx ocamlextra/dumper.cmx common.cmx 
 ocollection/oassocid.cmo: oassoc.cmi common.cmi 
 ocollection/oassocid.cmx: oassoc.cmx common.cmx 
-ocollection/ograph2way.cmo: oset.cmi ograph.cmi ocollection.cmi common.cmi \
-    ocollection/ograph2way.cmi 
-ocollection/ograph2way.cmx: oset.cmx ograph.cmx ocollection.cmx common.cmx \
-    ocollection/ograph2way.cmi 
-ocollection/osetb.cmo: oset.cmi ocollection.cmi 
-ocollection/osetb.cmx: oset.cmx ocollection.cmx 
+ocollection/ograph2way.cmo: ocamlextra/setb.cmi ocollection/osetb.cmo \
+    oset.cmi ograph.cmi ocollection.cmi common.cmi ocollection/ograph2way.cmi 
+ocollection/ograph2way.cmx: ocamlextra/setb.cmx ocollection/osetb.cmx \
+    oset.cmx ograph.cmx ocollection.cmx common.cmx ocollection/ograph2way.cmi 
+ocollection/osetb.cmo: ocamlextra/setb.cmi oset.cmi ocollection.cmi 
+ocollection/osetb.cmx: ocamlextra/setb.cmx oset.cmx ocollection.cmx 
 ocollection/oseth.cmo: oset.cmi common.cmi 
 ocollection/oseth.cmx: oset.cmx common.cmx 
 ocollection/oseti.cmo: seti.cmo oset.cmi ocollection.cmi 
 ocollection/oseti.cmx: seti.cmx oset.cmx ocollection.cmx 
-ocollection/osetpt.cmo: oset.cmi ocollection.cmi 
-ocollection/osetpt.cmx: oset.cmx ocollection.cmx 
+ocollection/osetpt.cmo: ocamlextra/setPt.cmo oset.cmi ocollection.cmi 
+ocollection/osetpt.cmx: ocamlextra/setPt.cmx oset.cmx ocollection.cmx 
 ocollection/oassoc_buffer.cmi: ocollection.cmi oassoc.cmi 
-ocollection/oassocbdb.cmi: ocollection.cmi oassoc.cmi 
-ocollection/oassocbdb_string.cmi: ocollection.cmi oassoc.cmi 
+ocollection/oassocbdb.cmi: ocollection.cmi ocollection/oassoc_buffer.cmi \
+    oassoc.cmi 
+ocollection/oassocbdb_string.cmi: ocollection.cmi \
+    ocollection/oassoc_buffer.cmi oassoc.cmi 
 ocollection/oassocdbm.cmi: ocollection.cmi oassoc.cmi common.cmi 
 ocollection/ograph2way.cmi: oset.cmi ograph.cmi 
index b30a105..e30d1af 100644 (file)
@@ -292,7 +292,7 @@ clean::
 
 depend: 
        $(OCAMLDEP) *.mli *.ml  > .depend
-       for i in $(SUBDIRS); do ocamldep $$i/*.ml $$i/*.mli >> .depend; done
+       for i in $(SUBDIRS); do $(OCAMLDEP) $$i/*.ml $$i/*.mli >> .depend; done
 
 distclean::
        rm -f .depend
index 807b72c..d8055a2 100644 (file)
@@ -5081,7 +5081,6 @@ let string_of_parse_info x =
 let string_of_parse_info_bis x = 
   spf "%s:%d:%d" x.file x.line x.column
 
-
 let (info_from_charpos2: int -> filename -> (int * int * string)) = 
  fun charpos filename ->
 
@@ -5096,21 +5095,26 @@ let (info_from_charpos2: int -> filename -> (int * int * string)) =
   let chan = open_in filename in
   let linen  = ref 0 in
   let posl   = ref 0 in
-  let rec charpos_to_pos_aux () =
-    let s = (input_line chan) in
+  let rec charpos_to_pos_aux last_valid =
+    let s =
+      try Some (input_line chan)
+      with End_of_file when charpos = last_valid -> None in
     incr linen;
-    let s = s ^ "\n" in
-    if (!posl + slength s > charpos)
-    then begin
-      close_in chan;
-      (!linen, charpos - !posl, s)
-    end
-    else begin
-      posl := !posl + slength s;
-      charpos_to_pos_aux ();
-    end
+    match s with
+      Some s ->
+       let s = s ^ "\n" in
+       if (!posl + slength s > charpos)
+       then begin
+         close_in chan;
+         (!linen, charpos - !posl, s)
+       end
+       else begin
+         posl := !posl + slength s;
+         charpos_to_pos_aux !posl;
+       end
+    | None -> (!linen, charpos - !posl, "\n")
   in 
-  let res = charpos_to_pos_aux () in
+  let res = charpos_to_pos_aux 0 in
   close_in chan;
   res
 
@@ -5181,13 +5185,11 @@ let (error_messagebis: filename -> (string * int) -> int -> string)=
     filename line pos charpos tok (chop linecontent)
 
 let error_message = fun filename (lexeme, lexstart) -> 
-  try 
-    error_messagebis filename (lexeme, lexstart) 0    
-  with End_of_file -> 
-    begin
+  try error_messagebis filename (lexeme, lexstart) 0    
+  with
+    End_of_file ->
       ("PB in Common.error_message, position " ^ i_to_s lexstart ^
-              " given out of file:" ^ filename);
-    end
+       " given out of file:" ^ filename)
 
 
 
index d29bc26..b1d1ee7 100644 (file)
@@ -1,6 +1,6 @@
 Coccinelle - Julia Lawall, Yoann Padioleau, Rene Rydhof Hansen, Henrik Stuart
 
-Copyright (C) 2005-2008 University of Copenhagen DIKU, Ecole des Mines de Nantes
+Copyright (C) 2005-2009 University of Copenhagen DIKU, Ecole des Mines de Nantes
 
   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License (GPL)
diff --git a/ctl/.#ctl_engine.ml.1.185 b/ctl/.#ctl_engine.ml.1.185
deleted file mode 100644 (file)
index cee310c..0000000
+++ /dev/null
@@ -1,2418 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(*external c_counter : unit -> int = "c_counter"*)
-let timeout = 800
-(* Optimize triples_conj by first extracting the intersection of the two sets,
-which can certainly be in the intersection *)
-let pTRIPLES_CONJ_OPT = ref true
-(* For complement, make NegState for the negation of a single state *)
-let pTRIPLES_COMPLEMENT_OPT = ref true
-(* For complement, do something special for the case where the environment
-and witnesses are empty *)
-let pTRIPLES_COMPLEMENT_SIMPLE_OPT = ref true
-(* "Double negate" the arguments of the path operators *)
-let pDOUBLE_NEGATE_OPT = ref true
-(* Only do pre_forall/pre_exists on new elements in fixpoint iteration *)
-let pNEW_INFO_OPT = ref true
-(* Filter the result of the label function to drop entries that aren't
-compatible with any of the available environments *)
-let pREQUIRED_ENV_OPT = ref true
-(* Memoize the raw result of the label function *)
-let pSATLABEL_MEMO_OPT = ref true
-(* Filter results according to the required states *)
-let pREQUIRED_STATES_OPT = ref true
-(* Drop negative witnesses at Uncheck *)
-let pUNCHECK_OPT = ref true
-let pANY_NEG_OPT = ref true
-let pLazyOpt = ref true
-
-(*
-let pTRIPLES_CONJ_OPT = ref false
-let pTRIPLES_COMPLEMENT_OPT = ref false
-let pTRIPLES_COMPLEMENT_SIMPLE_OPT = ref false
-let pDOUBLE_NEGATE_OPT = ref false
-let pNEW_INFO_OPT = ref false
-let pREQUIRED_ENV_OPT = ref false
-let pSATLABEL_MEMO_OPT = ref false
-let pREQUIRED_STATES_OPT = ref false
-let pUNCHECK_OPT = ref false
-let pANY_NEG_OPT = ref false
-let pLazyOpt = ref false
-*)
-
-
-let step_count = ref 0
-exception Steps
-let inc_step _ =
-  if not (!step_count = 0)
-  then
-    begin
-      step_count := !step_count - 1;
-      if !step_count = 0 then raise Steps
-    end
-
-let inc cell = cell := !cell + 1
-
-let satEU_calls = ref 0
-let satAW_calls = ref 0
-let satAU_calls = ref 0
-let satEF_calls = ref 0
-let satAF_calls = ref 0
-let satEG_calls = ref 0
-let satAG_calls = ref 0
-
-let triples = ref 0
-
-let ctr = ref 0
-let new_let _ =
-  let c = !ctr in
-  ctr := c + 1;
-  Printf.sprintf "_fresh_r_%d" c
-
-(* **********************************************************************
- *
- * Implementation of a Witness Tree model checking engine for CTL-FVex 
- * 
- *
- * **********************************************************************)
-
-(* ********************************************************************** *)
-(* Module: SUBST (substitutions: meta. vars and values)                   *)
-(* ********************************************************************** *)
-
-module type SUBST =
-  sig
-    type value
-    type mvar
-    val eq_mvar: mvar -> mvar -> bool
-    val eq_val: value -> value -> bool
-    val merge_val: value -> value -> value
-    val print_mvar : mvar -> unit
-    val print_value : value -> unit
-  end
-;;
-
-(* ********************************************************************** *)
-(* Module: GRAPH (control flow graphs / model)                            *)
-(* ********************************************************************** *)
-
-module type GRAPH =
-  sig
-    type node
-    type cfg
-    val predecessors:     cfg -> node -> node list
-    val successors:       cfg -> node -> node list
-    val extract_is_loop : cfg -> node -> bool
-    val print_node :      node -> unit
-    val size :            cfg -> int
-  end
-;;
-
-module OGRAPHEXT_GRAPH = 
-  struct
-    type node = int;;
-    type cfg = (string,unit) Ograph_extended.ograph_mutable;;
-    let predecessors cfg n = List.map fst ((cfg#predecessors n)#tolist);;
-    let print_node i = Format.print_string (Common.i_to_s i)
-  end
-;;
-
-(* ********************************************************************** *)
-(* Module: PREDICATE (predicates for CTL formulae)                        *)
-(* ********************************************************************** *)
-
-module type PREDICATE =
-sig
-  type t
-  val print_predicate : t -> unit
-end
-
-
-(* ********************************************************************** *)
-
-(* ---------------------------------------------------------------------- *)
-(* Misc. useful generic functions                                         *)
-(* ---------------------------------------------------------------------- *)
-
-let head = List.hd
-
-let tail l = 
-  match l with
-    [] -> []
-  | (x::xs) -> xs
-;;
-
-let foldl = List.fold_left;;
-
-let foldl1 f xs = foldl f (head xs) (tail xs)
-
-type 'a esc = ESC of 'a | CONT of 'a
-
-let foldr = List.fold_right;;
-
-let concat = List.concat;;
-
-let map = List.map;;
-
-let filter = List.filter;;
-
-let partition = List.partition;;
-
-let concatmap f l = List.concat (List.map f l);;
-
-let maybe f g opt =
-  match opt with
-    | None -> g
-    | Some x -> f x
-;;
-
-let some_map f opts = map (maybe (fun x -> Some (f x)) None) opts
-
-let some_tolist_alt opts = concatmap (maybe (fun x -> [x]) []) opts
-
-let rec some_tolist opts =
-  match opts with
-    | []             -> []
-    | (Some x)::rest -> x::(some_tolist rest)
-    | _::rest        -> some_tolist rest 
-;;
-
-let rec groupBy eq l =
-    match l with
-      [] -> []
-    | (x::xs) -> 
-       let (xs1,xs2) = partition (fun x' -> eq x x') xs in
-       (x::xs1)::(groupBy eq xs2)
-;;
-
-let group l = groupBy (=) l;;
-
-let rec memBy eq x l =
-  match l with
-    [] -> false
-  | (y::ys) -> if (eq x y) then true else (memBy eq x ys)
-;;
-
-let rec nubBy eq ls =
-  match ls with
-    [] -> []
-  | (x::xs) when (memBy eq x xs) -> nubBy eq xs
-  | (x::xs) -> x::(nubBy eq xs)
-;;
-
-let rec nub ls =
-  match ls with
-    [] -> []
-  | (x::xs) when (List.mem x xs) -> nub xs
-  | (x::xs) -> x::(nub xs)
-;;
-
-let state_compare (s1,_,_) (s2,_,_) = compare s1 s2
-
-let setifyBy eq xs = nubBy eq xs;;
-
-let setify xs = nub xs;;
-
-let inner_setify xs = List.sort compare (nub xs);;
-
-let unionBy compare eq xs = function
-    [] -> xs
-  | ys ->
-      let rec loop = function
-         [] -> ys
-       | x::xs -> if memBy eq x ys then loop xs else x::(loop xs) in
-      List.sort compare (loop xs)
-;;
-
-let union xs ys = unionBy state_compare (=) xs ys;;
-
-let setdiff xs ys = filter (fun x -> not (List.mem x ys)) xs;;
-
-let subseteqBy eq xs ys = List.for_all (fun x -> memBy eq x ys) xs;;
-
-let subseteq xs ys = List.for_all (fun x -> List.mem x ys) xs;;
-let supseteq xs ys = subseteq ys xs
-
-let setequalBy eq xs ys = (subseteqBy eq xs ys) & (subseteqBy eq ys xs);;
-
-let setequal xs ys = (subseteq xs ys) & (subseteq ys xs);;
-
-(* Fix point calculation *)
-let rec fix eq f x =
-  let x' = f x in if (eq x' x) then x' else fix eq f x'
-;;
-
-(* Fix point calculation on set-valued functions *)
-let setfix f x = (fix subseteq f x) (*if new is a subset of old, stop*)
-let setgfix f x = (fix supseteq f x) (*if new is a supset of old, stop*)
-
-let get_states l = nub (List.map (function (s,_,_) -> s) l)
-
-(* ********************************************************************** *)
-(* Module: CTL_ENGINE                                                     *)
-(* ********************************************************************** *)
-
-module CTL_ENGINE =
-  functor (SUB : SUBST) -> 
-    functor (G : GRAPH) ->
-      functor (P : PREDICATE) ->
-struct
-
-module A = Ast_ctl
-
-type substitution = (SUB.mvar, SUB.value) Ast_ctl.generic_substitution
-
-type ('pred,'anno) witness =
-    (G.node, substitution,
-     ('pred, SUB.mvar, 'anno) Ast_ctl.generic_ctl list)
-      Ast_ctl.generic_witnesstree
-
-type ('pred,'anno) triples =
-    (G.node * substitution * ('pred,'anno) witness list) list
-
-(* ---------------------------------------------------------------------- *)
-(* Pretty printing functions *)
-(* ---------------------------------------------------------------------- *)
-
-let (print_generic_substitution : substitution -> unit) = fun substxs ->
-  let print_generic_subst = function
-      A.Subst (mvar, v) ->
-       SUB.print_mvar mvar; Format.print_string " --> "; SUB.print_value v
-    | A.NegSubst (mvar, v) -> 
-       SUB.print_mvar mvar; Format.print_string " -/-> "; SUB.print_value v in
-  Format.print_string "[";
-  Common.print_between (fun () -> Format.print_string ";" )
-    print_generic_subst substxs;
-  Format.print_string "]"
-
-let rec (print_generic_witness: ('pred, 'anno) witness -> unit) =
-  function
-  | A.Wit (state, subst, anno, childrens) -> 
-      Format.print_string "wit ";
-      G.print_node state;
-      print_generic_substitution subst;
-      (match childrens with
-       [] -> Format.print_string "{}"
-      |        _ -> 
-         Format.force_newline(); Format.print_string "   "; Format.open_box 0;
-         print_generic_witnesstree childrens; Format.close_box())
-  | A.NegWit(wit) -> 
-      Format.print_string "!";
-      print_generic_witness wit
-
-and (print_generic_witnesstree: ('pred,'anno) witness list -> unit) =
-  fun witnesstree ->
-    Format.open_box 1;
-    Format.print_string "{";
-    Common.print_between
-      (fun () -> Format.print_string ";"; Format.force_newline() ) 
-      print_generic_witness witnesstree;
-    Format.print_string "}";
-    Format.close_box()
-      
-and print_generic_triple (node,subst,tree) =
-  G.print_node node;
-  print_generic_substitution subst;
-  print_generic_witnesstree tree
-
-and (print_generic_algo : ('pred,'anno) triples -> unit) = fun xs -> 
-  Format.print_string "<";
-  Common.print_between
-    (fun () -> Format.print_string ";"; Format.force_newline())
-    print_generic_triple xs;
-  Format.print_string ">"
-;;
-
-let print_state (str : string) (l : ('pred,'anno) triples) =
-  Printf.printf "%s\n" str;
-  List.iter (function x ->
-    print_generic_triple x; Format.print_newline(); flush stdout)
-    (List.sort compare l);
-  Printf.printf "\n"
-    
-let print_required_states = function
-    None -> Printf.printf "no required states\n"
-  | Some states ->
-      Printf.printf "required states: ";
-      List.iter
-       (function x ->
-         G.print_node x; Format.print_string " "; Format.print_flush())
-       states;
-      Printf.printf "\n"
-
-let mkstates states = function
-    None -> states
-  | Some states -> states
-    
-(* ---------------------------------------------------------------------- *)
-(*                                                                        *)
-(* ---------------------------------------------------------------------- *)
-    
-    
-(* ************************* *)
-(* Substitutions             *)
-(* ************************* *)
-    
-let dom_sub sub =
-  match sub with
-  | A.Subst(x,_)    -> x
-  | A.NegSubst(x,_) -> x
-;;
-       
-let ran_sub sub =
-  match sub with
-  | A.Subst(_,x)    -> x
-  | A.NegSubst(_,x) -> x
-;;
-       
-let eq_subBy eqx eqv sub sub' =
-  match (sub,sub') with 
-    | (A.Subst(x,v),A.Subst(x',v'))       -> (eqx x x') && (eqv v v')
-    | (A.NegSubst(x,v),A.NegSubst(x',v')) -> (eqx x x') && (eqv v v')
-    | _                               -> false
-;;
-
-(* NOTE: functor *)
-let eq_sub sub sub' = eq_subBy SUB.eq_mvar SUB.eq_val sub sub'
-
-let eq_subst th th' = setequalBy eq_sub th th';;
-
-let merge_subBy eqx (===) (>+<) sub sub' =
-  (* variable part is guaranteed to be the same *)
-  match (sub,sub') with
-    (A.Subst (x,v),A.Subst (x',v')) -> 
-      if (v === v')
-      then Some [A.Subst(x, v >+< v')]
-      else None
-  | (A.NegSubst(x,v),A.Subst(x',v')) ->
-      if (not (v === v'))
-      then Some [A.Subst(x',v')]
-      else None
-  | (A.Subst(x,v),A.NegSubst(x',v')) ->
-      if (not (v === v'))
-      then Some [A.Subst(x,v)]
-      else None
-  | (A.NegSubst(x,v),A.NegSubst(x',v')) ->
-      if (v === v')
-      then
-       let merged = v >+< v' in
-       if merged = v && merged = v'
-       then Some [A.NegSubst(x,v >+< v')]
-       else
-         (* positions are compatible, but not identical. keep apart. *)
-         Some [A.NegSubst(x,v);A.NegSubst(x',v')]
-      else Some [A.NegSubst(x,v);A.NegSubst(x',v')]
-;;
-
-(* NOTE: functor *)
-let merge_sub sub sub' = 
-  merge_subBy SUB.eq_mvar SUB.eq_val SUB.merge_val sub sub'
-
-let clean_substBy eq cmp theta = List.sort cmp (nubBy eq theta);;
-
-(* NOTE: we sort by using the generic "compare" on (meta-)variable
- *   names; we could also require a definition of compare for meta-variables 
- *   or substitutions but that seems like overkill for sorting
- *)
-let clean_subst theta = 
-  let res = 
-    clean_substBy eq_sub
-      (fun s s' ->
-       let res = compare (dom_sub s) (dom_sub s') in
-       if res = 0
-       then
-         match (s,s') with
-           (A.Subst(_,_),A.NegSubst(_,_)) -> -1
-         | (A.NegSubst(_,_),A.Subst(_,_)) -> 1
-         | _ -> compare (ran_sub s) (ran_sub s')
-       else res)
-      theta in
-  let rec loop = function
-      [] -> []
-    | (A.Subst(x,v)::A.NegSubst(y,v')::rest) when SUB.eq_mvar x y ->
-       loop (A.Subst(x,v)::rest)
-    | x::xs -> x::(loop xs) in
-  loop res
-
-let top_subst = [];;                   (* Always TRUE subst. *)
-
-(* Split a theta in two parts: one with (only) "x" and one without *)
-(* NOTE: functor *)
-let split_subst theta x = 
-  partition (fun sub -> SUB.eq_mvar (dom_sub sub) x) theta;;
-
-exception SUBST_MISMATCH
-let conj_subst theta theta' =
-  match (theta,theta') with
-    | ([],_) -> Some theta'
-    | (_,[]) -> Some theta
-    | _ ->
-       let rec classify = function
-           [] -> []
-         | [x] -> [(dom_sub x,[x])]
-         | x::xs ->
-             (match classify xs with
-               ((nm,y)::ys) as res ->
-                 if dom_sub x = nm
-                 then (nm,x::y)::ys
-                 else (dom_sub x,[x])::res
-             | _ -> failwith "not possible") in
-       let merge_all theta theta' =
-         foldl
-           (function rest ->
-             function sub ->
-               foldl
-                 (function rest ->
-                   function sub' ->
-                     match (merge_sub sub sub') with
-                       Some subs -> subs @ rest
-                     | _         -> raise SUBST_MISMATCH)
-                 rest theta')
-           [] theta in
-       let rec loop = function
-           ([],ctheta') ->
-             List.concat (List.map (function (_,ths) -> ths) ctheta')
-         | (ctheta,[]) ->
-             List.concat (List.map (function (_,ths) -> ths) ctheta)
-         | ((x,ths)::xs,(y,ths')::ys) ->
-             (match compare x y with
-               0 -> (merge_all ths ths') @ loop (xs,ys)
-             | -1 -> ths @ loop (xs,((y,ths')::ys))
-             | 1 -> ths' @ loop (((x,ths)::xs),ys)
-             | _ -> failwith "not possible") in
-       try Some (clean_subst(loop (classify theta, classify theta')))
-       with SUBST_MISMATCH -> None
-;;
-
-(* theta' must be a subset of theta *)
-let conj_subst_none theta theta' =
-  match (theta,theta') with
-    | (_,[]) -> Some theta
-    | ([],_) -> None
-    | _ ->
-       let rec classify = function
-           [] -> []
-         | [x] -> [(dom_sub x,[x])]
-         | x::xs ->
-             (match classify xs with
-               ((nm,y)::ys) as res ->
-                 if dom_sub x = nm
-                 then (nm,x::y)::ys
-                 else (dom_sub x,[x])::res
-             | _ -> failwith "not possible") in
-       let merge_all theta theta' =
-         foldl
-           (function rest ->
-             function sub ->
-               foldl
-                 (function rest ->
-                   function sub' ->
-                     match (merge_sub sub sub') with
-                       Some subs -> subs @ rest
-                     | _         -> raise SUBST_MISMATCH)
-                 rest theta')
-           [] theta in
-       let rec loop = function
-           (ctheta,[]) ->
-             List.concat (List.map (function (_,ths) -> ths) ctheta)
-         | ([],ctheta') -> raise SUBST_MISMATCH
-         | ((x,ths)::xs,(y,ths')::ys) ->
-             (match compare x y with
-               0 -> (merge_all ths ths') @ loop (xs,ys)
-             | -1 -> ths @ loop (xs,((y,ths')::ys))
-             | 1 -> raise SUBST_MISMATCH
-             | _ -> failwith "not possible") in
-       try Some (clean_subst(loop (classify theta, classify theta')))
-       with SUBST_MISMATCH -> None
-;;
-
-let negate_sub sub =
-  match sub with
-    | A.Subst(x,v)    -> A.NegSubst (x,v)
-    | A.NegSubst(x,v) -> A.Subst(x,v)
-;;
-
-(* Turn a (big) theta into a list of (small) thetas *)
-let negate_subst theta = (map (fun sub -> [negate_sub sub]) theta);;
-
-
-(* ************************* *)
-(* Witnesses                 *)
-(* ************************* *)
-
-(* Always TRUE witness *)
-let top_wit = ([] : (('pred, 'anno) witness list));;
-
-let eq_wit wit wit' = wit = wit';;
-
-let union_wit wit wit' = (*List.sort compare (wit' @ wit) for popl*)
-  let res = unionBy compare (=) wit wit' in
-  let anynegwit = (* if any is neg, then all are *)
-    List.exists (function A.NegWit _ -> true | A.Wit _ -> false) in
-  if anynegwit res
-  then List.filter (function A.NegWit _ -> true | A.Wit _ -> false) res
-  else res
-
-let negate_wit wit = A.NegWit wit (*
-  match wit with
-    | A.Wit(s,th,anno,ws)    -> A.NegWitWit(s,th,anno,ws)
-    | A.NegWitWit(s,th,anno,ws) -> A.Wit(s,th,anno,ws)*)
-;;
-
-let negate_wits wits =
-  List.sort compare (map (fun wit -> [negate_wit wit]) wits);;
-
-let unwitify trips =
-  let anynegwit = (* if any is neg, then all are *)
-    List.exists (function A.NegWit _ -> true | A.Wit _ -> false) in
-  setify
-    (List.fold_left
-       (function prev ->
-        function (s,th,wit) ->
-          if anynegwit wit then prev else (s,th,top_wit)::prev)
-       [] trips)
-
-(* ************************* *)
-(* Triples                   *)
-(* ************************* *)
-
-(* Triples are equal when the constituents are equal *)
-let eq_trip (s,th,wit) (s',th',wit') =
-  (s = s') && (eq_wit wit wit') && (eq_subst th th');;
-
-let triples_top states = map (fun s -> (s,top_subst,top_wit)) states;;
-
-let normalize trips =
-  List.map
-    (function (st,th,wit) -> (st,List.sort compare th,List.sort compare wit))
-    trips
-       
-
-(* conj opt doesn't work ((1,[],{{x=3}}) v (1,[],{{x=4}})) & (1,[],{{x=4}}) =
-(1,[],{{x=3},{x=4}}), not (1,[],{{x=4}}) *)
-let triples_conj trips trips' =
-  let (trips,shared,trips') =
-    if false && !pTRIPLES_CONJ_OPT (* see comment above *)
-    then
-      let (shared,trips) =
-       List.partition (function t -> List.mem t trips') trips in
-      let trips' =
-       List.filter (function t -> not(List.mem t shared)) trips' in
-      (trips,shared,trips')
-    else (trips,[],trips') in
-  foldl (* returns a set - setify inlined *)
-    (function rest ->
-      function (s1,th1,wit1) ->
-       foldl
-         (function rest ->
-           function (s2,th2,wit2) ->
-             if (s1 = s2) then
-               (match (conj_subst th1 th2) with
-                 Some th ->
-                   let t = (s1,th,union_wit wit1 wit2) in
-                   if List.mem t rest then rest else t::rest
-               | _       -> rest)
-             else rest)
-         rest trips')
-    shared trips
-;;
-
-(* ignore the state in the right argument.  always pretend it is the same as
-the left one *)
-(* env on right has to be a subset of env on left *)
-let triples_conj_none trips trips' =
-  let (trips,shared,trips') =
-    if false && !pTRIPLES_CONJ_OPT (* see comment above *)
-    then
-      let (shared,trips) =
-       List.partition (function t -> List.mem t trips') trips in
-      let trips' =
-       List.filter (function t -> not(List.mem t shared)) trips' in
-      (trips,shared,trips')
-    else (trips,[],trips') in
-  foldl (* returns a set - setify inlined *)
-    (function rest ->
-      function (s1,th1,wit1) ->
-       foldl
-         (function rest ->
-           function (s2,th2,wit2) ->
-             match (conj_subst_none th1 th2) with
-               Some th ->
-                 let t = (s1,th,union_wit wit1 wit2) in
-                 if List.mem t rest then rest else t::rest
-             | _       -> rest)
-         rest trips')
-    shared trips
-;;
-
-exception AW
-
-let triples_conj_AW trips trips' =
-  let (trips,shared,trips') =
-    if false && !pTRIPLES_CONJ_OPT
-    then
-      let (shared,trips) =
-       List.partition (function t -> List.mem t trips') trips in
-      let trips' =
-       List.filter (function t -> not(List.mem t shared)) trips' in
-      (trips,shared,trips')
-    else (trips,[],trips') in
-  foldl (* returns a set - setify inlined *)
-    (function rest ->
-      function (s1,th1,wit1) ->
-       foldl
-         (function rest ->
-           function (s2,th2,wit2) ->
-             if (s1 = s2) then
-               (match (conj_subst th1 th2) with
-                 Some th ->
-                   let t = (s1,th,union_wit wit1 wit2) in
-                   if List.mem t rest then rest else t::rest
-               | _ -> raise AW)
-             else rest)
-         rest trips')
-    shared trips
-;;
-
-(* *************************** *)
-(* NEGATION (NegState style)   *)
-(* *************************** *)
-
-(* Constructive negation at the state level *)
-type ('a) state =
-    PosState of 'a
-  | NegState of 'a list
-;;
-
-let compatible_states = function
-    (PosState s1, PosState s2) -> 
-      if s1 = s2 then Some (PosState s1) else None
-  | (PosState s1, NegState s2) -> 
-      if List.mem s1 s2 then None else Some (PosState s1)
-  | (NegState s1, PosState s2) -> 
-      if List.mem s2 s1 then None else Some (PosState s2)
-  | (NegState s1, NegState s2) -> Some (NegState (s1 @ s2))
-;;
-
-(* Conjunction on triples with "special states" *)
-let triples_state_conj trips trips' =
-  let (trips,shared,trips') =
-    if !pTRIPLES_CONJ_OPT
-    then
-      let (shared,trips) =
-       List.partition (function t -> List.mem t trips') trips in
-      let trips' =
-       List.filter (function t -> not(List.mem t shared)) trips' in
-      (trips,shared,trips')
-    else (trips,[],trips') in
-  foldl
-    (function rest ->
-      function (s1,th1,wit1) ->
-       foldl
-         (function rest ->
-           function (s2,th2,wit2) ->
-             match compatible_states(s1,s2) with
-               Some s ->
-                 (match (conj_subst th1 th2) with
-                   Some th ->
-                     let t = (s,th,union_wit wit1 wit2) in
-                     if List.mem t rest then rest else t::rest
-                 | _ -> rest)
-             | _ -> rest)
-         rest trips')
-    shared trips
-;;
-
-let triple_negate (s,th,wits) = 
-  let negstates = (NegState [s],top_subst,top_wit) in
-  let negths = map (fun th -> (PosState s,th,top_wit)) (negate_subst th) in
-  let negwits = map (fun nwit -> (PosState s,th,nwit)) (negate_wits wits) in
-    negstates :: (negths @ negwits) (* all different *)
-
-(* FIX ME: it is not necessary to do full conjunction *)
-let triples_complement states (trips : ('pred, 'anno) triples) =
-  if !pTRIPLES_COMPLEMENT_OPT
-  then
-    (let cleanup (s,th,wit) =
-      match s with
-       PosState s' -> [(s',th,wit)]
-      | NegState ss ->
-         assert (th=top_subst);
-         assert (wit=top_wit);
-         map (fun st -> (st,top_subst,top_wit)) (setdiff states ss) in
-    let (simple,complex) =
-      if !pTRIPLES_COMPLEMENT_SIMPLE_OPT
-      then
-       let (simple,complex) =
-         List.partition (function (s,[],[]) -> true | _ -> false) trips in
-       let simple =
-         [(NegState(List.map (function (s,_,_) -> s) simple),
-           top_subst,top_wit)] in
-       (simple,complex)
-      else ([(NegState [],top_subst,top_wit)],trips) in
-    let rec compl trips =
-      match trips with
-       [] -> simple
-      | (t::ts) -> triples_state_conj (triple_negate t) (compl ts) in
-    let compld = (compl complex) in
-    let compld = concatmap cleanup compld in
-    compld)
-  else
-    let negstates (st,th,wits) =
-      map (function st -> (st,top_subst,top_wit)) (setdiff states [st]) in
-    let negths (st,th,wits) =
-      map (function th -> (st,th,top_wit)) (negate_subst th) in
-    let negwits (st,th,wits) =
-      map (function nwit -> (st,th,nwit)) (negate_wits wits) in
-    match trips with
-      [] -> map (function st -> (st,top_subst,top_wit)) states
-    | x::xs ->
-       setify
-         (foldl
-            (function prev ->
-              function cur ->
-                triples_conj (negstates cur @ negths cur @ negwits cur) prev)
-            (negstates x @ negths x @ negwits x) xs)
-;;
-
-let triple_negate (s,th,wits) = 
-  let negths = map (fun th -> (s,th,top_wit)) (negate_subst th) in
-  let negwits = map (fun nwit -> (s,th,nwit)) (negate_wits wits) in
-  ([s], negths @ negwits) (* all different *)
-
-let print_compl_state str (n,p) =
-  Printf.printf "%s neg: " str;
-  List.iter
-    (function x -> G.print_node x; Format.print_flush(); Printf.printf " ")
-    n;
-  Printf.printf "\n";
-  print_state "pos" p
-
-let triples_complement states (trips : ('pred, 'anno) triples) =
-  if trips = []
-  then map (function st -> (st,top_subst,top_wit)) states
-  else
-    let cleanup (neg,pos) =
-      let keep_pos =
-       List.filter (function (s,_,_) -> List.mem s neg) pos in
-      (map (fun st -> (st,top_subst,top_wit)) (setdiff states neg)) @
-      keep_pos in
-    let trips = List.sort state_compare trips in
-    let all_negated = List.map triple_negate trips in
-    let merge_one (neg1,pos1) (neg2,pos2) =
-      let (pos1conj,pos1keep) =
-       List.partition (function (s,_,_) -> List.mem s neg2) pos1 in
-      let (pos2conj,pos2keep) =
-       List.partition (function (s,_,_) -> List.mem s neg1) pos2 in
-      (Common.union_set neg1 neg2,
-       (triples_conj pos1conj pos2conj) @ pos1keep @ pos2keep) in
-    let rec inner_loop = function
-       x1::x2::rest -> (merge_one x1 x2) :: (inner_loop rest)
-      | l -> l in
-    let rec outer_loop = function
-       [x] -> x
-      | l -> outer_loop (inner_loop l) in
-    cleanup (outer_loop all_negated)
-
-(* ********************************** *)
-(* END OF NEGATION (NegState style)   *)
-(* ********************************** *)
-
-(* now this is always true, so we could get rid of it *)
-let something_dropped = ref true
-
-let triples_union trips trips' =
-  (*unionBy compare eq_trip trips trips';;*)
-  (* returns -1 is t1 > t2, 1 if t2 >= t1, and 0 otherwise *)
-(*
-The following does not work.  Suppose we have ([x->3],{A}) and ([],{A,B}).
-Then, the following says that since the first is a more restrictive
-environment and has fewer witnesses, then it should be dropped. But having
-fewer witnesses is not necessarily less informative than having more,
-because fewer witnesses can mean the absence of the witness-causing thing.
-So the fewer witnesses have to be kept around.
-subseteq changed to = to make it hopefully work
-*)
-  if !pNEW_INFO_OPT
-  then
-    begin
-      something_dropped := false;
-      if trips = trips'
-      then (something_dropped := true; trips)
-      else
-       let subsumes (s1,th1,wit1) (s2,th2,wit2) =
-         if s1 = s2
-         then
-           (match conj_subst th1 th2 with
-             Some conj ->
-               if conj = th1
-               then if (*subseteq*) wit1 = wit2 then 1 else 0
-               else
-                 if conj = th2
-                 then if (*subseteq*) wit2 = wit1 then (-1) else 0
-                 else 0
-           | None -> 0)
-         else 0 in
-       let rec first_loop second = function
-           [] -> second
-         | x::xs -> first_loop (second_loop x second) xs
-       and second_loop x = function
-           [] -> [x]
-         | (y::ys) as all ->
-             match subsumes x y with
-               1 -> something_dropped := true; all
-             | (-1) -> second_loop x ys
-             | _ -> y::(second_loop x ys) in
-       first_loop trips trips'
-    end
-  else unionBy compare eq_trip trips trips'
-
-
-let triples_witness x unchecked not_keep trips =
-  let anyneg = (* if any is neg, then all are *)
-    List.exists (function A.NegSubst _ -> true | A.Subst _ -> false) in
-  let anynegwit = (* if any is neg, then all are *)
-    List.exists (function A.NegWit _ -> true | A.Wit _ -> false) in
-  let allnegwit = (* if any is neg, then all are *)
-    List.for_all (function A.NegWit _ -> true | A.Wit _ -> false) in
-  let negtopos =
-    List.map (function A.NegWit w -> w | A.Wit _ -> failwith "bad wit")in
-  let res = 
-    List.fold_left
-      (function prev ->
-       function (s,th,wit) as t ->
-         let (th_x,newth) = split_subst th x in
-         match th_x with
-           [] ->
-             (* one consider whether if not not_keep is true, then we should
-                fail.  but it could be that the variable is a used_after and
-                then it is the later rule that should fail and not this one *)
-             if not not_keep && !Flag_ctl.verbose_ctl_engine
-             then
-               (SUB.print_mvar x; Format.print_flush();
-                print_state ": empty witness from" [t]);
-             t::prev
-         | l when anyneg l && !pANY_NEG_OPT -> prev
-             (* see tests/nestseq for how neg bindings can come up even
-                without eg partial matches
-              (* negated substitution only allowed with negwits.
-                just dropped *)
-             if anynegwit wit && allnegwit wit (* nonempty negwit list *)
-             then prev
-             else
-               (print_generic_substitution l; Format.print_newline();
-               failwith"unexpected negative binding with positive witnesses")*)
-         | _ ->
-             let new_triple =
-               if unchecked or not_keep
-               then (s,newth,wit)
-               else
-                 if anynegwit wit && allnegwit wit
-                 then (s,newth,[A.NegWit(A.Wit(s,th_x,[],negtopos wit))])
-                 else (s,newth,[A.Wit(s,th_x,[],wit)]) in
-             new_triple::prev)
-      [] trips in
-  if unchecked || !Flag_ctl.partial_match (* the only way to have a NegWit *)
-  then setify res
-  else List.rev res
-;;
-
-
-(* ---------------------------------------------------------------------- *)
-(* SAT  - Model Checking Algorithm for CTL-FVex                           *)
-(*                                                                        *)
-(* TODO: Implement _all_ operators (directly)                             *)
-(* ---------------------------------------------------------------------- *)
-
-
-(* ************************************* *)
-(* The SAT algorithm and special helpers *)
-(* ************************************* *)
-
-let rec pre_exist dir (grp,_,_) y reqst =
-  let check s =
-    match reqst with None -> true | Some reqst -> List.mem s reqst in
-  let exp (s,th,wit) =
-    concatmap
-      (fun s' -> if check s' then [(s',th,wit)] else [])
-      (match dir with
-       A.FORWARD -> G.predecessors grp s
-      | A.BACKWARD -> G.successors grp s) in
-  setify (concatmap exp y)
-;;
-
-exception Empty
-
-let pre_forall dir (grp,_,states) y all reqst =
-  let check s =
-    match reqst with
-      None -> true | Some reqst -> List.mem s reqst in
-  let pred =
-    match dir with
-      A.FORWARD -> G.predecessors | A.BACKWARD -> G.successors in
-  let succ =
-    match dir with
-      A.FORWARD -> G.successors | A.BACKWARD -> G.predecessors in
-  let neighbors =
-    List.map
-      (function p -> (p,succ grp p))
-      (setify
-        (concatmap
-           (function (s,_,_) -> List.filter check (pred grp s)) y)) in
-  (* would a hash table be more efficient? *)
-  let all = List.sort state_compare all in
-  let rec up_nodes child s = function
-      [] -> []
-    | (s1,th,wit)::xs ->
-       (match compare s1 child with
-         -1 -> up_nodes child s xs
-       | 0 -> (s,th,wit)::(up_nodes child s xs)
-       | _ -> []) in
-  let neighbor_triples =
-    List.fold_left
-      (function rest ->
-       function (s,children) ->
-         try
-           (List.map
-              (function child ->
-                match up_nodes child s all with [] -> raise Empty | l -> l)
-              children) :: rest
-         with Empty -> rest)
-      [] neighbors in
-  match neighbor_triples with
-    [] -> []
-  | _ ->
-      (*normalize*)
-        (foldl1 (@) (List.map (foldl1 triples_conj) neighbor_triples))
-       
-let pre_forall_AW dir (grp,_,states) y all reqst =
-  let check s =
-    match reqst with
-      None -> true | Some reqst -> List.mem s reqst in
-  let pred =
-    match dir with
-      A.FORWARD -> G.predecessors | A.BACKWARD -> G.successors in
-  let succ =
-    match dir with
-      A.FORWARD -> G.successors | A.BACKWARD -> G.predecessors in
-  let neighbors =
-    List.map
-      (function p -> (p,succ grp p))
-      (setify
-        (concatmap
-           (function (s,_,_) -> List.filter check (pred grp s)) y)) in
-  (* would a hash table be more efficient? *)
-  let all = List.sort state_compare all in
-  let rec up_nodes child s = function
-      [] -> []
-    | (s1,th,wit)::xs ->
-       (match compare s1 child with
-         -1 -> up_nodes child s xs
-       | 0 -> (s,th,wit)::(up_nodes child s xs)
-       | _ -> []) in
-  let neighbor_triples =
-    List.fold_left
-      (function rest ->
-       function (s,children) ->
-         (List.map
-            (function child ->
-              match up_nodes child s all with [] -> raise AW | l -> l)
-            children) :: rest)
-      [] neighbors in
-  match neighbor_triples with
-    [] -> []
-  | _ -> foldl1 (@) (List.map (foldl1 triples_conj_AW) neighbor_triples)
-       
-(* drop_negwits will call setify *)
-let satEX dir m s reqst = pre_exist dir m s reqst;;
-    
-let satAX dir m s reqst = pre_forall dir m s s reqst
-;;
-
-(* E[phi1 U phi2] == phi2 \/ (phi1 /\ EXE[phi1 U phi2]) *)
-let satEU dir ((_,_,states) as m) s1 s2 reqst = 
-  inc satEU_calls;
-  if s1 = []
-  then s2
-  else
-    (*let ctr = ref 0 in*)
-    if !pNEW_INFO_OPT
-    then
-      let rec f y new_info =
-       inc_step();
-       match new_info with
-         [] -> y
-       | new_info ->
-           ctr := !ctr + 1;
-           let first = triples_conj s1 (pre_exist dir m new_info reqst) in
-           let res = triples_union first y in
-           let new_info = setdiff res y in
-           (*Printf.printf "iter %d res %d new_info %d\n"
-           !ctr (List.length res) (List.length new_info);
-           flush stdout;*)
-           f res new_info in
-      f s2 s2
-    else
-      let f y =
-       inc_step();
-       let pre = pre_exist dir m y reqst in
-       triples_union s2 (triples_conj s1 pre) in
-      setfix f s2
-;;
-
-(* EF phi == E[true U phi] *)
-let satEF dir m s2 reqst = 
-  inc satEF_calls;
-  (*let ctr = ref 0 in*)
-  if !pNEW_INFO_OPT
-  then
-    let rec f y new_info =
-      inc_step();
-      match new_info with
-       [] -> y
-      | new_info ->
-         (*ctr := !ctr + 1;
-         print_state (Printf.sprintf "iteration %d\n" !ctr) y;*)
-         let first = pre_exist dir m new_info reqst in
-         let res = triples_union first y in
-         let new_info = setdiff res y in
-         (*Printf.printf "EF %s iter %d res %d new_info %d\n"
-           (if dir = A.BACKWARD then "reachable" else "real ef")
-           !ctr (List.length res) (List.length new_info);
-         print_state "new info" new_info;
-         flush stdout;*)
-         f res new_info in
-    f s2 s2
-  else
-    let f y =
-      inc_step();
-      let pre = pre_exist dir m y reqst in
-      triples_union s2 pre in
-    setfix f s2
-
-
-type ('pred,'anno) auok =
-    AUok of ('pred,'anno) triples | AUfailed of ('pred,'anno) triples
-
-(* A[phi1 U phi2] == phi2 \/ (phi1 /\ AXA[phi1 U phi2]) *)
-let satAU dir ((cfg,_,states) as m) s1 s2 reqst =
-  inc satAU_calls;
-  if s1 = []
-  then AUok s2
-  else
-    (*let ctr = ref 0 in*)
-    let pre_forall =
-      if !Flag_ctl.loop_in_src_code
-      then pre_forall_AW
-      else pre_forall in
-    if !pNEW_INFO_OPT
-    then
-      let rec f y newinfo =
-       inc_step();
-       match newinfo with
-         [] -> AUok y
-       | new_info ->
-           (*ctr := !ctr + 1;
-           print_state (Printf.sprintf "iteration %d\n" !ctr) y;
-           flush stdout;*)
-           let pre =
-             try Some (pre_forall dir m new_info y reqst)
-             with AW -> None in
-           match pre with
-             None -> AUfailed y
-           | Some pre ->
-               match triples_conj s1 pre with
-                 [] -> AUok y
-               | first ->
-                   (*print_state "s1" s1;
-                   print_state "pre" pre;
-                   print_state "first" first;*)
-                   let res = triples_union first y in
-                   let new_info =
-                     if not !something_dropped
-                     then first
-                     else setdiff res y in
-                 (*Printf.printf
-                    "iter %d res %d new_info %d\n"
-                    !ctr (List.length res) (List.length new_info);
-                    flush stdout;*)
-                   f res new_info in
-      f s2 s2
-    else
-      if !Flag_ctl.loop_in_src_code
-      then AUfailed s2
-      else
-       (*let setfix =
-         fix (function s1 -> function s2 ->
-           let s1 = List.map (function (s,th,w) -> (s,th,nub w)) s1 in
-           let s2 = List.map (function (s,th,w) -> (s,th,nub w)) s2 in
-           subseteq s1 s2) in for popl *)
-       let f y =
-         inc_step();
-         let pre = pre_forall dir m y y reqst in
-         triples_union s2 (triples_conj s1 pre) in
-       AUok (setfix f s2)
-;;
-
-
-(* reqst could be the states of s1 *)
-      (*
-      let lstates = mkstates states reqst in
-      let initial_removed =
-       triples_complement lstates (triples_union s1 s2) in
-      let initial_base = triples_conj s1 (triples_complement lstates s2) in
-      let rec loop base removed =
-       let new_removed =
-         triples_conj base (pre_exist dir m removed reqst) in
-       let new_base =
-         triples_conj base (triples_complement lstates new_removed) in
-       if supseteq new_base base
-       then triples_union base s2
-       else loop new_base new_removed in
-      loop initial_base initial_removed *)
-
-let satAW dir ((grp,_,states) as m) s1 s2 reqst =
-  inc satAW_calls;
-  if s1 = []
-  then s2
-  else
-    (*
-       This works extremely badly when the region is small and the end of the
-       region is very ambiguous, eg free(x) ... x
-       see free.c
-    if !pNEW_INFO_OPT
-    then
-      let get_states l = setify(List.map (function (s,_,_) -> s) l) in
-      let ostates = Common.union_set (get_states s1) (get_states s2) in
-      let succ =
-       (match dir with
-         A.FORWARD -> G.successors grp
-       | A.BACKWARD -> G.predecessors grp) in
-      let states =
-       List.fold_left Common.union_set ostates (List.map succ ostates) in
-      let negphi = triples_complement states s1 in
-      let negpsi = triples_complement states s2 in
-      triples_complement ostates
-       (satEU dir m negpsi (triples_conj negphi negpsi) (Some ostates))
-    else
-       *)
-      (*let ctr = ref 0 in*)
-      let f y =
-       inc_step();
-       (*ctr := !ctr + 1;
-       Printf.printf "iter %d y %d\n" !ctr (List.length y);
-       print_state "y" y;
-       flush stdout;*)
-       let pre = pre_forall dir m y y reqst in
-       let conj = triples_conj s1 pre in (* or triples_conj_AW *)
-       triples_union s2 conj in
-      setgfix f (triples_union s1 s2)
-;;
-
-let satAF dir m s reqst = 
-  inc satAF_calls;
-  if !pNEW_INFO_OPT
-  then
-    let rec f y newinfo =
-      inc_step();
-      match newinfo with
-       [] -> y
-      | new_info ->
-         let first = pre_forall dir m new_info y reqst in
-         let res = triples_union first y in
-         let new_info = setdiff res y in
-         f res new_info in
-    f s s
-  else
-    let f y =
-      inc_step();
-      let pre = pre_forall dir m y y reqst in
-      triples_union s pre in
-    setfix f s
-
-let satAG dir ((_,_,states) as m) s reqst =
-  inc satAG_calls;
-  let f y =
-    inc_step();
-    let pre = pre_forall dir m y y reqst in
-    triples_conj y pre in
-  setgfix f s
-
-let satEG dir ((_,_,states) as m) s reqst =
-  inc satEG_calls;
-  let f y =
-    inc_step();
-    let pre = pre_exist dir m y reqst in
-    triples_conj y pre in
-  setgfix f s
-
-(* **************************************************************** *)
-(* Inner And - a way of dealing with multiple matches within a node *)
-(* **************************************************************** *)
-(* applied to the result of matching a node.  collect witnesses when the
-states and environments are the same *)
-
-let inner_and trips =
-  let rec loop = function
-      [] -> ([],[])
-    | (s,th,w)::trips ->
-       let (cur,acc) = loop trips in
-       (match cur with
-         (s',_,_)::_ when s = s' ->
-           let rec loop' = function
-               [] -> [(s,th,w)]
-             | ((_,th',w') as t')::ts' ->
-                 (match conj_subst th th' with
-                   Some th'' -> (s,th'',union_wit w w')::ts'
-                 | None -> t'::(loop' ts')) in
-           (loop' cur,acc)
-       | _ -> ([(s,th,w)],cur@acc)) in
-  let (cur,acc) =
-    loop (List.sort state_compare trips) (* is this sort needed? *) in
-  cur@acc
-
-(* *************** *)
-(* Partial matches *)
-(* *************** *)
-
-let filter_conj states unwanted partial_matches =
-  let x =
-    triples_conj (triples_complement states (unwitify unwanted))
-      partial_matches in
-  triples_conj (unwitify x) (triples_complement states x)
-
-let strict_triples_conj strict states trips trips' =
-  let res = triples_conj trips trips' in
-  if !Flag_ctl.partial_match && strict = A.STRICT
-  then
-    let fail_left = filter_conj states trips trips' in
-    let fail_right = filter_conj states trips' trips in
-    let ors = triples_union fail_left fail_right in
-    triples_union res ors
-  else res
-
-let strict_triples_conj_none strict states trips trips' =
-  let res = triples_conj_none trips trips' in
-  if !Flag_ctl.partial_match && strict = A.STRICT
-  then
-    let fail_left = filter_conj states trips trips' in
-    let fail_right = filter_conj states trips' trips in
-    let ors = triples_union fail_left fail_right in
-    triples_union res ors
-  else res
-
-let left_strict_triples_conj strict states trips trips' =
-  let res = triples_conj trips trips' in
-  if !Flag_ctl.partial_match && strict = A.STRICT
-  then
-    let fail_left = filter_conj states trips trips' in
-    triples_union res fail_left
-  else res
-
-let strict_A1 strict op failop dir ((_,_,states) as m) trips required_states = 
-  let res = op dir m trips required_states in
-  if !Flag_ctl.partial_match && strict = A.STRICT
-  then
-    let states = mkstates states required_states in
-    let fail = filter_conj states res (failop dir m trips required_states) in
-    triples_union res fail
-  else res
-
-let strict_A2 strict op failop dir ((_,_,states) as m) trips trips'
-    required_states = 
-  let res = op dir m trips trips' required_states in
-  if !Flag_ctl.partial_match && strict = A.STRICT
-  then
-    let states = mkstates states required_states in
-    let fail = filter_conj states res (failop dir m trips' required_states) in
-    triples_union res fail
-  else res
-      
-let strict_A2au strict op failop dir ((_,_,states) as m) trips trips'
-    required_states = 
-  match op dir m trips trips' required_states with
-    AUok res ->
-      if !Flag_ctl.partial_match && strict = A.STRICT
-      then
-       let states = mkstates states required_states in
-       let fail =
-         filter_conj states res (failop dir m trips' required_states) in
-       AUok (triples_union res fail)
-      else AUok res
-  | AUfailed res -> AUfailed res
-      
-(* ********************* *)
-(* Environment functions *)
-(* ********************* *)
-
-let drop_wits required_states s phi =
-  match required_states with
-    None -> s
-  | Some states -> List.filter (function (s,_,_) -> List.mem s states) s
-
-
-let print_required required =
-  List.iter
-    (function l ->
-      Format.print_string "{";
-      List.iter
-       (function reqd ->
-         print_generic_substitution reqd; Format.print_newline())
-       l;
-      Format.print_string "}";
-      Format.print_newline())
-    required
-
-exception Too_long
-
-let extend_required trips required =
-  if !Flag_ctl.partial_match
-  then required
-  else
-      if !pREQUIRED_ENV_OPT
-      then
-    (* make it a set *)
-       let envs =
-         List.fold_left
-           (function rest ->
-             function (_,t,_) -> if List.mem t rest then rest else t::rest)
-           [] trips in
-       let envs = if List.mem [] envs then [] else envs in
-       match (envs,required) with
-         ([],_) -> required
-       | (envs,hd::tl) ->
-           (try
-             let hdln = List.length hd + 5 (* let it grow a little bit *) in
-             let (_,merged) =
-               let add x (ln,y) =
-                 if List.mem x y
-                 then (ln,y)
-                 else if ln + 1 > hdln then raise Too_long else (ln+1,x::y) in
-               foldl
-                 (function rest ->
-                   function t ->
-                     foldl
-                       (function rest ->
-                         function r ->
-                           match conj_subst t r with
-                             None -> rest | Some th -> add th rest)
-                       rest hd)
-                 (0,[]) envs in
-             merged :: tl
-           with Too_long -> envs :: required)
-       | (envs,_) -> envs :: required
-      else required
-
-let drop_required v required =
-  if !pREQUIRED_ENV_OPT
-  then
-    let res =
-    inner_setify
-      (List.map
-        (function l ->
-          inner_setify
-            (List.map (List.filter (function sub -> not(dom_sub sub = v))) l))
-        required) in
-    (* check whether an entry has become useless *)
-    List.filter (function l -> not (List.exists (function x -> x = []) l)) res
-  else required
-
-(* no idea how to write this function ... *)
-let memo_label =
-  (Hashtbl.create(50) : (P.t, (G.node * substitution) list) Hashtbl.t)
-
-let satLabel label required p =
-    let triples =
-    if !pSATLABEL_MEMO_OPT
-    then
-      try
-       let states_subs = Hashtbl.find memo_label p in
-       List.map (function (st,th) -> (st,th,[])) states_subs
-      with
-       Not_found ->
-         let triples = setify(label p) in
-         Hashtbl.add memo_label p
-           (List.map (function (st,th,_) -> (st,th)) triples);
-         triples
-    else setify(label p) in
-    normalize
-      (if !pREQUIRED_ENV_OPT
-      then
-       foldl
-         (function rest ->
-           function ((s,th,_) as t) ->
-             if List.for_all
-                 (List.exists (function th' -> not(conj_subst th th' = None)))
-                 required
-             then t::rest
-             else rest)
-         [] triples
-      else triples)
-
-let get_required_states l =
-  if !pREQUIRED_STATES_OPT && not !Flag_ctl.partial_match
-  then
-    Some(inner_setify (List.map (function (s,_,_) -> s) l))
-  else None
-
-let get_children_required_states dir (grp,_,_) required_states =
-  if !pREQUIRED_STATES_OPT && not !Flag_ctl.partial_match
-  then
-    match required_states with
-      None -> None
-    | Some states ->
-       let fn =
-         match dir with
-           A.FORWARD -> G.successors
-         | A.BACKWARD -> G.predecessors in
-       Some (inner_setify (List.concat (List.map (fn grp) states)))
-  else None
-
-let reachable_table =
-  (Hashtbl.create(50) : (G.node * A.direction, G.node list) Hashtbl.t)
-
-(* like satEF, but specialized for get_reachable *)
-let reachsatEF dir (grp,_,_) s2 =
-  let dirop =
-    match dir with A.FORWARD -> G.successors | A.BACKWARD -> G.predecessors in
-  let union = unionBy compare (=) in
-  let rec f y = function
-      [] -> y
-    | new_info ->
-       let (pre_collected,new_info) =
-         List.partition (function Common.Left x -> true | _ -> false)
-           (List.map
-              (function x ->
-                try Common.Left (Hashtbl.find reachable_table (x,dir))
-                with Not_found -> Common.Right x)
-              new_info) in
-       let y =
-         List.fold_left
-           (function rest ->
-             function Common.Left x -> union x rest
-               | _ -> failwith "not possible")
-           y pre_collected in
-       let new_info =
-         List.map
-           (function Common.Right x -> x | _ -> failwith "not possible")
-           new_info in
-       let first = inner_setify (concatmap (dirop grp) new_info) in
-       let new_info = setdiff first y in
-       let res = new_info @ y in
-       f res new_info in
-  List.rev(f s2 s2) (* put root first *)
-
-let get_reachable dir m required_states =
-  match required_states with
-    None -> None
-  | Some states ->
-      Some
-       (List.fold_left
-          (function rest ->
-            function cur ->
-              if List.mem cur rest
-              then rest
-              else
-                Common.union_set
-                  (try Hashtbl.find reachable_table (cur,dir)
-                  with
-                    Not_found ->
-                      let states = reachsatEF dir m [cur] in
-                      Hashtbl.add reachable_table (cur,dir) states;
-                      states)
-                  rest)
-          [] states)
-
-let ctr = ref 0
-let new_var _ =
-  let c = !ctr in
-  ctr := !ctr + 1;
-  Printf.sprintf "_c%d" c
-
-(* **************************** *)
-(* End of environment functions *)
-(* **************************** *)
-
-type ('code,'value) cell = Frozen of 'code | Thawed of 'value
-
-let rec satloop unchecked required required_states
-    ((grp,label,states) as m) phi env =
-  let rec loop unchecked required required_states phi =
-    (*Common.profile_code "satloop" (fun _ -> *)
-    let res =
-      match phi with
-      A.False              -> []
-    | A.True               -> triples_top states
-    | A.Pred(p)            -> satLabel label required p
-    | A.Uncheck(phi1) ->
-       let unchecked = if !pUNCHECK_OPT then true else false in
-       loop unchecked required required_states phi1
-    | A.Not(phi)           ->
-       let phires = loop unchecked required required_states phi in
-       (*let phires =
-         List.map (function (s,th,w) -> (s,th,[])) phires in*)
-       triples_complement (mkstates states required_states)
-         phires
-    | A.Or(phi1,phi2)      ->
-       triples_union
-         (loop unchecked required required_states phi1)
-         (loop unchecked required required_states phi2)
-    | A.SeqOr(phi1,phi2)      ->
-       let res1 = loop unchecked required required_states phi1 in
-       let res2 = loop unchecked required required_states phi2 in
-       let res1neg = unwitify res1 in
-       triples_union res1
-         (triples_conj
-            (triples_complement (mkstates states required_states) res1neg)
-            res2)
-    | A.And(strict,phi1,phi2)     ->
-       (* phi1 is considered to be more likely to be [], because of the
-          definition of asttoctl.  Could use heuristics such as the size of
-          the term *)
-       let pm = !Flag_ctl.partial_match in
-       (match (pm,loop unchecked required required_states phi1) with
-         (false,[]) when !pLazyOpt -> []
-       | (_,phi1res) ->
-           let new_required = extend_required phi1res required in
-           let new_required_states = get_required_states phi1res in
-           (match (pm,loop unchecked new_required new_required_states phi2)
-           with
-             (false,[]) when !pLazyOpt -> []
-           | (_,phi2res) ->
-               strict_triples_conj strict
-                 (mkstates states required_states)
-                 phi1res phi2res))
-    | A.AndAny(dir,strict,phi1,phi2)     ->
-       (* phi2 can appear anywhere that is reachable *)
-       let pm = !Flag_ctl.partial_match in
-       (match (pm,loop unchecked required required_states phi1) with
-         (false,[]) -> []
-       | (_,phi1res) ->
-           let new_required = extend_required phi1res required in
-           let new_required_states = get_required_states phi1res in
-           let new_required_states =
-             get_reachable dir m new_required_states in
-           (match (pm,loop unchecked new_required new_required_states phi2)
-           with
-             (false,[]) -> phi1res
-           | (_,phi2res) ->
-               (match phi1res with
-                 [] -> (* !Flag_ctl.partial_match must be true *)
-                   if phi2res = []
-                   then []
-                   else
-                     let s = mkstates states required_states in
-                     List.fold_left
-                       (function a -> function b ->
-                         strict_triples_conj strict s a [b])
-                       [List.hd phi2res] (List.tl phi2res)
-               | [(state,_,_)] ->
-                   let phi2res =
-                     List.map (function (s,e,w) -> [(state,e,w)]) phi2res in
-                   let s = mkstates states required_states in
-                   List.fold_left
-                     (function a -> function b ->
-                       strict_triples_conj strict s a b)
-                     phi1res phi2res
-               | _ ->
-                   failwith
-                     "only one result allowed for the left arg of AndAny")))
-    | A.HackForStmt(dir,strict,phi1,phi2)     ->
-       (* phi2 can appear anywhere that is reachable *)
-       let pm = !Flag_ctl.partial_match in
-       (match (pm,loop unchecked required required_states phi1) with
-         (false,[]) -> []
-       | (_,phi1res) ->
-           let new_required = extend_required phi1res required in
-           let new_required_states = get_required_states phi1res in
-           let new_required_states =
-             get_reachable dir m new_required_states in
-           (match (pm,loop unchecked new_required new_required_states phi2)
-           with
-             (false,[]) -> phi1res
-           | (_,phi2res) ->
-                   (* if there is more than one state, something about the
-                      environment has to ensure that the right triples of
-                      phi2 get associated with the triples of phi1.
-                      the asttoctl2 has to ensure that that is the case.
-                      these should thus be structural properties.
-                      env of phi2 has to be a proper subset of env of phi1
-                      to ensure all end up being consistent.  no new triples
-                      should be generated.  strict_triples_conj_none takes
-                      care of this.
-                   *)
-                   let s = mkstates states required_states in
-                   List.fold_left
-                     (function acc ->
-                       function (st,th,_) as phi2_elem ->
-                         let inverse =
-                           triples_complement [st] [(st,th,[])] in
-                         strict_triples_conj_none strict s acc
-                           (phi2_elem::inverse))
-                     phi1res phi2res))
-    | A.InnerAnd(phi) ->
-       inner_and(loop unchecked required required_states phi)
-    | A.EX(dir,phi)      ->
-       let new_required_states =
-         get_children_required_states dir m required_states in
-       satEX dir m (loop unchecked required new_required_states phi)
-         required_states
-    | A.AX(dir,strict,phi)      ->
-       let new_required_states =
-         get_children_required_states dir m required_states in
-       let res = loop unchecked required new_required_states phi in
-       strict_A1 strict satAX satEX dir m res required_states
-    | A.EF(dir,phi)            ->
-       let new_required_states = get_reachable dir m required_states in
-       satEF dir m (loop unchecked required new_required_states phi)
-         new_required_states
-    | A.AF(dir,strict,phi)            ->
-       if !Flag_ctl.loop_in_src_code
-       then
-         loop unchecked required required_states
-           (A.AU(dir,strict,A.True,phi))
-       else
-         let new_required_states = get_reachable dir m required_states in
-         let res = loop unchecked required new_required_states phi in
-         strict_A1 strict satAF satEF dir m res new_required_states
-    | A.EG(dir,phi)            ->
-       let new_required_states = get_reachable dir m required_states in
-       satEG dir m (loop unchecked required new_required_states phi)
-         new_required_states
-    | A.AG(dir,strict,phi)            ->
-       let new_required_states = get_reachable dir m required_states in
-       let res = loop unchecked required new_required_states phi in
-       strict_A1 strict satAG satEF dir m res new_required_states
-    | A.EU(dir,phi1,phi2)      ->
-       let new_required_states = get_reachable dir m required_states in
-       (match loop unchecked required new_required_states phi2 with
-         [] when !pLazyOpt -> []
-       | s2 ->
-           let new_required = extend_required s2 required in
-           let s1 = loop unchecked new_required new_required_states phi1 in
-           satEU dir m s1 s2 new_required_states)
-    | A.AW(dir,strict,phi1,phi2) ->
-       let new_required_states = get_reachable dir m required_states in
-       (match loop unchecked required new_required_states phi2 with
-         [] when !pLazyOpt -> []
-       | s2 ->
-           let new_required = extend_required s2 required in
-           let s1 = loop unchecked new_required new_required_states phi1 in
-           strict_A2 strict satAW satEF dir m s1 s2 new_required_states)
-    | A.AU(dir,strict,phi1,phi2) ->
-       (*Printf.printf "using AU\n"; flush stdout;*)
-       let new_required_states = get_reachable dir m required_states in
-       (match loop unchecked required new_required_states phi2 with
-         [] when !pLazyOpt -> []
-       | s2 ->
-           let new_required = extend_required s2 required in
-           let s1 = loop unchecked new_required new_required_states phi1 in
-           let res =
-             strict_A2au strict satAU satEF dir m s1 s2 new_required_states in
-           match res with
-             AUok res -> res
-           | AUfailed tmp_res ->
-               (* found a loop, have to try AW *)
-               (* the formula is
-                  A[E[phi1 U phi2] & phi1 W phi2]
-                  the and is nonstrict *)
-               (* tmp_res is bigger than s2, so perhaps closer to s1 *)
-               (*Printf.printf "using AW\n"; flush stdout;*)
-               let s1 =
-                 triples_conj (satEU dir m s1 tmp_res new_required_states)
-                   s1 in
-               strict_A2 strict satAW satEF dir m s1 s2 new_required_states)
-    | A.Implies(phi1,phi2) ->
-       loop unchecked required required_states (A.Or(A.Not phi1,phi2))
-    | A.Exists (keep,v,phi)     ->
-       let new_required = drop_required v required in
-       triples_witness v unchecked (not keep)
-         (loop unchecked new_required required_states phi)
-    | A.Let(v,phi1,phi2)   ->
-       (* should only be used when the properties unchecked, required,
-          and required_states are known to be the same or at least
-          compatible between all the uses.  this is not checked. *)
-       let res = loop unchecked required required_states phi1 in
-       satloop unchecked required required_states m phi2 ((v,res) :: env)
-    | A.LetR(dir,v,phi1,phi2)   ->
-       (* should only be used when the properties unchecked, required,
-          and required_states are known to be the same or at least
-          compatible between all the uses.  this is not checked. *)
-       let new_required_states = get_reachable dir m required_states in
-       let res = loop unchecked required new_required_states phi1 in
-       satloop unchecked required required_states m phi2 ((v,res) :: env)
-    | A.Ref(v)             ->
-       let res = List.assoc v env in
-       if unchecked
-       then List.map (function (s,th,_) -> (s,th,[])) res
-       else res
-    | A.XX(phi) -> failwith "should have been removed" in
-    if !Flag_ctl.bench > 0 then triples := !triples + (List.length res);
-    drop_wits required_states res phi (* ) *) in
-  
-  loop unchecked required required_states phi
-;;    
-
-
-(* SAT with tracking *)
-let rec sat_verbose_loop unchecked required required_states annot maxlvl lvl
-    ((_,label,states) as m) phi env =
-  let anno res children = (annot lvl phi res children,res) in
-  let satv unchecked required required_states phi0 env =
-    sat_verbose_loop unchecked required required_states annot maxlvl (lvl+1)
-      m phi0 env in
-  if (lvl > maxlvl) && (maxlvl > -1) then
-    anno (satloop unchecked required required_states m phi env) []
-  else
-    let (child,res) =
-      match phi with
-      A.False              -> anno [] []
-    | A.True               -> anno (triples_top states) []
-    | A.Pred(p)            ->
-       Printf.printf "label\n"; flush stdout;
-       anno (satLabel label required p) []
-    | A.Uncheck(phi1) ->
-       let unchecked = if !pUNCHECK_OPT then true else false in
-       let (child1,res1) = satv unchecked required required_states phi1 env in
-       Printf.printf "uncheck\n"; flush stdout;
-       anno res1 [child1]
-    | A.Not(phi1)          -> 
-       let (child,res) =
-         satv unchecked required required_states phi1 env in
-       Printf.printf "not\n"; flush stdout;
-       anno (triples_complement (mkstates states required_states) res) [child]
-    | A.Or(phi1,phi2)      -> 
-       let (child1,res1) =
-         satv unchecked required required_states phi1 env in
-       let (child2,res2) =
-         satv unchecked required required_states phi2 env in
-       Printf.printf "or\n"; flush stdout;
-       anno (triples_union res1 res2) [child1; child2]
-    | A.SeqOr(phi1,phi2)      -> 
-       let (child1,res1) =
-         satv unchecked required required_states phi1 env in
-       let (child2,res2) =
-         satv unchecked required required_states phi2 env in
-       let res1neg =
-         List.map (function (s,th,_) -> (s,th,[])) res1 in
-       Printf.printf "seqor\n"; flush stdout;
-       anno (triples_union res1
-               (triples_conj
-                  (triples_complement (mkstates states required_states)
-                     res1neg)
-                  res2))
-         [child1; child2]
-    | A.And(strict,phi1,phi2)     -> 
-       let pm = !Flag_ctl.partial_match in
-       (match (pm,satv unchecked required required_states phi1 env) with
-         (false,(child1,[])) ->
-           Printf.printf "and\n"; flush stdout; anno [] [child1]
-       | (_,(child1,res1)) ->
-           let new_required = extend_required res1 required in
-           let new_required_states = get_required_states res1 in
-           (match (pm,satv unchecked new_required new_required_states phi2
-                     env) with
-             (false,(child2,[])) ->
-               Printf.printf "and\n"; flush stdout; anno [] [child1;child2]
-           | (_,(child2,res2)) ->
-               Printf.printf "and\n"; flush stdout;
-               let res =
-                 strict_triples_conj strict
-                   (mkstates states required_states)
-                   res1 res2 in
-               anno res [child1; child2]))
-    | A.AndAny(dir,strict,phi1,phi2)     ->
-       let pm = !Flag_ctl.partial_match in 
-       (match (pm,satv unchecked required required_states phi1 env) with
-         (false,(child1,[])) ->
-           Printf.printf "and\n"; flush stdout; anno [] [child1]
-       | (_,(child1,res1)) ->
-           let new_required = extend_required res1 required in
-           let new_required_states = get_required_states res1 in
-           let new_required_states =
-             get_reachable dir m new_required_states in
-           (match (pm,satv unchecked new_required new_required_states phi2
-               env) with
-             (false,(child2,[])) ->
-               Printf.printf "andany\n"; flush stdout;
-               anno res1 [child1;child2]
-           | (_,(child2,res2)) ->
-               (match res1 with
-                 [] -> (* !Flag_ctl.partial_match must be true *)
-                   if res2 = []
-                   then anno [] [child1; child2]
-                   else 
-                     let res =
-                       let s = mkstates states required_states in
-                       List.fold_left
-                         (function a -> function b ->
-                           strict_triples_conj strict s a [b])
-                         [List.hd res2] (List.tl res2) in
-                     anno res [child1; child2]
-               | [(state,_,_)] ->
-                   let res2 =
-                     List.map (function (s,e,w) -> [(state,e,w)]) res2 in
-                   Printf.printf "andany\n"; flush stdout;
-                   let res =
-                     let s = mkstates states required_states in
-                     List.fold_left
-                       (function a -> function b ->
-                         strict_triples_conj strict s a b)
-                       res1 res2 in
-                   anno res [child1; child2]
-               | _ ->
-                   failwith
-                     "only one result allowed for the left arg of AndAny")))
-    | A.HackForStmt(dir,strict,phi1,phi2)     ->
-       let pm = !Flag_ctl.partial_match in 
-       (match (pm,satv unchecked required required_states phi1 env) with
-         (false,(child1,[])) ->
-           Printf.printf "and\n"; flush stdout; anno [] [child1]
-       | (_,(child1,res1)) ->
-           let new_required = extend_required res1 required in
-           let new_required_states = get_required_states res1 in
-           let new_required_states =
-             get_reachable dir m new_required_states in
-           (match (pm,satv unchecked new_required new_required_states phi2
-               env) with
-             (false,(child2,[])) ->
-               Printf.printf "andany\n"; flush stdout;
-               anno res1 [child1;child2]
-           | (_,(child2,res2)) ->
-               let res =
-                 let s = mkstates states required_states in
-                 List.fold_left
-                   (function acc ->
-                     function (st,th,_) as phi2_elem ->
-                       let inverse =
-                         triples_complement [st] [(st,th,[])] in
-                       strict_triples_conj_none strict s acc
-                         (phi2_elem::inverse))
-                   res1 res2 in
-               anno res [child1; child2]))
-    | A.InnerAnd(phi1) ->
-       let (child1,res1) = satv unchecked required required_states phi1 env in
-       Printf.printf "uncheck\n"; flush stdout;
-       anno (inner_and res1) [child1]
-    | A.EX(dir,phi1)       -> 
-       let new_required_states =
-         get_children_required_states dir m required_states in
-       let (child,res) =
-         satv unchecked required new_required_states phi1 env in
-       Printf.printf "EX\n"; flush stdout;
-       anno (satEX dir m res required_states) [child]
-    | A.AX(dir,strict,phi1)       -> 
-       let new_required_states =
-         get_children_required_states dir m required_states in
-       let (child,res) =
-         satv unchecked required new_required_states phi1 env in
-       Printf.printf "AX\n"; flush stdout;
-       let res = strict_A1 strict satAX satEX dir m res required_states in
-       anno res [child]
-    | A.EF(dir,phi1)       -> 
-       let new_required_states = get_reachable dir m required_states in
-       let (child,res) =
-         satv unchecked required new_required_states phi1 env in
-       Printf.printf "EF\n"; flush stdout;
-       anno (satEF dir m res new_required_states) [child]
-    | A.AF(dir,strict,phi1) -> 
-       if !Flag_ctl.loop_in_src_code
-       then
-         satv unchecked required required_states
-           (A.AU(dir,strict,A.True,phi1))
-           env
-       else
-         (let new_required_states = get_reachable dir m required_states in
-         let (child,res) =
-           satv unchecked required new_required_states phi1 env in
-         Printf.printf "AF\n"; flush stdout;
-         let res =
-           strict_A1 strict satAF satEF dir m res new_required_states in
-         anno res [child])
-    | A.EG(dir,phi1)       -> 
-       let new_required_states = get_reachable dir m required_states in
-       let (child,res) =
-         satv unchecked required new_required_states phi1 env in
-       Printf.printf "EG\n"; flush stdout;
-       anno (satEG dir m res new_required_states) [child]
-    | A.AG(dir,strict,phi1)       -> 
-       let new_required_states = get_reachable dir m required_states in
-       let (child,res) =
-         satv unchecked required new_required_states phi1 env in
-       Printf.printf "AG\n"; flush stdout;
-       let res = strict_A1 strict satAG satEF dir m res new_required_states in
-       anno res [child]
-         
-    | A.EU(dir,phi1,phi2)  -> 
-       let new_required_states = get_reachable dir m required_states in
-       (match satv unchecked required new_required_states phi2 env with
-         (child2,[]) ->
-           Printf.printf "EU\n"; flush stdout;
-           anno [] [child2]
-       | (child2,res2) ->
-           let new_required = extend_required res2 required in
-           let (child1,res1) =
-             satv unchecked new_required new_required_states phi1 env in
-           Printf.printf "EU\n"; flush stdout;
-           anno (satEU dir m res1 res2 new_required_states) [child1; child2])
-    | A.AW(dir,strict,phi1,phi2)      -> 
-       failwith "should not be used" (*
-         let new_required_states = get_reachable dir m required_states in
-         (match satv unchecked required new_required_states phi2 env with
-           (child2,[]) ->
-             Printf.printf "AW %b\n" unchecked; flush stdout; anno [] [child2]
-         | (child2,res2) ->
-             let new_required = extend_required res2 required in
-             let (child1,res1) =
-               satv unchecked new_required new_required_states phi1 env in
-             Printf.printf "AW %b\n" unchecked; flush stdout;
-             let res =
-               strict_A2 strict satAW satEF dir m res1 res2
-                 new_required_states in
-             anno res [child1; child2]) *)
-    | A.AU(dir,strict,phi1,phi2)      -> 
-       let new_required_states = get_reachable dir m required_states in
-       (match satv unchecked required new_required_states phi2 env with
-         (child2,[]) ->
-           Printf.printf "AU\n"; flush stdout; anno [] [child2]
-       | (child2,s2) ->
-           let new_required = extend_required s2 required in
-           let (child1,s1) =
-             satv unchecked new_required new_required_states phi1 env in
-           Printf.printf "AU\n"; flush stdout;
-           let res =
-             strict_A2au strict satAU satEF dir m s1 s2 new_required_states in
-           (match res with
-             AUok res ->
-               anno res [child1; child2]
-           | AUfailed tmp_res ->
-               (* found a loop, have to try AW *)
-               (* the formula is
-                  A[E[phi1 U phi2] & phi1 W phi2]
-                  the and is nonstrict *)
-               (* tmp_res is bigger than s2, so perhaps closer to s1 *)
-             Printf.printf "AW\n"; flush stdout;
-             let s1 =
-               triples_conj (satEU dir m s1 tmp_res new_required_states) s1 in
-             let res =
-               strict_A2 strict satAW satEF dir m s1 s2 new_required_states in
-             anno res [child1; child2]))
-    | A.Implies(phi1,phi2) -> 
-       satv unchecked required required_states
-         (A.Or(A.Not phi1,phi2))
-         env
-    | A.Exists (keep,v,phi1)    -> 
-       let new_required = drop_required v required in
-       let (child,res) =
-         satv unchecked new_required required_states phi1 env in
-       Printf.printf "exists\n"; flush stdout;
-       anno (triples_witness v unchecked (not keep) res) [child]
-    | A.Let(v,phi1,phi2)   ->
-       let (child1,res1) =
-         satv unchecked required required_states phi1 env in
-       let (child2,res2) =
-         satv unchecked required required_states phi2 ((v,res1) :: env) in
-       anno res2 [child1;child2]
-    | A.LetR(dir,v,phi1,phi2)   ->
-       let new_required_states = get_reachable dir m required_states in
-       let (child1,res1) =
-         satv unchecked required new_required_states phi1 env in
-       let (child2,res2) =
-         satv unchecked required required_states phi2 ((v,res1) :: env) in
-       anno res2 [child1;child2]
-    | A.Ref(v)             ->
-       Printf.printf "Ref\n"; flush stdout;
-       let res = List.assoc v env in
-       let res =
-         if unchecked
-         then List.map (function (s,th,_) -> (s,th,[])) res
-         else res in
-       anno res []
-    | A.XX(phi) -> failwith "should have been removed" in
-    let res1 = drop_wits required_states res phi in
-    if not(res1 = res)
-    then
-      begin
-       print_required_states required_states;
-      print_state "after drop_wits" res1 end;
-    (child,res1)
-       
-;;
-
-let sat_verbose annotate maxlvl lvl m phi =
-  sat_verbose_loop false [] None annotate maxlvl lvl m phi []
-
-(* Type for annotations collected in a tree *)
-type ('a) witAnnoTree = WitAnno of ('a * ('a witAnnoTree) list);;
-
-let sat_annotree annotate m phi =
-  let tree_anno l phi res chld = WitAnno(annotate l phi res,chld) in
-    sat_verbose_loop false [] None tree_anno (-1) 0 m phi []
-;;
-
-(*
-let sat m phi = satloop m phi []
-;;
-*)
-
-let simpleanno l phi res =
-  let pp s = 
-    Format.print_string ("\n" ^ s ^ "\n------------------------------\n"); 
-    print_generic_algo (List.sort compare res);
-    Format.print_string "\n------------------------------\n\n" in
-  let pp_dir = function
-      A.FORWARD -> ()
-    | A.BACKWARD -> pp "^" in
-  match phi with
-    | A.False              -> pp "False"
-    | A.True               -> pp "True"
-    | A.Pred(p)            -> pp ("Pred" ^ (Common.dump p))
-    | A.Not(phi)           -> pp "Not"
-    | A.Exists(_,v,phi)    -> pp ("Exists " ^ (Common.dump(v)))
-    | A.And(_,phi1,phi2)   -> pp "And"
-    | A.AndAny(dir,_,phi1,phi2) -> pp "AndAny"
-    | A.HackForStmt(dir,_,phi1,phi2) -> pp "HackForStmt"
-    | A.Or(phi1,phi2)      -> pp "Or"
-    | A.SeqOr(phi1,phi2)   -> pp "SeqOr"
-    | A.Implies(phi1,phi2) -> pp "Implies"
-    | A.AF(dir,_,phi1)     -> pp "AF"; pp_dir dir
-    | A.AX(dir,_,phi1)     -> pp "AX"; pp_dir dir
-    | A.AG(dir,_,phi1)     -> pp "AG"; pp_dir dir
-    | A.AW(dir,_,phi1,phi2)-> pp "AW"; pp_dir dir
-    | A.AU(dir,_,phi1,phi2)-> pp "AU"; pp_dir dir
-    | A.EF(dir,phi1)       -> pp "EF"; pp_dir dir
-    | A.EX(dir,phi1)      -> pp "EX"; pp_dir dir
-    | A.EG(dir,phi1)      -> pp "EG"; pp_dir dir
-    | A.EU(dir,phi1,phi2)  -> pp "EU"; pp_dir dir
-    | A.Let (x,phi1,phi2)  -> pp ("Let"^" "^x)
-    | A.LetR (dir,x,phi1,phi2) -> pp ("LetR"^" "^x); pp_dir dir
-    | A.Ref(s)             -> pp ("Ref("^s^")")
-    | A.Uncheck(s)         -> pp "Uncheck"
-    | A.InnerAnd(s)        -> pp "InnerAnd"
-    | A.XX(phi1)           -> pp "XX"
-;;
-
-
-(* pad: Rene, you can now use the module pretty_print_ctl.ml to
-   print a ctl formula more accurately if you want.
-   Use the print_xxx provided in the different module to call 
-   Pretty_print_ctl.pp_ctl.
- *)
-
-let simpleanno2 l phi res = 
-  begin
-    Pretty_print_ctl.pp_ctl (P.print_predicate, SUB.print_mvar) false phi;
-    Format.print_newline ();
-    Format.print_string "----------------------------------------------------";
-    Format.print_newline ();
-    print_generic_algo (List.sort compare res);
-    Format.print_newline ();
-    Format.print_string "----------------------------------------------------";
-    Format.print_newline ();
-    Format.print_newline ();
-  end
-
-
-(* ---------------------------------------------------------------------- *)
-(* Benchmarking                                                           *)
-(* ---------------------------------------------------------------------- *)
-
-type optentry = bool ref * string
-type options = {label : optentry; unch : optentry;
-                conj : optentry; compl1 : optentry; compl2 : optentry;
-                newinfo : optentry;
-                reqenv : optentry; reqstates : optentry}
-
-let options =
-  {label = (pSATLABEL_MEMO_OPT,"satlabel_memo_opt");
-    unch = (pUNCHECK_OPT,"uncheck_opt");
-    conj = (pTRIPLES_CONJ_OPT,"triples_conj_opt");
-    compl1 = (pTRIPLES_COMPLEMENT_OPT,"triples_complement_opt");
-    compl2 = (pTRIPLES_COMPLEMENT_SIMPLE_OPT,"triples_complement_simple_opt");
-    newinfo = (pNEW_INFO_OPT,"new_info_opt");
-    reqenv = (pREQUIRED_ENV_OPT,"required_env_opt");
-    reqstates = (pREQUIRED_STATES_OPT,"required_states_opt")}
-
-let baseline =
-  [("none                    ",[]);
-    ("label                   ",[options.label]);
-    ("unch                    ",[options.unch]);
-    ("unch and label          ",[options.label;options.unch])]
-
-let conjneg =
-  [("conj                    ", [options.conj]);
-    ("compl1                  ", [options.compl1]);
-    ("compl12                 ", [options.compl1;options.compl2]);
-    ("conj/compl12            ", [options.conj;options.compl1;options.compl2]);
-    ("conj unch satl          ", [options.conj;options.unch;options.label]);
-(*
-    ("compl1 unch satl        ", [options.compl1;options.unch;options.label]);
-    ("compl12 unch satl       ",
-     [options.compl1;options.compl2;options.unch;options.label]); *)
-    ("conj/compl12 unch satl  ",
-     [options.conj;options.compl1;options.compl2;options.unch;options.label])]
-
-let path =
-  [("newinfo                 ", [options.newinfo]);
-    ("newinfo unch satl       ", [options.newinfo;options.unch;options.label])]
-
-let required =
-  [("reqenv                  ", [options.reqenv]);
-    ("reqstates               ", [options.reqstates]);
-    ("reqenv/states           ", [options.reqenv;options.reqstates]);
-(*  ("reqenv unch satl        ", [options.reqenv;options.unch;options.label]);
-    ("reqstates unch satl     ",
-     [options.reqstates;options.unch;options.label]);*)
-    ("reqenv/states unch satl ",
-     [options.reqenv;options.reqstates;options.unch;options.label])]
-
-let all_options =
-  [options.label;options.unch;options.conj;options.compl1;options.compl2;
-    options.newinfo;options.reqenv;options.reqstates]
-
-let all =
-  [("all                     ",all_options)]
-
-let all_options_but_path =
-  [options.label;options.unch;options.conj;options.compl1;options.compl2;
-    options.reqenv;options.reqstates]
-
-let all_but_path = ("all but path            ",all_options_but_path)
-
-let counters =
-  [(satAW_calls, "satAW", ref 0);
-    (satAU_calls, "satAU", ref 0);
-    (satEF_calls, "satEF", ref 0);
-    (satAF_calls, "satAF", ref 0);
-    (satEG_calls, "satEG", ref 0);
-    (satAG_calls, "satAG", ref 0);
-  (satEU_calls, "satEU", ref 0)]
-
-let perms =
-  map
-    (function (opt,x) ->
-      (opt,x,ref 0.0,ref 0,
-       List.map (function _ -> (ref 0, ref 0, ref 0)) counters))
-    [List.hd all;all_but_path]
-  (*(all@baseline@conjneg@path@required)*)
-
-exception Out
-
-let rec iter fn = function
-    1 -> fn()
-  | n -> let _ = fn() in
-    (Hashtbl.clear reachable_table;
-     Hashtbl.clear memo_label;
-     triples := 0;
-     iter fn (n-1))
-
-let copy_to_stderr fl =
-  let i = open_in fl in
-  let rec loop _ =
-    Printf.fprintf stderr "%s\n" (input_line i);
-    loop() in
-  try loop() with _ -> ();
-  close_in i
-
-let bench_sat (_,_,states) fn =
-  List.iter (function (opt,_) -> opt := false) all_options;
-  let answers =
-    concatmap
-      (function (name,options,time,trips,counter_info) ->
-       let iterct = !Flag_ctl.bench in
-       if !time > float_of_int timeout then time := -100.0;
-       if not (!time = -100.0)
-       then
-         begin
-           Hashtbl.clear reachable_table;
-           Hashtbl.clear memo_label;
-           List.iter (function (opt,_) -> opt := true) options;
-           List.iter (function (calls,_,save_calls) -> save_calls := !calls)
-             counters;
-           triples := 0;
-           let res =
-             let bef = Sys.time() in
-             try
-               Common.timeout_function timeout
-                 (fun () ->
-                   let bef = Sys.time() in
-                   let res = iter fn iterct in
-                   let aft = Sys.time() in
-                   time := !time +. (aft -. bef);
-                   trips := !trips + !triples;
-                   List.iter2
-                     (function (calls,_,save_calls) ->
-                       function (current_calls,current_cfg,current_max_cfg) ->
-                         current_calls :=
-                           !current_calls + (!calls - !save_calls);
-                         if (!calls - !save_calls) > 0
-                         then
-                           (let st = List.length states in
-                           current_cfg := !current_cfg + st;
-                           if st > !current_max_cfg
-                           then current_max_cfg := st))
-                     counters counter_info;
-                   [res])
-             with
-               Common.Timeout ->
-                 begin
-                   let aft = Sys.time() in
-                   time := -100.0;
-                   Printf.fprintf stderr "Timeout at %f on: %s\n"
-                     (aft -. bef) name;
-                   []
-                 end in
-           List.iter (function (opt,_) -> opt := false) options;
-           res
-         end
-       else [])
-      perms in
-  Printf.fprintf stderr "\n";
-  match answers with
-    [] -> []
-  | res::rest ->
-      (if not(List.for_all (function x -> x = res) rest)
-      then
-       (List.iter (print_state "a state") answers;
-        Printf.printf "something doesn't work\n");
-      res)
-      
-let print_bench _ =
-  let iterct = !Flag_ctl.bench in
-  if iterct > 0
-  then
-    (List.iter
-       (function (name,options,time,trips,counter_info) ->
-        Printf.fprintf stderr "%s Numbers: %f %d "
-          name (!time /. (float_of_int iterct)) !trips;
-        List.iter
-          (function (calls,cfg,max_cfg) ->
-            Printf.fprintf stderr "%d %d %d " (!calls / iterct) !cfg !max_cfg)
-          counter_info;
-        Printf.fprintf stderr "\n")
-       perms)
-
-(* ---------------------------------------------------------------------- *)
-(* preprocessing: ignore irrelevant functions *)
-
-let preprocess (cfg,_,_) label = function
-    [] -> true (* no information, try everything *)
-  | l ->
-      let sz = G.size cfg in
-      let verbose_output pred = function
-         [] ->
-           Printf.printf "did not find:\n";
-           P.print_predicate pred; Format.print_newline()
-       | _ ->
-           Printf.printf "found:\n";
-           P.print_predicate pred; Format.print_newline();
-           Printf.printf "but it was not enough\n" in
-      let get_any verbose x =
-       let res =
-         try Hashtbl.find memo_label x
-         with
-           Not_found ->
-             (let triples = label x in
-             let filtered =
-               List.map (function (st,th,_) -> (st,th)) triples in
-             Hashtbl.add memo_label x filtered;
-             filtered) in
-       if verbose then verbose_output x res;
-       not([] = res) in
-      let get_all l =
-       (* don't bother testing when there are more patterns than nodes *)
-       if List.length l > sz-2
-       then false
-       else List.for_all (get_any false) l in
-      if List.exists get_all l
-      then true
-      else
-       (if !Flag_ctl.verbose_match
-       then
-          List.iter (List.iter (function x -> let _ = get_any true x in ()))
-           l;
-        false)
-
-let filter_partial_matches trips =
-  if !Flag_ctl.partial_match
-  then
-    let anynegwit = (* if any is neg, then all are *)
-      List.exists (function A.NegWit _ -> true | A.Wit _ -> false) in
-    let (bad,good) =
-      List.partition (function (s,th,wit) -> anynegwit wit) trips in
-    (match bad with
-      [] -> ()
-    | _ -> print_state "partial matches" bad; Format.print_newline());
-    good
-  else trips
-
-(* ---------------------------------------------------------------------- *)
-(* Main entry point for engine *)
-let sat m phi reqopt =
-  try
-    (match !Flag_ctl.steps with
-      None -> step_count := 0
-    | Some x -> step_count := x);
-    Hashtbl.clear reachable_table;
-    Hashtbl.clear memo_label;
-    let (x,label,states) = m in
-    if (!Flag_ctl.bench > 0) or (preprocess m label reqopt)
-    then
-      ((* to drop when Yoann initialized this flag *)
-      if List.exists (G.extract_is_loop x) states
-      then Flag_ctl.loop_in_src_code := true;
-      let m = (x,label,List.sort compare states) in
-      let res =
-       if(!Flag_ctl.verbose_ctl_engine)
-       then
-         let fn _ = snd (sat_annotree simpleanno2 m phi) in
-         if !Flag_ctl.bench > 0
-         then bench_sat m fn
-         else fn()
-       else
-         let fn _ = satloop false [] None m phi [] in
-         if !Flag_ctl.bench > 0
-         then bench_sat m fn
-         else Common.profile_code "ctl" (fun _ -> fn()) in
-      let res = filter_partial_matches res in
-      (*
-      Printf.printf "steps: start %d, stop %d\n"
-       (match !Flag_ctl.steps with Some x -> x | _ -> 0)
-       !step_count;
-      Printf.printf "triples: %d\n" !triples;
-      print_state "final result" res;
-      *)
-      res)
-    else
-      (if !Flag_ctl.verbose_ctl_engine
-      then Common.pr2 "missing something required";
-       [])
-  with Steps -> []
-;;
-
-(* ********************************************************************** *)
-(* End of Module: CTL_ENGINE                                              *)
-(* ********************************************************************** *)
-end
-;;
-
diff --git a/ctl/.#ctl_engine.ml.1.187 b/ctl/.#ctl_engine.ml.1.187
deleted file mode 100644 (file)
index cee310c..0000000
+++ /dev/null
@@ -1,2418 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(*external c_counter : unit -> int = "c_counter"*)
-let timeout = 800
-(* Optimize triples_conj by first extracting the intersection of the two sets,
-which can certainly be in the intersection *)
-let pTRIPLES_CONJ_OPT = ref true
-(* For complement, make NegState for the negation of a single state *)
-let pTRIPLES_COMPLEMENT_OPT = ref true
-(* For complement, do something special for the case where the environment
-and witnesses are empty *)
-let pTRIPLES_COMPLEMENT_SIMPLE_OPT = ref true
-(* "Double negate" the arguments of the path operators *)
-let pDOUBLE_NEGATE_OPT = ref true
-(* Only do pre_forall/pre_exists on new elements in fixpoint iteration *)
-let pNEW_INFO_OPT = ref true
-(* Filter the result of the label function to drop entries that aren't
-compatible with any of the available environments *)
-let pREQUIRED_ENV_OPT = ref true
-(* Memoize the raw result of the label function *)
-let pSATLABEL_MEMO_OPT = ref true
-(* Filter results according to the required states *)
-let pREQUIRED_STATES_OPT = ref true
-(* Drop negative witnesses at Uncheck *)
-let pUNCHECK_OPT = ref true
-let pANY_NEG_OPT = ref true
-let pLazyOpt = ref true
-
-(*
-let pTRIPLES_CONJ_OPT = ref false
-let pTRIPLES_COMPLEMENT_OPT = ref false
-let pTRIPLES_COMPLEMENT_SIMPLE_OPT = ref false
-let pDOUBLE_NEGATE_OPT = ref false
-let pNEW_INFO_OPT = ref false
-let pREQUIRED_ENV_OPT = ref false
-let pSATLABEL_MEMO_OPT = ref false
-let pREQUIRED_STATES_OPT = ref false
-let pUNCHECK_OPT = ref false
-let pANY_NEG_OPT = ref false
-let pLazyOpt = ref false
-*)
-
-
-let step_count = ref 0
-exception Steps
-let inc_step _ =
-  if not (!step_count = 0)
-  then
-    begin
-      step_count := !step_count - 1;
-      if !step_count = 0 then raise Steps
-    end
-
-let inc cell = cell := !cell + 1
-
-let satEU_calls = ref 0
-let satAW_calls = ref 0
-let satAU_calls = ref 0
-let satEF_calls = ref 0
-let satAF_calls = ref 0
-let satEG_calls = ref 0
-let satAG_calls = ref 0
-
-let triples = ref 0
-
-let ctr = ref 0
-let new_let _ =
-  let c = !ctr in
-  ctr := c + 1;
-  Printf.sprintf "_fresh_r_%d" c
-
-(* **********************************************************************
- *
- * Implementation of a Witness Tree model checking engine for CTL-FVex 
- * 
- *
- * **********************************************************************)
-
-(* ********************************************************************** *)
-(* Module: SUBST (substitutions: meta. vars and values)                   *)
-(* ********************************************************************** *)
-
-module type SUBST =
-  sig
-    type value
-    type mvar
-    val eq_mvar: mvar -> mvar -> bool
-    val eq_val: value -> value -> bool
-    val merge_val: value -> value -> value
-    val print_mvar : mvar -> unit
-    val print_value : value -> unit
-  end
-;;
-
-(* ********************************************************************** *)
-(* Module: GRAPH (control flow graphs / model)                            *)
-(* ********************************************************************** *)
-
-module type GRAPH =
-  sig
-    type node
-    type cfg
-    val predecessors:     cfg -> node -> node list
-    val successors:       cfg -> node -> node list
-    val extract_is_loop : cfg -> node -> bool
-    val print_node :      node -> unit
-    val size :            cfg -> int
-  end
-;;
-
-module OGRAPHEXT_GRAPH = 
-  struct
-    type node = int;;
-    type cfg = (string,unit) Ograph_extended.ograph_mutable;;
-    let predecessors cfg n = List.map fst ((cfg#predecessors n)#tolist);;
-    let print_node i = Format.print_string (Common.i_to_s i)
-  end
-;;
-
-(* ********************************************************************** *)
-(* Module: PREDICATE (predicates for CTL formulae)                        *)
-(* ********************************************************************** *)
-
-module type PREDICATE =
-sig
-  type t
-  val print_predicate : t -> unit
-end
-
-
-(* ********************************************************************** *)
-
-(* ---------------------------------------------------------------------- *)
-(* Misc. useful generic functions                                         *)
-(* ---------------------------------------------------------------------- *)
-
-let head = List.hd
-
-let tail l = 
-  match l with
-    [] -> []
-  | (x::xs) -> xs
-;;
-
-let foldl = List.fold_left;;
-
-let foldl1 f xs = foldl f (head xs) (tail xs)
-
-type 'a esc = ESC of 'a | CONT of 'a
-
-let foldr = List.fold_right;;
-
-let concat = List.concat;;
-
-let map = List.map;;
-
-let filter = List.filter;;
-
-let partition = List.partition;;
-
-let concatmap f l = List.concat (List.map f l);;
-
-let maybe f g opt =
-  match opt with
-    | None -> g
-    | Some x -> f x
-;;
-
-let some_map f opts = map (maybe (fun x -> Some (f x)) None) opts
-
-let some_tolist_alt opts = concatmap (maybe (fun x -> [x]) []) opts
-
-let rec some_tolist opts =
-  match opts with
-    | []             -> []
-    | (Some x)::rest -> x::(some_tolist rest)
-    | _::rest        -> some_tolist rest 
-;;
-
-let rec groupBy eq l =
-    match l with
-      [] -> []
-    | (x::xs) -> 
-       let (xs1,xs2) = partition (fun x' -> eq x x') xs in
-       (x::xs1)::(groupBy eq xs2)
-;;
-
-let group l = groupBy (=) l;;
-
-let rec memBy eq x l =
-  match l with
-    [] -> false
-  | (y::ys) -> if (eq x y) then true else (memBy eq x ys)
-;;
-
-let rec nubBy eq ls =
-  match ls with
-    [] -> []
-  | (x::xs) when (memBy eq x xs) -> nubBy eq xs
-  | (x::xs) -> x::(nubBy eq xs)
-;;
-
-let rec nub ls =
-  match ls with
-    [] -> []
-  | (x::xs) when (List.mem x xs) -> nub xs
-  | (x::xs) -> x::(nub xs)
-;;
-
-let state_compare (s1,_,_) (s2,_,_) = compare s1 s2
-
-let setifyBy eq xs = nubBy eq xs;;
-
-let setify xs = nub xs;;
-
-let inner_setify xs = List.sort compare (nub xs);;
-
-let unionBy compare eq xs = function
-    [] -> xs
-  | ys ->
-      let rec loop = function
-         [] -> ys
-       | x::xs -> if memBy eq x ys then loop xs else x::(loop xs) in
-      List.sort compare (loop xs)
-;;
-
-let union xs ys = unionBy state_compare (=) xs ys;;
-
-let setdiff xs ys = filter (fun x -> not (List.mem x ys)) xs;;
-
-let subseteqBy eq xs ys = List.for_all (fun x -> memBy eq x ys) xs;;
-
-let subseteq xs ys = List.for_all (fun x -> List.mem x ys) xs;;
-let supseteq xs ys = subseteq ys xs
-
-let setequalBy eq xs ys = (subseteqBy eq xs ys) & (subseteqBy eq ys xs);;
-
-let setequal xs ys = (subseteq xs ys) & (subseteq ys xs);;
-
-(* Fix point calculation *)
-let rec fix eq f x =
-  let x' = f x in if (eq x' x) then x' else fix eq f x'
-;;
-
-(* Fix point calculation on set-valued functions *)
-let setfix f x = (fix subseteq f x) (*if new is a subset of old, stop*)
-let setgfix f x = (fix supseteq f x) (*if new is a supset of old, stop*)
-
-let get_states l = nub (List.map (function (s,_,_) -> s) l)
-
-(* ********************************************************************** *)
-(* Module: CTL_ENGINE                                                     *)
-(* ********************************************************************** *)
-
-module CTL_ENGINE =
-  functor (SUB : SUBST) -> 
-    functor (G : GRAPH) ->
-      functor (P : PREDICATE) ->
-struct
-
-module A = Ast_ctl
-
-type substitution = (SUB.mvar, SUB.value) Ast_ctl.generic_substitution
-
-type ('pred,'anno) witness =
-    (G.node, substitution,
-     ('pred, SUB.mvar, 'anno) Ast_ctl.generic_ctl list)
-      Ast_ctl.generic_witnesstree
-
-type ('pred,'anno) triples =
-    (G.node * substitution * ('pred,'anno) witness list) list
-
-(* ---------------------------------------------------------------------- *)
-(* Pretty printing functions *)
-(* ---------------------------------------------------------------------- *)
-
-let (print_generic_substitution : substitution -> unit) = fun substxs ->
-  let print_generic_subst = function
-      A.Subst (mvar, v) ->
-       SUB.print_mvar mvar; Format.print_string " --> "; SUB.print_value v
-    | A.NegSubst (mvar, v) -> 
-       SUB.print_mvar mvar; Format.print_string " -/-> "; SUB.print_value v in
-  Format.print_string "[";
-  Common.print_between (fun () -> Format.print_string ";" )
-    print_generic_subst substxs;
-  Format.print_string "]"
-
-let rec (print_generic_witness: ('pred, 'anno) witness -> unit) =
-  function
-  | A.Wit (state, subst, anno, childrens) -> 
-      Format.print_string "wit ";
-      G.print_node state;
-      print_generic_substitution subst;
-      (match childrens with
-       [] -> Format.print_string "{}"
-      |        _ -> 
-         Format.force_newline(); Format.print_string "   "; Format.open_box 0;
-         print_generic_witnesstree childrens; Format.close_box())
-  | A.NegWit(wit) -> 
-      Format.print_string "!";
-      print_generic_witness wit
-
-and (print_generic_witnesstree: ('pred,'anno) witness list -> unit) =
-  fun witnesstree ->
-    Format.open_box 1;
-    Format.print_string "{";
-    Common.print_between
-      (fun () -> Format.print_string ";"; Format.force_newline() ) 
-      print_generic_witness witnesstree;
-    Format.print_string "}";
-    Format.close_box()
-      
-and print_generic_triple (node,subst,tree) =
-  G.print_node node;
-  print_generic_substitution subst;
-  print_generic_witnesstree tree
-
-and (print_generic_algo : ('pred,'anno) triples -> unit) = fun xs -> 
-  Format.print_string "<";
-  Common.print_between
-    (fun () -> Format.print_string ";"; Format.force_newline())
-    print_generic_triple xs;
-  Format.print_string ">"
-;;
-
-let print_state (str : string) (l : ('pred,'anno) triples) =
-  Printf.printf "%s\n" str;
-  List.iter (function x ->
-    print_generic_triple x; Format.print_newline(); flush stdout)
-    (List.sort compare l);
-  Printf.printf "\n"
-    
-let print_required_states = function
-    None -> Printf.printf "no required states\n"
-  | Some states ->
-      Printf.printf "required states: ";
-      List.iter
-       (function x ->
-         G.print_node x; Format.print_string " "; Format.print_flush())
-       states;
-      Printf.printf "\n"
-
-let mkstates states = function
-    None -> states
-  | Some states -> states
-    
-(* ---------------------------------------------------------------------- *)
-(*                                                                        *)
-(* ---------------------------------------------------------------------- *)
-    
-    
-(* ************************* *)
-(* Substitutions             *)
-(* ************************* *)
-    
-let dom_sub sub =
-  match sub with
-  | A.Subst(x,_)    -> x
-  | A.NegSubst(x,_) -> x
-;;
-       
-let ran_sub sub =
-  match sub with
-  | A.Subst(_,x)    -> x
-  | A.NegSubst(_,x) -> x
-;;
-       
-let eq_subBy eqx eqv sub sub' =
-  match (sub,sub') with 
-    | (A.Subst(x,v),A.Subst(x',v'))       -> (eqx x x') && (eqv v v')
-    | (A.NegSubst(x,v),A.NegSubst(x',v')) -> (eqx x x') && (eqv v v')
-    | _                               -> false
-;;
-
-(* NOTE: functor *)
-let eq_sub sub sub' = eq_subBy SUB.eq_mvar SUB.eq_val sub sub'
-
-let eq_subst th th' = setequalBy eq_sub th th';;
-
-let merge_subBy eqx (===) (>+<) sub sub' =
-  (* variable part is guaranteed to be the same *)
-  match (sub,sub') with
-    (A.Subst (x,v),A.Subst (x',v')) -> 
-      if (v === v')
-      then Some [A.Subst(x, v >+< v')]
-      else None
-  | (A.NegSubst(x,v),A.Subst(x',v')) ->
-      if (not (v === v'))
-      then Some [A.Subst(x',v')]
-      else None
-  | (A.Subst(x,v),A.NegSubst(x',v')) ->
-      if (not (v === v'))
-      then Some [A.Subst(x,v)]
-      else None
-  | (A.NegSubst(x,v),A.NegSubst(x',v')) ->
-      if (v === v')
-      then
-       let merged = v >+< v' in
-       if merged = v && merged = v'
-       then Some [A.NegSubst(x,v >+< v')]
-       else
-         (* positions are compatible, but not identical. keep apart. *)
-         Some [A.NegSubst(x,v);A.NegSubst(x',v')]
-      else Some [A.NegSubst(x,v);A.NegSubst(x',v')]
-;;
-
-(* NOTE: functor *)
-let merge_sub sub sub' = 
-  merge_subBy SUB.eq_mvar SUB.eq_val SUB.merge_val sub sub'
-
-let clean_substBy eq cmp theta = List.sort cmp (nubBy eq theta);;
-
-(* NOTE: we sort by using the generic "compare" on (meta-)variable
- *   names; we could also require a definition of compare for meta-variables 
- *   or substitutions but that seems like overkill for sorting
- *)
-let clean_subst theta = 
-  let res = 
-    clean_substBy eq_sub
-      (fun s s' ->
-       let res = compare (dom_sub s) (dom_sub s') in
-       if res = 0
-       then
-         match (s,s') with
-           (A.Subst(_,_),A.NegSubst(_,_)) -> -1
-         | (A.NegSubst(_,_),A.Subst(_,_)) -> 1
-         | _ -> compare (ran_sub s) (ran_sub s')
-       else res)
-      theta in
-  let rec loop = function
-      [] -> []
-    | (A.Subst(x,v)::A.NegSubst(y,v')::rest) when SUB.eq_mvar x y ->
-       loop (A.Subst(x,v)::rest)
-    | x::xs -> x::(loop xs) in
-  loop res
-
-let top_subst = [];;                   (* Always TRUE subst. *)
-
-(* Split a theta in two parts: one with (only) "x" and one without *)
-(* NOTE: functor *)
-let split_subst theta x = 
-  partition (fun sub -> SUB.eq_mvar (dom_sub sub) x) theta;;
-
-exception SUBST_MISMATCH
-let conj_subst theta theta' =
-  match (theta,theta') with
-    | ([],_) -> Some theta'
-    | (_,[]) -> Some theta
-    | _ ->
-       let rec classify = function
-           [] -> []
-         | [x] -> [(dom_sub x,[x])]
-         | x::xs ->
-             (match classify xs with
-               ((nm,y)::ys) as res ->
-                 if dom_sub x = nm
-                 then (nm,x::y)::ys
-                 else (dom_sub x,[x])::res
-             | _ -> failwith "not possible") in
-       let merge_all theta theta' =
-         foldl
-           (function rest ->
-             function sub ->
-               foldl
-                 (function rest ->
-                   function sub' ->
-                     match (merge_sub sub sub') with
-                       Some subs -> subs @ rest
-                     | _         -> raise SUBST_MISMATCH)
-                 rest theta')
-           [] theta in
-       let rec loop = function
-           ([],ctheta') ->
-             List.concat (List.map (function (_,ths) -> ths) ctheta')
-         | (ctheta,[]) ->
-             List.concat (List.map (function (_,ths) -> ths) ctheta)
-         | ((x,ths)::xs,(y,ths')::ys) ->
-             (match compare x y with
-               0 -> (merge_all ths ths') @ loop (xs,ys)
-             | -1 -> ths @ loop (xs,((y,ths')::ys))
-             | 1 -> ths' @ loop (((x,ths)::xs),ys)
-             | _ -> failwith "not possible") in
-       try Some (clean_subst(loop (classify theta, classify theta')))
-       with SUBST_MISMATCH -> None
-;;
-
-(* theta' must be a subset of theta *)
-let conj_subst_none theta theta' =
-  match (theta,theta') with
-    | (_,[]) -> Some theta
-    | ([],_) -> None
-    | _ ->
-       let rec classify = function
-           [] -> []
-         | [x] -> [(dom_sub x,[x])]
-         | x::xs ->
-             (match classify xs with
-               ((nm,y)::ys) as res ->
-                 if dom_sub x = nm
-                 then (nm,x::y)::ys
-                 else (dom_sub x,[x])::res
-             | _ -> failwith "not possible") in
-       let merge_all theta theta' =
-         foldl
-           (function rest ->
-             function sub ->
-               foldl
-                 (function rest ->
-                   function sub' ->
-                     match (merge_sub sub sub') with
-                       Some subs -> subs @ rest
-                     | _         -> raise SUBST_MISMATCH)
-                 rest theta')
-           [] theta in
-       let rec loop = function
-           (ctheta,[]) ->
-             List.concat (List.map (function (_,ths) -> ths) ctheta)
-         | ([],ctheta') -> raise SUBST_MISMATCH
-         | ((x,ths)::xs,(y,ths')::ys) ->
-             (match compare x y with
-               0 -> (merge_all ths ths') @ loop (xs,ys)
-             | -1 -> ths @ loop (xs,((y,ths')::ys))
-             | 1 -> raise SUBST_MISMATCH
-             | _ -> failwith "not possible") in
-       try Some (clean_subst(loop (classify theta, classify theta')))
-       with SUBST_MISMATCH -> None
-;;
-
-let negate_sub sub =
-  match sub with
-    | A.Subst(x,v)    -> A.NegSubst (x,v)
-    | A.NegSubst(x,v) -> A.Subst(x,v)
-;;
-
-(* Turn a (big) theta into a list of (small) thetas *)
-let negate_subst theta = (map (fun sub -> [negate_sub sub]) theta);;
-
-
-(* ************************* *)
-(* Witnesses                 *)
-(* ************************* *)
-
-(* Always TRUE witness *)
-let top_wit = ([] : (('pred, 'anno) witness list));;
-
-let eq_wit wit wit' = wit = wit';;
-
-let union_wit wit wit' = (*List.sort compare (wit' @ wit) for popl*)
-  let res = unionBy compare (=) wit wit' in
-  let anynegwit = (* if any is neg, then all are *)
-    List.exists (function A.NegWit _ -> true | A.Wit _ -> false) in
-  if anynegwit res
-  then List.filter (function A.NegWit _ -> true | A.Wit _ -> false) res
-  else res
-
-let negate_wit wit = A.NegWit wit (*
-  match wit with
-    | A.Wit(s,th,anno,ws)    -> A.NegWitWit(s,th,anno,ws)
-    | A.NegWitWit(s,th,anno,ws) -> A.Wit(s,th,anno,ws)*)
-;;
-
-let negate_wits wits =
-  List.sort compare (map (fun wit -> [negate_wit wit]) wits);;
-
-let unwitify trips =
-  let anynegwit = (* if any is neg, then all are *)
-    List.exists (function A.NegWit _ -> true | A.Wit _ -> false) in
-  setify
-    (List.fold_left
-       (function prev ->
-        function (s,th,wit) ->
-          if anynegwit wit then prev else (s,th,top_wit)::prev)
-       [] trips)
-
-(* ************************* *)
-(* Triples                   *)
-(* ************************* *)
-
-(* Triples are equal when the constituents are equal *)
-let eq_trip (s,th,wit) (s',th',wit') =
-  (s = s') && (eq_wit wit wit') && (eq_subst th th');;
-
-let triples_top states = map (fun s -> (s,top_subst,top_wit)) states;;
-
-let normalize trips =
-  List.map
-    (function (st,th,wit) -> (st,List.sort compare th,List.sort compare wit))
-    trips
-       
-
-(* conj opt doesn't work ((1,[],{{x=3}}) v (1,[],{{x=4}})) & (1,[],{{x=4}}) =
-(1,[],{{x=3},{x=4}}), not (1,[],{{x=4}}) *)
-let triples_conj trips trips' =
-  let (trips,shared,trips') =
-    if false && !pTRIPLES_CONJ_OPT (* see comment above *)
-    then
-      let (shared,trips) =
-       List.partition (function t -> List.mem t trips') trips in
-      let trips' =
-       List.filter (function t -> not(List.mem t shared)) trips' in
-      (trips,shared,trips')
-    else (trips,[],trips') in
-  foldl (* returns a set - setify inlined *)
-    (function rest ->
-      function (s1,th1,wit1) ->
-       foldl
-         (function rest ->
-           function (s2,th2,wit2) ->
-             if (s1 = s2) then
-               (match (conj_subst th1 th2) with
-                 Some th ->
-                   let t = (s1,th,union_wit wit1 wit2) in
-                   if List.mem t rest then rest else t::rest
-               | _       -> rest)
-             else rest)
-         rest trips')
-    shared trips
-;;
-
-(* ignore the state in the right argument.  always pretend it is the same as
-the left one *)
-(* env on right has to be a subset of env on left *)
-let triples_conj_none trips trips' =
-  let (trips,shared,trips') =
-    if false && !pTRIPLES_CONJ_OPT (* see comment above *)
-    then
-      let (shared,trips) =
-       List.partition (function t -> List.mem t trips') trips in
-      let trips' =
-       List.filter (function t -> not(List.mem t shared)) trips' in
-      (trips,shared,trips')
-    else (trips,[],trips') in
-  foldl (* returns a set - setify inlined *)
-    (function rest ->
-      function (s1,th1,wit1) ->
-       foldl
-         (function rest ->
-           function (s2,th2,wit2) ->
-             match (conj_subst_none th1 th2) with
-               Some th ->
-                 let t = (s1,th,union_wit wit1 wit2) in
-                 if List.mem t rest then rest else t::rest
-             | _       -> rest)
-         rest trips')
-    shared trips
-;;
-
-exception AW
-
-let triples_conj_AW trips trips' =
-  let (trips,shared,trips') =
-    if false && !pTRIPLES_CONJ_OPT
-    then
-      let (shared,trips) =
-       List.partition (function t -> List.mem t trips') trips in
-      let trips' =
-       List.filter (function t -> not(List.mem t shared)) trips' in
-      (trips,shared,trips')
-    else (trips,[],trips') in
-  foldl (* returns a set - setify inlined *)
-    (function rest ->
-      function (s1,th1,wit1) ->
-       foldl
-         (function rest ->
-           function (s2,th2,wit2) ->
-             if (s1 = s2) then
-               (match (conj_subst th1 th2) with
-                 Some th ->
-                   let t = (s1,th,union_wit wit1 wit2) in
-                   if List.mem t rest then rest else t::rest
-               | _ -> raise AW)
-             else rest)
-         rest trips')
-    shared trips
-;;
-
-(* *************************** *)
-(* NEGATION (NegState style)   *)
-(* *************************** *)
-
-(* Constructive negation at the state level *)
-type ('a) state =
-    PosState of 'a
-  | NegState of 'a list
-;;
-
-let compatible_states = function
-    (PosState s1, PosState s2) -> 
-      if s1 = s2 then Some (PosState s1) else None
-  | (PosState s1, NegState s2) -> 
-      if List.mem s1 s2 then None else Some (PosState s1)
-  | (NegState s1, PosState s2) -> 
-      if List.mem s2 s1 then None else Some (PosState s2)
-  | (NegState s1, NegState s2) -> Some (NegState (s1 @ s2))
-;;
-
-(* Conjunction on triples with "special states" *)
-let triples_state_conj trips trips' =
-  let (trips,shared,trips') =
-    if !pTRIPLES_CONJ_OPT
-    then
-      let (shared,trips) =
-       List.partition (function t -> List.mem t trips') trips in
-      let trips' =
-       List.filter (function t -> not(List.mem t shared)) trips' in
-      (trips,shared,trips')
-    else (trips,[],trips') in
-  foldl
-    (function rest ->
-      function (s1,th1,wit1) ->
-       foldl
-         (function rest ->
-           function (s2,th2,wit2) ->
-             match compatible_states(s1,s2) with
-               Some s ->
-                 (match (conj_subst th1 th2) with
-                   Some th ->
-                     let t = (s,th,union_wit wit1 wit2) in
-                     if List.mem t rest then rest else t::rest
-                 | _ -> rest)
-             | _ -> rest)
-         rest trips')
-    shared trips
-;;
-
-let triple_negate (s,th,wits) = 
-  let negstates = (NegState [s],top_subst,top_wit) in
-  let negths = map (fun th -> (PosState s,th,top_wit)) (negate_subst th) in
-  let negwits = map (fun nwit -> (PosState s,th,nwit)) (negate_wits wits) in
-    negstates :: (negths @ negwits) (* all different *)
-
-(* FIX ME: it is not necessary to do full conjunction *)
-let triples_complement states (trips : ('pred, 'anno) triples) =
-  if !pTRIPLES_COMPLEMENT_OPT
-  then
-    (let cleanup (s,th,wit) =
-      match s with
-       PosState s' -> [(s',th,wit)]
-      | NegState ss ->
-         assert (th=top_subst);
-         assert (wit=top_wit);
-         map (fun st -> (st,top_subst,top_wit)) (setdiff states ss) in
-    let (simple,complex) =
-      if !pTRIPLES_COMPLEMENT_SIMPLE_OPT
-      then
-       let (simple,complex) =
-         List.partition (function (s,[],[]) -> true | _ -> false) trips in
-       let simple =
-         [(NegState(List.map (function (s,_,_) -> s) simple),
-           top_subst,top_wit)] in
-       (simple,complex)
-      else ([(NegState [],top_subst,top_wit)],trips) in
-    let rec compl trips =
-      match trips with
-       [] -> simple
-      | (t::ts) -> triples_state_conj (triple_negate t) (compl ts) in
-    let compld = (compl complex) in
-    let compld = concatmap cleanup compld in
-    compld)
-  else
-    let negstates (st,th,wits) =
-      map (function st -> (st,top_subst,top_wit)) (setdiff states [st]) in
-    let negths (st,th,wits) =
-      map (function th -> (st,th,top_wit)) (negate_subst th) in
-    let negwits (st,th,wits) =
-      map (function nwit -> (st,th,nwit)) (negate_wits wits) in
-    match trips with
-      [] -> map (function st -> (st,top_subst,top_wit)) states
-    | x::xs ->
-       setify
-         (foldl
-            (function prev ->
-              function cur ->
-                triples_conj (negstates cur @ negths cur @ negwits cur) prev)
-            (negstates x @ negths x @ negwits x) xs)
-;;
-
-let triple_negate (s,th,wits) = 
-  let negths = map (fun th -> (s,th,top_wit)) (negate_subst th) in
-  let negwits = map (fun nwit -> (s,th,nwit)) (negate_wits wits) in
-  ([s], negths @ negwits) (* all different *)
-
-let print_compl_state str (n,p) =
-  Printf.printf "%s neg: " str;
-  List.iter
-    (function x -> G.print_node x; Format.print_flush(); Printf.printf " ")
-    n;
-  Printf.printf "\n";
-  print_state "pos" p
-
-let triples_complement states (trips : ('pred, 'anno) triples) =
-  if trips = []
-  then map (function st -> (st,top_subst,top_wit)) states
-  else
-    let cleanup (neg,pos) =
-      let keep_pos =
-       List.filter (function (s,_,_) -> List.mem s neg) pos in
-      (map (fun st -> (st,top_subst,top_wit)) (setdiff states neg)) @
-      keep_pos in
-    let trips = List.sort state_compare trips in
-    let all_negated = List.map triple_negate trips in
-    let merge_one (neg1,pos1) (neg2,pos2) =
-      let (pos1conj,pos1keep) =
-       List.partition (function (s,_,_) -> List.mem s neg2) pos1 in
-      let (pos2conj,pos2keep) =
-       List.partition (function (s,_,_) -> List.mem s neg1) pos2 in
-      (Common.union_set neg1 neg2,
-       (triples_conj pos1conj pos2conj) @ pos1keep @ pos2keep) in
-    let rec inner_loop = function
-       x1::x2::rest -> (merge_one x1 x2) :: (inner_loop rest)
-      | l -> l in
-    let rec outer_loop = function
-       [x] -> x
-      | l -> outer_loop (inner_loop l) in
-    cleanup (outer_loop all_negated)
-
-(* ********************************** *)
-(* END OF NEGATION (NegState style)   *)
-(* ********************************** *)
-
-(* now this is always true, so we could get rid of it *)
-let something_dropped = ref true
-
-let triples_union trips trips' =
-  (*unionBy compare eq_trip trips trips';;*)
-  (* returns -1 is t1 > t2, 1 if t2 >= t1, and 0 otherwise *)
-(*
-The following does not work.  Suppose we have ([x->3],{A}) and ([],{A,B}).
-Then, the following says that since the first is a more restrictive
-environment and has fewer witnesses, then it should be dropped. But having
-fewer witnesses is not necessarily less informative than having more,
-because fewer witnesses can mean the absence of the witness-causing thing.
-So the fewer witnesses have to be kept around.
-subseteq changed to = to make it hopefully work
-*)
-  if !pNEW_INFO_OPT
-  then
-    begin
-      something_dropped := false;
-      if trips = trips'
-      then (something_dropped := true; trips)
-      else
-       let subsumes (s1,th1,wit1) (s2,th2,wit2) =
-         if s1 = s2
-         then
-           (match conj_subst th1 th2 with
-             Some conj ->
-               if conj = th1
-               then if (*subseteq*) wit1 = wit2 then 1 else 0
-               else
-                 if conj = th2
-                 then if (*subseteq*) wit2 = wit1 then (-1) else 0
-                 else 0
-           | None -> 0)
-         else 0 in
-       let rec first_loop second = function
-           [] -> second
-         | x::xs -> first_loop (second_loop x second) xs
-       and second_loop x = function
-           [] -> [x]
-         | (y::ys) as all ->
-             match subsumes x y with
-               1 -> something_dropped := true; all
-             | (-1) -> second_loop x ys
-             | _ -> y::(second_loop x ys) in
-       first_loop trips trips'
-    end
-  else unionBy compare eq_trip trips trips'
-
-
-let triples_witness x unchecked not_keep trips =
-  let anyneg = (* if any is neg, then all are *)
-    List.exists (function A.NegSubst _ -> true | A.Subst _ -> false) in
-  let anynegwit = (* if any is neg, then all are *)
-    List.exists (function A.NegWit _ -> true | A.Wit _ -> false) in
-  let allnegwit = (* if any is neg, then all are *)
-    List.for_all (function A.NegWit _ -> true | A.Wit _ -> false) in
-  let negtopos =
-    List.map (function A.NegWit w -> w | A.Wit _ -> failwith "bad wit")in
-  let res = 
-    List.fold_left
-      (function prev ->
-       function (s,th,wit) as t ->
-         let (th_x,newth) = split_subst th x in
-         match th_x with
-           [] ->
-             (* one consider whether if not not_keep is true, then we should
-                fail.  but it could be that the variable is a used_after and
-                then it is the later rule that should fail and not this one *)
-             if not not_keep && !Flag_ctl.verbose_ctl_engine
-             then
-               (SUB.print_mvar x; Format.print_flush();
-                print_state ": empty witness from" [t]);
-             t::prev
-         | l when anyneg l && !pANY_NEG_OPT -> prev
-             (* see tests/nestseq for how neg bindings can come up even
-                without eg partial matches
-              (* negated substitution only allowed with negwits.
-                just dropped *)
-             if anynegwit wit && allnegwit wit (* nonempty negwit list *)
-             then prev
-             else
-               (print_generic_substitution l; Format.print_newline();
-               failwith"unexpected negative binding with positive witnesses")*)
-         | _ ->
-             let new_triple =
-               if unchecked or not_keep
-               then (s,newth,wit)
-               else
-                 if anynegwit wit && allnegwit wit
-                 then (s,newth,[A.NegWit(A.Wit(s,th_x,[],negtopos wit))])
-                 else (s,newth,[A.Wit(s,th_x,[],wit)]) in
-             new_triple::prev)
-      [] trips in
-  if unchecked || !Flag_ctl.partial_match (* the only way to have a NegWit *)
-  then setify res
-  else List.rev res
-;;
-
-
-(* ---------------------------------------------------------------------- *)
-(* SAT  - Model Checking Algorithm for CTL-FVex                           *)
-(*                                                                        *)
-(* TODO: Implement _all_ operators (directly)                             *)
-(* ---------------------------------------------------------------------- *)
-
-
-(* ************************************* *)
-(* The SAT algorithm and special helpers *)
-(* ************************************* *)
-
-let rec pre_exist dir (grp,_,_) y reqst =
-  let check s =
-    match reqst with None -> true | Some reqst -> List.mem s reqst in
-  let exp (s,th,wit) =
-    concatmap
-      (fun s' -> if check s' then [(s',th,wit)] else [])
-      (match dir with
-       A.FORWARD -> G.predecessors grp s
-      | A.BACKWARD -> G.successors grp s) in
-  setify (concatmap exp y)
-;;
-
-exception Empty
-
-let pre_forall dir (grp,_,states) y all reqst =
-  let check s =
-    match reqst with
-      None -> true | Some reqst -> List.mem s reqst in
-  let pred =
-    match dir with
-      A.FORWARD -> G.predecessors | A.BACKWARD -> G.successors in
-  let succ =
-    match dir with
-      A.FORWARD -> G.successors | A.BACKWARD -> G.predecessors in
-  let neighbors =
-    List.map
-      (function p -> (p,succ grp p))
-      (setify
-        (concatmap
-           (function (s,_,_) -> List.filter check (pred grp s)) y)) in
-  (* would a hash table be more efficient? *)
-  let all = List.sort state_compare all in
-  let rec up_nodes child s = function
-      [] -> []
-    | (s1,th,wit)::xs ->
-       (match compare s1 child with
-         -1 -> up_nodes child s xs
-       | 0 -> (s,th,wit)::(up_nodes child s xs)
-       | _ -> []) in
-  let neighbor_triples =
-    List.fold_left
-      (function rest ->
-       function (s,children) ->
-         try
-           (List.map
-              (function child ->
-                match up_nodes child s all with [] -> raise Empty | l -> l)
-              children) :: rest
-         with Empty -> rest)
-      [] neighbors in
-  match neighbor_triples with
-    [] -> []
-  | _ ->
-      (*normalize*)
-        (foldl1 (@) (List.map (foldl1 triples_conj) neighbor_triples))
-       
-let pre_forall_AW dir (grp,_,states) y all reqst =
-  let check s =
-    match reqst with
-      None -> true | Some reqst -> List.mem s reqst in
-  let pred =
-    match dir with
-      A.FORWARD -> G.predecessors | A.BACKWARD -> G.successors in
-  let succ =
-    match dir with
-      A.FORWARD -> G.successors | A.BACKWARD -> G.predecessors in
-  let neighbors =
-    List.map
-      (function p -> (p,succ grp p))
-      (setify
-        (concatmap
-           (function (s,_,_) -> List.filter check (pred grp s)) y)) in
-  (* would a hash table be more efficient? *)
-  let all = List.sort state_compare all in
-  let rec up_nodes child s = function
-      [] -> []
-    | (s1,th,wit)::xs ->
-       (match compare s1 child with
-         -1 -> up_nodes child s xs
-       | 0 -> (s,th,wit)::(up_nodes child s xs)
-       | _ -> []) in
-  let neighbor_triples =
-    List.fold_left
-      (function rest ->
-       function (s,children) ->
-         (List.map
-            (function child ->
-              match up_nodes child s all with [] -> raise AW | l -> l)
-            children) :: rest)
-      [] neighbors in
-  match neighbor_triples with
-    [] -> []
-  | _ -> foldl1 (@) (List.map (foldl1 triples_conj_AW) neighbor_triples)
-       
-(* drop_negwits will call setify *)
-let satEX dir m s reqst = pre_exist dir m s reqst;;
-    
-let satAX dir m s reqst = pre_forall dir m s s reqst
-;;
-
-(* E[phi1 U phi2] == phi2 \/ (phi1 /\ EXE[phi1 U phi2]) *)
-let satEU dir ((_,_,states) as m) s1 s2 reqst = 
-  inc satEU_calls;
-  if s1 = []
-  then s2
-  else
-    (*let ctr = ref 0 in*)
-    if !pNEW_INFO_OPT
-    then
-      let rec f y new_info =
-       inc_step();
-       match new_info with
-         [] -> y
-       | new_info ->
-           ctr := !ctr + 1;
-           let first = triples_conj s1 (pre_exist dir m new_info reqst) in
-           let res = triples_union first y in
-           let new_info = setdiff res y in
-           (*Printf.printf "iter %d res %d new_info %d\n"
-           !ctr (List.length res) (List.length new_info);
-           flush stdout;*)
-           f res new_info in
-      f s2 s2
-    else
-      let f y =
-       inc_step();
-       let pre = pre_exist dir m y reqst in
-       triples_union s2 (triples_conj s1 pre) in
-      setfix f s2
-;;
-
-(* EF phi == E[true U phi] *)
-let satEF dir m s2 reqst = 
-  inc satEF_calls;
-  (*let ctr = ref 0 in*)
-  if !pNEW_INFO_OPT
-  then
-    let rec f y new_info =
-      inc_step();
-      match new_info with
-       [] -> y
-      | new_info ->
-         (*ctr := !ctr + 1;
-         print_state (Printf.sprintf "iteration %d\n" !ctr) y;*)
-         let first = pre_exist dir m new_info reqst in
-         let res = triples_union first y in
-         let new_info = setdiff res y in
-         (*Printf.printf "EF %s iter %d res %d new_info %d\n"
-           (if dir = A.BACKWARD then "reachable" else "real ef")
-           !ctr (List.length res) (List.length new_info);
-         print_state "new info" new_info;
-         flush stdout;*)
-         f res new_info in
-    f s2 s2
-  else
-    let f y =
-      inc_step();
-      let pre = pre_exist dir m y reqst in
-      triples_union s2 pre in
-    setfix f s2
-
-
-type ('pred,'anno) auok =
-    AUok of ('pred,'anno) triples | AUfailed of ('pred,'anno) triples
-
-(* A[phi1 U phi2] == phi2 \/ (phi1 /\ AXA[phi1 U phi2]) *)
-let satAU dir ((cfg,_,states) as m) s1 s2 reqst =
-  inc satAU_calls;
-  if s1 = []
-  then AUok s2
-  else
-    (*let ctr = ref 0 in*)
-    let pre_forall =
-      if !Flag_ctl.loop_in_src_code
-      then pre_forall_AW
-      else pre_forall in
-    if !pNEW_INFO_OPT
-    then
-      let rec f y newinfo =
-       inc_step();
-       match newinfo with
-         [] -> AUok y
-       | new_info ->
-           (*ctr := !ctr + 1;
-           print_state (Printf.sprintf "iteration %d\n" !ctr) y;
-           flush stdout;*)
-           let pre =
-             try Some (pre_forall dir m new_info y reqst)
-             with AW -> None in
-           match pre with
-             None -> AUfailed y
-           | Some pre ->
-               match triples_conj s1 pre with
-                 [] -> AUok y
-               | first ->
-                   (*print_state "s1" s1;
-                   print_state "pre" pre;
-                   print_state "first" first;*)
-                   let res = triples_union first y in
-                   let new_info =
-                     if not !something_dropped
-                     then first
-                     else setdiff res y in
-                 (*Printf.printf
-                    "iter %d res %d new_info %d\n"
-                    !ctr (List.length res) (List.length new_info);
-                    flush stdout;*)
-                   f res new_info in
-      f s2 s2
-    else
-      if !Flag_ctl.loop_in_src_code
-      then AUfailed s2
-      else
-       (*let setfix =
-         fix (function s1 -> function s2 ->
-           let s1 = List.map (function (s,th,w) -> (s,th,nub w)) s1 in
-           let s2 = List.map (function (s,th,w) -> (s,th,nub w)) s2 in
-           subseteq s1 s2) in for popl *)
-       let f y =
-         inc_step();
-         let pre = pre_forall dir m y y reqst in
-         triples_union s2 (triples_conj s1 pre) in
-       AUok (setfix f s2)
-;;
-
-
-(* reqst could be the states of s1 *)
-      (*
-      let lstates = mkstates states reqst in
-      let initial_removed =
-       triples_complement lstates (triples_union s1 s2) in
-      let initial_base = triples_conj s1 (triples_complement lstates s2) in
-      let rec loop base removed =
-       let new_removed =
-         triples_conj base (pre_exist dir m removed reqst) in
-       let new_base =
-         triples_conj base (triples_complement lstates new_removed) in
-       if supseteq new_base base
-       then triples_union base s2
-       else loop new_base new_removed in
-      loop initial_base initial_removed *)
-
-let satAW dir ((grp,_,states) as m) s1 s2 reqst =
-  inc satAW_calls;
-  if s1 = []
-  then s2
-  else
-    (*
-       This works extremely badly when the region is small and the end of the
-       region is very ambiguous, eg free(x) ... x
-       see free.c
-    if !pNEW_INFO_OPT
-    then
-      let get_states l = setify(List.map (function (s,_,_) -> s) l) in
-      let ostates = Common.union_set (get_states s1) (get_states s2) in
-      let succ =
-       (match dir with
-         A.FORWARD -> G.successors grp
-       | A.BACKWARD -> G.predecessors grp) in
-      let states =
-       List.fold_left Common.union_set ostates (List.map succ ostates) in
-      let negphi = triples_complement states s1 in
-      let negpsi = triples_complement states s2 in
-      triples_complement ostates
-       (satEU dir m negpsi (triples_conj negphi negpsi) (Some ostates))
-    else
-       *)
-      (*let ctr = ref 0 in*)
-      let f y =
-       inc_step();
-       (*ctr := !ctr + 1;
-       Printf.printf "iter %d y %d\n" !ctr (List.length y);
-       print_state "y" y;
-       flush stdout;*)
-       let pre = pre_forall dir m y y reqst in
-       let conj = triples_conj s1 pre in (* or triples_conj_AW *)
-       triples_union s2 conj in
-      setgfix f (triples_union s1 s2)
-;;
-
-let satAF dir m s reqst = 
-  inc satAF_calls;
-  if !pNEW_INFO_OPT
-  then
-    let rec f y newinfo =
-      inc_step();
-      match newinfo with
-       [] -> y
-      | new_info ->
-         let first = pre_forall dir m new_info y reqst in
-         let res = triples_union first y in
-         let new_info = setdiff res y in
-         f res new_info in
-    f s s
-  else
-    let f y =
-      inc_step();
-      let pre = pre_forall dir m y y reqst in
-      triples_union s pre in
-    setfix f s
-
-let satAG dir ((_,_,states) as m) s reqst =
-  inc satAG_calls;
-  let f y =
-    inc_step();
-    let pre = pre_forall dir m y y reqst in
-    triples_conj y pre in
-  setgfix f s
-
-let satEG dir ((_,_,states) as m) s reqst =
-  inc satEG_calls;
-  let f y =
-    inc_step();
-    let pre = pre_exist dir m y reqst in
-    triples_conj y pre in
-  setgfix f s
-
-(* **************************************************************** *)
-(* Inner And - a way of dealing with multiple matches within a node *)
-(* **************************************************************** *)
-(* applied to the result of matching a node.  collect witnesses when the
-states and environments are the same *)
-
-let inner_and trips =
-  let rec loop = function
-      [] -> ([],[])
-    | (s,th,w)::trips ->
-       let (cur,acc) = loop trips in
-       (match cur with
-         (s',_,_)::_ when s = s' ->
-           let rec loop' = function
-               [] -> [(s,th,w)]
-             | ((_,th',w') as t')::ts' ->
-                 (match conj_subst th th' with
-                   Some th'' -> (s,th'',union_wit w w')::ts'
-                 | None -> t'::(loop' ts')) in
-           (loop' cur,acc)
-       | _ -> ([(s,th,w)],cur@acc)) in
-  let (cur,acc) =
-    loop (List.sort state_compare trips) (* is this sort needed? *) in
-  cur@acc
-
-(* *************** *)
-(* Partial matches *)
-(* *************** *)
-
-let filter_conj states unwanted partial_matches =
-  let x =
-    triples_conj (triples_complement states (unwitify unwanted))
-      partial_matches in
-  triples_conj (unwitify x) (triples_complement states x)
-
-let strict_triples_conj strict states trips trips' =
-  let res = triples_conj trips trips' in
-  if !Flag_ctl.partial_match && strict = A.STRICT
-  then
-    let fail_left = filter_conj states trips trips' in
-    let fail_right = filter_conj states trips' trips in
-    let ors = triples_union fail_left fail_right in
-    triples_union res ors
-  else res
-
-let strict_triples_conj_none strict states trips trips' =
-  let res = triples_conj_none trips trips' in
-  if !Flag_ctl.partial_match && strict = A.STRICT
-  then
-    let fail_left = filter_conj states trips trips' in
-    let fail_right = filter_conj states trips' trips in
-    let ors = triples_union fail_left fail_right in
-    triples_union res ors
-  else res
-
-let left_strict_triples_conj strict states trips trips' =
-  let res = triples_conj trips trips' in
-  if !Flag_ctl.partial_match && strict = A.STRICT
-  then
-    let fail_left = filter_conj states trips trips' in
-    triples_union res fail_left
-  else res
-
-let strict_A1 strict op failop dir ((_,_,states) as m) trips required_states = 
-  let res = op dir m trips required_states in
-  if !Flag_ctl.partial_match && strict = A.STRICT
-  then
-    let states = mkstates states required_states in
-    let fail = filter_conj states res (failop dir m trips required_states) in
-    triples_union res fail
-  else res
-
-let strict_A2 strict op failop dir ((_,_,states) as m) trips trips'
-    required_states = 
-  let res = op dir m trips trips' required_states in
-  if !Flag_ctl.partial_match && strict = A.STRICT
-  then
-    let states = mkstates states required_states in
-    let fail = filter_conj states res (failop dir m trips' required_states) in
-    triples_union res fail
-  else res
-      
-let strict_A2au strict op failop dir ((_,_,states) as m) trips trips'
-    required_states = 
-  match op dir m trips trips' required_states with
-    AUok res ->
-      if !Flag_ctl.partial_match && strict = A.STRICT
-      then
-       let states = mkstates states required_states in
-       let fail =
-         filter_conj states res (failop dir m trips' required_states) in
-       AUok (triples_union res fail)
-      else AUok res
-  | AUfailed res -> AUfailed res
-      
-(* ********************* *)
-(* Environment functions *)
-(* ********************* *)
-
-let drop_wits required_states s phi =
-  match required_states with
-    None -> s
-  | Some states -> List.filter (function (s,_,_) -> List.mem s states) s
-
-
-let print_required required =
-  List.iter
-    (function l ->
-      Format.print_string "{";
-      List.iter
-       (function reqd ->
-         print_generic_substitution reqd; Format.print_newline())
-       l;
-      Format.print_string "}";
-      Format.print_newline())
-    required
-
-exception Too_long
-
-let extend_required trips required =
-  if !Flag_ctl.partial_match
-  then required
-  else
-      if !pREQUIRED_ENV_OPT
-      then
-    (* make it a set *)
-       let envs =
-         List.fold_left
-           (function rest ->
-             function (_,t,_) -> if List.mem t rest then rest else t::rest)
-           [] trips in
-       let envs = if List.mem [] envs then [] else envs in
-       match (envs,required) with
-         ([],_) -> required
-       | (envs,hd::tl) ->
-           (try
-             let hdln = List.length hd + 5 (* let it grow a little bit *) in
-             let (_,merged) =
-               let add x (ln,y) =
-                 if List.mem x y
-                 then (ln,y)
-                 else if ln + 1 > hdln then raise Too_long else (ln+1,x::y) in
-               foldl
-                 (function rest ->
-                   function t ->
-                     foldl
-                       (function rest ->
-                         function r ->
-                           match conj_subst t r with
-                             None -> rest | Some th -> add th rest)
-                       rest hd)
-                 (0,[]) envs in
-             merged :: tl
-           with Too_long -> envs :: required)
-       | (envs,_) -> envs :: required
-      else required
-
-let drop_required v required =
-  if !pREQUIRED_ENV_OPT
-  then
-    let res =
-    inner_setify
-      (List.map
-        (function l ->
-          inner_setify
-            (List.map (List.filter (function sub -> not(dom_sub sub = v))) l))
-        required) in
-    (* check whether an entry has become useless *)
-    List.filter (function l -> not (List.exists (function x -> x = []) l)) res
-  else required
-
-(* no idea how to write this function ... *)
-let memo_label =
-  (Hashtbl.create(50) : (P.t, (G.node * substitution) list) Hashtbl.t)
-
-let satLabel label required p =
-    let triples =
-    if !pSATLABEL_MEMO_OPT
-    then
-      try
-       let states_subs = Hashtbl.find memo_label p in
-       List.map (function (st,th) -> (st,th,[])) states_subs
-      with
-       Not_found ->
-         let triples = setify(label p) in
-         Hashtbl.add memo_label p
-           (List.map (function (st,th,_) -> (st,th)) triples);
-         triples
-    else setify(label p) in
-    normalize
-      (if !pREQUIRED_ENV_OPT
-      then
-       foldl
-         (function rest ->
-           function ((s,th,_) as t) ->
-             if List.for_all
-                 (List.exists (function th' -> not(conj_subst th th' = None)))
-                 required
-             then t::rest
-             else rest)
-         [] triples
-      else triples)
-
-let get_required_states l =
-  if !pREQUIRED_STATES_OPT && not !Flag_ctl.partial_match
-  then
-    Some(inner_setify (List.map (function (s,_,_) -> s) l))
-  else None
-
-let get_children_required_states dir (grp,_,_) required_states =
-  if !pREQUIRED_STATES_OPT && not !Flag_ctl.partial_match
-  then
-    match required_states with
-      None -> None
-    | Some states ->
-       let fn =
-         match dir with
-           A.FORWARD -> G.successors
-         | A.BACKWARD -> G.predecessors in
-       Some (inner_setify (List.concat (List.map (fn grp) states)))
-  else None
-
-let reachable_table =
-  (Hashtbl.create(50) : (G.node * A.direction, G.node list) Hashtbl.t)
-
-(* like satEF, but specialized for get_reachable *)
-let reachsatEF dir (grp,_,_) s2 =
-  let dirop =
-    match dir with A.FORWARD -> G.successors | A.BACKWARD -> G.predecessors in
-  let union = unionBy compare (=) in
-  let rec f y = function
-      [] -> y
-    | new_info ->
-       let (pre_collected,new_info) =
-         List.partition (function Common.Left x -> true | _ -> false)
-           (List.map
-              (function x ->
-                try Common.Left (Hashtbl.find reachable_table (x,dir))
-                with Not_found -> Common.Right x)
-              new_info) in
-       let y =
-         List.fold_left
-           (function rest ->
-             function Common.Left x -> union x rest
-               | _ -> failwith "not possible")
-           y pre_collected in
-       let new_info =
-         List.map
-           (function Common.Right x -> x | _ -> failwith "not possible")
-           new_info in
-       let first = inner_setify (concatmap (dirop grp) new_info) in
-       let new_info = setdiff first y in
-       let res = new_info @ y in
-       f res new_info in
-  List.rev(f s2 s2) (* put root first *)
-
-let get_reachable dir m required_states =
-  match required_states with
-    None -> None
-  | Some states ->
-      Some
-       (List.fold_left
-          (function rest ->
-            function cur ->
-              if List.mem cur rest
-              then rest
-              else
-                Common.union_set
-                  (try Hashtbl.find reachable_table (cur,dir)
-                  with
-                    Not_found ->
-                      let states = reachsatEF dir m [cur] in
-                      Hashtbl.add reachable_table (cur,dir) states;
-                      states)
-                  rest)
-          [] states)
-
-let ctr = ref 0
-let new_var _ =
-  let c = !ctr in
-  ctr := !ctr + 1;
-  Printf.sprintf "_c%d" c
-
-(* **************************** *)
-(* End of environment functions *)
-(* **************************** *)
-
-type ('code,'value) cell = Frozen of 'code | Thawed of 'value
-
-let rec satloop unchecked required required_states
-    ((grp,label,states) as m) phi env =
-  let rec loop unchecked required required_states phi =
-    (*Common.profile_code "satloop" (fun _ -> *)
-    let res =
-      match phi with
-      A.False              -> []
-    | A.True               -> triples_top states
-    | A.Pred(p)            -> satLabel label required p
-    | A.Uncheck(phi1) ->
-       let unchecked = if !pUNCHECK_OPT then true else false in
-       loop unchecked required required_states phi1
-    | A.Not(phi)           ->
-       let phires = loop unchecked required required_states phi in
-       (*let phires =
-         List.map (function (s,th,w) -> (s,th,[])) phires in*)
-       triples_complement (mkstates states required_states)
-         phires
-    | A.Or(phi1,phi2)      ->
-       triples_union
-         (loop unchecked required required_states phi1)
-         (loop unchecked required required_states phi2)
-    | A.SeqOr(phi1,phi2)      ->
-       let res1 = loop unchecked required required_states phi1 in
-       let res2 = loop unchecked required required_states phi2 in
-       let res1neg = unwitify res1 in
-       triples_union res1
-         (triples_conj
-            (triples_complement (mkstates states required_states) res1neg)
-            res2)
-    | A.And(strict,phi1,phi2)     ->
-       (* phi1 is considered to be more likely to be [], because of the
-          definition of asttoctl.  Could use heuristics such as the size of
-          the term *)
-       let pm = !Flag_ctl.partial_match in
-       (match (pm,loop unchecked required required_states phi1) with
-         (false,[]) when !pLazyOpt -> []
-       | (_,phi1res) ->
-           let new_required = extend_required phi1res required in
-           let new_required_states = get_required_states phi1res in
-           (match (pm,loop unchecked new_required new_required_states phi2)
-           with
-             (false,[]) when !pLazyOpt -> []
-           | (_,phi2res) ->
-               strict_triples_conj strict
-                 (mkstates states required_states)
-                 phi1res phi2res))
-    | A.AndAny(dir,strict,phi1,phi2)     ->
-       (* phi2 can appear anywhere that is reachable *)
-       let pm = !Flag_ctl.partial_match in
-       (match (pm,loop unchecked required required_states phi1) with
-         (false,[]) -> []
-       | (_,phi1res) ->
-           let new_required = extend_required phi1res required in
-           let new_required_states = get_required_states phi1res in
-           let new_required_states =
-             get_reachable dir m new_required_states in
-           (match (pm,loop unchecked new_required new_required_states phi2)
-           with
-             (false,[]) -> phi1res
-           | (_,phi2res) ->
-               (match phi1res with
-                 [] -> (* !Flag_ctl.partial_match must be true *)
-                   if phi2res = []
-                   then []
-                   else
-                     let s = mkstates states required_states in
-                     List.fold_left
-                       (function a -> function b ->
-                         strict_triples_conj strict s a [b])
-                       [List.hd phi2res] (List.tl phi2res)
-               | [(state,_,_)] ->
-                   let phi2res =
-                     List.map (function (s,e,w) -> [(state,e,w)]) phi2res in
-                   let s = mkstates states required_states in
-                   List.fold_left
-                     (function a -> function b ->
-                       strict_triples_conj strict s a b)
-                     phi1res phi2res
-               | _ ->
-                   failwith
-                     "only one result allowed for the left arg of AndAny")))
-    | A.HackForStmt(dir,strict,phi1,phi2)     ->
-       (* phi2 can appear anywhere that is reachable *)
-       let pm = !Flag_ctl.partial_match in
-       (match (pm,loop unchecked required required_states phi1) with
-         (false,[]) -> []
-       | (_,phi1res) ->
-           let new_required = extend_required phi1res required in
-           let new_required_states = get_required_states phi1res in
-           let new_required_states =
-             get_reachable dir m new_required_states in
-           (match (pm,loop unchecked new_required new_required_states phi2)
-           with
-             (false,[]) -> phi1res
-           | (_,phi2res) ->
-                   (* if there is more than one state, something about the
-                      environment has to ensure that the right triples of
-                      phi2 get associated with the triples of phi1.
-                      the asttoctl2 has to ensure that that is the case.
-                      these should thus be structural properties.
-                      env of phi2 has to be a proper subset of env of phi1
-                      to ensure all end up being consistent.  no new triples
-                      should be generated.  strict_triples_conj_none takes
-                      care of this.
-                   *)
-                   let s = mkstates states required_states in
-                   List.fold_left
-                     (function acc ->
-                       function (st,th,_) as phi2_elem ->
-                         let inverse =
-                           triples_complement [st] [(st,th,[])] in
-                         strict_triples_conj_none strict s acc
-                           (phi2_elem::inverse))
-                     phi1res phi2res))
-    | A.InnerAnd(phi) ->
-       inner_and(loop unchecked required required_states phi)
-    | A.EX(dir,phi)      ->
-       let new_required_states =
-         get_children_required_states dir m required_states in
-       satEX dir m (loop unchecked required new_required_states phi)
-         required_states
-    | A.AX(dir,strict,phi)      ->
-       let new_required_states =
-         get_children_required_states dir m required_states in
-       let res = loop unchecked required new_required_states phi in
-       strict_A1 strict satAX satEX dir m res required_states
-    | A.EF(dir,phi)            ->
-       let new_required_states = get_reachable dir m required_states in
-       satEF dir m (loop unchecked required new_required_states phi)
-         new_required_states
-    | A.AF(dir,strict,phi)            ->
-       if !Flag_ctl.loop_in_src_code
-       then
-         loop unchecked required required_states
-           (A.AU(dir,strict,A.True,phi))
-       else
-         let new_required_states = get_reachable dir m required_states in
-         let res = loop unchecked required new_required_states phi in
-         strict_A1 strict satAF satEF dir m res new_required_states
-    | A.EG(dir,phi)            ->
-       let new_required_states = get_reachable dir m required_states in
-       satEG dir m (loop unchecked required new_required_states phi)
-         new_required_states
-    | A.AG(dir,strict,phi)            ->
-       let new_required_states = get_reachable dir m required_states in
-       let res = loop unchecked required new_required_states phi in
-       strict_A1 strict satAG satEF dir m res new_required_states
-    | A.EU(dir,phi1,phi2)      ->
-       let new_required_states = get_reachable dir m required_states in
-       (match loop unchecked required new_required_states phi2 with
-         [] when !pLazyOpt -> []
-       | s2 ->
-           let new_required = extend_required s2 required in
-           let s1 = loop unchecked new_required new_required_states phi1 in
-           satEU dir m s1 s2 new_required_states)
-    | A.AW(dir,strict,phi1,phi2) ->
-       let new_required_states = get_reachable dir m required_states in
-       (match loop unchecked required new_required_states phi2 with
-         [] when !pLazyOpt -> []
-       | s2 ->
-           let new_required = extend_required s2 required in
-           let s1 = loop unchecked new_required new_required_states phi1 in
-           strict_A2 strict satAW satEF dir m s1 s2 new_required_states)
-    | A.AU(dir,strict,phi1,phi2) ->
-       (*Printf.printf "using AU\n"; flush stdout;*)
-       let new_required_states = get_reachable dir m required_states in
-       (match loop unchecked required new_required_states phi2 with
-         [] when !pLazyOpt -> []
-       | s2 ->
-           let new_required = extend_required s2 required in
-           let s1 = loop unchecked new_required new_required_states phi1 in
-           let res =
-             strict_A2au strict satAU satEF dir m s1 s2 new_required_states in
-           match res with
-             AUok res -> res
-           | AUfailed tmp_res ->
-               (* found a loop, have to try AW *)
-               (* the formula is
-                  A[E[phi1 U phi2] & phi1 W phi2]
-                  the and is nonstrict *)
-               (* tmp_res is bigger than s2, so perhaps closer to s1 *)
-               (*Printf.printf "using AW\n"; flush stdout;*)
-               let s1 =
-                 triples_conj (satEU dir m s1 tmp_res new_required_states)
-                   s1 in
-               strict_A2 strict satAW satEF dir m s1 s2 new_required_states)
-    | A.Implies(phi1,phi2) ->
-       loop unchecked required required_states (A.Or(A.Not phi1,phi2))
-    | A.Exists (keep,v,phi)     ->
-       let new_required = drop_required v required in
-       triples_witness v unchecked (not keep)
-         (loop unchecked new_required required_states phi)
-    | A.Let(v,phi1,phi2)   ->
-       (* should only be used when the properties unchecked, required,
-          and required_states are known to be the same or at least
-          compatible between all the uses.  this is not checked. *)
-       let res = loop unchecked required required_states phi1 in
-       satloop unchecked required required_states m phi2 ((v,res) :: env)
-    | A.LetR(dir,v,phi1,phi2)   ->
-       (* should only be used when the properties unchecked, required,
-          and required_states are known to be the same or at least
-          compatible between all the uses.  this is not checked. *)
-       let new_required_states = get_reachable dir m required_states in
-       let res = loop unchecked required new_required_states phi1 in
-       satloop unchecked required required_states m phi2 ((v,res) :: env)
-    | A.Ref(v)             ->
-       let res = List.assoc v env in
-       if unchecked
-       then List.map (function (s,th,_) -> (s,th,[])) res
-       else res
-    | A.XX(phi) -> failwith "should have been removed" in
-    if !Flag_ctl.bench > 0 then triples := !triples + (List.length res);
-    drop_wits required_states res phi (* ) *) in
-  
-  loop unchecked required required_states phi
-;;    
-
-
-(* SAT with tracking *)
-let rec sat_verbose_loop unchecked required required_states annot maxlvl lvl
-    ((_,label,states) as m) phi env =
-  let anno res children = (annot lvl phi res children,res) in
-  let satv unchecked required required_states phi0 env =
-    sat_verbose_loop unchecked required required_states annot maxlvl (lvl+1)
-      m phi0 env in
-  if (lvl > maxlvl) && (maxlvl > -1) then
-    anno (satloop unchecked required required_states m phi env) []
-  else
-    let (child,res) =
-      match phi with
-      A.False              -> anno [] []
-    | A.True               -> anno (triples_top states) []
-    | A.Pred(p)            ->
-       Printf.printf "label\n"; flush stdout;
-       anno (satLabel label required p) []
-    | A.Uncheck(phi1) ->
-       let unchecked = if !pUNCHECK_OPT then true else false in
-       let (child1,res1) = satv unchecked required required_states phi1 env in
-       Printf.printf "uncheck\n"; flush stdout;
-       anno res1 [child1]
-    | A.Not(phi1)          -> 
-       let (child,res) =
-         satv unchecked required required_states phi1 env in
-       Printf.printf "not\n"; flush stdout;
-       anno (triples_complement (mkstates states required_states) res) [child]
-    | A.Or(phi1,phi2)      -> 
-       let (child1,res1) =
-         satv unchecked required required_states phi1 env in
-       let (child2,res2) =
-         satv unchecked required required_states phi2 env in
-       Printf.printf "or\n"; flush stdout;
-       anno (triples_union res1 res2) [child1; child2]
-    | A.SeqOr(phi1,phi2)      -> 
-       let (child1,res1) =
-         satv unchecked required required_states phi1 env in
-       let (child2,res2) =
-         satv unchecked required required_states phi2 env in
-       let res1neg =
-         List.map (function (s,th,_) -> (s,th,[])) res1 in
-       Printf.printf "seqor\n"; flush stdout;
-       anno (triples_union res1
-               (triples_conj
-                  (triples_complement (mkstates states required_states)
-                     res1neg)
-                  res2))
-         [child1; child2]
-    | A.And(strict,phi1,phi2)     -> 
-       let pm = !Flag_ctl.partial_match in
-       (match (pm,satv unchecked required required_states phi1 env) with
-         (false,(child1,[])) ->
-           Printf.printf "and\n"; flush stdout; anno [] [child1]
-       | (_,(child1,res1)) ->
-           let new_required = extend_required res1 required in
-           let new_required_states = get_required_states res1 in
-           (match (pm,satv unchecked new_required new_required_states phi2
-                     env) with
-             (false,(child2,[])) ->
-               Printf.printf "and\n"; flush stdout; anno [] [child1;child2]
-           | (_,(child2,res2)) ->
-               Printf.printf "and\n"; flush stdout;
-               let res =
-                 strict_triples_conj strict
-                   (mkstates states required_states)
-                   res1 res2 in
-               anno res [child1; child2]))
-    | A.AndAny(dir,strict,phi1,phi2)     ->
-       let pm = !Flag_ctl.partial_match in 
-       (match (pm,satv unchecked required required_states phi1 env) with
-         (false,(child1,[])) ->
-           Printf.printf "and\n"; flush stdout; anno [] [child1]
-       | (_,(child1,res1)) ->
-           let new_required = extend_required res1 required in
-           let new_required_states = get_required_states res1 in
-           let new_required_states =
-             get_reachable dir m new_required_states in
-           (match (pm,satv unchecked new_required new_required_states phi2
-               env) with
-             (false,(child2,[])) ->
-               Printf.printf "andany\n"; flush stdout;
-               anno res1 [child1;child2]
-           | (_,(child2,res2)) ->
-               (match res1 with
-                 [] -> (* !Flag_ctl.partial_match must be true *)
-                   if res2 = []
-                   then anno [] [child1; child2]
-                   else 
-                     let res =
-                       let s = mkstates states required_states in
-                       List.fold_left
-                         (function a -> function b ->
-                           strict_triples_conj strict s a [b])
-                         [List.hd res2] (List.tl res2) in
-                     anno res [child1; child2]
-               | [(state,_,_)] ->
-                   let res2 =
-                     List.map (function (s,e,w) -> [(state,e,w)]) res2 in
-                   Printf.printf "andany\n"; flush stdout;
-                   let res =
-                     let s = mkstates states required_states in
-                     List.fold_left
-                       (function a -> function b ->
-                         strict_triples_conj strict s a b)
-                       res1 res2 in
-                   anno res [child1; child2]
-               | _ ->
-                   failwith
-                     "only one result allowed for the left arg of AndAny")))
-    | A.HackForStmt(dir,strict,phi1,phi2)     ->
-       let pm = !Flag_ctl.partial_match in 
-       (match (pm,satv unchecked required required_states phi1 env) with
-         (false,(child1,[])) ->
-           Printf.printf "and\n"; flush stdout; anno [] [child1]
-       | (_,(child1,res1)) ->
-           let new_required = extend_required res1 required in
-           let new_required_states = get_required_states res1 in
-           let new_required_states =
-             get_reachable dir m new_required_states in
-           (match (pm,satv unchecked new_required new_required_states phi2
-               env) with
-             (false,(child2,[])) ->
-               Printf.printf "andany\n"; flush stdout;
-               anno res1 [child1;child2]
-           | (_,(child2,res2)) ->
-               let res =
-                 let s = mkstates states required_states in
-                 List.fold_left
-                   (function acc ->
-                     function (st,th,_) as phi2_elem ->
-                       let inverse =
-                         triples_complement [st] [(st,th,[])] in
-                       strict_triples_conj_none strict s acc
-                         (phi2_elem::inverse))
-                   res1 res2 in
-               anno res [child1; child2]))
-    | A.InnerAnd(phi1) ->
-       let (child1,res1) = satv unchecked required required_states phi1 env in
-       Printf.printf "uncheck\n"; flush stdout;
-       anno (inner_and res1) [child1]
-    | A.EX(dir,phi1)       -> 
-       let new_required_states =
-         get_children_required_states dir m required_states in
-       let (child,res) =
-         satv unchecked required new_required_states phi1 env in
-       Printf.printf "EX\n"; flush stdout;
-       anno (satEX dir m res required_states) [child]
-    | A.AX(dir,strict,phi1)       -> 
-       let new_required_states =
-         get_children_required_states dir m required_states in
-       let (child,res) =
-         satv unchecked required new_required_states phi1 env in
-       Printf.printf "AX\n"; flush stdout;
-       let res = strict_A1 strict satAX satEX dir m res required_states in
-       anno res [child]
-    | A.EF(dir,phi1)       -> 
-       let new_required_states = get_reachable dir m required_states in
-       let (child,res) =
-         satv unchecked required new_required_states phi1 env in
-       Printf.printf "EF\n"; flush stdout;
-       anno (satEF dir m res new_required_states) [child]
-    | A.AF(dir,strict,phi1) -> 
-       if !Flag_ctl.loop_in_src_code
-       then
-         satv unchecked required required_states
-           (A.AU(dir,strict,A.True,phi1))
-           env
-       else
-         (let new_required_states = get_reachable dir m required_states in
-         let (child,res) =
-           satv unchecked required new_required_states phi1 env in
-         Printf.printf "AF\n"; flush stdout;
-         let res =
-           strict_A1 strict satAF satEF dir m res new_required_states in
-         anno res [child])
-    | A.EG(dir,phi1)       -> 
-       let new_required_states = get_reachable dir m required_states in
-       let (child,res) =
-         satv unchecked required new_required_states phi1 env in
-       Printf.printf "EG\n"; flush stdout;
-       anno (satEG dir m res new_required_states) [child]
-    | A.AG(dir,strict,phi1)       -> 
-       let new_required_states = get_reachable dir m required_states in
-       let (child,res) =
-         satv unchecked required new_required_states phi1 env in
-       Printf.printf "AG\n"; flush stdout;
-       let res = strict_A1 strict satAG satEF dir m res new_required_states in
-       anno res [child]
-         
-    | A.EU(dir,phi1,phi2)  -> 
-       let new_required_states = get_reachable dir m required_states in
-       (match satv unchecked required new_required_states phi2 env with
-         (child2,[]) ->
-           Printf.printf "EU\n"; flush stdout;
-           anno [] [child2]
-       | (child2,res2) ->
-           let new_required = extend_required res2 required in
-           let (child1,res1) =
-             satv unchecked new_required new_required_states phi1 env in
-           Printf.printf "EU\n"; flush stdout;
-           anno (satEU dir m res1 res2 new_required_states) [child1; child2])
-    | A.AW(dir,strict,phi1,phi2)      -> 
-       failwith "should not be used" (*
-         let new_required_states = get_reachable dir m required_states in
-         (match satv unchecked required new_required_states phi2 env with
-           (child2,[]) ->
-             Printf.printf "AW %b\n" unchecked; flush stdout; anno [] [child2]
-         | (child2,res2) ->
-             let new_required = extend_required res2 required in
-             let (child1,res1) =
-               satv unchecked new_required new_required_states phi1 env in
-             Printf.printf "AW %b\n" unchecked; flush stdout;
-             let res =
-               strict_A2 strict satAW satEF dir m res1 res2
-                 new_required_states in
-             anno res [child1; child2]) *)
-    | A.AU(dir,strict,phi1,phi2)      -> 
-       let new_required_states = get_reachable dir m required_states in
-       (match satv unchecked required new_required_states phi2 env with
-         (child2,[]) ->
-           Printf.printf "AU\n"; flush stdout; anno [] [child2]
-       | (child2,s2) ->
-           let new_required = extend_required s2 required in
-           let (child1,s1) =
-             satv unchecked new_required new_required_states phi1 env in
-           Printf.printf "AU\n"; flush stdout;
-           let res =
-             strict_A2au strict satAU satEF dir m s1 s2 new_required_states in
-           (match res with
-             AUok res ->
-               anno res [child1; child2]
-           | AUfailed tmp_res ->
-               (* found a loop, have to try AW *)
-               (* the formula is
-                  A[E[phi1 U phi2] & phi1 W phi2]
-                  the and is nonstrict *)
-               (* tmp_res is bigger than s2, so perhaps closer to s1 *)
-             Printf.printf "AW\n"; flush stdout;
-             let s1 =
-               triples_conj (satEU dir m s1 tmp_res new_required_states) s1 in
-             let res =
-               strict_A2 strict satAW satEF dir m s1 s2 new_required_states in
-             anno res [child1; child2]))
-    | A.Implies(phi1,phi2) -> 
-       satv unchecked required required_states
-         (A.Or(A.Not phi1,phi2))
-         env
-    | A.Exists (keep,v,phi1)    -> 
-       let new_required = drop_required v required in
-       let (child,res) =
-         satv unchecked new_required required_states phi1 env in
-       Printf.printf "exists\n"; flush stdout;
-       anno (triples_witness v unchecked (not keep) res) [child]
-    | A.Let(v,phi1,phi2)   ->
-       let (child1,res1) =
-         satv unchecked required required_states phi1 env in
-       let (child2,res2) =
-         satv unchecked required required_states phi2 ((v,res1) :: env) in
-       anno res2 [child1;child2]
-    | A.LetR(dir,v,phi1,phi2)   ->
-       let new_required_states = get_reachable dir m required_states in
-       let (child1,res1) =
-         satv unchecked required new_required_states phi1 env in
-       let (child2,res2) =
-         satv unchecked required required_states phi2 ((v,res1) :: env) in
-       anno res2 [child1;child2]
-    | A.Ref(v)             ->
-       Printf.printf "Ref\n"; flush stdout;
-       let res = List.assoc v env in
-       let res =
-         if unchecked
-         then List.map (function (s,th,_) -> (s,th,[])) res
-         else res in
-       anno res []
-    | A.XX(phi) -> failwith "should have been removed" in
-    let res1 = drop_wits required_states res phi in
-    if not(res1 = res)
-    then
-      begin
-       print_required_states required_states;
-      print_state "after drop_wits" res1 end;
-    (child,res1)
-       
-;;
-
-let sat_verbose annotate maxlvl lvl m phi =
-  sat_verbose_loop false [] None annotate maxlvl lvl m phi []
-
-(* Type for annotations collected in a tree *)
-type ('a) witAnnoTree = WitAnno of ('a * ('a witAnnoTree) list);;
-
-let sat_annotree annotate m phi =
-  let tree_anno l phi res chld = WitAnno(annotate l phi res,chld) in
-    sat_verbose_loop false [] None tree_anno (-1) 0 m phi []
-;;
-
-(*
-let sat m phi = satloop m phi []
-;;
-*)
-
-let simpleanno l phi res =
-  let pp s = 
-    Format.print_string ("\n" ^ s ^ "\n------------------------------\n"); 
-    print_generic_algo (List.sort compare res);
-    Format.print_string "\n------------------------------\n\n" in
-  let pp_dir = function
-      A.FORWARD -> ()
-    | A.BACKWARD -> pp "^" in
-  match phi with
-    | A.False              -> pp "False"
-    | A.True               -> pp "True"
-    | A.Pred(p)            -> pp ("Pred" ^ (Common.dump p))
-    | A.Not(phi)           -> pp "Not"
-    | A.Exists(_,v,phi)    -> pp ("Exists " ^ (Common.dump(v)))
-    | A.And(_,phi1,phi2)   -> pp "And"
-    | A.AndAny(dir,_,phi1,phi2) -> pp "AndAny"
-    | A.HackForStmt(dir,_,phi1,phi2) -> pp "HackForStmt"
-    | A.Or(phi1,phi2)      -> pp "Or"
-    | A.SeqOr(phi1,phi2)   -> pp "SeqOr"
-    | A.Implies(phi1,phi2) -> pp "Implies"
-    | A.AF(dir,_,phi1)     -> pp "AF"; pp_dir dir
-    | A.AX(dir,_,phi1)     -> pp "AX"; pp_dir dir
-    | A.AG(dir,_,phi1)     -> pp "AG"; pp_dir dir
-    | A.AW(dir,_,phi1,phi2)-> pp "AW"; pp_dir dir
-    | A.AU(dir,_,phi1,phi2)-> pp "AU"; pp_dir dir
-    | A.EF(dir,phi1)       -> pp "EF"; pp_dir dir
-    | A.EX(dir,phi1)      -> pp "EX"; pp_dir dir
-    | A.EG(dir,phi1)      -> pp "EG"; pp_dir dir
-    | A.EU(dir,phi1,phi2)  -> pp "EU"; pp_dir dir
-    | A.Let (x,phi1,phi2)  -> pp ("Let"^" "^x)
-    | A.LetR (dir,x,phi1,phi2) -> pp ("LetR"^" "^x); pp_dir dir
-    | A.Ref(s)             -> pp ("Ref("^s^")")
-    | A.Uncheck(s)         -> pp "Uncheck"
-    | A.InnerAnd(s)        -> pp "InnerAnd"
-    | A.XX(phi1)           -> pp "XX"
-;;
-
-
-(* pad: Rene, you can now use the module pretty_print_ctl.ml to
-   print a ctl formula more accurately if you want.
-   Use the print_xxx provided in the different module to call 
-   Pretty_print_ctl.pp_ctl.
- *)
-
-let simpleanno2 l phi res = 
-  begin
-    Pretty_print_ctl.pp_ctl (P.print_predicate, SUB.print_mvar) false phi;
-    Format.print_newline ();
-    Format.print_string "----------------------------------------------------";
-    Format.print_newline ();
-    print_generic_algo (List.sort compare res);
-    Format.print_newline ();
-    Format.print_string "----------------------------------------------------";
-    Format.print_newline ();
-    Format.print_newline ();
-  end
-
-
-(* ---------------------------------------------------------------------- *)
-(* Benchmarking                                                           *)
-(* ---------------------------------------------------------------------- *)
-
-type optentry = bool ref * string
-type options = {label : optentry; unch : optentry;
-                conj : optentry; compl1 : optentry; compl2 : optentry;
-                newinfo : optentry;
-                reqenv : optentry; reqstates : optentry}
-
-let options =
-  {label = (pSATLABEL_MEMO_OPT,"satlabel_memo_opt");
-    unch = (pUNCHECK_OPT,"uncheck_opt");
-    conj = (pTRIPLES_CONJ_OPT,"triples_conj_opt");
-    compl1 = (pTRIPLES_COMPLEMENT_OPT,"triples_complement_opt");
-    compl2 = (pTRIPLES_COMPLEMENT_SIMPLE_OPT,"triples_complement_simple_opt");
-    newinfo = (pNEW_INFO_OPT,"new_info_opt");
-    reqenv = (pREQUIRED_ENV_OPT,"required_env_opt");
-    reqstates = (pREQUIRED_STATES_OPT,"required_states_opt")}
-
-let baseline =
-  [("none                    ",[]);
-    ("label                   ",[options.label]);
-    ("unch                    ",[options.unch]);
-    ("unch and label          ",[options.label;options.unch])]
-
-let conjneg =
-  [("conj                    ", [options.conj]);
-    ("compl1                  ", [options.compl1]);
-    ("compl12                 ", [options.compl1;options.compl2]);
-    ("conj/compl12            ", [options.conj;options.compl1;options.compl2]);
-    ("conj unch satl          ", [options.conj;options.unch;options.label]);
-(*
-    ("compl1 unch satl        ", [options.compl1;options.unch;options.label]);
-    ("compl12 unch satl       ",
-     [options.compl1;options.compl2;options.unch;options.label]); *)
-    ("conj/compl12 unch satl  ",
-     [options.conj;options.compl1;options.compl2;options.unch;options.label])]
-
-let path =
-  [("newinfo                 ", [options.newinfo]);
-    ("newinfo unch satl       ", [options.newinfo;options.unch;options.label])]
-
-let required =
-  [("reqenv                  ", [options.reqenv]);
-    ("reqstates               ", [options.reqstates]);
-    ("reqenv/states           ", [options.reqenv;options.reqstates]);
-(*  ("reqenv unch satl        ", [options.reqenv;options.unch;options.label]);
-    ("reqstates unch satl     ",
-     [options.reqstates;options.unch;options.label]);*)
-    ("reqenv/states unch satl ",
-     [options.reqenv;options.reqstates;options.unch;options.label])]
-
-let all_options =
-  [options.label;options.unch;options.conj;options.compl1;options.compl2;
-    options.newinfo;options.reqenv;options.reqstates]
-
-let all =
-  [("all                     ",all_options)]
-
-let all_options_but_path =
-  [options.label;options.unch;options.conj;options.compl1;options.compl2;
-    options.reqenv;options.reqstates]
-
-let all_but_path = ("all but path            ",all_options_but_path)
-
-let counters =
-  [(satAW_calls, "satAW", ref 0);
-    (satAU_calls, "satAU", ref 0);
-    (satEF_calls, "satEF", ref 0);
-    (satAF_calls, "satAF", ref 0);
-    (satEG_calls, "satEG", ref 0);
-    (satAG_calls, "satAG", ref 0);
-  (satEU_calls, "satEU", ref 0)]
-
-let perms =
-  map
-    (function (opt,x) ->
-      (opt,x,ref 0.0,ref 0,
-       List.map (function _ -> (ref 0, ref 0, ref 0)) counters))
-    [List.hd all;all_but_path]
-  (*(all@baseline@conjneg@path@required)*)
-
-exception Out
-
-let rec iter fn = function
-    1 -> fn()
-  | n -> let _ = fn() in
-    (Hashtbl.clear reachable_table;
-     Hashtbl.clear memo_label;
-     triples := 0;
-     iter fn (n-1))
-
-let copy_to_stderr fl =
-  let i = open_in fl in
-  let rec loop _ =
-    Printf.fprintf stderr "%s\n" (input_line i);
-    loop() in
-  try loop() with _ -> ();
-  close_in i
-
-let bench_sat (_,_,states) fn =
-  List.iter (function (opt,_) -> opt := false) all_options;
-  let answers =
-    concatmap
-      (function (name,options,time,trips,counter_info) ->
-       let iterct = !Flag_ctl.bench in
-       if !time > float_of_int timeout then time := -100.0;
-       if not (!time = -100.0)
-       then
-         begin
-           Hashtbl.clear reachable_table;
-           Hashtbl.clear memo_label;
-           List.iter (function (opt,_) -> opt := true) options;
-           List.iter (function (calls,_,save_calls) -> save_calls := !calls)
-             counters;
-           triples := 0;
-           let res =
-             let bef = Sys.time() in
-             try
-               Common.timeout_function timeout
-                 (fun () ->
-                   let bef = Sys.time() in
-                   let res = iter fn iterct in
-                   let aft = Sys.time() in
-                   time := !time +. (aft -. bef);
-                   trips := !trips + !triples;
-                   List.iter2
-                     (function (calls,_,save_calls) ->
-                       function (current_calls,current_cfg,current_max_cfg) ->
-                         current_calls :=
-                           !current_calls + (!calls - !save_calls);
-                         if (!calls - !save_calls) > 0
-                         then
-                           (let st = List.length states in
-                           current_cfg := !current_cfg + st;
-                           if st > !current_max_cfg
-                           then current_max_cfg := st))
-                     counters counter_info;
-                   [res])
-             with
-               Common.Timeout ->
-                 begin
-                   let aft = Sys.time() in
-                   time := -100.0;
-                   Printf.fprintf stderr "Timeout at %f on: %s\n"
-                     (aft -. bef) name;
-                   []
-                 end in
-           List.iter (function (opt,_) -> opt := false) options;
-           res
-         end
-       else [])
-      perms in
-  Printf.fprintf stderr "\n";
-  match answers with
-    [] -> []
-  | res::rest ->
-      (if not(List.for_all (function x -> x = res) rest)
-      then
-       (List.iter (print_state "a state") answers;
-        Printf.printf "something doesn't work\n");
-      res)
-      
-let print_bench _ =
-  let iterct = !Flag_ctl.bench in
-  if iterct > 0
-  then
-    (List.iter
-       (function (name,options,time,trips,counter_info) ->
-        Printf.fprintf stderr "%s Numbers: %f %d "
-          name (!time /. (float_of_int iterct)) !trips;
-        List.iter
-          (function (calls,cfg,max_cfg) ->
-            Printf.fprintf stderr "%d %d %d " (!calls / iterct) !cfg !max_cfg)
-          counter_info;
-        Printf.fprintf stderr "\n")
-       perms)
-
-(* ---------------------------------------------------------------------- *)
-(* preprocessing: ignore irrelevant functions *)
-
-let preprocess (cfg,_,_) label = function
-    [] -> true (* no information, try everything *)
-  | l ->
-      let sz = G.size cfg in
-      let verbose_output pred = function
-         [] ->
-           Printf.printf "did not find:\n";
-           P.print_predicate pred; Format.print_newline()
-       | _ ->
-           Printf.printf "found:\n";
-           P.print_predicate pred; Format.print_newline();
-           Printf.printf "but it was not enough\n" in
-      let get_any verbose x =
-       let res =
-         try Hashtbl.find memo_label x
-         with
-           Not_found ->
-             (let triples = label x in
-             let filtered =
-               List.map (function (st,th,_) -> (st,th)) triples in
-             Hashtbl.add memo_label x filtered;
-             filtered) in
-       if verbose then verbose_output x res;
-       not([] = res) in
-      let get_all l =
-       (* don't bother testing when there are more patterns than nodes *)
-       if List.length l > sz-2
-       then false
-       else List.for_all (get_any false) l in
-      if List.exists get_all l
-      then true
-      else
-       (if !Flag_ctl.verbose_match
-       then
-          List.iter (List.iter (function x -> let _ = get_any true x in ()))
-           l;
-        false)
-
-let filter_partial_matches trips =
-  if !Flag_ctl.partial_match
-  then
-    let anynegwit = (* if any is neg, then all are *)
-      List.exists (function A.NegWit _ -> true | A.Wit _ -> false) in
-    let (bad,good) =
-      List.partition (function (s,th,wit) -> anynegwit wit) trips in
-    (match bad with
-      [] -> ()
-    | _ -> print_state "partial matches" bad; Format.print_newline());
-    good
-  else trips
-
-(* ---------------------------------------------------------------------- *)
-(* Main entry point for engine *)
-let sat m phi reqopt =
-  try
-    (match !Flag_ctl.steps with
-      None -> step_count := 0
-    | Some x -> step_count := x);
-    Hashtbl.clear reachable_table;
-    Hashtbl.clear memo_label;
-    let (x,label,states) = m in
-    if (!Flag_ctl.bench > 0) or (preprocess m label reqopt)
-    then
-      ((* to drop when Yoann initialized this flag *)
-      if List.exists (G.extract_is_loop x) states
-      then Flag_ctl.loop_in_src_code := true;
-      let m = (x,label,List.sort compare states) in
-      let res =
-       if(!Flag_ctl.verbose_ctl_engine)
-       then
-         let fn _ = snd (sat_annotree simpleanno2 m phi) in
-         if !Flag_ctl.bench > 0
-         then bench_sat m fn
-         else fn()
-       else
-         let fn _ = satloop false [] None m phi [] in
-         if !Flag_ctl.bench > 0
-         then bench_sat m fn
-         else Common.profile_code "ctl" (fun _ -> fn()) in
-      let res = filter_partial_matches res in
-      (*
-      Printf.printf "steps: start %d, stop %d\n"
-       (match !Flag_ctl.steps with Some x -> x | _ -> 0)
-       !step_count;
-      Printf.printf "triples: %d\n" !triples;
-      print_state "final result" res;
-      *)
-      res)
-    else
-      (if !Flag_ctl.verbose_ctl_engine
-      then Common.pr2 "missing something required";
-       [])
-  with Steps -> []
-;;
-
-(* ********************************************************************** *)
-(* End of Module: CTL_ENGINE                                              *)
-(* ********************************************************************** *)
-end
-;;
-
diff --git a/ctl/.cvsignore b/ctl/.cvsignore
deleted file mode 100644 (file)
index 0a2d2b3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.depend
-*.cma
dissimilarity index 92%
index 8733390..270088d 100644 (file)
@@ -1,21 +1,11 @@
-ctl_engine.cmi: ../commons/ograph_extended.cmi ast_ctl.cmo 
-pretty_print_ctl.cmi: ast_ctl.cmo 
-wrapper_ctl.cmi: ctl_engine.cmi ast_ctl.cmo 
-ctl_engine.cmo: pretty_print_ctl.cmi ../commons/ograph_extended.cmi \
-    flag_ctl.cmo ../globals/flag.cmo ../commons/common.cmi ast_ctl.cmo \
-    ctl_engine.cmi 
-ctl_engine.cmx: pretty_print_ctl.cmx ../commons/ograph_extended.cmx \
-    flag_ctl.cmx ../globals/flag.cmx ../commons/common.cmx ast_ctl.cmx \
-    ctl_engine.cmi 
-pretty_print_ctl.cmo: flag_ctl.cmo ../commons/common.cmi ast_ctl.cmo \
-    pretty_print_ctl.cmi 
-pretty_print_ctl.cmx: flag_ctl.cmx ../commons/common.cmx ast_ctl.cmx \
-    pretty_print_ctl.cmi 
-test_ctl.cmo: wrapper_ctl.cmi ../commons/ograph_extended.cmi ctl_engine.cmi \
-    ast_ctl.cmo 
-test_ctl.cmx: wrapper_ctl.cmx ../commons/ograph_extended.cmx ctl_engine.cmx \
-    ast_ctl.cmx 
-wrapper_ctl.cmo: ../globals/flag.cmo ctl_engine.cmi ../commons/common.cmi \
-    ast_ctl.cmo wrapper_ctl.cmi 
-wrapper_ctl.cmx: ../globals/flag.cmx ctl_engine.cmx ../commons/common.cmx \
-    ast_ctl.cmx wrapper_ctl.cmi 
+ctl_engine.cmi: ast_ctl.cmo 
+pretty_print_ctl.cmi: ast_ctl.cmo 
+wrapper_ctl.cmi: ctl_engine.cmi ast_ctl.cmo 
+ctl_engine.cmo: pretty_print_ctl.cmi flag_ctl.cmo ast_ctl.cmo ctl_engine.cmi 
+ctl_engine.cmx: pretty_print_ctl.cmx flag_ctl.cmx ast_ctl.cmx ctl_engine.cmi 
+pretty_print_ctl.cmo: flag_ctl.cmo ast_ctl.cmo pretty_print_ctl.cmi 
+pretty_print_ctl.cmx: flag_ctl.cmx ast_ctl.cmx pretty_print_ctl.cmi 
+test_ctl.cmo: wrapper_ctl.cmi ctl_engine.cmi ast_ctl.cmo 
+test_ctl.cmx: wrapper_ctl.cmx ctl_engine.cmx ast_ctl.cmx 
+wrapper_ctl.cmo: ctl_engine.cmi ast_ctl.cmo wrapper_ctl.cmi 
+wrapper_ctl.cmx: ctl_engine.cmx ast_ctl.cmx wrapper_ctl.cmi 
index e195a95..8785901 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+# Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 # This file is part of Coccinelle.
 # 
@@ -36,7 +36,7 @@ INCLUDES=-I ../commons -I ../commons/ocamlextra -I ../globals
 OCAMLCFLAGS ?= -g -dtypes
 OCAMLC =ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
 OCAMLOPT = ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
-OCAMLDEP = ocamldep$(OPTBIN) $(INCLUDES)
+OCAMLDEP = ocamldep$(OPTBIN) #$(INCLUDES)
 OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
 
 
index ac26eec..deacee2 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index c19260f..a739d05 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index e78fb19..5c26e23 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 7da4cad..4c898d7 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 1ead1af..6ae2419 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 35cf043..b970775 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
diff --git a/docs/grammar/Makefile b/docs/grammar/Makefile
new file mode 100644 (file)
index 0000000..088be9e
--- /dev/null
@@ -0,0 +1,61 @@
+TEX=cocci_syntax.tex
+WEB=/var/www/localhost/htdocs/coccinelle/
+EMNWEB=~/website/docs/
+
+PDF=$(TEX:.tex=.pdf)
+HTML=$(TEX:.tex=.html)
+
+
+.phony: all html clean check
+
+all: $(TEX)
+       pdflatex $<
+       pdflatex $<
+
+html: $(HTML)
+
+clean:
+       rm -f *.aux *.dvi *.haux *.htoc *.log *.out *~
+
+distclean: clean
+       rm -f *.pdf *.html *.gif *.css
+
+check: $(HTML)
+       checklink $<
+
+world: all html
+
+universe: world install
+
+install:
+       cp *.css *.gif *.html $(WEB)
+       cp $(PDF) $(WEB)
+       chown apache:apache -R $(WEB)
+       chmod a-w -R $(WEB)
+
+emn_install: all html
+       cp *.css *.gif *.html $(EMNWEB)
+       cp $(PDF) $(EMNWEB)
+
+############################################
+############################################
+
+.SUFFIXES: .html .tex
+
+.tex.html:
+# For Gentoo: /usr/lib64/hevea
+# For Ubuntu family: /usr/share/hevea
+# For default installation
+       @if [ -f /usr/lib64/hevea/xxdate.exe ]; then \
+       hevea -exec /usr/lib64/hevea/xxdate.exe  $< ; \
+       hevea -exec /usr/lib64/hevea/xxdate.exe  $< ; \
+       elif [ -f /usr/share/hevea/xxdate.exe ]; then \
+       hevea -exec /usr/share/hevea/xxdate.exe $< ; \
+       hevea -exec /usr/share/hevea/xxdate.exe $< ; \
+       elif [ -f /usr/local/lib/hevea/xxdate.exe ]; then \
+       hevea -exec /usr/local/lib/hevea/xxdate.exe $< ; \
+       hevea -exec /usr/local/lib/hevea/xxdate.exe $< ; \
+       else \
+       echo -e "\n\n *** Hevea: Unable to find xxdate.exe ***\n\n"; \
+       fi
+       hacha -o index.html cocci_syntax.html
diff --git a/docs/grammar/cocci_syntax.tex b/docs/grammar/cocci_syntax.tex
new file mode 100644 (file)
index 0000000..ed2b3fd
--- /dev/null
@@ -0,0 +1,809 @@
+\documentclass{article}
+%\usepackage[latin9]{inputenc}
+\usepackage{hevea}
+\usepackage{fullpage}
+\usepackage{alltt}
+\usepackage{xspace}
+\usepackage[pdfborder={0 0 0}]{hyperref}
+\usepackage{listings}
+\usepackage[usenames,dvipsnames]{color}
+\usepackage[T1]{fontenc}
+\usepackage{multirow}
+
+\lstset{basicstyle=\ttfamily,numbers=left, numberstyle=\tiny, stepnumber=1, numbersep=5pt,language=C,commentstyle=\color{OliveGreen},keywordstyle=\color{blue},stringstyle=\color{BrickRed}}
+
+%
+% You must prefix the +/- lines of
+% cocci files with @+/@- respectively.
+% This will enable the automatic coloration.
+%
+% Note: You need at least the following version of hevea
+% http://hevea.inria.fr/distri/unstable/hevea-2008-12-17.tar.gz
+%
+\ifhevea % For HTML generation
+\lstdefinelanguage{Cocci}{
+morekeywords={idexpression,expression,statement,identifier,
+parameter,list,when,strict,any,forall,local,position,typedef},
+keywordstyle=\color{OliveGreen}\bfseries,
+sensitive=false,
+moredelim=[is][\color{blue}]{@M}{@M},
+moredelim=[il][\color{OliveGreen}]{@+},
+moredelim=[il][\color{BrickRed}]{@-}}
+
+\lstdefinelanguage{PatchC}[ANSI]{C}{
+stringstyle=\color{black},
+moredelim=[il][\color{OliveGreen}]{@+},
+moredelim=[il][\color{BrickRed}]{@-},
+moredelim=[il][\color{Plum}]{@M}}
+
+\else % For DVI/PS/PDF generation
+\lstdefinelanguage{Cocci}{
+morekeywords={idexpression,expression,statement,identifier,
+parameter,list,when,strict,any,forall,local,position,typedef},
+keywordstyle=\color{OliveGreen}\bfseries,
+sensitive=false,
+moredelim=*[is][\color{blue}]{@M}{@M},
+moredelim=[il][\color{OliveGreen}]{@+},
+moredelim=[il][\color{BrickRed}]{@-}}
+
+\lstdefinelanguage{PatchC}[ANSI]{C}{
+stringstyle=\color{black},
+moredelim=[il][\color{OliveGreen}]{@+},
+moredelim=[il][\color{BrickRed}]{@-},
+moredelim=[il][\color{Plum}]{@M}}
+\fi
+
+\newif\iflanguagestyle
+\languagestylefalse
+\input{grammar}
+
+\newcommand{\sizecodebis}[0]{\scriptsize}
+
+\newcommand{\mita}[1]{\mbox{\it{{#1}}}}
+\newcommand{\mtt}[1]{\mbox{\tt{{#1}}}}
+\newcommand{\msf}[1]{\mbox{\sf{{#1}}}}
+\newcommand{\stt}[1]{\mbox{\scriptsize\tt{{#1}}}}
+\newcommand{\ssf}[1]{\mbox{\scriptsize\sf{{#1}}}}
+\newcommand{\sita}[1]{\mbox{\scriptsize\it{{#1}}}}
+\newcommand{\mrm}[1]{\mbox{\rm{{#1}}}}
+\newcommand{\mth}[1]{\({#1}\)}
+\newcommand{\entails}[2]{\begin{array}{@{}c@{}}{#1}\\\hline{#2}\end{array}}
+\newcommand{\ttlb}{\mbox{\tt \char'173}}
+\newcommand{\ttrb}{\mbox{\tt \char'175}}
+\newcommand{\ttmid}{\mbox{\tt \char'174}}
+\newcommand{\tttld}{\mbox{\tt \char'176}}
+
+\newcommand{\fixme}[1]{{\color{red} #1}}
+
+\ifhevea
+\newcommand{\phantom}{}
+\newcommand{\air}{   }
+\else
+\newcommand{\air}{\phantom{xxx}}
+\fi
+
+\title{The SmPL Grammar (version 0.1.4)}
+\author{Research group on Coccinelle}
+\date{\today}
+
+\begin{document}
+\maketitle
+
+%\section{The SmPL Grammar}
+
+% This section presents the SmPL grammar.  This definition follows closely
+% our implementation using the Menhir parser generator \cite{menhir}.
+
+This document presents the grammar of the SmPL language used by the
+\href{http://www.emn.fr/x-info/coccinelle}{Coccinelle tool}.  For the most
+part, the grammar is written using standard notation.  In some rules,
+however, the left-hand side is in all uppercase letters.  These are
+macros, which take one or more grammar rule right-hand-sides as
+arguments.  The grammar also uses some unspecified nonterminals, such
+as {\sf id}, {\sf const}, etc.  These refer to the sets suggested by
+the name, {\em i.e.}, {\sf id} refers to the set of possible
+C-language identifiers, while {\sf const} refers to the set of
+possible C-language constants.  \ifhevea A PDF version of this
+documentation is available at
+\url{http://www.emn.fr/x-info/coccinelle/docs/cocci_syntax.pdf}.\else
+A HTML version of this documentation is available online at
+\url{http://www.emn.fr/x-info/coccinelle/docs/cocci_syntax.html}. \fi
+
+%% \ifhevea A PDF
+%% version of this documentation is available at
+%% \url{http://localhost:8080/coccinelle/cocci_syntax.pdf}.\else A HTML
+%% version of this documentation is available online at
+%% \url{http://localhost:8080/coccinelle/cocci_syntax.html}. \fi
+
+\section{Program}
+
+\begin{grammar}
+  \RULE{\rt{program}}
+  \CASE{\any{\NT{include\_cocci}} \some{\NT{changeset}}}
+
+  \RULE{\rt{include\_cocci}}
+  \CASE{using \NT{string}}
+  \CASE{using \NT{pathToIsoFile}}
+
+  \RULE{\rt{changeset}}
+  \CASE{\NT{metavariables} \NT{transformation}}
+%  \CASE{\NT{metavariables} \ANY{--- filename +++ filename} \NT{transformation}}
+
+\end{grammar}
+
+% Between the metavariables and the transformation rule, there can be a
+% specification of constraints on the names of the old and new files,
+% analogous to the filename specifications in the standard patch syntax.
+% (see Figure \ref{scsiglue_patch}).
+
+\section{Metavariables}
+
+The \NT{rulename} portion of the metavariable declaration can specify
+properties of a rule such as its name, the names of the rules that it
+depends on, the isomorphisms to be used in processing the rule, and whether
+quantification over paths should be universal or existential.  The optional
+annotation {\tt expression} indicates that the pattern is to be considered
+as matching an expression, and thus can be used to avoid some parsing
+problems.
+
+The \NT{metadecl} portion of the metavariable declaration defines various
+types of metavariables that will be used for matching in the transformation
+section.
+
+\begin{grammar}
+  \RULE{\rt{metavariables}}
+  \CASE{@@ \any{\NT{metadecl}} @@}
+  \CASE{@ \NT{rulename} @ \any{\NT{metadecl}} @@}
+
+  \RULE{\rt{rulename}}
+  \CASE{\T{id} \OPT{extends \T{id}} \OPT{depends on \NT{dep}} \opt{\NT{iso}}
+    \opt{\NT{disable-iso}} \opt{\NT{exists}} \opt{expression}}
+  \CASE{script:\T{language} \OPT{depends on \NT{dep}}}
+
+  \RULE{\rt{dep}}
+  \CASE{\NT{pnrule}}
+  \CASE{\NT{dep} \&\& \NT{dep}}
+  \CASE{\NT{dep} || \NT{dep}}
+
+  \RULE{\rt{pnrule}}
+  \CASE{\T{id}}
+  \CASE{!\T{id}}
+  \CASE{ever \T{id}}
+  \CASE{never \T{id}}
+  \CASE{(\NT{dep})}
+
+  \RULE{\rt{iso}}
+  \CASE{using \NT{string} \ANY{, \NT{string}}}
+
+  \RULE{\rt{disable-iso}}
+  \CASE{disable \NT{COMMA\_LIST}\mth{(}\T{id}\mth{)}}
+
+  \RULE{\rt{exists}}
+  \CASE{exists}
+  \CASE{forall}
+%  \CASE{\opt{reverse} forall}
+
+  \RULE{\rt{COMMA\_LIST}\mth{(}\rt{elem}\mth{)}}
+  \CASE{\NT{elem} \ANY{, \NT{elem}}}
+\end{grammar}
+
+The keyword \NT{disable-iso} is normally used with the names of
+isomorphisms defined in standard.iso or whatever isomorphism file has been
+included.  There are, however, some other isomorphisms that are built into
+the implementation of Coccinelle and that can be disabled as well.  Their
+names are given below.  In each case, the text descibes the standard
+behavior.  Using \NT{disable-iso} with the given name disables this behavior.
+
+\begin{itemize}
+\item \KW{optional\_storage}: A SmPL function definition that does not
+  specify any visibility (i.e., static or extern), or a SmPL variable
+  declaration that does not specify any storage (i.e., auto, static,
+  register, or extern), matches a function declaration or variable
+  declaration with any visibility or storage, respectively.
+\item \KW{optional\_qualifier}: This is similar to \KW{optional\_storage},
+  except that here is it the qualifier (i.e., const or volatile) that does
+  not have to be specified in the SmPL code, but may be present in the C code.
+\item \KW{value\_format}: Integers in various formats, e.g., 1 and 0x1, are
+  considered to be equivalent in the matching process.
+\item \KW{comm\_assoc}: An expression of the form \NT{exp} \NT{bin\_op}
+  \KW{...}, where \NT{bin\_op} is commutative and associative, is
+  considered to match any top-level sequence of \NT{bin\_op} operators
+  containing \NT{exp} as the top-level argument.
+\end{itemize}
+
+The possible types of metavariable declarations are defined by the grammar
+rule below.  Metavariables should occur at least once in the transformation
+immediately following their declaration.  Fresh metavariables must only be
+used in {\tt +} code.  These properties are not expressed in the grammar,
+but are checked by a subsequent analysis.  The metavariables are designated
+according to the kind of terms they can match, such as a statement, an
+identifier, or an expression.  An expression metavariable can be further
+constrained by its type.
+
+\begin{grammar}
+  \RULE{\rt{metadecl}}
+  \CASE{fresh identifier \NT{ids} ;}
+  \CASE{identifier \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+  \CASE{parameter \opt{list} \NT{ids} ;}
+  \CASE{parameter list [ \NT{id} ] \NT{ids} ;}
+  \CASE{type \NT{ids} ;}
+  \CASE{statement \opt{list} \NT{ids} ;}
+  \CASE{typedef \NT{ids} ;}
+  \CASE{declarer name \NT{ids} ;}
+%  \CASE{\opt{local} function \NT{pmid\_with\_not\_eq\_list} ;}
+  \CASE{declarer \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+  \CASE{iterator name \NT{ids} ;}
+  \CASE{iterator \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+%  \CASE{error \NT{pmid\_with\_not\_eq\_list} ; }
+  \CASE{\opt{local} idexpression \opt{\NT{ctype}} \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+  \CASE{\opt{local} idexpression \OPT{\ttlb \NT{ctypes}\ttrb~\any{*}} \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+  \CASE{\opt{local} idexpression \some{*} \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+  \CASE{expression list \NT{ids} ;}
+  \CASE{expression \some{*} \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+  \CASE{expression \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_ceq}\mth{)} ;}
+  \CASE{expression list [ ident ] \NT{ids} ;}
+  \CASE{\NT{ctype} [ ] \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+  \CASE{\NT{ctype} \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_ceq}\mth{)} ;}
+  \CASE{\ttlb \NT{ctypes}\ttrb~\any{*} \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_ceq}\mth{)} ;}
+  \CASE{\ttlb \NT{ctypes}\ttrb~\any{*} [ ] \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+  \CASE{constant \opt{\NT{ctype}} \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+  \CASE{constant \OPT{\ttlb \NT{ctypes}\ttrb~\any{*}} \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq}\mth{)} ;}
+  \CASE{position \opt{any} \NT{COMMA\_LIST}\mth{(}\NT{pmid\_with\_not\_eq\_mid}\mth{)} ;}
+\end{grammar}
+
+\begin{grammar}
+  \RULE{\rt{ids}}
+  \CASE{\NT{COMMA\_LIST}\mth{(}\NT{pmid}\mth{)}}
+
+  \RULE{\rt{pmid}}
+  \CASE{\T{id}}
+  \CASE{\NT{mid}}
+%   \CASE{list}
+%   \CASE{error}
+%   \CASE{type}
+
+  \RULE{\rt{mid}}  \CASE{\T{rulename\_id}.\T{id}}
+
+  \RULE{\rt{pmid\_with\_not\_eq}}
+  \CASE{\NT{pmid} \OPT{!= \T{id}}}
+  \CASE{\NT{pmid} \OPT{!= \ttlb~\NT{COMMA\_LIST}\mth{(}\T{id}\mth{)} \ttrb}}
+
+  \RULE{\rt{pmid\_with\_not\_ceq}}
+  \CASE{\NT{pmid} \OPT{!= \NT{id\_or\_cst}}}
+  \CASE{\NT{pmid} \OPT{!= \ttlb~\NT{COMMA\_LIST}\mth{(}\NT{id\_or\_cst}\mth{)} \ttrb}}
+
+  \RULE{\rt{id\_or\_cst}}
+  \CASE{\T{id}}
+  \CASE{\T{integer}}
+
+  \RULE{\rt{pmid\_with\_not\_eq\_mid}}
+  \CASE{\NT{pmid} \OPT{!= \NT{mid}}}
+  \CASE{\NT{pmid} \OPT{!= \ttlb~\NT{COMMA\_LIST}\mth{(}\NT{mid}\mth{)} \ttrb}}
+\end{grammar}
+
+Subsequently, we refer to arbitrary metavariables as
+\mth{\msf{metaid}^{\mbox{\scriptsize{\it{ty}}}}}, where {\it{ty}}
+indicates the {\it metakind} used in the declaration of the variable.
+For example, \mth{\msf{metaid}^{\ssf{Type}}} refers to a metavariable
+that was declared using \texttt{type} and stands for any type.
+
+The \NT{ctype} and \NT{ctypes} nonterminals are used by both the grammar of
+metavariable declarations and the grammar of transformations, and are
+defined on page~\pageref{types}.
+
+\section{Transformation}
+
+The transformation specification essentially has the form of C code,
+except that lines to remove are annotated with \verb+-+ in the first
+column, and lines to add are annotated with \verb-+-.  A
+transformation specification can also use {\em dots}, ``\verb-...-'',
+describing an arbitrary sequence of function arguments or instructions
+within a control-flow path.  Dots may be modified with a {\tt when}
+clause, indicating a pattern that should not occur anywhere within the
+matched sequence.  Finally, a transformation can specify a disjunction
+of patterns, of the form \mtt{( \mth{\mita{pat}_1} | \mita{\ldots} |
+  \mth{\mita{pat}_n} )} where each \texttt{(}, \texttt{|} or
+\texttt{)} is in column 0 or preceded by \texttt{\textbackslash}.
+
+The grammar that we present for the transformation is not actually the
+grammar of the SmPL code that can be written by the programmer, but is
+instead the grammar of the slice of this consisting of the {\tt -}
+annotated and the unannotated code (the context of the transformed lines),
+or the {\tt +} annotated code and the unannotated code.  For example, for
+parsing purposes, the following transformation
+%presented in Section \ref{sec:seq2}
+is split into the two variants shown below and each is parsed
+separately.
+
+\begin{center}
+\begin{tabular}{c}
+\begin{lstlisting}[language=Cocci]
+  proc_info_func(...) {
+    <...
+@--    hostno
+@++    hostptr->host_no
+    ...>
+ }
+\end{lstlisting}\\
+\end{tabular}
+\end{center}
+
+{%\sizecodebis
+\begin{center}
+\begin{tabular}{p{5cm}p{3cm}p{5cm}}
+\begin{lstlisting}[language=Cocci]
+  proc_info_func(...) {
+    <...
+@--    hostno
+    ...>
+ }
+\end{lstlisting}
+&&
+\begin{lstlisting}[language=Cocci]
+  proc_info_func(...) {
+    <...
+@++    hostptr->host_no
+    ...>
+ }
+\end{lstlisting}
+\end{tabular}
+\end{center}
+}
+
+\noindent
+Requiring that both slices parse correctly ensures that the rule matches
+syntactically valid C code and that it produces syntactically valid C code.
+The generated parse trees are then merged for use in the subsequent
+matching and transformation process.
+
+The grammar for the minus or plus slice of a transformation is as follows:
+
+\begin{grammar}
+
+  \RULE{\rt{transformation}}
+  \CASE{\some{\NT{include}}}
+  \CASE{\NT{OPTDOTSEQ}\mth{(}\NT{expr}, \NT{when}\mth{)}}
+  \CASE{\NT{OPTDOTSEQ}\mth{(}\some{\NT{decl\_stmt}}, \NT{when}\mth{)}}
+  \CASE{\NT{OPTDOTSEQ}\mth{(}\NT{fundecl}, \NT{when}\mth{)}}
+
+  \RULE{\rt{include}}
+  \CASE{\#include \T{include\_string}}
+
+%  \RULE{\rt{fun\_decl\_stmt}}
+%  \CASE{\NT{decl\_stmt}}
+%  \CASE{\NT{fundecl}}
+
+%  \CASE{\NT{ctype}}
+%  \CASE{\ttlb \NT{initialize\_list} \ttrb}
+%  \CASE{\NT{toplevel\_seq\_start\_after\_dots\_init}}
+%
+%  \RULE{\rt{toplevel\_seq\_start\_after\_dots\_init}}
+%  \CASE{\NT{stmt\_dots} \NT{toplevel\_after\_dots}}
+%  \CASE{\NT{expr} \opt{\NT{toplevel\_after\_exp}}}
+%  \CASE{\NT{decl\_stmt\_expr} \opt{\NT{toplevel\_after\_stmt}}}
+%
+%  \RULE{\rt{stmt\_dots}}
+%  \CASE{... \any{\NT{when}}}
+%  \CASE{<... \any{\NT{when}} \NT{nest\_after\_dots} ...>}
+%  \CASE{<+... \any{\NT{when}} \NT{nest\_after\_dots} ...+>}
+
+  \RULE{\rt{when}}
+  \CASE{when != \NT{when\_code}}
+  \CASE{when = \NT{rule\_elem\_stmt}}
+  \CASE{when \NT{COMMA\_LIST}\mth{(}\NT{any\_strict}\mth{)}}
+  \CASE{when true != \NT{expr}}
+  \CASE{when false != \NT{expr}}
+
+  \RULE{\rt{when\_code}}
+  \CASE{\NT{OPTDOTSEQ}\mth{(}\some{\NT{decl\_stmt}}, \NT{when}\mth{)}}
+  \CASE{\NT{OPTDOTSEQ}\mth{(}\NT{expr}, \NT{when}\mth{)}}
+
+  \RULE{\rt{rule\_elem\_stmt}}
+  \CASE{\NT{one\_decl}}
+  \CASE{\NT{expr};}
+  \CASE{return \opt{\NT{expr}};}
+  \CASE{break;}
+  \CASE{continue;}
+  \CASE{\bs(\NT{rule\_elem\_stmt} \SOME{\bs| \NT{rule\_elem\_stmt}}\bs)}
+
+  \RULE{\rt{any\_strict}}
+  \CASE{any}
+  \CASE{strict}
+  \CASE{forall}
+  \CASE{exists}
+
+%  \RULE{\rt{nest\_after\_dots}}
+%  \CASE{\NT{decl\_stmt\_exp} \opt{\NT{nest\_after\_stmt}}}
+%  \CASE{\opt{\NT{exp}} \opt{\NT{nest\_after\_exp}}}
+%
+%  \RULE{\rt{nest\_after\_stmt}}
+%  \CASE{\NT{stmt\_dots} \NT{nest\_after\_dots}}
+%  \CASE{\NT{decl\_stmt} \opt{\NT{nest\_after\_stmt}}}
+%
+%  \RULE{\rt{nest\_after\_exp}}
+%  \CASE{\NT{stmt\_dots} \NT{nest\_after\_dots}}
+%
+%  \RULE{\rt{toplevel\_after\_dots}}
+%  \CASE{\opt{\NT{toplevel\_after\_exp}}}
+%  \CASE{\NT{exp} \opt{\NT{toplevel\_after\_exp}}}
+%  \CASE{\NT{decl\_stmt\_expr} \NT{toplevel\_after\_stmt}}
+%
+%  \RULE{\rt{toplevel\_after\_exp}}
+%  \CASE{\NT{stmt\_dots} \opt{\NT{toplevel\_after\_dots}}}
+%
+%  \RULE{\rt{decl\_stmt\_expr}}
+%  \CASE{TMetaStmList$^\ddag$}
+%  \CASE{\NT{decl\_var}}
+%  \CASE{\NT{stmt}}
+%  \CASE{(\NT{stmt\_seq} \ANY{| \NT{stmt\_seq}})}
+%
+%  \RULE{\rt{toplevel\_after\_stmt}}
+%  \CASE{\NT{stmt\_dots} \opt{\NT{toplevel\_after\_dots}}}
+%  \CASE{\NT{decl\_stmt} \NT{toplevel\_after\_stmt}}
+
+\end{grammar}
+
+\begin{grammar}
+  \RULE{\rt{OPTDOTSEQ}\mth{(}\rt{grammar\_ds}, \rt{when\_ds}\mth{)}}
+  \CASE{}\multicolumn{3}{r}{\hspace{1cm}
+  \KW{\opt{... \opt{\NT{when\_ds}}} \NT{grammar\_ds}
+    \ANY{... \opt{\NT{when\_ds}} \NT{grammar\_ds}}
+    \opt{... \opt{\NT{when\_ds}}}}
+  }
+
+%  \CASE{\opt{... \opt{\NT{when\_ds}}} \NT{grammar}
+%    \ANY{... \opt{\NT{when\_ds}} \NT{grammar}}
+%    \opt{... \opt{\NT{when\_ds}}}}
+%  \CASE{<... \any{\NT{when\_ds}} \NT{grammar} ...>}
+%  \CASE{<+... \any{\NT{when\_ds}} \NT{grammar} ...+>}
+
+\end{grammar}
+
+\noindent
+Lines may be annotated with an element of the set $\{\mtt{-}, \mtt{+},
+\mtt{*}\}$ or the singleton $\mtt{?}$, or one of each set. \mtt{?}
+represents at most one match of the given pattern. \mtt{*} is used for
+semantic match, \emph{i.e.}, a pattern that highlights the fragments
+annotated with \mtt{*}, but does not perform any modification of the
+matched code. \mtt{*} cannot be mixed with \mtt{-} and \mtt{+}.  There are
+some constraints on the use of these annotations:
+\begin{itemize}
+\item Dots, {\em i.e.} \texttt{...}, cannot occur on a line marked
+  \texttt{+}.
+\item Nested dots, {\em i.e.}, dots enclosed in {\tt <} and {\tt >}, cannot
+  occur on a line with any marking.
+\end{itemize}
+
+\section{Types}
+\label{types}
+
+\begin{grammar}
+
+  \RULE{\rt{ctypes}}
+  \CASE{\NT{COMMA\_LIST}\mth{(}\NT{ctype}\mth{)}}
+
+  \RULE{\rt{ctype}}
+  \CASE{\opt{\NT{const\_vol}} \NT{generic\_ctype} \any{*}}
+  \CASE{\opt{\NT{const\_vol}} void \some{*}}
+  \CASE{(\NT{ctype} \ANY{| \NT{ctype}})}
+
+  \RULE{\rt{const\_vol}}
+  \CASE{const}
+  \CASE{volatile}
+
+  \RULE{\rt{generic\_ctype}}
+  \CASE{\NT{ctype\_qualif}}
+  \CASE{\opt{\NT{ctype\_qualif}} char}
+  \CASE{\opt{\NT{ctype\_qualif}} short}
+  \CASE{\opt{\NT{ctype\_qualif}} int}
+  \CASE{\opt{\NT{ctype\_qualif}} long}
+  \CASE{\opt{\NT{ctype\_qualif}} long long}
+  \CASE{double}
+  \CASE{float}
+  \CASE{\OPT{struct\OR union} \T{id} \OPT{\{ \any{\NT{struct\_decl\_list}} \}}}
+
+  \RULE{\rt{ctype\_qualif}}
+  \CASE{unsigned}
+  \CASE{signed}
+
+  \RULE{\rt{struct\_decl\_list}}
+  \CASE{\NT{struct\_decl\_list\_start}}
+
+  \RULE{\rt{struct\_decl\_list\_start}}
+  \CASE{\NT{struct\_decl}}
+  \CASE{\NT{struct\_decl} \NT{struct\_decl\_list\_start}}
+  \CASE{... \opt{when != \NT{struct\_decl}}$^\dag$ \opt{\NT{continue\_struct\_decl\_list}}}
+
+  \RULE{\rt{continue\_struct\_decl\_list}}
+  \CASE{\NT{struct\_decl} \NT{struct\_decl\_list\_start}}
+  \CASE{\NT{struct\_decl}}
+
+  \RULE{\rt{struct\_decl}}
+  \CASE{\NT{ctype} \NT{d\_ident};}
+  \CASE{\NT{fn\_ctype} (* \NT{d\_ident}) (\NT{PARAMSEQ}\mth{(}\NT{name\_opt\_decl}, \mth{\varepsilon)});)}
+  \CASE{\opt{\NT{const\_vol}} \T{id} \NT{d\_ident};}
+
+  \RULE{\rt{d\_ident}}
+  \CASE{\NT{id} \any{[\opt{\NT{expr}}]}}
+
+  \RULE{\rt{fn\_ctype}}
+  \CASE{\NT{generic\_ctype} \any{*}}
+  \CASE{void \any{*}}
+
+  \RULE{\rt{name\_opt\_decl}}
+  \CASE{\NT{decl}}
+  \CASE{\NT{ctype}}
+  \CASE{\NT{fn\_ctype}}
+\end{grammar}
+
+$^\dag$ The optional \texttt{when} construct ends at the end of the line.
+
+\section{Function declarations}
+
+\begin{grammar}
+
+  \RULE{\rt{fundecl}}
+  \CASE{\opt{\NT{fn\_ctype}} \any{\NT{funinfo}} \NT{funid}
+    (\opt{\NT{PARAMSEQ}\mth{(}\NT{param}, \mth{\varepsilon)}})
+    \ttlb~\opt{\NT{stmt\_seq}} \ttrb}
+
+  \RULE{\rt{funproto}}
+  \CASE{\opt{\NT{fn\_ctype}} \any{\NT{funinfo}} \NT{funid}
+    (\opt{\NT{PARAMSEQ}\mth{(}\NT{param}, \mth{\varepsilon)}});}
+
+  \RULE{\rt{funinfo}}
+  \CASE{inline}
+  \CASE{\NT{storage}}
+%   \CASE{\NT{attr}}
+
+  \RULE{\rt{storage}}
+  \CASE{static}
+  \CASE{auto}
+  \CASE{register}
+  \CASE{extern}
+
+  \RULE{\rt{funid}}
+  \CASE{\T{id}}
+  \CASE{\mth{\T{metaid}^{\ssf{Id}}}}
+%   \CASE{\mth{\T{metaid}^{\ssf{Func}}}}
+%   \CASE{\mth{\T{metaid}^{\ssf{LocalFunc}}}}
+
+  \RULE{\rt{param}}
+  \CASE{\NT{type} \T{id}}
+  \CASE{\mth{\T{metaid}^{\ssf{Param}}}}
+  \CASE{\mth{\T{metaid}^{\ssf{ParamList}}}}
+
+  \RULE{\rt{decl}}
+  \CASE{\NT{ctype} \NT{id}}
+  \CASE{\NT{fn\_ctype} (* \NT{id}) (\NT{PARAMSEQ}\mth{(}\NT{name\_opt\_decl}, \mth{\varepsilon)})}
+  \CASE{void}
+  \CASE{\mth{\T{metaid}^{\ssf{Param}}}}
+\end{grammar}
+
+\begin{grammar}
+  \RULE{\rt{PARAMSEQ}\mth{(}\rt{gram\_p}, \rt{when\_p}\mth{)}}
+  \CASE{\NT{COMMA\_LIST}\mth{(}\NT{gram\_p} \OR \ldots \opt{\NT{when\_p}}\mth{)}}
+\end{grammar}
+
+%\newpage
+
+\section{Declarations}
+
+\begin{grammar}
+  \RULE{\rt{decl\_var}}
+%  \CASE{\NT{type} \opt{\NT{id} \opt{[\opt{\NT{dot\_expr}}]}
+%      \ANY{, \NT{id} \opt{[ \opt{\NT{dot\_expr}}]}}};}
+  \CASE{\NT{common\_decl}}
+  \CASE{\opt{\NT{storage}} \NT{ctype} \NT{COMMA\_LIST}\mth{(}\NT{d\_ident}\mth{)} ;}
+  \CASE{\opt{\NT{storage}} \opt{\NT{const\_vol}} \T{id} \NT{COMMA\_LIST}\mth{(}\NT{d\_ident}\mth{)} ;}
+  \CASE{\opt{\NT{storage}} \NT{fn\_ctype} ( * \NT{d\_ident} ) ( \NT{PARAMSEQ}\mth{(}\NT{name\_opt\_decl}, \mth{\varepsilon)} ) = \NT{initialize} ;}
+  \CASE{typedef \NT{ctype} \NT{typedef\_ident} ;}
+
+  \RULE{\rt{one\_decl}}
+  \CASE{\NT{common\_decl}}
+  \CASE{\opt{\NT{storage}} \NT{ctype} \NT{id};}
+%  \CASE{\NT{storage} \NT{ctype} \NT{id} \opt{[\opt{\NT{dot\\_expr}}]} = \NT{nest\\_expr};}
+  \CASE{\opt{\NT{storage}} \opt{\NT{const\_vol}} \T{id} \NT{d\_ident} ;}
+
+  \RULE{\rt{common\_decl}}
+  \CASE{\NT{ctype};}
+  \CASE{\NT{funproto}}
+  \CASE{\opt{\NT{storage}} \NT{ctype} \NT{d\_ident} = \NT{initialize} ;}
+  \CASE{\opt{\NT{storage}} \opt{\NT{const\_vol}} \T{id} \NT{d\_ident} = \NT{initialize} ;}
+  \CASE{\opt{\NT{storage}} \NT{fn\_ctype} ( * \NT{d\_ident} ) ( \NT{PARAMSEQ}\mth{(}\NT{name\_opt\_decl}, \mth{\varepsilon)} ) ;}
+  \CASE{\NT{decl\_ident} ( \OPT{\NT{COMMA\_LIST}\mth{(}\NT{expr}\mth{)}} ) ;}
+
+  \RULE{\rt{initialize}}
+  \CASE{\NT{dot\_expr}}
+  \CASE{\ttlb~\opt{\NT{COMMA\_LIST}\mth{(}\NT{dot\_expr}\mth{)}}~\ttrb}
+
+  \RULE{\rt{decl\_ident}}
+  \CASE{\T{DeclarerId}}
+  \CASE{\mth{\T{metaid}^{\ssf{Declarer}}}}
+\end{grammar}
+
+\section{Statements}
+
+The first rule {\em statement} describes the various forms of a statement.
+The remaining rules implement the constraints that are sensitive to the
+context in which the statement occurs: {\em single\_statement} for a
+context in which only one statement is allowed, and {\em decl\_statement}
+for a context in which a declaration, statement, or sequence thereof is
+allowed.
+
+\begin{grammar}
+  \RULE{\rt{stmt}}
+  \CASE{\NT{include}}
+  \CASE{\mth{\T{metaid}^{\ssf{Stmt}}}}
+  \CASE{\NT{expr};}
+  \CASE{if (\NT{dot\_expr}) \NT{single\_stmt} \opt{else \NT{single\_stmt}}}
+  \CASE{for (\opt{\NT{dot\_expr}}; \opt{\NT{dot\_expr}}; \opt{\NT{dot\_expr}})
+    \NT{single\_stmt}}
+  \CASE{while (\NT{dot\_expr}) \NT{single\_stmt}}
+  \CASE{do \NT{single\_stmt} while (\NT{dot\_expr});}
+  \CASE{\NT{iter\_ident} (\any{\NT{dot\_expr}}) \NT{single\_stmt}}
+  \CASE{switch (\opt{\NT{dot\_expr}}) \ttlb \any{\NT{case\_line}} \ttrb}
+  \CASE{return \opt{\NT{dot\_expr}};}
+  \CASE{\ttlb~\opt{\NT{stmt\_seq}} \ttrb}
+  \CASE{\NT{NEST}\mth{(}\some{\NT{decl\_stmt}}, \NT{when}\mth{)}}
+  \CASE{\NT{NEST}\mth{(}\NT{expr}, \NT{when}\mth{)}}
+  \CASE{break;}
+  \CASE{continue;}
+  \CASE{\NT{id}:}
+  \CASE{goto \NT{id};}
+  \CASE{\ttlb \NT{stmt\_seq} \ttrb}
+
+  \RULE{\rt{single\_stmt}}
+  \CASE{\NT{stmt}}
+  \CASE{\NT{OR}\mth{(}\NT{stmt}\mth{)}}
+
+  \RULE{\rt{decl\_stmt}}
+  \CASE{\mth{\T{metaid}^{\ssf{StmtList}}}}
+  \CASE{\NT{decl\_var}}
+  \CASE{\NT{stmt}}
+  \CASE{\NT{OR}\mth{(}\NT{stmt\_seq}\mth{)}}
+
+  \RULE{\rt{stmt\_seq}}
+  \CASE{\any{\NT{decl\_stmt}}
+    \opt{\NT{DOTSEQ}\mth{(}\some{\NT{decl\_stmt}},
+      \NT{when}\mth{)} \any{\NT{decl\_stmt}}}}
+  \CASE{\any{\NT{decl\_stmt}}
+    \opt{\NT{DOTSEQ}\mth{(}\NT{expr},
+      \NT{when}\mth{)} \any{\NT{decl\_stmt}}}}
+
+  \RULE{\rt{case\_line}}
+  \CASE{default :~\NT{stmt\_seq}}
+  \CASE{case \NT{dot\_expr} :~\NT{stmt\_seq}}
+
+  \RULE{\rt{iter\_ident}}
+  \CASE{\T{IteratorId}}
+  \CASE{\mth{\T{metaid}^{\ssf{Iterator}}}}
+\end{grammar}
+
+\begin{grammar}
+  \RULE{\rt{OR}\mth{(}\rt{gram\_o}\mth{)}}
+  \CASE{( \NT{gram\_o} \ANY{\ttmid \NT{gram\_o}})}
+
+  \RULE{\rt{DOTSEQ}\mth{(}\rt{gram\_d}, \rt{when\_d}\mth{)}}
+  \CASE{\ldots \opt{\NT{when\_d}} \ANY{\NT{gram\_d} \ldots \opt{\NT{when\_d}}}}
+
+  \RULE{\rt{NEST}\mth{(}\rt{gram\_n}, \rt{when\_n}\mth{)}}
+  \CASE{<\ldots \opt{\NT{when\_n}} \NT{gram\_n} \ANY{\ldots \opt{\NT{when\_n}} \NT{gram\_n}} \ldots>}
+  \CASE{<+\ldots \opt{\NT{when\_n}} \NT{gram\_n} \ANY{\ldots \opt{\NT{when\_n}} \NT{gram\_n}} \ldots+>}
+\end{grammar}
+
+\noindent
+OR is a macro that generates a disjunction of patterns.  The three
+tokens \T{(}, \T{\ttmid}, and \T{)} must appear in the leftmost
+column, to differentiate them from the parentheses and bit-or tokens
+that can appear within expressions (and cannot appear in the leftmost
+column). These token may also be preceded by \texttt{\bs}
+when they are used in an other column.  These tokens are furthermore
+different from (, \(\mid\), and ), which are part of the grammar
+metalanguage.
+
+\section{Expressions}
+
+A nest or a single ellipsis is allowed in some expression contexts, and
+causes ambiguity in others.  For example, in a sequence \mtt{\ldots
+\mita{expr} \ldots}, the nonterminal \mita{expr} must be instantiated as an
+explicit C-language expression, while in an array reference,
+\mtt{\mth{\mita{expr}_1} \mtt{[} \mth{\mita{expr}_2} \mtt{]}}, the
+nonterminal \mth{\mita{expr}_2}, because it is delimited by brackets, can
+be also instantiated as \mtt{\ldots}, representing an arbitrary expression.  To
+distinguish between the various possibilities, we define three nonterminals
+for expressions: {\em expr} does not allow either top-level nests or
+ellipses, {\em nest\_expr} allows a nest but not an ellipsis, and {\em
+dot\_expr} allows both.  The EXPR macro is used to express these variants
+in a concise way.
+
+\begin{grammar}
+  \RULE{\rt{expr}}
+  \CASE{\NT{EXPR}\mth{(}\NT{expr}\mth{)}}
+
+  \RULE{\rt{nest\_expr}}
+  \CASE{\NT{EXPR}\mth{(}\NT{nest\_expr}\mth{)}}
+  \CASE{\NT{NEST}\mth{(}\NT{nest\_expr}, \NT{exp\_whencode}\mth{)}}
+
+  \RULE{\rt{dot\_expr}}
+  \CASE{\NT{EXPR}\mth{(}\NT{dot\_expr}\mth{)}}
+  \CASE{\NT{NEST}\mth{(}\NT{dot\_expr}, \NT{exp\_whencode}\mth{)}}
+  \CASE{...~\opt{\NT{exp\_whencode}}}
+
+  \RULE{\rt{EXPR}\mth{(}\rt{exp}\mth{)}}
+  \CASE{\NT{exp} \NT{assign\_op} \NT{exp}}
+  \CASE{\NT{exp}++}
+  \CASE{\NT{exp}--}
+  \CASE{\NT{unary\_op} \NT{exp}}
+  \CASE{\NT{exp} \NT{bin\_op} \NT{exp}}
+  \CASE{\NT{exp} ?~\NT{dot\_expr} :~\NT{exp}}
+  \CASE{(\NT{type}) \NT{exp}}
+  \CASE{\NT{exp} [\NT{dot\_expr}]}
+  \CASE{\NT{exp} .~\NT{id}}
+  \CASE{\NT{exp} -> \NT{id}}
+  \CASE{\NT{exp}(\opt{\NT{PARAMSEQ}\mth{(}\NT{arg}, \NT{exp\_whencode}\mth{)}})}
+  \CASE{\NT{id}}
+%   \CASE{\mth{\T{metaid}^{\ssf{Func}}}}
+%   \CASE{\mth{\T{metaid}^{\ssf{LocalFunc}}}}
+  \CASE{\mth{\T{metaid}^{\ssf{Exp}}}}
+%   \CASE{\mth{\T{metaid}^{\ssf{Err}}}}
+  \CASE{\mth{\T{metaid}^{\ssf{Const}}}}
+  \CASE{\NT{const}}
+  \CASE{(\NT{dot\_expr})}
+  \CASE{\NT{OR}\mth{(}\NT{exp}\mth{)}}
+
+  \RULE{\rt{arg}}
+  \CASE{\NT{nest\_expr}}
+  \CASE{\mth{\T{metaid}^{\ssf{ExpList}}}}
+
+  \RULE{\rt{exp\_whencode}}
+  \CASE{when != \NT{expr}}
+
+  \RULE{\rt{assign\_op}}
+  \CASE{= \OR -= \OR += \OR *= \OR /= \OR \%=}
+  \CASE{\&= \OR |= \OR \caret= \OR \lt\lt= \OR \gt\gt=}
+
+  \RULE{\rt{bin\_op}}
+  \CASE{* \OR / \OR \% \OR + \OR -}
+  \CASE{\lt\lt \OR \gt\gt \OR \caret\xspace \OR \& \OR \ttmid}
+  \CASE{< \OR > \OR <= \OR >= \OR == \OR != \OR \&\& \OR \ttmid\ttmid}
+
+  \RULE{\rt{unary\_op}}
+  \CASE{++ \OR -- \OR \& \OR * \OR + \OR - \OR !}
+
+\end{grammar}
+
+\section{Constant, Identifiers and Types for Transformations}
+
+\begin{grammar}
+  \RULE{\rt{const}}
+  \CASE{\NT{string}}
+  \CASE{[0-9]+}
+  \CASE{\mth{\cdots}}
+
+  \RULE{\rt{string}}
+  \CASE{"\any{[\^{}"]}"}
+
+  \RULE{\rt{id}}
+  \CASE{\T{id} \OR \mth{\T{metaid}^{\ssf{Id}}}}
+
+  \RULE{\rt{typedef\_ident}}
+  \CASE{\T{id} \OR \mth{\T{metaid}^{\ssf{Type}}}}
+
+  \RULE{\rt{type}}
+  \CASE{\NT{ctype} \OR \mth{\T{metaid}^{\ssf{Type}}}}
+
+  \RULE{\rt{pathToIsoFile}}
+  \CASE{<.*>}
+\end{grammar}
+
+\include{examples}
+\end{document}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "cocci_syntax"
+%%% coding: latin-9
+%%% TeX-PDF-mode: t
+%%% ispell-local-dictionary: "american"
+%%% End:
diff --git a/docs/grammar/examples.tex b/docs/grammar/examples.tex
new file mode 100644 (file)
index 0000000..704bc29
--- /dev/null
@@ -0,0 +1,430 @@
+
+\section{Examples}
+%\label{sec:examples}
+
+This section presents a range of examples.  Each
+example is presented along with some C code to which it is
+applied. The description explains the rules and the matching process.
+
+\subsection{Function renaming}
+
+One of the primary goals of Coccinelle is to perform software
+evolution.  For instance, Coccinelle could be used to perform function
+renaming. In the following example, every occurrence of a call to the
+function \texttt{foo} is replaced by a call to the
+function \texttt{bar}.\\
+
+\begin{tabular}{ccc}
+Before & Semantic patch & After \\
+\begin{minipage}[t]{.3\linewidth}
+\begin{lstlisting}
+#DEFINE TEST "foo"
+
+printf("foo");
+
+int main(int i) {
+//Test
+  int k = foo();
+
+  if(1) {
+    foo();
+  } else {
+    foo();
+  }
+
+  foo();
+}
+\end{lstlisting}
+\end{minipage}
+&
+\begin{minipage}[t]{.3\linewidth}
+\begin{lstlisting}[language=Cocci]
+@M@@
+
+@@@M
+
+
+@-- foo()
+@++ bar()
+\end{lstlisting}
+\end{minipage}
+&
+\begin{minipage}[t]{.3\linewidth}
+\begin{lstlisting}
+#DEFINE TEST "foo"
+
+printf("foo");
+
+int main(int i) {
+//Test
+  int k = bar();
+
+  if(1) {
+    bar();
+  } else {
+    bar();
+  }
+
+  bar();
+}
+\end{lstlisting}
+\end{minipage}\\
+\end{tabular}
+
+\newpage
+\subsection{Removing a function argument}
+
+Another important kind of evolution is the introduction or deletion of a
+function argument. In the following example, the rule \texttt{rule1} looks
+for definitions of functions having return type \texttt{irqreturn\_t} and
+two parameters. A second \emph{anonymous} rule then looks for calls to the
+previously matched functions that have three arguments. The third argument
+is then removed to correspond to the new function prototype.\\
+
+\begin{tabular}{c}
+\begin{lstlisting}[language=Cocci,name=arg]
+@M@ rule1 @
+identifier fn;
+identifier irq, dev_id;
+typedef irqreturn_t;
+@@@M
+
+static irqreturn_t fn (int irq, void *dev_id)
+{
+   ...
+}
+
+@M@@
+identifier rule1.fn;
+expression E1, E2, E3;
+@@@M
+
+ fn(E1, E2
+@--  ,E3
+   )
+\end{lstlisting}\\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular}{c}
+  \texttt{drivers/atm/firestream.c} at line 1653 before transformation\\
+\begin{lstlisting}[language=PatchC]
+static void fs_poll (unsigned long data)
+{
+        struct fs_dev *dev = (struct fs_dev *) data;
+
+@-        fs_irq (0, dev, NULL);
+        dev->timer.expires = jiffies + FS_POLL_FREQ;
+        add_timer (&dev->timer);
+}
+\end{lstlisting}\\
+\vspace{1cm}
+\\
+
+
+  \texttt{drivers/atm/firestream.c} at line 1653 after transformation\\
+\begin{lstlisting}[language=PatchC]
+static void fs_poll (unsigned long data)
+{
+        struct fs_dev *dev = (struct fs_dev *) data;
+
+@+        fs_irq (0, dev);
+        dev->timer.expires = jiffies + FS_POLL_FREQ;
+        add_timer (&dev->timer);
+}
+\end{lstlisting}\\
+\end{tabular}
+
+\newpage
+\subsection{Introduction of a macro}
+
+To avoid code duplication or error prone code, the kernel provides
+macros such as \texttt{BUG\_ON}, \texttt{DIV\_ROUND\_UP} and
+\texttt{FIELD\_SIZE}. In these cases, the semantic patches look for
+the old code pattern and replace it by the new code.\\
+
+A semantic patch to introduce uses of the \texttt{DIV\_ROUND\_UP} macro
+looks for the corresponding expression, \emph{i.e.}, $(n + d - 1) /
+d$. When some code is matched, the metavariables \texttt{n} and \texttt{d}
+are bound to their corresponding expressions. Finally, Coccinelle rewrites
+the code with the \texttt{DIV\_ROUND\_UP} macro using the values bound to
+\texttt{n} and \texttt{d}, as illustrated in the patch that follows.\\
+
+\begin{tabular}{c}
+Semantic patch to introduce uses of the \texttt{DIV\_ROUND\_UP} macro\\
+\begin{lstlisting}[language=Cocci,name=divround]
+@M@ haskernel @
+@@@M
+
+#include <linux/kernel.h>
+
+@M@ depends on haskernel @
+expression n,d;
+@@@M
+
+(
+@-- (((n) + (d)) - 1) / (d))
+@++ DIV_ROUND_UP(n,d)
+|
+@-- (((n) + ((d) - 1)) / (d))
+@++ DIV_ROUND_UP(n,d)
+)
+\end{lstlisting}
+\end{tabular}\\
+
+\vspace{1cm}
+
+\begin{tabular}{c}
+Example of a generated patch hunk\\
+\begin{lstlisting}[language=PatchC]
+@---- a/drivers/atm/horizon.c
+@++++ b/drivers/atm/horizon.c
+@M@@ -698,7 +698,7 @@ got_it:
+                if (bits)
+                        *bits = (div<<CLOCK_SELECT_SHIFT) | (pre-1);
+                if (actual) {
+@--                       *actual = (br + (pre<<div) - 1) / (pre<<div);
+@++                       *actual = DIV_ROUND_UP(br, pre<<div);
+                        PRINTD (DBG_QOS, "actual rate: %u", *actual);
+                }
+                return 0;
+\end{lstlisting}
+\end{tabular}\\
+
+\newpage
+
+The \texttt{BUG\_ON} macro makes a assertion about the value of an
+expression. However, because some parts of the kernel define
+\texttt{BUG\_ON} to be the empty statement when debugging is not wanted,
+care must be taken when the asserted expression may have some side-effects,
+as is the case of a function call. Thus, we create a rule introducing
+\texttt{BUG\_ON} only in the case when the asserted expression does not
+perform a function call.
+
+On particular piece of code that has the form of a function call is a use
+of \texttt{unlikely}, which informs the compiler that a particular
+expression is unlikely to be true.  In this case, because \texttt{unlikely}
+does not perform any side effects, it is safe to use \texttt{BUG\_ON}.  The
+second rule takes care of this case.  It furthermore disables the
+isomorphism that allows a call to \texttt{unlikely} be replaced with its
+argument, as then the second rule would be the same as the first one.\\
+
+\begin{tabular}{c}
+\begin{lstlisting}[language=Cocci,name=bugon]
+@M@@
+expression E,f;
+@@@M
+
+(
+  if (<+... f(...) ...+>) { BUG(); }
+|
+@-- if (E) { BUG(); }
+@++ BUG_ON(E);
+)
+
+@M@ disable unlikely @
+expression E,f;
+@@@M
+
+(
+  if (<+... f(...) ...+>) { BUG(); }
+|
+@-- if (unlikely(E)) { BUG(); }
+@++ BUG_ON(E);
+)
+\end{lstlisting}\\
+\end{tabular}\\
+
+For instance, using the semantic patch above, Coccinelle generates
+patches like the following one.
+
+\begin{tabular}{c}
+\begin{lstlisting}[language=PatchC]
+@---- a/fs/ext3/balloc.c
+@++++ b/fs/ext3/balloc.c
+@M@@ -232,8 +232,7 @@ restart:
+                prev = rsv;
+        }
+        printk("Window map complete.\n");
+@--       if (bad)
+@--               BUG();
+@++       BUG_ON(bad);
+ }
+ #define rsv_window_dump(root, verbose) \
+        __rsv_window_dump((root), (verbose), __FUNCTION__)
+\end{lstlisting}
+\end{tabular}
+
+\newpage
+\subsection{Look for \texttt{NULL} dereference}
+
+This SmPL match looks for \texttt{NULL} dereferences. Once an
+expression has been compared to \texttt{NULL}, a dereference to this
+expression is prohibited unless the pointer variable is reassigned.\\
+
+\begin{tabular}{c}
+    Original \\
+
+\begin{lstlisting}
+foo = kmalloc(1024);
+if (!foo) {
+  printk ("Error %s", foo->here);
+  return;
+}
+foo->ok = 1;
+return;
+\end{lstlisting}\\
+  \end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular}{c}
+  Semantic match\\
+
+\begin{lstlisting}[language=Cocci]
+@M@@
+expression E, E1;
+identifier f;
+statement S1,S2,S3;
+@@@M
+
+@+* if (E == NULL)
+{
+  ... when != if (E == NULL) S1 else S2
+      when != E = E1
+@+* E->f
+  ... when any
+  return ...;
+}
+else S3
+\end{lstlisting}\\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular}{c}
+  Matched lines\\
+
+\begin{lstlisting}[language=PatchC]
+foo = kmalloc(1024);
+@-if (!foo) {
+@-  printk ("Error %s", foo->here);
+  return;
+}
+foo->ok = 1;
+return;
+\end{lstlisting}\\
+\end{tabular}
+
+\newpage
+\subsection{Reference counter: the of\_xxx API}
+
+Coccinelle can embed Python code. Python code is used inside special
+SmPL rule annotated with \texttt{script:python}.  Python rules inherit
+metavariables, such as identifier or token positions, from other SmPL
+rules. The inherited metavariables can then be manipulated by Python
+code.
+
+The following semantic match looks for a call to the
+\texttt{of\_find\_node\_by\_name} function. This call increments a
+counter which must be decremented to release the resource. Then, when
+there is no call to \texttt{of\_node\_put}, no new assignment to the
+\texttt{device\_node} variable \texttt{n} and a \texttt{return}
+statement is reached, a bug is detected and the position \texttt{p1}
+and \texttt{p2} are initialized. As the Python only depends on the
+positions \texttt{p1} and \texttt{p2}, it is evaluated. In the
+following case, some emacs Org mode data are produced.  This example
+illustrates the various fields that can be accessed in the Python code from
+a position variable.
+
+\begin{tabular}{c}
+\begin{lstlisting}[language=Cocci,breaklines=true]
+@M@ r exists @
+local idexpression struct device_node *n;
+position p1, p2;
+statement S1,S2;
+expression E,E1;
+@@@M
+
+(
+if (!(n@p1 = of_find_node_by_name(...))) S1
+|
+n@p1 = of_find_node_by_name(...)
+)
+<... when != of_node_put(n)
+    when != if (...) { <+... of_node_put(n) ...+> }
+    when != true !n  || ...
+    when != n = E
+    when != E = n
+if (!n || ...) S2
+...>
+(
+  return <+...n...+>;
+|
+return@p2 ...;
+|
+n = E1
+|
+E1 = n
+)
+
+@M@ script:python @
+p1 << r.p1;
+p2 << r.p2;
+@@@M
+
+print "* TODO [[view:%s::face=ovl-face1::linb=%s::colb=%s::cole=%s][inc. counter:%s::%s]]" % (p1[0].file,p1[0].line,p1[0].column,p1[0].column_end,p1[0].file,p1[0].line)
+print "[[view:%s::face=ovl-face2::linb=%s::colb=%s::cole=%s][return]]" % (p2[0].file,p2[0].line,p2[0].column,p2[0].column_end)
+\end{lstlisting}
+\end{tabular}
+
+
+\newpage
+
+Lines 13 to 17 list a variety of constructs that should not appear
+between a call to \texttt{of\_find\_node\_by\_name} and a buggy return
+site. Examples are a call to \texttt{of\_node\_put} (line 13) and a
+transition into the then branch of a conditional testing whether
+\texttt{n} is \texttt{NULL} (line 15). Any number of conditionals
+testing whether \texttt{n} is \texttt{NULL} are allowed as indicated
+by the use of a nest \texttt{<...~~...>} to describe the path between
+the call to \texttt{of\_find\_node\_by\_name}, the return and the
+conditional in the pattern on line 18.\\
+
+The previously semantic match has been used to generate the following
+lines. They may be edited using the emacs Org mode to navigate in the code
+from a site to another.
+
+\begin{lstlisting}[language=,breaklines=true]
+* TODO [[view:/linux-next/arch/powerpc/platforms/pseries/setup.c::face=ovl-face1::linb=236::colb=18::cole=20][inc. counter:/linux-next/arch/powerpc/platforms/pseries/setup.c::236]]
+[[view:/linux-next/arch/powerpc/platforms/pseries/setup.c::face=ovl-face2::linb=250::colb=3::cole=9][return]]
+* TODO [[view:/linux-next/arch/powerpc/platforms/pseries/setup.c::face=ovl-face1::linb=236::colb=18::cole=20][inc. counter:/linux-next/arch/powerpc/platforms/pseries/setup.c::236]]
+[[view:/linux-next/arch/powerpc/platforms/pseries/setup.c::face=ovl-face2::linb=245::colb=3::cole=9][return]]
+\end{lstlisting}
+
+% \begin{tabular}{ccc}
+% Before & Semantic patch & After \\
+% \begin{minipage}[t]{.3\linewidth}
+% \begin{lstlisting}
+% \end{lstlisting}
+% \end{minipage}
+% &
+% \begin{minipage}[t]{.3\linewidth}
+% \begin{lstlisting}[language=Cocci]
+% \end{lstlisting}
+% \end{minipage}
+% &
+% \begin{minipage}[t]{.3\linewidth}
+% \begin{lstlisting}
+% \end{lstlisting}
+% \end{minipage}\\
+% \end{tabular}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "cocci_syntax"
+%%% coding: latin-9
+%%% TeX-PDF-mode: t
+%%% ispell-local-dictionary: "american"
+%%% End:
diff --git a/docs/grammar/grammar.tex b/docs/grammar/grammar.tex
new file mode 100644 (file)
index 0000000..c16b836
--- /dev/null
@@ -0,0 +1,64 @@
+% Definition of a grammar (BNF style) package for Latex and Hevea
+
+
+\ifhevea
+% Definition for Hevea (HTML generation)
+\def\T#1{{\sf #1}}
+\def\NTS#1{{\maroon #1\/}}
+\def\KW#1{{\blue #1}}
+\def\gramor{{\black $|$}}
+\def\grameq{{\black \quad::=\quad}}
+\def\lparen{{\black (}}
+\def\rparen{{\black )}}
+\def\lbracket{{\black [}}
+\def\rbracket{{\black ]}}
+\def\plus{{\black +}}
+\def\questionmark{{\black ?}}
+\def\etoile{{\black *}}
+\else
+% Definition for LaTeX
+\def\T#1{{\sf #1}}
+\def\NTS#1{{\it #1\/}}
+\def\KW#1{{\mtt{#1}}}
+%\def\gramor{$\vert$}
+\def\gramor{$\mid$}
+\def\grameq{\,\,\,::=\,\,\,\,\,}
+\def\lparen{(}
+\def\rparen{)}
+\def\lbracket{$[$}
+\def\rbracket{$]$}
+\def\plus{+}
+\def\questionmark{?}
+\def\etoile{*}
+\fi
+
+\def\NT#1{\hyperlink{#1}{\NTS{#1}}}
+\def\group#1{{\rm\lparen}#1{\rm\rparen}}
+\def\range#1#2{#1{..}#2}
+\def\any#1{#1$^{\etoile}$}
+\def\some#1{#1$^{\plus}$}
+\def\ANY#1{\any{{\rm\lparen}#1{\rm\rparen}}}
+\def\SOME#1{\some{{\rm\lparen}#1{\rm\rparen}}}
+\def\OR{\gramor\ }
+
+\iflanguagestyle
+% Option notation : [ xxx ] versus (xxx)^?
+\def\opt#1{#1$^{\questionmark}$}
+\def\OPT#1{\opt{{\rm\lparen}#1{\rm\rparen}}}
+\else
+\def\opt#1{{\lbracket}#1{\rbracket}}
+\def\OPT#1{\opt{#1}}
+\fi
+
+\newenvironment{grammar}{\begin{center}\begin{tabular}{l@{}c@{}l}}{\end{tabular}\end{center}}
+\def\RULE#1\CASE#2{\NTS{#1} & \grameq & \KW{#2} \\}
+\def\CASE#1{& \gramor & \KW{#1} \\}
+
+\newcommand{\rt}[1]{\hypertarget{#1}{#1}}
+\newcommand{\bs}{\textbackslash}
+
+\def\lb{\char123}
+\def\rb{\char125}
+\def\lt{\tt\char60}
+\def\gt{\tt\char62}
+\def\caret{\tt\^{}}
diff --git a/docs/options.pdf b/docs/options.pdf
new file mode 100644 (file)
index 0000000..95eb81a
Binary files /dev/null and b/docs/options.pdf differ
diff --git a/docs/options.tex b/docs/options.tex
new file mode 100644 (file)
index 0000000..85e3fad
--- /dev/null
@@ -0,0 +1,471 @@
+\documentclass{article}
+\usepackage{fullpage}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{ifthen}
+\usepackage[geometry]{ifsym}
+\title{Coccinelle Usage (version 0.1.4)}
+\newcommand{\minimum}[2]{\paragraph*{\makebox[0in][r]{\FilledBigDiamondshape\,\,} {{#1}}} {#2}}
+\newcommand{\normal}[2]{\paragraph*{\makebox[0in][r]{\BigLowerDiamond\,\,} {{#1}}} {#2}}
+\newcommand{\rare}[2]{\paragraph*{\makebox[0in][r]{\BigDiamondshape\,\,} {{#1}}} {#2}}
+\newcommand{\developer}[2]{\paragraph*{{#1}} {#2}}
+
+% Very convenient to add comments on the paper. Just set the boolean
+% to false before sending the paper:
+\newboolean{showcomments}
+\setboolean{showcomments}{true}
+\ifthenelse{\boolean{showcomments}}
+{ \newcommand{\mynote}[2]{
+    \fbox{\bfseries\sffamily\scriptsize#1}
+    {\small$\blacktriangleright$\textsf{\emph{#2}}$\blacktriangleleft$}}}
+{ \newcommand{\mynote}[2]{}}
+
+\newcommand\jl[1]{\mynote{Julia}{#1}}
+
+\begin{document}
+\maketitle
+
+\section{Introduction}
+
+This document describes the options provided by Coccinelle.  The options
+have an impact on various phases of the semantic patch application
+process.  These are:
+
+\begin{enumerate}
+\item Selecting and parsing the semantic patch.
+\item Selecting and parsing the C code.
+\item Application of the semantic patch to the C code.
+\item Transformation.
+\item Generation of the result.
+\end{enumerate}
+
+\noindent
+One can either initiate the complete process from step 1, or
+to perform step 1 or step 2 individually.
+
+Coccinelle has quite a lot of options.  The most common usages are as
+follows, for a semantic match {\tt foo.cocci}, a C file {\tt foo.c}, and a
+directory {\tt foodir}:
+
+\begin{itemize}
+\item {\tt spatch -parse\_cocci foo.cocci}: Check that the semantic patch
+  is syntactically correct.
+\item {\tt spatch -parse\_c foo.c}: Check that the C file
+  is syntactically correct.  The Coccinelle C parser tries to recover
+  during the parsing process, so if one function does not parse, it will
+  start up again with the next one.  Thus, a parse error is often not a
+  cause for concern, unless it occurs in a function that is relevant to the
+  semantic patch.
+\item {\tt spatch -sp\_file foo.cocci foo.c}: Apply the semantic patch {\tt
+    foo.cocci} to the file {\tt foo.c} and print out any transformations as a
+  diff.
+\item {\tt spatch -sp\_file foo.cocci foo.c -debug}:  The same as the
+  previous case, but print out some information about the matching process.
+\item {\tt spatch -sp\_file foo.cocci -dir foodir}:  Apply the semantic
+  patch {\tt foo.cocci} to all of the C files in the directory {\tt foodir}.
+\item {\tt spatch -sp\_file foo.cocci -dir foodir -include\_headers}:  Apply
+  the semantic patch {\tt foo.cocci} to all of the C files and header files
+  in the directory {\tt foodir}. 
+\end{itemize}
+
+In the rest of this document, the options are annotated as follows:
+\begin{itemize}
+\item \FilledBigDiamondshape: a basic option, that is most likely of
+  interest to all users.
+\item \BigLowerDiamond: an option that is frequently used, often for better
+understanding the effect of a semantic patch.
+\item \BigDiamondshape: an option that is likely to be rarely used, but
+  whose effect is still comprehensible to a user.
+\item An option with no annotation is likely of interest only to
+  developers.
+\end{itemize}
+
+\section{Selecting and parsing the semantic patch}
+
+\subsection{Standalone options}
+
+\normal{-parse\_cocci $\langle$file$\rangle$}{ Parse a semantic
+patch file and print out some information about it.}
+
+\subsection{The semantic patch}
+
+\minimum{-sp\_file $\langle$file$\rangle$, -c $\langle$file$\rangle$, 
+-cocci\_file $\langle$file$\rangle$}{ Specify the name of the file
+  containing the semantic patch.  The file name should end in {\tt .cocci}.
+All three options do the same thing; the last two are deprecated.}
+
+\subsection{Isomorphisms}
+
+\rare{-iso, -iso\_file}{ Specify a file containing isomorphisms to be used in
+place of the standard one.  Normally one should use the {\tt using}
+construct within a semantic patch to specify isomorphisms to be used {\em
+  in addition to} the standard ones.}
+
+\developer{-track\_iso}{ Gather information about isomorphism usage.}
+
+\developer{-profile\_iso}{ Gather information about the time required for
+isomorphism expansion.}
+
+\subsection{Display options}
+
+\rare{-show\_cocci}{Show the semantic patch that is being processed before
+  expanding isomorphisms.}
+
+\rare{-show\_SP}{Show the semantic patch that is being processed after
+  expanding isomorphisms.}
+
+\rare{-show\_ctl\_text}{ Show the representation
+of the semantic patch in CTL.}
+
+\rare{-ctl\_inline\_let}{ Sometimes {\tt let} is used to name
+intermediate terms CTL representation.  This option causes the let-bound
+terms to be inlined at the point of their reference.
+This option implicitly sets {\bf -show\_ctl\_text}.}
+
+\rare{-ctl\_show\_mcodekind}{ Show
+transformation information within the CTL representation
+of the semantic patch. This option implicitly sets {\bf -show\_ctl\_text}.}
+
+\rare{-show\_ctl\_tex}{ Create a LaTeX files showing the representation
+of the semantic patch in CTL.}
+
+\section{Selecting and parsing the C files}
+
+\subsection{Standalone options}
+
+\normal{-parse\_c $\langle$file/dir$\rangle$}{ Parse a {\tt .c} file or all
+  of the {\tt .c} files in a directory.  This generates information about
+  any parse errors encountered.}
+
+\normal{-parse\_h $\langle$file/dir$\rangle$}{ Parse a {\tt .h} file or all
+  of the {\tt .h} files in a directory.  This generates information about
+  any parse errors encountered.}
+
+\normal{-parse\_ch $\langle$file/dir$\rangle$}{ Parse a {\tt .c} or {\tt
+    .h} file or all of the {\tt .c} or {\tt .h} files in a directory.  This
+  generates information about any parse errors encountered.}
+
+\normal{-control\_flow $\langle$file$\rangle$, -control\_flow
+$\langle$file$\rangle$:$\langle$function$\rangle$}{ Print a control-flow
+graph for all of the functions in a file or for a specific function in a
+file.  This requires {\tt dot} (http://www.graphviz.org/) and {\tt gv}.}
+
+\rare{-type\_c $\langle$file$\rangle$}{ Parse a C file and pretty-print a
+version including type information.}
+
+\developer{-tokens\_c $\langle$file$\rangle$}{Prints the tokens in a C
+  file.}
+
+\developer{-parse\_unparse $\langle$file$\rangle$}{Parse and then reconstruct
+  a C file.}
+
+\developer{-compare\_c $\langle$file$\rangle$ $\langle$file$\rangle$,
+  -compare\_c\_hardcoded}{Compares one C file to another, or compare the
+file tests/compare1.c to the file tests/compare2.c.}
+
+\developer{-test\_cfg\_ifdef $\langle$file$\rangle$}{Do some special
+processing of \#ifdef and display the resulting control-flow graph.  This
+requires {\tt dot} and {\tt gv}.}
+
+\developer{-test\_attributes $\langle$file$\rangle$,
+           -test\_cpp $\langle$file$\rangle$}{
+Test the parsing of cpp code and attributes, respectively.}
+
+\subsection{Selecting C files}
+
+An argument that ends in {\tt .c} is assumed to be a C file to process.  A
+directory can be specified with the option {\bf -dir}, described below.
+Normally, only one C file or one directory is specified.  If multiple files
+are specified, they are treated in parallel, {\em i.e.}, the first semantic
+patch rule is applied to all functions in all files, then the second
+semantic patch rule is applied to all functions in all files, etc.  If a
+directory is specified then no files may be specified and only the
+rightmost directory specified is used.
+
+\minimum{-dir}{ Specify a directory containing C files to process.}
+
+\normal{-include\_headers}{ This option causes header files to be processed
+independently.  This option only makes sense if a directory is specified
+using {\bf -dir}.}
+
+\normal{-use\_glimpse}{ Use a glimpse index to select the files to which
+a semantic patch may be relevant.  This option requires that a directory is
+specified.  The index may be created using the script {\tt
+  coccinelle/scripts/ glimpseindex\_cocci.sh}.  Glimpse is available at
+http://webglimpse.net/.  In conjunction with the option {\bf -patch\_cocci}
+this option prints the regular expression that will be passed to glimpse.}
+
+\developer{-kbuild\_info $\langle$file$\rangle$}{ The specified file
+  contains information about which sets of files should be considered in
+  parallel.}
+
+\developer{-disable\_worth\_trying\_opt}{Normally, a C file is only
+  processed if it contains some keywords that have been determined to be
+  essential for the semantic patch to match somewhere in the file.  This
+  option disables this optimization and tries the semantic patch on all files.}
+
+\developer{-test $\langle$file$\rangle$}{ A shortcut for running Coccinelle
+on the semantic patch ``file{\tt{.cocci}}'' and the C file ``file{\tt{.c}}''.}
+
+\developer{-testall}{A shortcut for running Coccinelle on all files in a
+  subdirectory {\tt tests} such that there are all of a {\tt .cocci} file, a {\tt
+    .c} file, and a {\tt .res} file, where the {\tt .res} contains the
+  expected result.}
+
+\developer{-test\_okfailed, -test\_regression\_okfailed} Other options for
+keeping track of tests that have succeeded and failed.
+
+\developer{-compare\_with\_expected}{Compare the result of applying
+  Coccinelle to file{\tt{.c}} to the file file{\tt{.res}} representing the
+  expected result.}
+
+\subsection{Parsing C files}
+
+\rare{-show\_c}{Show the C code that is being processed.}
+
+\rare{-parse\_error\_msg}{Show parsing errors in the C file.}
+
+\rare{-type\_error\_msg}{Show information about where the C type checker
+  was not able to determine the type of an expression.}
+
+\developer{-use\_cache} Use preparsed versions of the C files that are
+stored in a cache.
+
+\developer{-debug\_cpp, -debug\_lexer, -debug\_etdt,
+  -debug\_typedef}{Various options for debugging the C parser.}
+
+\developer{-filter\_msg, -filter\_define\_error,
+  -filter\_passed\_level}{Various options for debugging the C parser.}
+
+\developer{-only\_return\_is\_error\_exit}{In matching ``{\tt{\ldots}}'' in
+  a semantic patch or when forall is specified, a rule must match all
+  control-flow paths starting from a node matching the beginning of the
+  rule.  This is relaxed, however, for error handling code.  Normally, error
+  handling code is considered to be a conditional with only a then branch
+  that ends in goto, break, continue, or return.  If this option is set,
+  then only a then branch ending in a return is considered to be error
+  handling code.  Usually a better strategy is to use {\tt when strict} in
+  the semantic patch, and then match explicitly the case where there is a
+  conditional whose then branch ends in a return.}
+
+\subsubsection*{Macros and other preprocessor code}
+
+\normal{-D $\langle$file$\rangle$, -macro\_file $\langle$file$\rangle$}{
+  Extra macro definitions to be taken into account when parsing the C
+  files.}
+
+\rare{-ifdef\_to\_if}{ This option constructs represents an \#ifdef in
+the source code as a conditional in the control-flow graph.  This option is
+unsafe, as it makes the source code unparsable when \#ifdef is used in a
+way that does not directly convert to a conditional.  Nevertheless, it can
+be useful when \#ifdef is used in a well-structured way.}
+
+\rare{-use\_if0\_code}{ Normally code under \#if 0 is ignored.  If this
+option is set then the code is considered, just like the code under any
+other \#ifdef.}
+
+\developer{-noadd\_typedef\_root}{This seems to reduce the scope of a
+  typedef declaration found in the C code.}
+
+\subsubsection*{Include files}
+
+\normal{-all\_includes, -local\_includes, -no\_includes}{
+These options control which include files mentioned in a C file are taken into
+account.  {\bf -all\_includes} indicates that all included files will be
+processed.  {\bf -local\_includes} indicates that only included files in
+the current directory will be processed.  {\bf -no\_includes} indicates
+that no included files will be processed.  If the semantic patch contains
+type specifications on expression metavariables, then the default is {\bf
+-local\_includes}.  Otherwise the default is {\bf -no\_includes}.  At most
+one of these options can be specified.}
+
+\normal{-I $\langle$path$\rangle$}{ This option specifies the directory in
+  which to find non-local include files.  This option should be used only
+  once, as each use will overwrite the preceding one.}
+
+\rare{-relax\_include\_path}{This option causes the search for local
+  include files to consider the directory specified using {\bf -I} if the
+  included file is not found in the current directory.}
+
+\section{Application of the semantic patch to the C code}
+
+\subsection{Feedback at the rule level during the application of the
+  semantic patch}
+
+\normal{-show\_bindings}{
+Show the environments with respect to which each rule is applied and the
+bindings that result from each such application.}
+
+\normal{-show\_dependencies}{ Show the status (matched or unmatched) of the
+rules on which a given rule depends.  {\bf -show\_dependencies} implicitly
+sets {\bf -show\_bindings}, as the values of the dependencies are
+environment-specific.}
+
+\normal{-show\_trying}{
+Show the name of each program element to which each rule is applied.}
+
+\normal{-show\_transinfo}{
+Show information about each transformation that is performed.
+The node numbers that are referenced are the number of the nodes in the
+control-flow graph, which can be seen using the option {\bf -control\_flow}
+(the initial control-flow graph only) or the option {\bf -show\_flow} (the
+control-flow graph before and after each rule application).}
+
+\normal{-show\_misc}{Show some miscellaneous information.}
+
+\rare{-show\_flow $\langle$file$\rangle$, -show\_flow
+  $\langle$file$\rangle$:$\langle$function$\rangle$} Show the control-flow
+graph before and after the application of each rule.
+
+\developer{-show\_before\_fixed\_flow}{This is similar to {\bf
+    -show\_flow}, but shows a preliminary version of the control-flow graph.}
+
+\subsection{Feedback at the CTL level during the application of the
+  semantic patch}
+
+\normal{-verbose\_engine}{Show a trace of the matching of atomic terms to C
+  code.}
+
+\rare{-verbose\_ctl\_engine}{Show a trace of the CTL matching process.
+  This is unfortunately rather voluminous and not so helpful for someone
+  who is not familiar with CTL in general and the translation of SmPL into
+  CTL specifically.  This option implicitly sets the option {\bf
+    -show\_ctl\_text}.}
+
+\rare{-graphical\_trace}{Create a pdf file containing the control flow
+  graph annotated with the various nodes matched during the CTL matching
+  process.  Unfortunately, except for the most simple examples, the output
+  is voluminous, and so the option is not really practical for most
+  examples.  This requires {\tt dot} (http://www.graphviz.org/) and {\tt
+  pdftk}.}
+
+\rare{-gt\_without\_label}{The same as {\bf -graphical\_trace}, but the PDF
+  file does not contain the CTL code.}
+
+\rare{-partial\_match}{
+Report partial matches of the semantic patch on the C file.  This can
+  be substantially slower than normal matching.}
+
+\rare{-verbose\_match}{
+Report on when CTL matching is not applied to a function or other program
+unit because it does not contain some required atomic pattern.
+This can be viewed as a simpler, more efficient, but less informative
+version of {\bf -partial\_match}.}
+
+\subsection{Actions during the application of the semantic patch}
+
+\rare{-allow\_inconsistent\_paths}{Normally, a term that is transformed
+  should only be accessible from other terms that are matched by the
+  semantic patch.  This option removes this constraint.  Doing so, is
+  unsafe, however, because the properties that hold along the matched path
+  might not hold at all along the unmatched path.}
+
+\rare{-disallow\_nested\_exps}{In an expression that contains repeated
+  nested subterms, {\em e.g.} of the form {\tt f(f(x))}, a pattern can
+  match a single expression in multiple ways, some nested inside others.
+  This option causes the matching process to stop immediately at the
+  outermost match.  Thus, in the example {\tt f(f(x))}, the possibility
+  that the pattern {\tt f(E)}, with metavariable {\tt E}, matches with {\tt
+    E} as {\tt x} will not be considered.}
+
+\rare{-pyoutput coccilib.output.Gtk, -pyoutput coccilib.output.Console}{
+This controls whether Python output is sent to Gtk or to the console.  {\bf
+  -pyoutput coccilib.output.Console} is the default.  The Gtk option is
+currently not well supported.}
+
+\developer{-loop}{When there is ``{\tt{\ldots}}'' in the semantic patch,
+  the CTL operator {\sf AU} is used if the current function does not
+  contain a loop, and {\sf AW} may be used if it does.  This option causes
+  {\sf AW} always to be used.}
+
+\developer{-steps $\langle$int$\rangle$}{
+This limits the number of steps performed by the CTL engine to the
+specified number.  This option is unsafe as it might cause a rule to fail
+due to running out of steps rather than due to not matching.}
+
+\developer{-bench $\langle$int$\rangle$}{This collects various information
+  about the operations performed during the CTL matching process.}
+
+\developer{-popl, -popl\_mark\_all, -popl\_keep\_all\_wits}{
+These options use a simplified version of the SmPL language.  {\bf
+  -popl\_mark\_all} and {\bf -popl\_keep\_all\_wits} implicitly set {\bf
+  -popl}.}
+
+\section{Generation of the result}
+
+Normally, the only output is a diff printed to standard output.
+
+\rare{-o $\langle$file$\rangle$}{ The output file.}
+
+\rare{-inplace}{ Modify the input file.}
+
+\rare{-outplace}{ Store modifications in a .cocci\_res file.}
+
+\rare{-no\_show\_diff}{ Normally, a diff between the original and transformed
+code is printed on the standard output.  This option causes this not to be
+done.}
+
+\rare{-U}{ Set number of diff context lines.}
+
+\rare{-save\_tmp\_files}{Coccinelle creates some temporary
+  files in {\tt /tmp} that it deletes after use.  This option causes these
+  files to be saved.}
+
+\developer{-debug\_unparsing}{Show some debugging information about the
+  generation of the transformed code.  This has the side-effect of
+  deleting the transformed code.}
+
+\developer{-patch}{ Deprecated option.}
+
+
+\section{Other options}
+
+\subsection{Version information}
+
+\normal{-version}{ The version of Coccinelle.  No other options are
+allowed.}
+
+\normal{-date}{ The date of the current version of Coccinelle. No other
+options are allowed.}
+
+\subsection{Help}
+
+\minimum{-h, -shorthelp}{ The most useful commands.}
+
+\minimum{-help, --help, -longhelp}{ A complete listing of the available
+commands.}
+
+\subsection{Controlling the execution of Coccinelle}
+
+\normal{-timeout $\langle$int$\rangle$}{ The maximum time in seconds for
+  processing a single file.}
+
+\rare{-max $\langle$int$\rangle$}{This option informs Coccinelle of the
+  number of instances of Coccinelle that will be run concurrently.  This
+  option requires {\bf -index}.  It is usually used with {\bf -dir}.}
+
+\rare{-index $\langle$int$\rangle$}{This option informs Coccinelle of
+  which of the concurrent instances is the current one.  This option
+  requires {\bf -max}.}
+
+\rare{-mod\_distrib}{When multiple instances of Coccinelle are run in
+  parallel, normally the first instance processes the first $n$ files, the
+  second instance the second $n$ files, etc.  With this option, the files
+  are distributed among the instances in a round-robin fashion.}
+
+\developer{-debugger}{Option for running Coccinelle from within the OCaml
+  debugger.}
+
+\developer{-profile}{ Gather timing information about the main Coccinelle
+functions.}
+
+\developer{-disable\_once}{Print various warning messages every time some
+condition occurs, rather than only once.}
+
+\subsection{Miscellaneous}
+
+\rare{-quiet}{Suppress most output.  This is the default.}
+
+\developer{-pad, -hrule $\langle$dir$\rangle$, -xxx, -l1}{}
+
+\end{document}
diff --git a/docs/spatch.1 b/docs/spatch.1
new file mode 100644 (file)
index 0000000..fdd9db0
--- /dev/null
@@ -0,0 +1,176 @@
+.\"  -*- nroff -*-
+.\" Please adjust this date whenever revising the manpage.
+.TH SPATCH 1 "December 30, 2008"
+
+.\" see http://www.fnal.gov/docs/products/ups/ReferenceManual/html/manpages.html
+.\" see http://www.linuxjournal.com/article/1158
+.\" see http://www.schweikhardt.net/man_page_howto.html
+.\" groff -Tascii -man ./spatch.1 | more
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.\"
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively. Also \fR for roman.
+.SH NAME
+spatch \- apply a semantic patch file to a set of C files
+
+.SH SYNOPSIS
+.B spatch
+.B -sp_file
+.I <SP>
+.I <files>
+.B [-o 
+.I <outfile>
+.B ] 
+.B [-iso_file 
+.I <iso>
+.B ] 
+.B [
+.I options
+.B ]
+.\"
+.SH DESCRIPTION
+\fBspatch\fP is a program matching and transformation tool for C.
+The programmer describes the code to match and the transformation to
+perform as a semantic patch, which looks like a standard patch, but can
+transform multiple files at any number of code sites.
+
+.PP
+Further information about spatch is available at
+\fBhttp://www.emn.fr/x-info/coccinelle\fP.
+
+.SH OPTIONS
+Here is a summary of the most commonly used options:
+
+.TP
+.B -sp_file \fI<file>\fP
+the semantic patch file
+.TP
+.B -dir                 \fI<dir>\fP
+process all files in directory recursively
+.TP
+.B -iso_file            \fI<file>\fP
+(default=/usr/local/share/coccinelle/standard.iso)
+.TP
+.B -macro_file          \fI<file>\fP
+(default=/usr/local/share/coccinelle/standard.h)
+.TP
+.B -debug        
+print some information to help debug the matching process
+.TP
+.B -all_includes        
+causes all available include files to be used
+.TP
+.B -no_includes         
+causes not even local include files to be used
+.TP
+.B -I                   \fI<dir>\fP
+the directory containing the include files
+.TP 
+.B -include_headers     
+process header files independently
+.TP
+.B -use_glimpse         
+works with -dir, use information generated by glimpseindex
+.TP
+.B -o                   \fI<file>\fP
+the output file. If none is specified, a patch is generated on the standard
+output
+.TP
+.B -inplace             
+do the modification on the file directly
+.TP
+.B -outplace            
+store modifications in a .cocci_res file
+.TP
+.B -version             
+show the version of spatch
+.TP
+.B -date                
+show the date on which spatch was compiled
+.TP
+.B -shorthelp           
+see short list of options
+.TP
+.B -longhelp            
+see all the available options in different categories
+.TP 
+.B \-help, \-\-help             
+show summary of options.
+
+
+
+.SH EXAMPLES
+
+  ./spatch -sp_file foo.cocci foo.c
+
+Apply the semantic patch foo.cocci to the C file foo.c.  The semantic patch
+is applied modulo a set of isomorphisms contained in standard.iso
+(standard.iso is by default located in
+/usr/local/share/coccinelle/standard.iso).  A patch showing the effect of
+the application, if any, will be generated on the standard output.
+
+  ./spatch -sp_file foo.cocci foo.c -o /tmp/newfoo.c
+
+The same as the above, except that a modified version of foo.c is stored in
+/tmp/newfoo.c.
+
+It is also possible to apply spatch to all of the C files in
+a directory: 
+
+  ./spatch -cocci_file foo.cocci -dir foodir . 
+
+If the semantic patch is not working as expected, the option -debug
+shows selection of information about the application of
+a semantic patch to a file or directory.
+
+.SH FILES
+.I /usr/local/share/coccinelle/standard.iso
+.RS
+This file contains the default set of isomorphisms.
+.RE
+.I /usr/local/share/coccinelle/standard.h
+.RS
+This file contains the default set of macro hints.
+
+.SH ENVIRONMENT
+.IP COCCINELLE_HOME
+The path to coccinelle share directory. Defaut is 
+.I /usr/local/share/coccinelle
+
+.SH REFERENCES
+Y. Padioleau, J.L. Lawall, R.R Hansen, G. Muller
+"Documenting and Automating Collateral Evolutions in Linux Device Driver"
+.I EuroSys 2008, 
+Glasgow, Scotland (April 2008) pp. 247-260.
+
+.SH AUTHOR
+\fBspatch\fP was written by Julia Lawall <julia@diku.dk>, Yoann Padioleau
+<yoann.padioleau@gmail.com>, Rene Rydhof Hansen <rrhansen@diku.dk> and
+Henrik Stuart <henrik@hstuart.dk>.
+.PP
+This manual page was written by Yoann Padioleau <yoann.padioleau@gmail.com>
+and Julia Lawall <julia@diku.dk>.
+
+.SH REPORTING BUGS
+Send a mail to <julia@diku.dk> or <yoann.padioleau@gmail.com>
+
+.SH COPYRIGHT
+Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen.
+spatch is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, according to version 2 of the License.
+
+.SH SEE ALSO
+.BR patch (1).
+
diff --git a/engine/.#Makefile.1.49 b/engine/.#Makefile.1.49
deleted file mode 100644 (file)
index 4103bca..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-# Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-# This file is part of Coccinelle.
-# 
-# Coccinelle is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, according to version 2 of the License.
-# 
-# Coccinelle is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-# 
-# The authors reserve the right to distribute this or future versions of
-# Coccinelle under other licenses.
-
-
-##############################################################################
-# Variables
-##############################################################################
-#TARGET=matcher
-TARGET=cocciengine
-CTLTARGET=engine
-
-SRC= flag_matcher.ml lib_engine.ml pretty_print_engine.ml \
-      check_exhaustive_pattern.ml \
-      check_reachability.ml \
-      c_vs_c.ml isomorphisms_c_c.ml \
-      cocci_vs_c.ml pattern_c.ml sgrep.ml transformation_c.ml  \
-      asttomember.ml asttoctl2.ml ctltotex.ml \
-      postprocess_transinfo.ml ctlcocci_integration.ml
-
-#c_vs_c.ml
-#SRC= flag_matcher.ml \
-#  c_vs_c.ml cocci_vs_c.ml \
-#  lib_engine.ml \
-#  pattern_c.ml transformation_c.ml 
-
-#LIBS=../commons/commons.cma ../parsing_c/parsing_c.cma
-#INCLUDES= -I ../commons -I ../parsing_c
-INCLUDES = -I ../commons -I ../commons/ocamlextra -I ../globals \
-              -I ../ctl -I ../parsing_cocci -I ../parsing_c 
-LIBS=../commons/commons.cma ../globals/globals.cma \
-     ../ctl/ctl.cma ../parsing_c/c_parser.cma ../parsing_cocci/cocci_parser.cma
-
-SYSLIBS= str.cma unix.cma 
-
-
-# just to test asttoctl
-# CTLSOURCES = lib_engine.ml pretty_print_engine.ml asttoctl.ml ctltotex.ml \
-#      main.ml
-
-##############################################################################
-# Generic variables
-##############################################################################
-
-#for warning:  -w A 
-#for profiling:  -p -inline 0   with OCAMLOPT
-OCAMLCFLAGS ?= -g -dtypes
-
-OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
-OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
-OCAMLLEX=ocamllex$(OPTBIN) #-ml
-OCAMLYACC=ocamlyacc -v
-OCAMLDEP=ocamldep$(OPTBIN) $(INCLUDES)
-OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
-
-
-OBJS = $(SRC:.ml=.cmo)
-OPTOBJS = $(SRC:.ml=.cmx)
-
-
-##############################################################################
-# Top rules
-##############################################################################
-all: $(TARGET).cma
-all.opt: $(TARGET).cmxa
-
-$(TARGET).cma: $(OBJS)
-       $(OCAMLC) -a -o $(TARGET).cma $(OBJS)
-
-$(TARGET).cmxa: $(OPTOBJS) $(LIBS:.cma=.cmxa)
-       $(OCAMLOPT) -a -o $(TARGET).cmxa $(OPTOBJS)
-
-$(TARGET).top: $(OBJS) $(LIBS)
-       $(OCAMLMKTOP) -o $(TARGET).top $(SYSLIBS) $(LIBS) $(OBJS)
-
-clean::
-       rm -f $(TARGET).top
-
-
-
-##############################################################################
-# Pad's rules
-##############################################################################
-
-##############################################################################
-# Generic rules
-##############################################################################
-
-.SUFFIXES: .ml .mli .cmo .cmi .cmx
-
-.ml.cmo:
-       $(OCAMLC) -c $<
-.mli.cmi:
-       $(OCAMLC) -c $<
-.ml.cmx:
-       $(OCAMLOPT) -c $<
-
-.ml.mldepend: 
-       $(OCAMLC) -i $<
-
-clean::
-       rm -f *.cm[ioxa] *.o *.a *.cmxa *.annot
-clean::
-       rm -f *~ .*~ gmon.out #*#
-
-beforedepend::
-
-depend:: beforedepend
-       $(OCAMLDEP) *.mli *.ml    > .depend
-
--include .depend
diff --git a/engine/.#Makefile.1.50 b/engine/.#Makefile.1.50
deleted file mode 100644 (file)
index 105528d..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-# Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-# This file is part of Coccinelle.
-# 
-# Coccinelle is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, according to version 2 of the License.
-# 
-# Coccinelle is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-# 
-# The authors reserve the right to distribute this or future versions of
-# Coccinelle under other licenses.
-
-
-##############################################################################
-# Variables
-##############################################################################
-#TARGET=matcher
-TARGET=cocciengine
-CTLTARGET=engine
-
-SRC= flag_matcher.ml lib_engine.ml pretty_print_engine.ml \
-      check_exhaustive_pattern.ml \
-      check_reachability.ml \
-      c_vs_c.ml isomorphisms_c_c.ml \
-      cocci_vs_c.ml pattern_c.ml sgrep.ml transformation_c.ml  \
-      asttomember.ml asttoctl2.ml ctltotex.ml \
-      postprocess_transinfo.ml ctlcocci_integration.ml
-
-#c_vs_c.ml
-#SRC= flag_matcher.ml \
-#  c_vs_c.ml cocci_vs_c.ml \
-#  lib_engine.ml \
-#  pattern_c.ml transformation_c.ml 
-
-#LIBS=../commons/commons.cma ../parsing_c/parsing_c.cma
-#INCLUDES= -I ../commons -I ../parsing_c
-INCLUDES = -I ../commons -I ../commons/ocamlextra -I ../globals \
-              -I ../ctl -I ../parsing_cocci -I ../parsing_c 
-LIBS=../commons/commons.cma ../globals/globals.cma \
-     ../ctl/ctl.cma ../parsing_c/parsing_c.cma ../parsing_cocci/cocci_parser.cma
-
-SYSLIBS= str.cma unix.cma 
-
-
-# just to test asttoctl
-# CTLSOURCES = lib_engine.ml pretty_print_engine.ml asttoctl.ml ctltotex.ml \
-#      main.ml
-
-##############################################################################
-# Generic variables
-##############################################################################
-
-#for warning:  -w A 
-#for profiling:  -p -inline 0   with OCAMLOPT
-OCAMLCFLAGS ?= -g -dtypes
-
-OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
-OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
-OCAMLLEX=ocamllex$(OPTBIN) #-ml
-OCAMLYACC=ocamlyacc -v
-OCAMLDEP=ocamldep$(OPTBIN) $(INCLUDES)
-OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
-
-
-OBJS = $(SRC:.ml=.cmo)
-OPTOBJS = $(SRC:.ml=.cmx)
-
-
-##############################################################################
-# Top rules
-##############################################################################
-all: $(TARGET).cma
-all.opt: $(TARGET).cmxa
-
-$(TARGET).cma: $(OBJS)
-       $(OCAMLC) -a -o $(TARGET).cma $(OBJS)
-
-$(TARGET).cmxa: $(OPTOBJS) $(LIBS:.cma=.cmxa)
-       $(OCAMLOPT) -a -o $(TARGET).cmxa $(OPTOBJS)
-
-$(TARGET).top: $(OBJS) $(LIBS)
-       $(OCAMLMKTOP) -o $(TARGET).top $(SYSLIBS) $(LIBS) $(OBJS)
-
-clean::
-       rm -f $(TARGET).top
-
-
-
-##############################################################################
-# Pad's rules
-##############################################################################
-
-##############################################################################
-# Generic rules
-##############################################################################
-
-.SUFFIXES: .ml .mli .cmo .cmi .cmx
-
-.ml.cmo:
-       $(OCAMLC) -c $<
-.mli.cmi:
-       $(OCAMLC) -c $<
-.ml.cmx:
-       $(OCAMLOPT) -c $<
-
-.ml.mldepend: 
-       $(OCAMLC) -i $<
-
-clean::
-       rm -f *.cm[ioxa] *.o *.a *.cmxa *.annot
-clean::
-       rm -f *~ .*~ gmon.out #*#
-
-beforedepend::
-
-depend:: beforedepend
-       $(OCAMLDEP) *.mli *.ml    > .depend
-
--include .depend
diff --git a/engine/.#asttoctl2.ml.1.144 b/engine/.#asttoctl2.ml.1.144
deleted file mode 100644 (file)
index 0691c57..0000000
+++ /dev/null
@@ -1,2305 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* for MINUS and CONTEXT, pos is always None in this file *)
-(*search for require*)
-(* true = don't see all matched nodes, only modified ones *)
-let onlyModif = ref true(*false*)
-
-type ex = Exists | Forall | ReverseForall
-let exists = ref Forall
-
-module Ast = Ast_cocci
-module V = Visitor_ast
-module CTL = Ast_ctl
-
-let warning s = Printf.fprintf stderr "warning: %s\n" s
-
-type cocci_predicate = Lib_engine.predicate * Ast.meta_name Ast_ctl.modif
-type formula =
-    (cocci_predicate,Ast.meta_name, Wrapper_ctl.info) Ast_ctl.generic_ctl
-
-let union = Common.union_set
-let intersect l1 l2 = List.filter (function x -> List.mem x l2) l1
-let subset l1 l2 = List.for_all (function x -> List.mem x l2) l1
-
-let foldl1 f xs = List.fold_left f (List.hd xs) (List.tl xs)
-let foldr1 f xs =
-  let xs = List.rev xs in List.fold_left f (List.hd xs) (List.tl xs)
-
-let used_after = ref ([] : Ast.meta_name list)
-let guard_to_strict guard = if guard then CTL.NONSTRICT else CTL.STRICT
-
-let saved = ref ([] : Ast.meta_name list)
-
-let string2var x = ("",x)
-
-(* --------------------------------------------------------------------- *)
-(* predicates matching various nodes in the graph *)
-
-let ctl_and s x y    =
-  match (x,y) with
-    (CTL.False,_) | (_,CTL.False) -> CTL.False
-  | (CTL.True,a) | (a,CTL.True) -> a
-  | _ -> CTL.And(s,x,y)
-
-let ctl_or x y     =
-  match (x,y) with
-    (CTL.True,_) | (_,CTL.True) -> CTL.True
-  | (CTL.False,a) | (a,CTL.False) -> a
-  | _ -> CTL.Or(x,y)
-
-let ctl_or_fl x y     =
-  match (x,y) with
-    (CTL.True,_) | (_,CTL.True) -> CTL.True
-  | (CTL.False,a) | (a,CTL.False) -> a
-  | _ -> CTL.Or(y,x)
-
-let ctl_seqor x y     =
-  match (x,y) with
-    (CTL.True,_) | (_,CTL.True) -> CTL.True
-  | (CTL.False,a) | (a,CTL.False) -> a
-  | _ -> CTL.SeqOr(x,y)
-
-let ctl_not = function
-    CTL.True -> CTL.False
-  | CTL.False -> CTL.True
-  | x -> CTL.Not(x)
-
-let ctl_ax s = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x ->
-      match !exists with
-       Exists -> CTL.EX(CTL.FORWARD,x)
-      |        Forall -> CTL.AX(CTL.FORWARD,s,x)
-      |        ReverseForall -> failwith "not supported"
-
-let ctl_ax_absolute s = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.AX(CTL.FORWARD,s,x)
-
-let ctl_ex = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.EX(CTL.FORWARD,x)
-
-(* This stays being AX even for sgrep_mode, because it is used to identify
-the structure of the term, not matching the pattern. *)
-let ctl_back_ax = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.AX(CTL.BACKWARD,CTL.NONSTRICT,x)
-
-let ctl_back_ex = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.EX(CTL.BACKWARD,x)
-
-let ctl_ef = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.EF(CTL.FORWARD,x)
-
-let ctl_ag s = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.AG(CTL.FORWARD,s,x)
-
-let ctl_au s x y =
-  match (x,!exists) with
-    (CTL.True,Exists) -> CTL.EF(CTL.FORWARD,y)
-  | (CTL.True,Forall) -> CTL.AF(CTL.FORWARD,s,y)
-  | (CTL.True,ReverseForall) -> failwith "not supported"
-  | (_,Exists) -> CTL.EU(CTL.FORWARD,x,y)
-  | (_,Forall) -> CTL.AU(CTL.FORWARD,s,x,y)
-  | (_,ReverseForall) -> failwith "not supported"
-
-let ctl_anti_au s x y = (* only for ..., where the quantifier is changed *)
-  CTL.XX
-    (match (x,!exists) with
-      (CTL.True,Exists) -> CTL.AF(CTL.FORWARD,s,y)
-    | (CTL.True,Forall) -> CTL.EF(CTL.FORWARD,y)
-    | (CTL.True,ReverseForall) -> failwith "not supported"
-    | (_,Exists) -> CTL.AU(CTL.FORWARD,s,x,y)
-    | (_,Forall) -> CTL.EU(CTL.FORWARD,x,y)
-    | (_,ReverseForall) -> failwith "not supported")
-
-let ctl_uncheck = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.Uncheck x
-
-let label_pred_maker = function
-    None -> CTL.True
-  | Some (label_var,used) ->
-      used := true;
-      CTL.Pred(Lib_engine.PrefixLabel(label_var),CTL.Control)
-
-let bclabel_pred_maker = function
-    None -> CTL.True
-  | Some (label_var,used) ->
-      used := true;
-      CTL.Pred(Lib_engine.BCLabel(label_var),CTL.Control)
-
-let predmaker guard pred label =
-  ctl_and (guard_to_strict guard) (CTL.Pred pred) (label_pred_maker label)
-
-let aftpred     = predmaker false (Lib_engine.After,       CTL.Control)
-let retpred     = predmaker false (Lib_engine.Return,      CTL.Control)
-let funpred     = predmaker false (Lib_engine.FunHeader,   CTL.Control)
-let toppred     = predmaker false (Lib_engine.Top,         CTL.Control)
-let exitpred    = predmaker false (Lib_engine.ErrorExit,   CTL.Control)
-let endpred     = predmaker false (Lib_engine.Exit,        CTL.Control)
-let gotopred    = predmaker false (Lib_engine.Goto,        CTL.Control)
-let inlooppred  = predmaker false (Lib_engine.InLoop,      CTL.Control)
-let truepred    = predmaker false (Lib_engine.TrueBranch,  CTL.Control)
-let falsepred   = predmaker false (Lib_engine.FalseBranch, CTL.Control)
-let fallpred    = predmaker false (Lib_engine.FallThrough, CTL.Control)
-
-let aftret label_var f = ctl_or (aftpred label_var) (exitpred label_var)
-
-let letctr = ref 0
-let get_let_ctr _ =
-  let cur = !letctr in
-  letctr := cur + 1;
-  Printf.sprintf "r%d" cur
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Eliminate OptStm *)
-
-(* for optional thing with nothing after, should check that the optional thing
-never occurs.  otherwise the matching stops before it occurs *)
-let elim_opt =
-  let mcode x = x in
-  let donothing r k e = k e in
-
-  let fvlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_fvs l) in
-
-  let mfvlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_mfvs l) in
-
-  let freshlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_fresh l) in
-
-  let inheritedlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_inherited l) in
-
-  let savedlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_saved l) in
-
-  let varlists l =
-    (fvlist l, mfvlist l, freshlist l, inheritedlist l, savedlist l) in
-
-  let rec dots_list unwrapped wrapped =
-    match (unwrapped,wrapped) with
-      ([],_) -> []
-
-    | (Ast.Dots(_,_,_,_)::Ast.OptStm(stm)::(Ast.Dots(_,_,_,_) as u)::urest,
-       d0::s::d1::rest)
-    | (Ast.Nest(_,_,_,_,_)::Ast.OptStm(stm)::(Ast.Dots(_,_,_,_) as u)::urest,
-       d0::s::d1::rest) ->
-        let l = Ast.get_line stm in
-        let new_rest1 = stm :: (dots_list (u::urest) (d1::rest)) in
-        let new_rest2 = dots_list urest rest in
-        let (fv_rest1,mfv_rest1,fresh_rest1,inherited_rest1,s1) =
-          varlists new_rest1 in
-        let (fv_rest2,mfv_rest2,fresh_rest2,inherited_rest2,s2) =
-          varlists new_rest2 in
-        [d0;
-          {(Ast.make_term
-              (Ast.Disj
-                 [{(Ast.make_term(Ast.DOTS(new_rest1))) with
-                    Ast.node_line = l;
-                    Ast.free_vars = fv_rest1;
-                    Ast.minus_free_vars = mfv_rest1;
-                    Ast.fresh_vars = fresh_rest1;
-                    Ast.inherited = inherited_rest1;
-                    Ast.saved_witness = s1};
-                   {(Ast.make_term(Ast.DOTS(new_rest2))) with
-                     Ast.node_line = l;
-                     Ast.free_vars = fv_rest2;
-                     Ast.minus_free_vars = mfv_rest2;
-                     Ast.fresh_vars = fresh_rest2;
-                     Ast.inherited = inherited_rest2;
-                     Ast.saved_witness = s2}])) with
-            Ast.node_line = l;
-            Ast.free_vars = fv_rest1;
-            Ast.minus_free_vars = mfv_rest1;
-            Ast.fresh_vars = fresh_rest1;
-            Ast.inherited = inherited_rest1;
-            Ast.saved_witness = s1}]
-
-    | (Ast.OptStm(stm)::urest,_::rest) ->
-        let l = Ast.get_line stm in
-        let new_rest1 = dots_list urest rest in
-        let new_rest2 = stm::new_rest1 in
-        let (fv_rest1,mfv_rest1,fresh_rest1,inherited_rest1,s1) =
-          varlists new_rest1 in
-        let (fv_rest2,mfv_rest2,fresh_rest2,inherited_rest2,s2) =
-          varlists new_rest2 in
-        [{(Ast.make_term
-              (Ast.Disj
-                 [{(Ast.make_term(Ast.DOTS(new_rest2))) with
-                     Ast.node_line = l;
-                     Ast.free_vars = fv_rest2;
-                     Ast.minus_free_vars = mfv_rest2;
-                     Ast.fresh_vars = fresh_rest2;
-                     Ast.inherited = inherited_rest2;
-                     Ast.saved_witness = s2};
-                   {(Ast.make_term(Ast.DOTS(new_rest1))) with
-                    Ast.node_line = l;
-                    Ast.free_vars = fv_rest1;
-                    Ast.minus_free_vars = mfv_rest1;
-                    Ast.fresh_vars = fresh_rest1;
-                    Ast.inherited = inherited_rest1;
-                    Ast.saved_witness = s1}])) with
-            Ast.node_line = l;
-            Ast.free_vars = fv_rest2;
-            Ast.minus_free_vars = mfv_rest2;
-            Ast.fresh_vars = fresh_rest2;
-            Ast.inherited = inherited_rest2;
-            Ast.saved_witness = s2}]
-
-    | ([Ast.Dots(_,_,_,_);Ast.OptStm(stm)],[d1;_]) ->
-       let l = Ast.get_line stm in
-       let fv_stm = Ast.get_fvs stm in
-       let mfv_stm = Ast.get_mfvs stm in
-       let fresh_stm = Ast.get_fresh stm in
-       let inh_stm = Ast.get_inherited stm in
-       let saved_stm = Ast.get_saved stm in
-       let fv_d1 = Ast.get_fvs d1 in
-       let mfv_d1 = Ast.get_mfvs d1 in
-       let fresh_d1 = Ast.get_fresh d1 in
-       let inh_d1 = Ast.get_inherited d1 in
-       let saved_d1 = Ast.get_saved d1 in
-       let fv_both = Common.union_set fv_stm fv_d1 in
-       let mfv_both = Common.union_set mfv_stm mfv_d1 in
-       let fresh_both = Common.union_set fresh_stm fresh_d1 in
-       let inh_both = Common.union_set inh_stm inh_d1 in
-       let saved_both = Common.union_set saved_stm saved_d1 in
-       [d1;
-         {(Ast.make_term
-             (Ast.Disj
-                [{(Ast.make_term(Ast.DOTS([stm]))) with
-                   Ast.node_line = l;
-                   Ast.free_vars = fv_stm;
-                   Ast.minus_free_vars = mfv_stm;
-                   Ast.fresh_vars = fresh_stm;
-                   Ast.inherited = inh_stm;
-                   Ast.saved_witness = saved_stm};
-                  {(Ast.make_term(Ast.DOTS([d1]))) with
-                    Ast.node_line = l;
-                    Ast.free_vars = fv_d1;
-                    Ast.minus_free_vars = mfv_d1;
-                    Ast.fresh_vars = fresh_d1;
-                    Ast.inherited = inh_d1;
-                    Ast.saved_witness = saved_d1}])) with
-            Ast.node_line = l;
-            Ast.free_vars = fv_both;
-            Ast.minus_free_vars = mfv_both;
-            Ast.fresh_vars = fresh_both;
-            Ast.inherited = inh_both;
-            Ast.saved_witness = saved_both}]
-
-    | ([Ast.Nest(_,_,_,_,_);Ast.OptStm(stm)],[d1;_]) ->
-       let l = Ast.get_line stm in
-       let rw = Ast.rewrap stm in
-       let rwd = Ast.rewrap stm in
-       let dots = Ast.Dots(Ast.make_mcode "...",[],[],[]) in
-       [d1;rw(Ast.Disj
-                [rwd(Ast.DOTS([stm]));
-                  {(Ast.make_term(Ast.DOTS([rw dots])))
-                  with Ast.node_line = l}])]
-
-    | (_::urest,stm::rest) -> stm :: (dots_list urest rest)
-    | _ -> failwith "not possible" in
-
-  let stmtdotsfn r k d =
-    let d = k d in
-    Ast.rewrap d
-      (match Ast.unwrap d with
-       Ast.DOTS(l) -> Ast.DOTS(dots_list (List.map Ast.unwrap l) l)
-      | Ast.CIRCLES(l) -> failwith "elimopt: not supported"
-      | Ast.STARS(l) -> failwith "elimopt: not supported") in
-  
-  V.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing stmtdotsfn donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing
-
-(* --------------------------------------------------------------------- *)
-(* after management *)
-(* We need Guard for the following case:
-<...
- a
- <...
-  b
- ...>
-...>
-foo();
-
-Here the inner <... b ...> should not go past foo.  But foo is not the
-"after" of the body of the outer nest, because we don't want to search for
-it in the case where the body of the outer nest ends in something other
-than dots or a nest. *)
-
-(* what is the difference between tail and end??? *)
-
-type after = After of formula | Guard of formula | Tail | End | VeryEnd
-
-let a2n = function After x -> Guard x | a -> a
-
-let print_ctl x =
-  let pp_pred (x,_) = Pretty_print_engine.pp_predicate x in
-  let pp_meta (_,x) = Common.pp x in
-  Pretty_print_ctl.pp_ctl (pp_pred,pp_meta) false x;
-  Format.print_newline()
-
-let print_after = function
-    After ctl -> Printf.printf "After:\n"; print_ctl ctl
-  | Guard ctl -> Printf.printf "Guard:\n"; print_ctl ctl
-  | Tail -> Printf.printf "Tail\n"
-  | VeryEnd -> Printf.printf "Very End\n"
-  | End -> Printf.printf "End\n"
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-let fresh_var _ = string2var "_v"
-let fresh_pos _ = string2var "_pos" (* must be a constant *)
-
-let fresh_metavar _ = "_S"
-
-(* fvinfo is going to end up being from the whole associated statement.
-   it would be better if it were just the free variables in d, but free_vars.ml
-   doesn't keep track of free variables on + code *)
-let make_meta_rule_elem d fvinfo =
-  let nm = fresh_metavar() in
-  Ast.make_meta_rule_elem nm d fvinfo
-
-let get_unquantified quantified vars =
-  List.filter (function x -> not (List.mem x quantified)) vars
-
-let make_seq guard l =
-  let s = guard_to_strict guard in
-  foldr1 (function rest -> function cur -> ctl_and s cur (ctl_ax s rest)) l
-
-let make_seq_after2 guard first rest =
-  let s = guard_to_strict guard in
-  match rest with
-    After rest -> ctl_and s first (ctl_ax s (ctl_ax s rest))
-  | _ -> first
-
-let make_seq_after guard first rest =
-  match rest with
-    After rest -> make_seq guard [first;rest]
-  | _ -> first
-
-let opt_and guard first rest =
-  let s = guard_to_strict guard in
-  match first with
-    None -> rest
-  | Some first -> ctl_and s first rest
-
-let and_after guard first rest =
-  let s = guard_to_strict guard in
-  match rest with After rest -> ctl_and s first rest | _ -> first
-
-let contains_modif =
-  let bind x y = x or y in
-  let option_default = false in
-  let mcode r (_,_,kind,_) =
-    match kind with
-      Ast.MINUS(_,_) -> true
-    | Ast.PLUS -> failwith "not possible"
-    | Ast.CONTEXT(_,info) -> not (info = Ast.NOTHING) in
-  let do_nothing r k e = k e in
-  let rule_elem r k re =
-    let res = k re in
-    match Ast.unwrap re with
-      Ast.FunHeader(bef,_,fninfo,name,lp,params,rp) ->
-       bind (mcode r ((),(),bef,Ast.NoMetaPos)) res
-    | Ast.Decl(bef,_,decl) -> bind (mcode r ((),(),bef,Ast.NoMetaPos)) res
-    | _ -> res in
-  let recursor =
-    V.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      do_nothing do_nothing do_nothing do_nothing
-      do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-      do_nothing rule_elem do_nothing do_nothing do_nothing do_nothing in
-  recursor.V.combiner_rule_elem
-
-(* code is not a DisjRuleElem *)
-let make_match label guard code =
-  let v = fresh_var() in
-  let matcher = Lib_engine.Match(code) in
-  if contains_modif code && not guard
-  then CTL.Exists(true,v,predmaker guard (matcher,CTL.Modif v) label)
-  else
-    let iso_info = !Flag.track_iso_usage && not (Ast.get_isos code = []) in
-    (match (iso_info,!onlyModif,guard,
-           intersect !used_after (Ast.get_fvs code)) with
-      (false,true,_,[]) | (_,_,true,_) ->
-       predmaker guard (matcher,CTL.Control) label
-    | _ -> CTL.Exists(true,v,predmaker guard (matcher,CTL.UnModif v) label))
-
-let make_raw_match label guard code =
-  predmaker guard (Lib_engine.Match(code),CTL.Control) label
-    
-let rec seq_fvs quantified = function
-    [] -> []
-  | fv1::fvs ->
-      let t1fvs = get_unquantified quantified fv1 in
-      let termfvs =
-       List.fold_left Common.union_set []
-         (List.map (get_unquantified quantified) fvs) in
-      let bothfvs = Common.inter_set t1fvs termfvs in
-      let t1onlyfvs = Common.minus_set t1fvs bothfvs in
-      let new_quantified = Common.union_set bothfvs quantified in
-      (t1onlyfvs,bothfvs)::(seq_fvs new_quantified fvs)
-
-let quantify guard =
-  List.fold_right
-    (function cur ->
-      function code -> CTL.Exists (not guard && List.mem cur !saved,cur,code))
-
-let non_saved_quantify =
-  List.fold_right
-    (function cur -> function code -> CTL.Exists (false,cur,code))
-
-let intersectll lst nested_list =
-  List.filter (function x -> List.exists (List.mem x) nested_list) lst
-
-(* --------------------------------------------------------------------- *)
-(* Count depth of braces.  The translation of a closed brace appears deeply
-nested within the translation of the sequence term, so the name of the
-paren var has to take into account the names of the nested braces.  On the
-other hand the close brace does not escape, so we don't have to take into
-account other paren variable names. *)
-
-(* called repetitively, which is inefficient, but less trouble than adding a
-new field to Seq and FunDecl *)
-let count_nested_braces s =
-  let bind x y = max x y in
-  let option_default = 0 in
-  let stmt_count r k s =
-    match Ast.unwrap s with
-      Ast.Seq(_,_,_,_) | Ast.FunDecl(_,_,_,_,_) -> (k s) + 1
-    | _ -> k s in
-  let donothing r k e = k e in
-  let mcode r x = 0 in
-  let recursor = V.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing stmt_count donothing donothing donothing in
-  let res = string_of_int (recursor.V.combiner_statement s) in
-  string2var ("p"^res)
-
-let labelctr = ref 0
-let get_label_ctr _ =
-  let cur = !labelctr in
-  labelctr := cur + 1;
-  string2var (Printf.sprintf "l%d" cur)
-
-(* --------------------------------------------------------------------- *)
-(* annotate dots with before and after neighbors *)
-
-let print_bef_aft = function
-    Ast.WParen (re,n) ->
-      Printf.printf "bef/aft\n";
-      Pretty_print_cocci.rule_elem "" re;
-      Format.print_newline()
-  | Ast.Other s ->
-      Printf.printf "bef/aft\n";
-      Pretty_print_cocci.statement "" s;
-      Format.print_newline()
-  | Ast.Other_dots d ->
-      Printf.printf "bef/aft\n";
-      Pretty_print_cocci.statement_dots d;
-      Format.print_newline()
-
-(* [] can only occur if we are in a disj, where it comes from a ?  In that
-case, we want to use a, which accumulates all of the previous patterns in
-their entirety. *)
-let rec get_before_elem sl a =
-  match Ast.unwrap sl with
-    Ast.DOTS(x) ->
-      let rec loop sl a =
-       match sl with
-         [] -> ([],Common.Right a)
-       | [e] ->
-           let (e,ea) = get_before_e e a in
-           ([e],Common.Left ea)
-       | e::sl ->
-           let (e,ea) = get_before_e e a in
-           let (sl,sla) = loop sl ea in
-           (e::sl,sla) in
-      let (l,a) = loop x a in
-      (Ast.rewrap sl (Ast.DOTS(l)),a)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-and get_before sl a =
-  match get_before_elem sl a with
-    (term,Common.Left x) -> (term,x)
-  | (term,Common.Right x) -> (term,x)
-
-and get_before_whencode wc =
-  List.map
-    (function
-       Ast.WhenNot w -> let (w,_) = get_before w [] in Ast.WhenNot w
-      | Ast.WhenAlways w -> let (w,_) = get_before_e w [] in Ast.WhenAlways w
-      |        Ast.WhenModifier(x) -> Ast.WhenModifier(x)
-      | Ast.WhenNotTrue w -> Ast.WhenNotTrue w
-      | Ast.WhenNotFalse w -> Ast.WhenNotFalse w)
-    wc
-
-and get_before_e s a =
-  match Ast.unwrap s with
-    Ast.Dots(d,w,_,aft) ->
-      (Ast.rewrap s (Ast.Dots(d,get_before_whencode w,a,aft)),a)
-  | Ast.Nest(stmt_dots,w,multi,_,aft) ->
-      let w = get_before_whencode w in
-      let (sd,_) = get_before stmt_dots a in
-      let a =
-       List.filter
-         (function
-             Ast.Other a ->
-               let unifies =
-                 Unify_ast.unify_statement_dots
-                   (Ast.rewrap s (Ast.DOTS([a]))) stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | Ast.Other_dots a ->
-               let unifies = Unify_ast.unify_statement_dots a stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | _ -> true)
-         a in
-      (Ast.rewrap s (Ast.Nest(sd,w,multi,a,aft)),[Ast.Other_dots stmt_dots])
-  | Ast.Disj(stmt_dots_list) ->
-      let (dsl,dsla) =
-       List.split (List.map (function e -> get_before e a) stmt_dots_list) in
-      (Ast.rewrap s (Ast.Disj(dsl)),List.fold_left Common.union_set [] dsla)
-  | Ast.Atomic(ast) ->
-      (match Ast.unwrap ast with
-       Ast.MetaStmt(_,_,_,_) -> (s,[])
-      |        _ -> (s,[Ast.Other s]))
-  | Ast.Seq(lbrace,decls,body,rbrace) ->
-      let index = count_nested_braces s in
-      let (de,dea) = get_before decls [Ast.WParen(lbrace,index)] in
-      let (bd,_) = get_before body dea in
-      (Ast.rewrap s (Ast.Seq(lbrace,de,bd,rbrace)),
-       [Ast.WParen(rbrace,index)])
-  | Ast.Define(header,body) ->
-      let (body,_) = get_before body [] in
-      (Ast.rewrap s (Ast.Define(header,body)), [Ast.Other s])
-  | Ast.IfThen(ifheader,branch,aft) ->
-      let (br,_) = get_before_e branch [] in
-      (Ast.rewrap s (Ast.IfThen(ifheader,br,aft)), [Ast.Other s])
-  | Ast.IfThenElse(ifheader,branch1,els,branch2,aft) ->
-      let (br1,_) = get_before_e branch1 [] in
-      let (br2,_) = get_before_e branch2 [] in
-      (Ast.rewrap s (Ast.IfThenElse(ifheader,br1,els,br2,aft)),[Ast.Other s])
-  | Ast.While(header,body,aft) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.While(header,bd,aft)),[Ast.Other s])
-  | Ast.For(header,body,aft) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.For(header,bd,aft)),[Ast.Other s])
-  | Ast.Do(header,body,tail) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.Do(header,bd,tail)),[Ast.Other s])
-  | Ast.Iterator(header,body,aft) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.Iterator(header,bd,aft)),[Ast.Other s])
-  | Ast.Switch(header,lb,cases,rb) ->
-      let cases =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-               let (body,_) = get_before body [] in
-               Ast.rewrap case_line (Ast.CaseLine(header,body))
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      (Ast.rewrap s (Ast.Switch(header,lb,cases,rb)),[Ast.Other s])
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      let (de,dea) = get_before decls [] in
-      let (bd,_) = get_before body dea in
-      (Ast.rewrap s (Ast.FunDecl(header,lbrace,de,bd,rbrace)),[])
-  | _ -> failwith "get_before_e: not supported"
-
-let rec get_after sl a =
-  match Ast.unwrap sl with
-    Ast.DOTS(x) ->
-      let rec loop sl =
-       match sl with
-         [] -> ([],a)
-       | e::sl ->
-           let (sl,sla) = loop sl in
-           let (e,ea) = get_after_e e sla in
-           (e::sl,ea) in
-      let (l,a) = loop x in
-      (Ast.rewrap sl (Ast.DOTS(l)),a)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-and get_after_whencode a wc =
-  List.map
-    (function
-       Ast.WhenNot w -> let (w,_) = get_after w a (*?*) in Ast.WhenNot w
-      | Ast.WhenAlways w -> let (w,_) = get_after_e w a in Ast.WhenAlways w
-      |        Ast.WhenModifier(x) -> Ast.WhenModifier(x)
-      | Ast.WhenNotTrue w -> Ast.WhenNotTrue w
-      | Ast.WhenNotFalse w -> Ast.WhenNotFalse w)
-    wc
-
-and get_after_e s a =
-  match Ast.unwrap s with
-    Ast.Dots(d,w,bef,_) ->
-      (Ast.rewrap s (Ast.Dots(d,get_after_whencode a w,bef,a)),a)
-  | Ast.Nest(stmt_dots,w,multi,bef,_) ->
-      let w = get_after_whencode a w in
-      let (sd,_) = get_after stmt_dots a in
-      let a =
-       List.filter
-         (function
-             Ast.Other a ->
-               let unifies =
-                 Unify_ast.unify_statement_dots
-                   (Ast.rewrap s (Ast.DOTS([a]))) stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | Ast.Other_dots a ->
-               let unifies = Unify_ast.unify_statement_dots a stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | _ -> true)
-         a in
-      (Ast.rewrap s (Ast.Nest(sd,w,multi,bef,a)),[Ast.Other_dots stmt_dots])
-  | Ast.Disj(stmt_dots_list) ->
-      let (dsl,dsla) =
-       List.split (List.map (function e -> get_after e a) stmt_dots_list) in
-      (Ast.rewrap s (Ast.Disj(dsl)),List.fold_left Common.union_set [] dsla)
-  | Ast.Atomic(ast) ->
-      (match Ast.unwrap ast with
-       Ast.MetaStmt(nm,keep,Ast.SequencibleAfterDots _,i) ->
-         (* check "after" information for metavar optimization *)
-         (* if the error is not desired, could just return [], then
-            the optimization (check for EF) won't take place *)
-         List.iter
-           (function
-               Ast.Other x ->
-                 (match Ast.unwrap x with
-                   Ast.Dots(_,_,_,_) | Ast.Nest(_,_,_,_,_) ->
-                     failwith
-                       "dots/nest not allowed before and after stmt metavar"
-                 | _ -> ())
-             | Ast.Other_dots x ->
-                 (match Ast.undots x with
-                   x::_ ->
-                     (match Ast.unwrap x with
-                       Ast.Dots(_,_,_,_) | Ast.Nest(_,_,_,_,_) ->
-                         failwith
-                           ("dots/nest not allowed before and after stmt "^
-                            "metavar")
-                     | _ -> ())
-                 | _ -> ())
-             | _ -> ())
-           a;
-         (Ast.rewrap s
-            (Ast.Atomic
-               (Ast.rewrap s
-                  (Ast.MetaStmt(nm,keep,Ast.SequencibleAfterDots a,i)))),[])
-      |        Ast.MetaStmt(_,_,_,_) -> (s,[])
-      |        _ -> (s,[Ast.Other s]))
-  | Ast.Seq(lbrace,decls,body,rbrace) ->
-      let index = count_nested_braces s in
-      let (bd,bda) = get_after body [Ast.WParen(rbrace,index)] in
-      let (de,_) = get_after decls bda in
-      (Ast.rewrap s (Ast.Seq(lbrace,de,bd,rbrace)),
-       [Ast.WParen(lbrace,index)])
-  | Ast.Define(header,body) ->
-      let (body,_) = get_after body a in
-      (Ast.rewrap s (Ast.Define(header,body)), [Ast.Other s])
-  | Ast.IfThen(ifheader,branch,aft) ->
-      let (br,_) = get_after_e branch a in
-      (Ast.rewrap s (Ast.IfThen(ifheader,br,aft)),[Ast.Other s])
-  | Ast.IfThenElse(ifheader,branch1,els,branch2,aft) ->
-      let (br1,_) = get_after_e branch1 a in
-      let (br2,_) = get_after_e branch2 a in
-      (Ast.rewrap s (Ast.IfThenElse(ifheader,br1,els,br2,aft)),[Ast.Other s])
-  | Ast.While(header,body,aft) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.While(header,bd,aft)),[Ast.Other s])
-  | Ast.For(header,body,aft) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.For(header,bd,aft)),[Ast.Other s])
-  | Ast.Do(header,body,tail) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.Do(header,bd,tail)),[Ast.Other s])
-  | Ast.Iterator(header,body,aft) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.Iterator(header,bd,aft)),[Ast.Other s])
-  | Ast.Switch(header,lb,cases,rb) ->
-      let cases =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-               let (body,_) = get_after body [] in
-               Ast.rewrap case_line (Ast.CaseLine(header,body))
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      (Ast.rewrap s (Ast.Switch(header,lb,cases,rb)),[Ast.Other s])
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      let (bd,bda) = get_after body [] in
-      let (de,_) = get_after decls bda in
-      (Ast.rewrap s (Ast.FunDecl(header,lbrace,de,bd,rbrace)),[])
-  | _ -> failwith "get_after_e: not supported"
-
-let preprocess_dots sl =
-  let (sl,_) = get_before sl [] in
-  let (sl,_) = get_after sl [] in
-  sl
-
-let preprocess_dots_e sl =
-  let (sl,_) = get_before_e sl [] in
-  let (sl,_) = get_after_e sl [] in
-  sl
-
-(* --------------------------------------------------------------------- *)
-(* various return_related things *)
-
-let rec ends_in_return stmt_list =
-  match Ast.unwrap stmt_list with
-    Ast.DOTS(x) ->
-      (match List.rev x with
-       x::_ ->
-         (match Ast.unwrap x with
-           Ast.Atomic(x) ->
-             let rec loop x =
-               match Ast.unwrap x with
-                 Ast.Return(_,_) | Ast.ReturnExpr(_,_,_) -> true
-               | Ast.DisjRuleElem((_::_) as l) -> List.for_all loop l
-               | _ -> false in
-             loop x
-         | Ast.Disj(disjs) -> List.for_all ends_in_return disjs
-         | _ -> false)
-      |        _ -> false)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-(* --------------------------------------------------------------------- *)
-(* expressions *)
-
-let exptymatch l make_match make_guard_match =
-  let pos = fresh_pos() in
-  let matches_guard_matches =
-    List.map
-      (function x ->
-       let pos = Ast.make_mcode pos in
-       (make_match (Ast.set_pos x (Some pos)),
-        make_guard_match (Ast.set_pos x (Some pos))))
-      l in
-  let (matches,guard_matches) = List.split matches_guard_matches in
-  let rec suffixes = function
-      [] -> []
-    | x::xs -> xs::(suffixes xs) in
-  let prefixes = List.rev (suffixes (List.rev guard_matches)) in
-  let info = (* not null *)
-    List.map2
-      (function matcher ->
-       function negates ->
-         CTL.Exists
-           (false,pos,
-            ctl_and CTL.NONSTRICT matcher
-              (ctl_not
-                 (ctl_uncheck (List.fold_left ctl_or_fl CTL.False negates)))))
-      matches prefixes in
-  CTL.InnerAnd(List.fold_left ctl_or_fl CTL.False (List.rev info))
-
-(* code might be a DisjRuleElem, in which case we break it apart
-   code might contain an Exp or Ty
-   this one pushes the quantifier inwards *)
-let do_re_matches label guard res quantified minus_quantified =
-  let make_guard_match x =
-    let stmt_fvs = Ast.get_mfvs x in
-    let fvs = get_unquantified minus_quantified stmt_fvs in
-    non_saved_quantify fvs (make_match None true x) in
-  let make_match x =
-    let stmt_fvs = Ast.get_fvs x in
-    let fvs = get_unquantified quantified stmt_fvs in
-    quantify guard fvs (make_match None guard x) in
-  ctl_and CTL.NONSTRICT (label_pred_maker label)
-    (match List.map Ast.unwrap res with
-      [] -> failwith "unexpected empty disj"
-    | Ast.Exp(e)::rest -> exptymatch res make_match make_guard_match
-    | Ast.Ty(t)::rest  -> exptymatch res make_match make_guard_match
-    | all ->
-       if List.exists (function Ast.Exp(_) | Ast.Ty(_) -> true | _ -> false)
-           all
-       then failwith "unexpected exp or ty";
-       List.fold_left ctl_seqor CTL.False
-         (List.rev (List.map make_match res)))
-
-(* code might be a DisjRuleElem, in which case we break it apart
-   code doesn't contain an Exp or Ty
-   this one is for use when it is not practical to push the quantifier inwards
- *)
-let header_match label guard code : ('a, Ast.meta_name, 'b) CTL.generic_ctl =
-  match Ast.unwrap code with
-    Ast.DisjRuleElem(res) ->
-      let make_match = make_match None guard in
-      let orop = if guard then ctl_or else ctl_seqor in
-      ctl_and CTL.NONSTRICT (label_pred_maker label)
-      (List.fold_left orop CTL.False (List.map make_match res))
-  | _ -> make_match label guard code
-
-(* --------------------------------------------------------------------- *)
-(* control structures *)
-
-let end_control_structure fvs header body after_pred
-    after_checks no_after_checks (afvs,afresh,ainh,aft) after label guard =
-  (* aft indicates what is added after the whole if, which has to be added
-     to the endif node *)
-  let (aft_needed,after_branch) =
-    match aft with
-      Ast.CONTEXT(_,Ast.NOTHING) ->
-       (false,make_seq_after2 guard after_pred after)
-    | _ ->
-       let match_endif =
-         make_match label guard
-           (make_meta_rule_elem aft (afvs,afresh,ainh)) in
-       (true,
-        make_seq_after guard after_pred
-          (After(make_seq_after guard match_endif after))) in
-  let body = body after_branch in
-  let s = guard_to_strict guard in
-  (* the code *)
-  quantify guard fvs
-    (ctl_and s header
-       (opt_and guard
-         (match (after,aft_needed) with
-           (After _,_) (* pattern doesn't end here *)
-         | (_,true) (* + code added after *) -> after_checks
-         | _ -> no_after_checks)
-         (ctl_ax_absolute s body)))
-
-let ifthen ifheader branch ((afvs,_,_,_) as aft) after
-    quantified minus_quantified label llabel slabel recurse make_match guard =
-(* "if (test) thn" becomes:
-    if(test) & AX((TrueBranch & AX thn) v FallThrough v After)
-
-    "if (test) thn; after" becomes:
-    if(test) & AX((TrueBranch & AX thn) v FallThrough v (After & AXAX after))
-             & EX After
-*)
-  (* free variables *) 
-  let (efvs,bfvs) =
-    match seq_fvs quantified
-       [Ast.get_fvs ifheader;Ast.get_fvs branch;afvs] with
-      [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-    | _ -> failwith "not possible" in
-  let new_quantified = Common.union_set bfvs quantified in
-  let (mefvs,mbfvs) =
-    match seq_fvs minus_quantified
-       [Ast.get_mfvs ifheader;Ast.get_mfvs branch;[]] with
-      [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-    | _ -> failwith "not possible" in
-  let new_mquantified = Common.union_set mbfvs minus_quantified in
-  (* if header *)
-  let if_header = quantify guard efvs (make_match ifheader) in
-  (* then branch and after *)
-  let lv = get_label_ctr() in
-  let used = ref false in
-  let true_branch =
-    make_seq guard
-      [truepred label; recurse branch Tail new_quantified new_mquantified
-         (Some (lv,used)) llabel slabel guard] in
-  let after_pred = aftpred label in
-  let or_cases after_branch =
-    ctl_or true_branch (ctl_or (fallpred label) after_branch) in
-  let (if_header,wrapper) =
-    if !used
-    then
-      let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-      (ctl_and CTL.NONSTRICT(*???*) if_header label_pred,
-       (function body -> quantify true [lv] body))
-    else (if_header,function x -> x) in
-  wrapper
-    (end_control_structure bfvs if_header or_cases after_pred
-       (Some(ctl_ex after_pred)) None aft after label guard)
-
-let ifthenelse ifheader branch1 els branch2 ((afvs,_,_,_) as aft) after
-    quantified minus_quantified label llabel slabel recurse make_match guard =
-(*  "if (test) thn else els" becomes:
-    if(test) & AX((TrueBranch & AX thn) v
-                  (FalseBranch & AX (else & AX els)) v After)
-             & EX FalseBranch
-
-    "if (test) thn else els; after" becomes:
-    if(test) & AX((TrueBranch & AX thn) v
-                  (FalseBranch & AX (else & AX els)) v
-                  (After & AXAX after))
-             & EX FalseBranch
-             & EX After
-*)
-  (* free variables *)
-  let (e1fvs,b1fvs,s1fvs) =
-    match seq_fvs quantified
-       [Ast.get_fvs ifheader;Ast.get_fvs branch1;afvs] with
-      [(e1fvs,b1fvs);(s1fvs,b1afvs);_] ->
-       (e1fvs,Common.union_set b1fvs b1afvs,s1fvs)
-    | _ -> failwith "not possible" in
-  let (e2fvs,b2fvs,s2fvs) =
-    (* fvs on else? *)
-    match seq_fvs quantified
-       [Ast.get_fvs ifheader;Ast.get_fvs branch2;afvs] with
-      [(e2fvs,b2fvs);(s2fvs,b2afvs);_] ->
-       (e2fvs,Common.union_set b2fvs b2afvs,s2fvs)
-    | _ -> failwith "not possible" in
-  let bothfvs        = union (union b1fvs b2fvs) (intersect s1fvs s2fvs) in
-  let exponlyfvs     = intersect e1fvs e2fvs in
-  let new_quantified = union bothfvs quantified in
-  (* minus free variables *)
-  let (me1fvs,mb1fvs,ms1fvs) =
-    match seq_fvs minus_quantified
-       [Ast.get_mfvs ifheader;Ast.get_mfvs branch1;[]] with
-      [(e1fvs,b1fvs);(s1fvs,b1afvs);_] ->
-       (e1fvs,Common.union_set b1fvs b1afvs,s1fvs)
-    | _ -> failwith "not possible" in
-  let (me2fvs,mb2fvs,ms2fvs) =
-    (* fvs on else? *)
-    match seq_fvs minus_quantified
-       [Ast.get_mfvs ifheader;Ast.get_mfvs branch2;[]] with
-      [(e2fvs,b2fvs);(s2fvs,b2afvs);_] ->
-       (e2fvs,Common.union_set b2fvs b2afvs,s2fvs)
-    | _ -> failwith "not possible" in
-  let mbothfvs       = union (union mb1fvs mb2fvs) (intersect ms1fvs ms2fvs) in
-  let new_mquantified = union mbothfvs minus_quantified in
-  (* if header *)
-  let if_header = quantify guard exponlyfvs (make_match ifheader) in
-  (* then and else branches *)
-  let lv = get_label_ctr() in
-  let used = ref false in
-  let true_branch =
-    make_seq guard
-      [truepred label; recurse branch1 Tail new_quantified new_mquantified
-         (Some (lv,used)) llabel slabel guard] in
-  let false_branch =
-    make_seq guard
-      [falsepred label; make_match els;
-       recurse branch2 Tail new_quantified new_mquantified
-         (Some (lv,used)) llabel slabel guard] in
-  let after_pred = aftpred label in
-  let or_cases after_branch =
-    ctl_or true_branch (ctl_or false_branch after_branch) in
-  let s = guard_to_strict guard in
-  let (if_header,wrapper) =
-    if !used
-    then
-      let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-      (ctl_and CTL.NONSTRICT(*???*) if_header label_pred,
-       (function body -> quantify true [lv] body))
-    else (if_header,function x -> x) in
-  wrapper
-    (end_control_structure bothfvs if_header or_cases after_pred
-      (Some(ctl_and s (ctl_ex (falsepred label)) (ctl_ex after_pred)))
-      (Some(ctl_ex (falsepred label)))
-      aft after label guard)
-
-let forwhile header body ((afvs,_,_,_) as aft) after
-    quantified minus_quantified label recurse make_match guard =
-  let process _ =
-    (* the translation in this case is similar to that of an if with no else *)
-    (* free variables *) 
-    let (efvs,bfvs) =
-      match seq_fvs quantified [Ast.get_fvs header;Ast.get_fvs body;afvs] with
-       [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-      | _ -> failwith "not possible" in
-    let new_quantified = Common.union_set bfvs quantified in
-    (* minus free variables *) 
-    let (mefvs,mbfvs) =
-      match seq_fvs minus_quantified
-         [Ast.get_mfvs header;Ast.get_mfvs body;[]] with
-       [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-      | _ -> failwith "not possible" in
-    let new_mquantified = Common.union_set mbfvs minus_quantified in
-    (* loop header *)
-    let header = quantify guard efvs (make_match header) in
-    let lv = get_label_ctr() in
-    let used = ref false in
-    let body =
-      make_seq guard
-       [inlooppred label;
-         recurse body Tail new_quantified new_mquantified
-           (Some (lv,used)) (Some (lv,used)) None guard] in
-    let after_pred = fallpred label in
-    let or_cases after_branch = ctl_or body after_branch in
-    let (header,wrapper) =
-      if !used
-      then
-       let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-       (ctl_and CTL.NONSTRICT(*???*) header label_pred,
-        (function body -> quantify true [lv] body))
-      else (header,function x -> x) in
-    wrapper
-      (end_control_structure bfvs header or_cases after_pred
-        (Some(ctl_ex after_pred)) None aft after label guard) in
-  match (Ast.unwrap body,aft) with
-    (Ast.Atomic(re),(_,_,_,Ast.CONTEXT(_,Ast.NOTHING))) ->
-      (match Ast.unwrap re with
-       Ast.MetaStmt((_,_,Ast.CONTEXT(_,Ast.NOTHING),_),
-                    Type_cocci.Unitary,_,false) ->
-         let (efvs) =
-           match seq_fvs quantified [Ast.get_fvs header] with
-             [(efvs,_)] -> efvs
-           | _ -> failwith "not possible" in
-         quantify guard efvs (make_match header)
-      | _ -> process())
-  | _ -> process()
-  
-(* --------------------------------------------------------------------- *)
-(* statement metavariables *)
-
-(* issue: an S metavariable that is not an if branch/loop body
-   should not match an if branch/loop body, so check that the labels
-   of the nodes before the first node matched by the S are different
-   from the label of the first node matched by the S *)
-let sequencibility body label_pred process_bef_aft = function
-    Ast.Sequencible | Ast.SequencibleAfterDots [] ->
-      body
-       (function x ->
-         (ctl_and CTL.NONSTRICT (ctl_not (ctl_back_ax label_pred)) x))
-  | Ast.SequencibleAfterDots l ->
-      (* S appears after some dots.  l is the code that comes after the S.
-        want to search for that first, because S can match anything, while
-        the stuff after is probably more restricted *)
-      let afts = List.map process_bef_aft l in
-      let ors = foldl1 ctl_or afts in
-      ctl_and CTL.NONSTRICT
-       (ctl_ef (ctl_and CTL.NONSTRICT ors (ctl_back_ax label_pred)))
-       (body
-          (function x ->
-            ctl_and CTL.NONSTRICT (ctl_not (ctl_back_ax label_pred)) x))
-  | Ast.NotSequencible -> body (function x -> x)
-
-let svar_context_with_add_after stmt s label quantified d ast
-    seqible after process_bef_aft guard fvinfo =
-  let label_var = (*fresh_label_var*) string2var "_lab" in
-  let label_pred =
-    CTL.Pred (Lib_engine.Label(label_var),CTL.Control) in
-  let prelabel_pred =
-    CTL.Pred (Lib_engine.PrefixLabel(label_var),CTL.Control) in
-  let matcher d = make_match None guard (make_meta_rule_elem d fvinfo) in
-  let full_metamatch = matcher d in
-  let first_metamatch =
-    matcher
-      (match d with
-       Ast.CONTEXT(pos,Ast.BEFOREAFTER(bef,_)) ->
-         Ast.CONTEXT(pos,Ast.BEFORE(bef))
-      |        Ast.CONTEXT(pos,_) -> Ast.CONTEXT(pos,Ast.NOTHING)
-      | Ast.MINUS(_,_) | Ast.PLUS -> failwith "not possible") in
-  let middle_metamatch =
-    matcher
-      (match d with
-       Ast.CONTEXT(pos,_) -> Ast.CONTEXT(pos,Ast.NOTHING)
-      | Ast.MINUS(_,_) | Ast.PLUS -> failwith "not possible") in
-  let last_metamatch =
-    matcher
-      (match d with
-       Ast.CONTEXT(pos,Ast.BEFOREAFTER(_,aft)) ->
-         Ast.CONTEXT(pos,Ast.AFTER(aft))
-      |        Ast.CONTEXT(_,_) -> d
-      | Ast.MINUS(_,_) | Ast.PLUS -> failwith "not possible") in
-
-  let rest_nodes =
-    ctl_and CTL.NONSTRICT middle_metamatch prelabel_pred in  
-  let left_or = (* the whole statement is one node *)
-    make_seq guard
-      [full_metamatch; and_after guard (ctl_not prelabel_pred) after] in
-  let right_or = (* the statement covers multiple nodes *)
-    make_seq guard
-      [first_metamatch;
-        ctl_au CTL.NONSTRICT
-         rest_nodes
-         (make_seq guard
-            [ctl_and CTL.NONSTRICT last_metamatch label_pred;
-              and_after guard
-                (ctl_not prelabel_pred) after])] in
-  let body f =
-    ctl_and CTL.NONSTRICT label_pred
-       (f (ctl_and CTL.NONSTRICT
-           (make_raw_match label false ast) (ctl_or left_or right_or))) in
-  let stmt_fvs = Ast.get_fvs stmt in
-  let fvs = get_unquantified quantified stmt_fvs in
-  quantify guard (label_var::fvs)
-    (sequencibility body label_pred process_bef_aft seqible)
-
-let svar_minus_or_no_add_after stmt s label quantified d ast
-    seqible after process_bef_aft guard fvinfo =
-  let label_var = (*fresh_label_var*) string2var "_lab" in
-  let label_pred =
-    CTL.Pred (Lib_engine.Label(label_var),CTL.Control) in
-  let prelabel_pred =
-    CTL.Pred (Lib_engine.PrefixLabel(label_var),CTL.Control) in
-  let matcher d = make_match None guard (make_meta_rule_elem d fvinfo) in
-  let pure_d =
-    (* don't have to put anything before the beginning, so don't have to
-       distinguish the first node.  so don't have to bother about paths,
-       just use the label. label ensures that found nodes match up with
-       what they should because it is in the lhs of the andany. *)
-    match d with
-       Ast.MINUS(pos,[]) -> true
-      | Ast.CONTEXT(pos,Ast.NOTHING) -> true
-      | _ -> false in
-  let ender =
-    match (pure_d,after) with
-      (true,Tail) | (true,End) | (true,VeryEnd) ->
-       (* the label sharing makes it safe to use AndAny *)
-       CTL.HackForStmt(CTL.FORWARD,CTL.NONSTRICT,
-                       ctl_and CTL.NONSTRICT label_pred
-                         (make_raw_match label false ast),
-                       ctl_and CTL.NONSTRICT (matcher d) prelabel_pred)
-    | _ ->
-       (* more safe but less efficient *)
-       let first_metamatch = matcher d in
-       let rest_metamatch =
-         matcher
-           (match d with
-             Ast.MINUS(pos,_) -> Ast.MINUS(pos,[])
-           | Ast.CONTEXT(pos,_) -> Ast.CONTEXT(pos,Ast.NOTHING)
-           | Ast.PLUS -> failwith "not possible") in
-       let rest_nodes = ctl_and CTL.NONSTRICT rest_metamatch prelabel_pred in
-       let last_node = and_after guard (ctl_not prelabel_pred) after in
-       (ctl_and CTL.NONSTRICT (make_raw_match label false ast)
-          (make_seq guard
-             [first_metamatch;
-               ctl_au CTL.NONSTRICT rest_nodes last_node])) in
-  let body f = ctl_and CTL.NONSTRICT label_pred (f ender) in
-  let stmt_fvs = Ast.get_fvs stmt in
-  let fvs = get_unquantified quantified stmt_fvs in
-  quantify guard (label_var::fvs)
-    (sequencibility body label_pred process_bef_aft seqible)
-
-(* --------------------------------------------------------------------- *)
-(* dots and nests *)
-
-let dots_au is_strict toend label s wrapcode x seq_after y quantifier =
-  let matchgoto = gotopred None in
-  let matchbreak =
-    make_match None false
-      (wrapcode
-        (Ast.Break(Ast.make_mcode "break",Ast.make_mcode ";"))) in
-  let matchcontinue =
-     make_match None false
-      (wrapcode
-        (Ast.Continue(Ast.make_mcode "continue",Ast.make_mcode ";"))) in
-  let stop_early v =
-    if quantifier = Exists
-    then CTL.False
-    else if toend
-    then CTL.Or(aftpred label,exitpred label)
-    else if is_strict
-    then aftpred label
-    else
-      let lv = get_label_ctr() in
-      let labelpred = CTL.Pred(Lib_engine.Label lv,CTL.Control) in
-      let preflabelpred = label_pred_maker (Some (lv,ref true)) in
-      ctl_or (aftpred label)
-       (quantify false [lv]
-          (ctl_and CTL.NONSTRICT
-             (ctl_and CTL.NONSTRICT (truepred label) labelpred)
-             (ctl_au CTL.NONSTRICT
-                (ctl_and CTL.NONSTRICT (ctl_not v) preflabelpred)
-                (ctl_and CTL.NONSTRICT preflabelpred
-                   (ctl_or (retpred None)
-                      (if !Flag_matcher.only_return_is_error_exit
-                      then CTL.True
-                      else
-                        (ctl_or matchcontinue
-                           (ctl_and CTL.NONSTRICT
-                              (ctl_or matchgoto matchbreak)
-                              (ctl_ag s (ctl_not seq_after)))))))))) in
-  let v = get_let_ctr() in
-  let op = if quantifier = !exists then ctl_au else ctl_anti_au in
-  op s x (CTL.Let(v,y,ctl_or (CTL.Ref v) (stop_early (CTL.Ref v))))
-
-let rec dots_and_nests plus nest whencodes bef aft dotcode after label
-    process_bef_aft statement_list statement guard quantified wrapcode =
-  let ctl_and_ns = ctl_and CTL.NONSTRICT in
-  (* proces bef_aft *)
-  let shortest l =
-    List.fold_left ctl_or_fl CTL.False (List.map process_bef_aft l) in
-  let bef_aft = (* to be negated *)
-    try
-      let _ =
-       List.find
-         (function Ast.WhenModifier(Ast.WhenAny) -> true | _ -> false)
-         whencodes in
-      CTL.False
-    with Not_found -> shortest (Common.union_set bef aft) in
-  let is_strict =
-    List.exists
-      (function Ast.WhenModifier(Ast.WhenStrict) -> true | _ -> false)
-      whencodes in
-  let check_quantifier quant other =
-    if List.exists
-       (function Ast.WhenModifier(x) -> x = quant | _ -> false)
-       whencodes
-    then
-      if List.exists
-         (function Ast.WhenModifier(x) -> x = other | _ -> false)
-         whencodes
-      then failwith "inconsistent annotation on dots"
-      else true
-    else false in
-  let quantifier =
-    if check_quantifier Ast.WhenExists Ast.WhenForall
-    then Exists
-    else
-      if check_quantifier Ast.WhenForall Ast.WhenExists
-      then Forall
-      else !exists in
-  (* the following is used when we find a goto, etc and consider accepting
-     without finding the rest of the pattern *)
-  let aft = shortest aft in
-  (* process whencode *)
-  let labelled = label_pred_maker label in
-  let whencodes arg =
-    let (poswhen,negwhen) =
-      List.fold_left
-       (function (poswhen,negwhen) ->
-         function
-             Ast.WhenNot whencodes ->
-               (poswhen,ctl_or (statement_list whencodes) negwhen)
-           | Ast.WhenAlways stm ->
-               (ctl_and CTL.NONSTRICT (statement stm) poswhen,negwhen)
-           | Ast.WhenModifier(_) -> (poswhen,negwhen)
-           | Ast.WhenNotTrue(e) ->
-               (poswhen,
-                 ctl_or (whencond_true e label guard quantified) negwhen)
-           | Ast.WhenNotFalse(e) ->
-               (poswhen,
-                 ctl_or (whencond_false e label guard quantified) negwhen))
-       (CTL.True,bef_aft) (List.rev whencodes) in
-    let poswhen = ctl_and_ns arg poswhen in
-    let negwhen =
-(*    if !exists
-      then*)
-        (* add in After, because it's not part of the program *)
-       ctl_or (aftpred label) negwhen
-      (*else negwhen*) in
-    ctl_and_ns poswhen (ctl_not negwhen) in
-  (* process dot code, if any *)
-  let dotcode =
-    match (dotcode,guard) with
-      (None,_) | (_,true) -> CTL.True
-    | (Some dotcode,_) -> dotcode in
-  (* process nest code, if any *)
-  (* whencode goes in the negated part of the nest; if no nest, just goes
-      on the "true" in between code *)
-  let plus_var = if plus then get_label_ctr() else string2var "" in
-  let plus_var2 = if plus then get_label_ctr() else string2var "" in
-  let ornest =
-    match (nest,guard && not plus) with
-      (None,_) | (_,true) -> whencodes CTL.True
-    | (Some nest,false) ->
-       let v = get_let_ctr() in
-       let is_plus x =
-         if plus
-         then
-           (* the idea is that BindGood is sort of a witness; a witness to
-              having found the subterm in at least one place.  If there is
-              not a witness, then there is a risk that it will get thrown
-              away, if it is merged with a node that has an empty
-              environment.  See tests/nestplus.  But this all seems
-              rather suspicious *)
-           CTL.And(CTL.NONSTRICT,x,
-                   CTL.Exists(true,plus_var2,
-                              CTL.Pred(Lib_engine.BindGood(plus_var),
-                                       CTL.Modif plus_var2)))
-         else x in
-        CTL.Let(v,nest,
-               CTL.Or(is_plus (CTL.Ref v),
-                      whencodes (CTL.Not(ctl_uncheck (CTL.Ref v))))) in
-  let plus_modifier x =
-    if plus
-    then
-      CTL.Exists
-       (false,plus_var,
-        (CTL.And
-           (CTL.NONSTRICT,x,
-            CTL.Not(CTL.Pred(Lib_engine.BindBad(plus_var),CTL.Control)))))
-    else x in
-
-  let ender =
-    match after with
-      After f -> f
-    | Guard f -> ctl_uncheck f
-    | VeryEnd ->
-       let exit = endpred label in
-       let errorexit = exitpred label in
-       ctl_or exit errorexit
-    (* not at all sure what the next two mean... *)
-    | End -> CTL.True
-    | Tail ->
-       (match label with
-         Some (lv,used) -> used := true;
-           ctl_or (CTL.Pred(Lib_engine.Label lv,CTL.Control))
-             (ctl_back_ex (ctl_or (retpred label) (gotopred label)))
-       | None -> endpred label)
-         (* was the following, but not clear why sgrep should allow
-            incomplete patterns
-       let exit = endpred label in
-       let errorexit = exitpred label in
-       if !exists
-       then ctl_or exit errorexit (* end anywhere *)
-       else exit (* end at the real end of the function *) *) in
-  plus_modifier
-    (dots_au is_strict ((after = Tail) or (after = VeryEnd))
-       label (guard_to_strict guard) wrapcode
-      (ctl_and_ns dotcode (ctl_and_ns ornest labelled))
-      aft ender quantifier)
-
-and get_whencond_exps e =
-  match Ast.unwrap e with
-    Ast.Exp e -> [e]
-  | Ast.DisjRuleElem(res) ->
-      List.fold_left Common.union_set [] (List.map get_whencond_exps res)
-  | _ -> failwith "not possible"
-
-and make_whencond_headers e e1 label guard quantified =
-  let fvs = Ast.get_fvs e in
-  let header_pred h =
-    quantify guard (get_unquantified quantified fvs)
-      (make_match label guard h) in
-  let if_header e1 =
-    header_pred
-      (Ast.rewrap e
-        (Ast.IfHeader
-           (Ast.make_mcode "if",
-            Ast.make_mcode "(",e1,Ast.make_mcode ")"))) in
-  let while_header e1 =
-    header_pred
-      (Ast.rewrap e
-        (Ast.WhileHeader
-           (Ast.make_mcode "while",
-            Ast.make_mcode "(",e1,Ast.make_mcode ")"))) in
-  let for_header e1 =
-    header_pred
-      (Ast.rewrap e
-        (Ast.ForHeader
-           (Ast.make_mcode "for",Ast.make_mcode "(",None,Ast.make_mcode ";",
-            Some e1,Ast.make_mcode ";",None,Ast.make_mcode ")"))) in
-  let if_headers =
-    List.fold_left ctl_or CTL.False (List.map if_header e1) in
-  let while_headers =
-    List.fold_left ctl_or CTL.False (List.map while_header e1) in
-  let for_headers =
-    List.fold_left ctl_or CTL.False (List.map for_header e1) in
-  (if_headers, while_headers, for_headers)
-
-and whencond_true e label guard quantified =
-  let e1 = get_whencond_exps e in
-  let (if_headers, while_headers, for_headers) =
-    make_whencond_headers e e1 label guard quantified in
-  ctl_or
-    (ctl_and CTL.NONSTRICT (truepred label) (ctl_back_ex if_headers))
-    (ctl_and CTL.NONSTRICT
-       (inlooppred label) (ctl_back_ex (ctl_or while_headers for_headers)))
-
-and whencond_false e label guard quantified =
-  let e1 = get_whencond_exps e in
-  let (if_headers, while_headers, for_headers) =
-    make_whencond_headers e e1 label guard quantified in
-  ctl_or (ctl_and CTL.NONSTRICT (falsepred label) (ctl_back_ex if_headers))
-    (ctl_and CTL.NONSTRICT (fallpred label)
-       (ctl_or (ctl_back_ex if_headers)
-         (ctl_or (ctl_back_ex while_headers) (ctl_back_ex for_headers))))
-
-(* --------------------------------------------------------------------- *)
-(* the main translation loop *)
-  
-let rec statement_list stmt_list after quantified minus_quantified
-    label llabel slabel dots_before guard =
-  let isdots x =
-    (* include Disj to be on the safe side *)
-    match Ast.unwrap x with
-      Ast.Dots _ | Ast.Nest _ | Ast.Disj _ -> true | _ -> false in
-  let compute_label l e db = if db or isdots e then l else None in
-  match Ast.unwrap stmt_list with
-    Ast.DOTS(x) ->
-      let rec loop quantified minus_quantified dots_before label llabel slabel
-         = function
-         ([],_,_) -> (match after with After f -> f | _ -> CTL.True)
-       | ([e],_,_) ->
-           statement e after quantified minus_quantified
-             (compute_label label e dots_before)
-             llabel slabel guard
-       | (e::sl,fv::fvs,mfv::mfvs) ->
-           let shared = intersectll fv fvs in
-           let unqshared = get_unquantified quantified shared in
-           let new_quantified = Common.union_set unqshared quantified in
-           let minus_shared = intersectll mfv mfvs in
-           let munqshared =
-             get_unquantified minus_quantified minus_shared in
-           let new_mquantified =
-             Common.union_set munqshared minus_quantified in
-           quantify guard unqshared
-             (statement e
-                (After
-                   (let (label1,llabel1,slabel1) =
-                     match Ast.unwrap e with
-                       Ast.Atomic(re) ->
-                         (match Ast.unwrap re with
-                           Ast.Goto _ -> (None,None,None)
-                         | _ -> (label,llabel,slabel))
-                     | _ -> (label,llabel,slabel) in
-                   loop new_quantified new_mquantified (isdots e)
-                     label1 llabel1 slabel1
-                     (sl,fvs,mfvs)))
-                new_quantified new_mquantified
-                (compute_label label e dots_before) llabel slabel guard)
-       | _ -> failwith "not possible" in
-      loop quantified minus_quantified dots_before
-       label llabel slabel
-       (x,List.map Ast.get_fvs x,List.map Ast.get_mfvs x)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-(* llabel is the label of the enclosing loop and slabel is the label of the
-   enclosing switch *)
-and statement stmt after quantified minus_quantified
-    label llabel slabel guard =
-  let ctl_au     = ctl_au CTL.NONSTRICT in
-  let ctl_ax     = ctl_ax CTL.NONSTRICT in
-  let ctl_and    = ctl_and CTL.NONSTRICT in
-  let make_seq   = make_seq guard in
-  let make_seq_after = make_seq_after guard in
-  let real_make_match = make_match in
-  let make_match = header_match label guard in
-
-  let dots_done = ref false in (* hack for dots cases we can easily handle *)
-
-  let term =
-  match Ast.unwrap stmt with
-    Ast.Atomic(ast) ->
-      (match Ast.unwrap ast with
-       (* the following optimisation is not a good idea, because when S
-          is alone, we would like it not to match a declaration.
-          this makes more matching for things like when (...) S, but perhaps
-          that matching is not so costly anyway *)
-       (*Ast.MetaStmt(_,Type_cocci.Unitary,_,false) when guard -> CTL.True*)
-      |        Ast.MetaStmt((s,_,(Ast.CONTEXT(_,Ast.BEFOREAFTER(_,_)) as d),_),
-                    keep,seqible,_)
-      | Ast.MetaStmt((s,_,(Ast.CONTEXT(_,Ast.AFTER(_)) as d),_),
-                    keep,seqible,_)->
-         svar_context_with_add_after stmt s label quantified d ast seqible
-           after
-           (process_bef_aft quantified minus_quantified
-              label llabel slabel true)
-           guard
-           (Ast.get_fvs stmt, Ast.get_fresh stmt, Ast.get_inherited stmt)
-
-      |        Ast.MetaStmt((s,_,d,_),keep,seqible,_) ->
-         svar_minus_or_no_add_after stmt s label quantified d ast seqible
-           after
-           (process_bef_aft quantified minus_quantified
-              label llabel slabel true)
-           guard
-           (Ast.get_fvs stmt, Ast.get_fresh stmt, Ast.get_inherited stmt)
-
-      |        _ ->
-         let term =
-           match Ast.unwrap ast with
-             Ast.DisjRuleElem(res) ->
-               do_re_matches label guard res quantified minus_quantified
-           | Ast.Exp(_) | Ast.Ty(_) ->
-               let stmt_fvs = Ast.get_fvs stmt in
-               let fvs = get_unquantified quantified stmt_fvs in
-               CTL.InnerAnd(quantify guard fvs (make_match ast))
-           | _ ->
-               let stmt_fvs = Ast.get_fvs stmt in
-               let fvs = get_unquantified quantified stmt_fvs in
-               quantify guard fvs (make_match ast) in
-         match Ast.unwrap ast with
-           Ast.Break(brk,semi) ->
-             (match (llabel,slabel) with
-               (_,Some(lv,used)) -> (* use switch label if there is one *)
-                 ctl_and term (bclabel_pred_maker slabel)
-             | _ -> ctl_and term (bclabel_pred_maker llabel))
-         | Ast.Continue(brk,semi) -> ctl_and term (bclabel_pred_maker llabel)
-          | Ast.Return((_,info,retmc,pos),(_,_,semmc,_)) ->
-             (* discard pattern that comes after return *)
-             let normal_res = make_seq_after term after in
-             (* the following code tries to propagate the modifications on
-                return; to a close brace, in the case where the final return
-                is absent *)
-             let new_mc =
-               match (retmc,semmc) with
-                 (Ast.MINUS(_,l1),Ast.MINUS(_,l2)) when !Flag.sgrep_mode2 ->
-                   (* in sgrep mode, we can propagate the - *)
-                   Some (Ast.MINUS(Ast.NoPos,l1@l2))
-               | (Ast.MINUS(_,l1),Ast.MINUS(_,l2))
-               | (Ast.CONTEXT(_,Ast.BEFORE(l1)),
-                  Ast.CONTEXT(_,Ast.AFTER(l2))) ->
-                   Some (Ast.CONTEXT(Ast.NoPos,Ast.BEFORE(l1@l2)))
-               | (Ast.CONTEXT(_,Ast.BEFORE(_)),Ast.CONTEXT(_,Ast.NOTHING))
-               | (Ast.CONTEXT(_,Ast.NOTHING),Ast.CONTEXT(_,Ast.NOTHING)) ->
-                   Some retmc
-               | (Ast.CONTEXT(_,Ast.NOTHING),Ast.CONTEXT(_,Ast.AFTER(l))) ->
-                   Some (Ast.CONTEXT(Ast.NoPos,Ast.BEFORE(l)))
-               | _ -> None in
-             let ret = Ast.make_mcode "return" in
-             let edots =
-               Ast.rewrap ast (Ast.Edots(Ast.make_mcode "...",None)) in
-             let semi = Ast.make_mcode ";" in
-             let simple_return =
-               make_match(Ast.rewrap ast (Ast.Return(ret,semi))) in
-             let return_expr =
-               make_match(Ast.rewrap ast (Ast.ReturnExpr(ret,edots,semi))) in
-             (match new_mc with
-               Some new_mc ->
-                 let exit = endpred None in
-                 let mod_rbrace =
-                   Ast.rewrap ast (Ast.SeqEnd (("}",info,new_mc,pos))) in
-                 let stripped_rbrace =
-                   Ast.rewrap ast (Ast.SeqEnd(Ast.make_mcode "}")) in
-                 ctl_or normal_res
-                   (ctl_and (make_match mod_rbrace)
-                      (ctl_and
-                         (ctl_back_ax
-                            (ctl_not
-                               (ctl_uncheck
-                                  (ctl_or simple_return return_expr))))
-                         (ctl_au
-                            (make_match stripped_rbrace)
-                            (* error exit not possible; it is in the middle
-                               of code, so a return is needed *)
-                            exit)))
-             | _ ->
-                 (* some change in the middle of the return, so have to
-                    find an actual return *)
-                 normal_res)
-          | _ ->
-             (* should try to deal with the dots_bef_aft problem elsewhere,
-                but don't have the courage... *)
-             let term =
-               if guard
-               then term
-               else
-                 do_between_dots stmt term End
-                   quantified minus_quantified label llabel slabel guard in
-             dots_done := true;
-             make_seq_after term after)
-  | Ast.Seq(lbrace,decls,body,rbrace) ->
-      let (lbfvs,b1fvs,b2fvs,b3fvs,rbfvs) =
-       match
-         seq_fvs quantified
-           [Ast.get_fvs lbrace;Ast.get_fvs decls;
-             Ast.get_fvs body;Ast.get_fvs rbrace]
-       with
-         [(lbfvs,b1fvs);(_,b2fvs);(_,b3fvs);(rbfvs,_)] ->
-           (lbfvs,b1fvs,b2fvs,b3fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let (mlbfvs,mb1fvs,mb2fvs,mb3fvs,mrbfvs) =
-       match
-         seq_fvs minus_quantified
-           [Ast.get_mfvs lbrace;Ast.get_mfvs decls;
-             Ast.get_mfvs body;Ast.get_mfvs rbrace]
-       with
-         [(lbfvs,b1fvs);(_,b2fvs);(_,b3fvs);(rbfvs,_)] ->
-           (lbfvs,b1fvs,b2fvs,b3fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let pv = count_nested_braces stmt in
-      let lv = get_label_ctr() in
-      let paren_pred = CTL.Pred(Lib_engine.Paren pv,CTL.Control) in
-      let label_pred = CTL.Pred(Lib_engine.Label lv,CTL.Control) in
-      let start_brace =
-       ctl_and
-         (quantify guard lbfvs (make_match lbrace))
-         (ctl_and paren_pred label_pred) in
-      let empty_rbrace =
-       match Ast.unwrap rbrace with
-         Ast.SeqEnd((data,info,_,pos)) ->
-           Ast.rewrap rbrace(Ast.SeqEnd(Ast.make_mcode data))
-       | _ -> failwith "unexpected close brace" in
-      let end_brace =
-       (* label is not needed; paren_pred is enough *)
-       quantify guard rbfvs
-         (ctl_au (make_match empty_rbrace)
-            (ctl_and
-               (real_make_match None guard rbrace)
-               paren_pred)) in
-      let new_quantified2 =
-       Common.union_set b1fvs (Common.union_set b2fvs quantified) in
-      let new_quantified3 = Common.union_set b3fvs new_quantified2 in
-      let new_mquantified2 =
-       Common.union_set mb1fvs (Common.union_set mb2fvs minus_quantified) in
-      let new_mquantified3 = Common.union_set mb3fvs new_mquantified2 in
-      let pattern_as_given =
-       let new_quantified2 = Common.union_set [pv] new_quantified2 in
-       let new_quantified3 = Common.union_set [pv] new_quantified3 in
-       quantify true [pv;lv]
-         (quantify guard b1fvs
-            (make_seq
-               [start_brace;
-                 quantify guard b2fvs
-                   (statement_list decls
-                      (After
-                         (quantify guard b3fvs
-                            (statement_list body
-                               (After (make_seq_after end_brace after))
-                               new_quantified3 new_mquantified3
-                               (Some (lv,ref true)) (* label mostly useful *)
-                               llabel slabel true guard)))
-                      new_quantified2 new_mquantified2
-                      (Some (lv,ref true)) llabel slabel false guard)])) in
-      if ends_in_return body
-      then
-       (* matching error handling code *)
-       (* Cases:
-          1. The pattern as given
-          2. A goto, and then some close braces, and then the pattern as
-          given, but without the braces (only possible if there are no
-          decls, and open and close braces are unmodified)
-          3. Part of the pattern as given, then a goto, and then the rest
-          of the pattern.  For this case, we just check that all paths have
-          a goto within the current braces.  checking for a goto at every
-          point in the pattern seems expensive and not worthwhile. *)
-       let pattern2 =
-         let body = preprocess_dots body in (* redo, to drop braces *)
-         make_seq
-           [gotopred label;
-             ctl_au
-               (make_match empty_rbrace)
-               (ctl_ax (* skip the destination label *)
-                  (quantify guard b3fvs
-                     (statement_list body End
-                        new_quantified3 new_mquantified3 None llabel slabel
-                        true guard)))] in
-       let pattern3 =
-         let new_quantified2 = Common.union_set [pv] new_quantified2 in
-         let new_quantified3 = Common.union_set [pv] new_quantified3 in
-         quantify true [pv;lv]
-           (quantify guard b1fvs
-              (make_seq
-                 [start_brace;
-                   ctl_and
-                     (CTL.AU (* want AF even for sgrep *)
-                        (CTL.FORWARD,CTL.STRICT,
-                         CTL.Pred(Lib_engine.PrefixLabel(lv),CTL.Control),
-                         ctl_and (* brace must be eventually after goto *)
-                           (gotopred (Some (lv,ref true)))
-                           (* want AF even for sgrep *)
-                           (CTL.AF(CTL.FORWARD,CTL.STRICT,end_brace))))
-                     (quantify guard b2fvs
-                        (statement_list decls
-                           (After
-                              (quantify guard b3fvs
-                                 (statement_list body Tail
-                                       (*After
-                                          (make_seq_after
-                                             nopv_end_brace after)*)
-                                    new_quantified3 new_mquantified3
-                                    None llabel slabel true guard)))
-                           new_quantified2 new_mquantified2
-                           (Some (lv,ref true))
-                           llabel slabel false guard))])) in
-       ctl_or pattern_as_given
-         (match Ast.unwrap decls with
-           Ast.DOTS([]) -> ctl_or pattern2 pattern3
-         | Ast.DOTS(l) -> pattern3
-         | _ -> failwith "circles and stars not supported")
-      else pattern_as_given
-  | Ast.IfThen(ifheader,branch,aft) ->
-      ifthen ifheader branch aft after quantified minus_quantified
-         label llabel slabel statement make_match guard
-        
-  | Ast.IfThenElse(ifheader,branch1,els,branch2,aft) ->
-      ifthenelse ifheader branch1 els branch2 aft after quantified
-         minus_quantified label llabel slabel statement make_match guard
-
-  | Ast.While(header,body,aft) | Ast.For(header,body,aft)
-  | Ast.Iterator(header,body,aft) ->
-      forwhile header body aft after quantified minus_quantified
-       label statement make_match guard
-
-  | Ast.Disj(stmt_dots_list) -> (* list shouldn't be empty *)
-      ctl_and
-       (label_pred_maker label)
-       (List.fold_left ctl_seqor CTL.False
-          (List.map
-             (function sl ->
-               statement_list sl after quantified minus_quantified label
-                 llabel slabel true guard)
-             stmt_dots_list))
-
-  | Ast.Nest(stmt_dots,whencode,multi,bef,aft) ->
-      (* label in recursive call is None because label check is already
-        wrapped around the corresponding code *)
-
-      let bfvs =
-       match seq_fvs quantified [Ast.get_wcfvs whencode;Ast.get_fvs stmt_dots]
-       with
-         [(wcfvs,bothfvs);(bdfvs,_)] -> bothfvs
-       | _ -> failwith "not possible" in
-
-      (* no minus version because when code doesn't contain any minus code *)
-      let new_quantified = Common.union_set bfvs quantified in
-
-      quantify guard bfvs
-       (let dots_pattern =
-         statement_list stmt_dots (a2n after) new_quantified minus_quantified
-           None llabel slabel true guard in
-       dots_and_nests multi
-         (Some dots_pattern) whencode bef aft None after label
-         (process_bef_aft new_quantified minus_quantified
-            None llabel slabel true)
-         (function x ->
-           statement_list x Tail new_quantified minus_quantified None
-             llabel slabel true true)
-         (function x ->
-           statement x Tail new_quantified minus_quantified None
-             llabel slabel true)
-         guard quantified
-         (function x -> Ast.set_fvs [] (Ast.rewrap stmt x)))
-
-  | Ast.Dots((_,i,d,_),whencodes,bef,aft) ->
-      let dot_code =
-       match d with
-         Ast.MINUS(_,_) ->
-            (* no need for the fresh metavar, but ... is a bit wierd as a
-              variable name *)
-           Some(make_match (make_meta_rule_elem d ([],[],[])))
-       | _ -> None in
-      dots_and_nests false None whencodes bef aft dot_code after label
-       (process_bef_aft quantified minus_quantified None llabel slabel true)
-       (function x ->
-         statement_list x Tail quantified minus_quantified
-           None llabel slabel true true)
-       (function x ->
-         statement x Tail quantified minus_quantified None llabel slabel true)
-       guard quantified
-       (function x -> Ast.set_fvs [] (Ast.rewrap stmt x))
-
-  | Ast.Switch(header,lb,cases,rb) ->
-      let rec intersect_all = function
-         [] -> []
-       | [x] -> x
-       | x::xs -> intersect x (intersect_all xs) in
-      let rec union_all l = List.fold_left union [] l in
-      (* start normal variables *)
-      let header_fvs = Ast.get_fvs header in
-      let lb_fvs = Ast.get_fvs lb in
-      let case_fvs = List.map Ast.get_fvs cases in
-      let rb_fvs = Ast.get_fvs rb in
-      let (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-          all_casefvs,all_b3fvs,all_rbfvs) =
-       List.fold_left
-         (function (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-                    all_casefvs,all_b3fvs,all_rbfvs) ->
-           function case_fvs ->
-             match seq_fvs quantified [header_fvs;lb_fvs;case_fvs;rb_fvs] with
-               [(efvs,b1fvs);(lbfvs,b2fvs);(casefvs,b3fvs);(rbfvs,_)] ->
-                 (efvs::all_efvs,b1fvs::all_b1fvs,lbfvs::all_lbfvs,
-                  b2fvs::all_b2fvs,casefvs::all_casefvs,b3fvs::all_b3fvs,
-                  rbfvs::all_rbfvs)
-             | _ -> failwith "not possible")
-         ([],[],[],[],[],[],[]) case_fvs in
-      let (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-          all_casefvs,all_b3fvs,all_rbfvs) =
-       (List.rev all_efvs,List.rev all_b1fvs,List.rev all_lbfvs,
-        List.rev all_b2fvs,List.rev all_casefvs,List.rev all_b3fvs,
-        List.rev all_rbfvs) in
-      let exponlyfvs = intersect_all all_efvs in
-      let lbonlyfvs = intersect_all all_lbfvs in
-(* don't do anything with right brace.  Hope there is no + code on it *)
-(*      let rbonlyfvs = intersect_all all_rbfvs in*)
-      let b1fvs = union_all all_b1fvs in
-      let new1_quantified = union b1fvs quantified in
-      let b2fvs = union (union_all all_b1fvs) (intersect_all all_casefvs) in
-      let new2_quantified = union b2fvs new1_quantified in
-(*      let b3fvs = union_all all_b3fvs in*)
-      (* ------------------- start minus free variables *)
-      let header_mfvs = Ast.get_mfvs header in
-      let lb_mfvs = Ast.get_mfvs lb in
-      let case_mfvs = List.map Ast.get_mfvs cases in
-      let rb_mfvs = Ast.get_mfvs rb in
-      let (all_mefvs,all_mb1fvs,all_mlbfvs,all_mb2fvs,
-          all_mcasefvs,all_mb3fvs,all_mrbfvs) =
-       List.fold_left
-         (function (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-                    all_casefvs,all_b3fvs,all_rbfvs) ->
-           function case_mfvs ->
-             match
-               seq_fvs quantified
-                 [header_mfvs;lb_mfvs;case_mfvs;rb_mfvs] with
-               [(efvs,b1fvs);(lbfvs,b2fvs);(casefvs,b3fvs);(rbfvs,_)] ->
-                 (efvs::all_efvs,b1fvs::all_b1fvs,lbfvs::all_lbfvs,
-                  b2fvs::all_b2fvs,casefvs::all_casefvs,b3fvs::all_b3fvs,
-                  rbfvs::all_rbfvs)
-             | _ -> failwith "not possible")
-         ([],[],[],[],[],[],[]) case_mfvs in
-      let (all_mefvs,all_mb1fvs,all_mlbfvs,all_mb2fvs,
-          all_mcasefvs,all_mb3fvs,all_mrbfvs) =
-       (List.rev all_mefvs,List.rev all_mb1fvs,List.rev all_mlbfvs,
-        List.rev all_mb2fvs,List.rev all_mcasefvs,List.rev all_mb3fvs,
-        List.rev all_mrbfvs) in
-(* don't do anything with right brace.  Hope there is no + code on it *)
-(*      let rbonlyfvs = intersect_all all_rbfvs in*)
-      let mb1fvs = union_all all_mb1fvs in
-      let new1_mquantified = union mb1fvs quantified in
-      let mb2fvs = union (union_all all_mb1fvs) (intersect_all all_mcasefvs) in
-      let new2_mquantified = union mb2fvs new1_mquantified in
-(*      let b3fvs = union_all all_b3fvs in*)
-      (* ------------------- end collection of free variables *)
-      let switch_header = quantify guard exponlyfvs (make_match header) in
-      let lb = quantify guard lbonlyfvs (make_match lb) in
-(*      let rb = quantify guard rbonlyfvs (make_match rb) in*)
-      let case_headers =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-               let e1fvs =
-                 match seq_fvs new2_quantified [Ast.get_fvs header] with
-                   [(e1fvs,_)] -> e1fvs
-                 | _ -> failwith "not possible" in
-               quantify guard e1fvs (real_make_match label true header)
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      let no_header =
-       ctl_not (List.fold_left ctl_or_fl CTL.False case_headers) in
-      let lv = get_label_ctr() in
-      let used = ref false in
-      let case_code =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-                 let (e1fvs,b1fvs,s1fvs) =
-                   let fvs = [Ast.get_fvs header;Ast.get_fvs body] in
-                   match seq_fvs new2_quantified fvs with
-                     [(e1fvs,b1fvs);(s1fvs,_)] -> (e1fvs,b1fvs,s1fvs)
-                   | _ -> failwith "not possible" in
-                 let (me1fvs,mb1fvs,ms1fvs) =
-                   let fvs = [Ast.get_mfvs header;Ast.get_mfvs body] in
-                   match seq_fvs new2_mquantified fvs with
-                     [(e1fvs,b1fvs);(s1fvs,_)] -> (e1fvs,b1fvs,s1fvs)
-                   | _ -> failwith "not possible" in
-                 let case_header =
-                   quantify guard e1fvs (make_match header) in
-                 let new3_quantified = union b1fvs new2_quantified in
-                 let new3_mquantified = union mb1fvs new2_mquantified in
-                 let body =
-                   statement_list body Tail
-                     new3_quantified new3_mquantified label llabel
-                     (Some (lv,used)) true(*?*) guard in
-                 quantify guard b1fvs (make_seq [case_header; body])
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      let default_required =
-       if List.exists
-           (function case ->
-             match Ast.unwrap case with
-               Ast.CaseLine(header,_) ->
-                 (match Ast.unwrap header with
-                   Ast.Default(_,_) -> true
-                 | _ -> false)
-             | _ -> false)
-           cases
-       then function x -> x
-       else function x -> ctl_or (fallpred label) x in
-      let after_pred = aftpred label in
-      let body after_branch =
-       ctl_or
-         (default_required
-            (quantify guard b2fvs
-               (make_seq
-                  [ctl_and lb
-                      (List.fold_left ctl_and CTL.True
-                         (List.map ctl_ex case_headers));
-                    List.fold_left ctl_or_fl no_header case_code])))
-         after_branch in
-      let aft =
-       (rb_fvs,Ast.get_fresh rb,Ast.get_inherited rb,
-       match Ast.unwrap rb with
-         Ast.SeqEnd(rb) -> Ast.get_mcodekind rb
-       | _ -> failwith "not possible") in
-      let (switch_header,wrapper) =
-       if !used
-       then
-         let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-         (ctl_and switch_header label_pred,
-          (function body -> quantify true [lv] body))
-       else (switch_header,function x -> x) in
-      wrapper
-       (end_control_structure b1fvs switch_header body
-          after_pred (Some(ctl_ex after_pred)) None aft after label guard)
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      let (hfvs,b1fvs,lbfvs,b2fvs,b3fvs,b4fvs,rbfvs) =
-       match
-         seq_fvs quantified
-           [Ast.get_fvs header;Ast.get_fvs lbrace;Ast.get_fvs decls;
-             Ast.get_fvs body;Ast.get_fvs rbrace]
-       with
-         [(hfvs,b1fvs);(lbfvs,b2fvs);(_,b3fvs);(_,b4fvs);(rbfvs,_)] ->
-           (hfvs,b1fvs,lbfvs,b2fvs,b3fvs,b4fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let (mhfvs,mb1fvs,mlbfvs,mb2fvs,mb3fvs,mb4fvs,mrbfvs) =
-       match
-         seq_fvs quantified
-           [Ast.get_mfvs header;Ast.get_mfvs lbrace;Ast.get_mfvs decls;
-             Ast.get_mfvs body;Ast.get_mfvs rbrace]
-       with
-         [(hfvs,b1fvs);(lbfvs,b2fvs);(_,b3fvs);(_,b4fvs);(rbfvs,_)] ->
-           (hfvs,b1fvs,lbfvs,b2fvs,b3fvs,b4fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let function_header = quantify guard hfvs (make_match header) in
-      let start_brace = quantify guard lbfvs (make_match lbrace) in
-      let stripped_rbrace =
-       match Ast.unwrap rbrace with
-         Ast.SeqEnd((data,info,_,_)) ->
-           Ast.rewrap rbrace(Ast.SeqEnd (Ast.make_mcode data))
-       | _ -> failwith "unexpected close brace" in
-      let end_brace =
-       let exit = CTL.Pred (Lib_engine.Exit,CTL.Control) in
-       let errorexit = CTL.Pred (Lib_engine.ErrorExit,CTL.Control) in
-       let fake_brace = CTL.Pred (Lib_engine.FakeBrace,CTL.Control) in
-       ctl_and
-         (quantify guard rbfvs (make_match rbrace))
-         (ctl_and
-            (* the following finds the beginning of the fake braces,
-               if there are any, not completely sure how this works.
-            sse the examples sw and return *)
-            (ctl_back_ex (ctl_not fake_brace))
-            (ctl_au (make_match stripped_rbrace) (ctl_or exit errorexit))) in
-      let new_quantified3 =
-       Common.union_set b1fvs
-         (Common.union_set b2fvs (Common.union_set b3fvs quantified)) in
-      let new_quantified4 = Common.union_set b4fvs new_quantified3 in
-      let new_mquantified3 =
-       Common.union_set mb1fvs
-         (Common.union_set mb2fvs
-            (Common.union_set mb3fvs minus_quantified)) in
-      let new_mquantified4 = Common.union_set mb4fvs new_mquantified3 in
-      let fn_nest =
-       match (Ast.undots decls,Ast.undots body,contains_modif rbrace) with
-         ([],[body],false) ->
-           (match Ast.unwrap body with
-             Ast.Nest(stmt_dots,[],multi,_,_) ->
-               if multi
-               then None (* not sure how to optimize this case *)
-               else Some (Common.Left stmt_dots)
-           | Ast.Dots(_,whencode,_,_) when
-               (List.for_all
-                  (* flow sensitive, so not optimizable *)
-                  (function Ast.WhenNotTrue(_) | Ast.WhenNotFalse(_) ->
-                     false
-                | _ -> true) whencode) ->
-               Some (Common.Right whencode)
-           | _ -> None)
-       | _ -> None in
-      let body_code =
-       match fn_nest with
-         Some (Common.Left stmt_dots) ->
-           (* special case for function header + body - header is unambiguous
-              and unique, so we can just look for the nested body anywhere
-              else in the CFG *)
-           CTL.AndAny
-             (CTL.FORWARD,guard_to_strict guard,start_brace,
-              statement_list stmt_dots
-                (* discards match on right brace, but don't need it *)
-                (Guard (make_seq_after end_brace after))
-                new_quantified4 new_mquantified4
-                None llabel slabel true guard)
-       | Some (Common.Right whencode) ->
-           (* try to be more efficient for the case where the body is just
-              ...  Perhaps this is too much of a special case, but useful
-              for dropping a parameter and checking that it is never used. *)
-           make_seq
-             [start_brace;
-               match whencode with
-                 [] -> CTL.True
-               | _ ->
-                   let leftarg =
-                     ctl_and
-                       (ctl_not
-                          (List.fold_left
-                             (function prev ->
-                               function
-                                   Ast.WhenAlways(s) -> prev
-                                 | Ast.WhenNot(sl) ->
-                                     let x =
-                                       statement_list sl Tail
-                                         new_quantified4 new_mquantified4
-                                         label llabel slabel true true in
-                                     ctl_or prev x
-                                 | Ast.WhenNotTrue(_) | Ast.WhenNotFalse(_) ->
-                                     failwith "unexpected"
-                                 | Ast.WhenModifier(Ast.WhenAny) -> CTL.False
-                                 | Ast.WhenModifier(_) -> prev)
-                             CTL.False whencode))
-                        (List.fold_left
-                          (function prev ->
-                            function
-                                Ast.WhenAlways(s) ->
-                                  let x =
-                                    statement s Tail
-                                      new_quantified4 new_mquantified4
-                                      label llabel slabel true in
-                                  ctl_and prev x
-                              | Ast.WhenNot(sl) -> prev
-                              | Ast.WhenNotTrue(_) | Ast.WhenNotFalse(_) ->
-                                  failwith "unexpected"
-                              | Ast.WhenModifier(Ast.WhenAny) -> CTL.True
-                              | Ast.WhenModifier(_) -> prev)
-                          CTL.True whencode) in
-                   ctl_au leftarg (make_match stripped_rbrace)]
-       | None ->
-           make_seq
-             [start_brace;
-               quantify guard b3fvs
-                 (statement_list decls
-                    (After
-                       (quantify guard b4fvs
-                          (statement_list body
-                             (After (make_seq_after end_brace after))
-                             new_quantified4 new_mquantified4
-                             None llabel slabel true guard)))
-                    new_quantified3 new_mquantified3 None llabel slabel
-                    false guard)] in
-      quantify guard b1fvs
-       (make_seq [function_header; quantify guard b2fvs body_code])
-  | Ast.Define(header,body) ->
-      let (hfvs,bfvs,bodyfvs) =
-       match seq_fvs quantified [Ast.get_fvs header;Ast.get_fvs body]
-       with
-         [(hfvs,b1fvs);(bodyfvs,_)] -> (hfvs,b1fvs,bodyfvs)
-       | _ -> failwith "not possible" in
-      let (mhfvs,mbfvs,mbodyfvs) =
-       match seq_fvs minus_quantified [Ast.get_mfvs header;Ast.get_mfvs body]
-       with
-         [(hfvs,b1fvs);(bodyfvs,_)] -> (hfvs,b1fvs,bodyfvs)
-       | _ -> failwith "not possible" in
-      let define_header = quantify guard hfvs (make_match header) in
-      let body_code =
-       statement_list body after
-         (Common.union_set bfvs quantified)
-         (Common.union_set mbfvs minus_quantified)
-         None llabel slabel true guard in
-      quantify guard bfvs (make_seq [define_header; body_code])
-  | Ast.OptStm(stm) ->
-      failwith "OptStm should have been compiled away\n"
-  | Ast.UniqueStm(stm) -> failwith "arities not yet supported"
-  | _ -> failwith "not supported" in
-  if guard or !dots_done
-  then term
-  else
-    do_between_dots stmt term after quantified minus_quantified
-      label llabel slabel guard
-
-(* term is the translation of stmt *)
-and do_between_dots stmt term after quantified minus_quantified
-    label llabel slabel guard =
-    match Ast.get_dots_bef_aft stmt with
-      Ast.AddingBetweenDots (brace_term,n)
-    | Ast.DroppingBetweenDots (brace_term,n) ->
-       let match_brace =
-         statement brace_term after quantified minus_quantified
-           label llabel slabel guard in
-       let v = Printf.sprintf "_r_%d" n in
-       let case1 = ctl_and CTL.NONSTRICT (CTL.Ref v) match_brace in
-       let case2 = ctl_and CTL.NONSTRICT (ctl_not (CTL.Ref v)) term in
-       CTL.Let
-         (v,ctl_or
-            (ctl_back_ex (ctl_or (truepred label) (inlooppred label)))
-            (ctl_back_ex (ctl_back_ex (falsepred label))),
-          ctl_or case1 case2)   
-    | Ast.NoDots -> term
-
-(* un_process_bef_aft is because we don't want to do transformation in this
-  code, and thus don't case about braces before or after it *)
-and process_bef_aft quantified minus_quantified label llabel slabel guard =
-  function
-    Ast.WParen (re,n) ->
-      let paren_pred = CTL.Pred (Lib_engine.Paren n,CTL.Control) in
-      let s = guard_to_strict guard in
-      quantify true (get_unquantified quantified [n])
-       (ctl_and s (make_raw_match None guard re) paren_pred)
-  | Ast.Other s ->
-      statement s Tail quantified minus_quantified label llabel slabel guard
-  | Ast.Other_dots d ->
-      statement_list d Tail quantified minus_quantified
-       label llabel slabel true guard
-
-(* --------------------------------------------------------------------- *)
-(* cleanup: convert AX to EX for pdots.
-Concretely: AX(A[...] & E[...]) becomes AX(A[...]) & EX(E[...])
-This is what we wanted in the first place, but it wasn't possible to make
-because the AX and its argument are not created in the same place.
-Rather clunky... *)
-(* also cleanup XX, which is a marker for the case where the programmer
-specifies to change the quantifier on .... Assumed to only occur after one AX
-or EX, or at top level. *)
-
-let rec cleanup c =
-  let c = match c with CTL.XX(c) -> c | _ -> c in
-  match c with
-    CTL.False    -> CTL.False
-  | CTL.True     -> CTL.True
-  | CTL.Pred(p)  -> CTL.Pred(p)
-  | CTL.Not(phi) -> CTL.Not(cleanup phi)
-  | CTL.Exists(keep,v,phi) -> CTL.Exists(keep,v,cleanup phi)
-  | CTL.AndAny(dir,s,phi1,phi2) ->
-      CTL.AndAny(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.HackForStmt(dir,s,phi1,phi2) ->
-      CTL.HackForStmt(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.And(s,phi1,phi2)   -> CTL.And(s,cleanup phi1,cleanup phi2)
-  | CTL.Or(phi1,phi2)      -> CTL.Or(cleanup phi1,cleanup phi2)
-  | CTL.SeqOr(phi1,phi2)   -> CTL.SeqOr(cleanup phi1,cleanup phi2)
-  | CTL.Implies(phi1,phi2) -> CTL.Implies(cleanup phi1,cleanup phi2)
-  | CTL.AF(dir,s,phi1) -> CTL.AF(dir,s,cleanup phi1)
-  | CTL.AX(CTL.FORWARD,s,
-          CTL.Let(v1,e1,
-                  CTL.And(CTL.NONSTRICT,CTL.AU(CTL.FORWARD,s2,e2,e3),
-                          CTL.EU(CTL.FORWARD,e4,e5)))) ->
-    CTL.Let(v1,e1,
-           CTL.And(CTL.NONSTRICT,
-                   CTL.AX(CTL.FORWARD,s,CTL.AU(CTL.FORWARD,s2,e2,e3)),
-                   CTL.EX(CTL.FORWARD,CTL.EU(CTL.FORWARD,e4,e5))))
-  | CTL.AX(dir,s,CTL.XX(phi)) -> CTL.EX(dir,cleanup phi)
-  | CTL.EX(dir,CTL.XX((CTL.AU(_,s,_,_)) as phi)) ->
-      CTL.AX(dir,s,cleanup phi)
-  | CTL.XX(phi)               -> failwith "bad XX"
-  | CTL.AX(dir,s,phi1) -> CTL.AX(dir,s,cleanup phi1)
-  | CTL.AG(dir,s,phi1) -> CTL.AG(dir,s,cleanup phi1)
-  | CTL.EF(dir,phi1)   -> CTL.EF(dir,cleanup phi1)
-  | CTL.EX(dir,phi1)   -> CTL.EX(dir,cleanup phi1)
-  | CTL.EG(dir,phi1)   -> CTL.EG(dir,cleanup phi1)
-  | CTL.AW(dir,s,phi1,phi2) -> CTL.AW(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.AU(dir,s,phi1,phi2) -> CTL.AU(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.EU(dir,phi1,phi2)   -> CTL.EU(dir,cleanup phi1,cleanup phi2)
-  | CTL.Let (x,phi1,phi2)   -> CTL.Let (x,cleanup phi1,cleanup phi2)
-  | CTL.LetR (dir,x,phi1,phi2) -> CTL.LetR (dir,x,cleanup phi1,cleanup phi2)
-  | CTL.Ref(s) -> CTL.Ref(s)
-  | CTL.Uncheck(phi1)  -> CTL.Uncheck(cleanup phi1)
-  | CTL.InnerAnd(phi1) -> CTL.InnerAnd(cleanup phi1)
-
-(* --------------------------------------------------------------------- *)
-(* Function declaration *)
-
-let top_level name (ua,pos) t =
-  let ua = List.filter (function (nm,_) -> nm = name) ua in
-  used_after := ua;
-  saved := Ast.get_saved t;
-  let quantified = Common.minus_set ua pos in
-  quantify false quantified
-    (match Ast.unwrap t with
-      Ast.FILEINFO(old_file,new_file) -> failwith "not supported fileinfo"
-    | Ast.DECL(stmt) ->
-       let unopt = elim_opt.V.rebuilder_statement stmt in
-       let unopt = preprocess_dots_e unopt in
-       cleanup(statement unopt VeryEnd quantified [] None None None false)
-    | Ast.CODE(stmt_dots) ->
-       let unopt = elim_opt.V.rebuilder_statement_dots stmt_dots in
-       let unopt = preprocess_dots unopt in
-       let starts_with_dots =
-         match Ast.undots stmt_dots with
-           d::ds ->
-             (match Ast.unwrap d with
-               Ast.Dots(_,_,_,_) | Ast.Circles(_,_,_,_)
-             | Ast.Stars(_,_,_,_) -> true
-             | _ -> false)
-         | _ -> false in
-       let starts_with_brace =
-         match Ast.undots stmt_dots with
-           d::ds ->
-             (match Ast.unwrap d with
-               Ast.Seq(_) -> true
-             | _ -> false)
-         | _ -> false in
-       let res =
-         statement_list unopt VeryEnd quantified [] None None None
-           false false in
-       cleanup
-         (if starts_with_dots
-         then
-         (* EX because there is a loop on enter/top *)
-           ctl_and CTL.NONSTRICT (toppred None) (ctl_ex res)
-         else if starts_with_brace
-         then
-            ctl_and CTL.NONSTRICT
-             (ctl_not(CTL.EX(CTL.BACKWARD,(funpred None)))) res
-         else res)
-    | Ast.ERRORWORDS(exps) -> failwith "not supported errorwords")
-
-(* --------------------------------------------------------------------- *)
-(* Entry points *)
-
-let asttoctlz (name,(_,_,exists_flag),l) used_after positions =
-  letctr := 0;
-  labelctr := 0;
-  (match exists_flag with
-    Ast.Exists -> exists := Exists
-  | Ast.Forall -> exists := Forall
-  | Ast.ReverseForall -> exists := ReverseForall
-  | Ast.Undetermined ->
-      exists := if !Flag.sgrep_mode2 then Exists else Forall);
-
-  let (l,used_after) =
-    List.split
-      (List.filter
-        (function (t,_) ->
-          match Ast.unwrap t with Ast.ERRORWORDS(exps) -> false | _ -> true)
-        (List.combine l (List.combine used_after positions))) in
-  let res = List.map2 (top_level name) used_after l in
-  exists := Forall;
-  res
-
-let asttoctl r used_after positions =
-  match r with
-    Ast.ScriptRule _ -> []
-  | Ast.CocciRule (a,b,c,_) -> asttoctlz (a,b,c) used_after positions
-
-let pp_cocci_predicate (pred,modif) =
-  Pretty_print_engine.pp_predicate pred
-
-let cocci_predicate_to_string (pred,modif) =
-  Pretty_print_engine.predicate_to_string pred
diff --git a/engine/.#asttoctl2.ml.1.145 b/engine/.#asttoctl2.ml.1.145
deleted file mode 100644 (file)
index 6b2a340..0000000
+++ /dev/null
@@ -1,2311 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* for MINUS and CONTEXT, pos is always None in this file *)
-(*search for require*)
-(* true = don't see all matched nodes, only modified ones *)
-let onlyModif = ref true(*false*)
-
-type ex = Exists | Forall | ReverseForall
-let exists = ref Forall
-
-module Ast = Ast_cocci
-module V = Visitor_ast
-module CTL = Ast_ctl
-
-let warning s = Printf.fprintf stderr "warning: %s\n" s
-
-type cocci_predicate = Lib_engine.predicate * Ast.meta_name Ast_ctl.modif
-type formula =
-    (cocci_predicate,Ast.meta_name, Wrapper_ctl.info) Ast_ctl.generic_ctl
-
-let union = Common.union_set
-let intersect l1 l2 = List.filter (function x -> List.mem x l2) l1
-let subset l1 l2 = List.for_all (function x -> List.mem x l2) l1
-
-let foldl1 f xs = List.fold_left f (List.hd xs) (List.tl xs)
-let foldr1 f xs =
-  let xs = List.rev xs in List.fold_left f (List.hd xs) (List.tl xs)
-
-let used_after = ref ([] : Ast.meta_name list)
-let guard_to_strict guard = if guard then CTL.NONSTRICT else CTL.STRICT
-
-let saved = ref ([] : Ast.meta_name list)
-
-let string2var x = ("",x)
-
-(* --------------------------------------------------------------------- *)
-(* predicates matching various nodes in the graph *)
-
-let ctl_and s x y    =
-  match (x,y) with
-    (CTL.False,_) | (_,CTL.False) -> CTL.False
-  | (CTL.True,a) | (a,CTL.True) -> a
-  | _ -> CTL.And(s,x,y)
-
-let ctl_or x y     =
-  match (x,y) with
-    (CTL.True,_) | (_,CTL.True) -> CTL.True
-  | (CTL.False,a) | (a,CTL.False) -> a
-  | _ -> CTL.Or(x,y)
-
-let ctl_or_fl x y     =
-  match (x,y) with
-    (CTL.True,_) | (_,CTL.True) -> CTL.True
-  | (CTL.False,a) | (a,CTL.False) -> a
-  | _ -> CTL.Or(y,x)
-
-let ctl_seqor x y     =
-  match (x,y) with
-    (CTL.True,_) | (_,CTL.True) -> CTL.True
-  | (CTL.False,a) | (a,CTL.False) -> a
-  | _ -> CTL.SeqOr(x,y)
-
-let ctl_not = function
-    CTL.True -> CTL.False
-  | CTL.False -> CTL.True
-  | x -> CTL.Not(x)
-
-let ctl_ax s = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x ->
-      match !exists with
-       Exists -> CTL.EX(CTL.FORWARD,x)
-      |        Forall -> CTL.AX(CTL.FORWARD,s,x)
-      |        ReverseForall -> failwith "not supported"
-
-let ctl_ax_absolute s = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.AX(CTL.FORWARD,s,x)
-
-let ctl_ex = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.EX(CTL.FORWARD,x)
-
-(* This stays being AX even for sgrep_mode, because it is used to identify
-the structure of the term, not matching the pattern. *)
-let ctl_back_ax = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.AX(CTL.BACKWARD,CTL.NONSTRICT,x)
-
-let ctl_back_ex = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.EX(CTL.BACKWARD,x)
-
-let ctl_ef = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.EF(CTL.FORWARD,x)
-
-let ctl_ag s = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.AG(CTL.FORWARD,s,x)
-
-let ctl_au s x y =
-  match (x,!exists) with
-    (CTL.True,Exists) -> CTL.EF(CTL.FORWARD,y)
-  | (CTL.True,Forall) -> CTL.AF(CTL.FORWARD,s,y)
-  | (CTL.True,ReverseForall) -> failwith "not supported"
-  | (_,Exists) -> CTL.EU(CTL.FORWARD,x,y)
-  | (_,Forall) -> CTL.AU(CTL.FORWARD,s,x,y)
-  | (_,ReverseForall) -> failwith "not supported"
-
-let ctl_anti_au s x y = (* only for ..., where the quantifier is changed *)
-  CTL.XX
-    (match (x,!exists) with
-      (CTL.True,Exists) -> CTL.AF(CTL.FORWARD,s,y)
-    | (CTL.True,Forall) -> CTL.EF(CTL.FORWARD,y)
-    | (CTL.True,ReverseForall) -> failwith "not supported"
-    | (_,Exists) -> CTL.AU(CTL.FORWARD,s,x,y)
-    | (_,Forall) -> CTL.EU(CTL.FORWARD,x,y)
-    | (_,ReverseForall) -> failwith "not supported")
-
-let ctl_uncheck = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.Uncheck x
-
-let label_pred_maker = function
-    None -> CTL.True
-  | Some (label_var,used) ->
-      used := true;
-      CTL.Pred(Lib_engine.PrefixLabel(label_var),CTL.Control)
-
-let bclabel_pred_maker = function
-    None -> CTL.True
-  | Some (label_var,used) ->
-      used := true;
-      CTL.Pred(Lib_engine.BCLabel(label_var),CTL.Control)
-
-let predmaker guard pred label =
-  ctl_and (guard_to_strict guard) (CTL.Pred pred) (label_pred_maker label)
-
-let aftpred     = predmaker false (Lib_engine.After,       CTL.Control)
-let retpred     = predmaker false (Lib_engine.Return,      CTL.Control)
-let funpred     = predmaker false (Lib_engine.FunHeader,   CTL.Control)
-let toppred     = predmaker false (Lib_engine.Top,         CTL.Control)
-let exitpred    = predmaker false (Lib_engine.ErrorExit,   CTL.Control)
-let endpred     = predmaker false (Lib_engine.Exit,        CTL.Control)
-let gotopred    = predmaker false (Lib_engine.Goto,        CTL.Control)
-let inlooppred  = predmaker false (Lib_engine.InLoop,      CTL.Control)
-let truepred    = predmaker false (Lib_engine.TrueBranch,  CTL.Control)
-let falsepred   = predmaker false (Lib_engine.FalseBranch, CTL.Control)
-let fallpred    = predmaker false (Lib_engine.FallThrough, CTL.Control)
-
-let aftret label_var f = ctl_or (aftpred label_var) (exitpred label_var)
-
-let letctr = ref 0
-let get_let_ctr _ =
-  let cur = !letctr in
-  letctr := cur + 1;
-  Printf.sprintf "r%d" cur
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Eliminate OptStm *)
-
-(* for optional thing with nothing after, should check that the optional thing
-never occurs.  otherwise the matching stops before it occurs *)
-let elim_opt =
-  let mcode x = x in
-  let donothing r k e = k e in
-
-  let fvlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_fvs l) in
-
-  let mfvlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_mfvs l) in
-
-  let freshlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_fresh l) in
-
-  let inheritedlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_inherited l) in
-
-  let savedlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_saved l) in
-
-  let varlists l =
-    (fvlist l, mfvlist l, freshlist l, inheritedlist l, savedlist l) in
-
-  let rec dots_list unwrapped wrapped =
-    match (unwrapped,wrapped) with
-      ([],_) -> []
-
-    | (Ast.Dots(_,_,_,_)::Ast.OptStm(stm)::(Ast.Dots(_,_,_,_) as u)::urest,
-       d0::s::d1::rest)
-    | (Ast.Nest(_,_,_,_,_)::Ast.OptStm(stm)::(Ast.Dots(_,_,_,_) as u)::urest,
-       d0::s::d1::rest) ->
-        let l = Ast.get_line stm in
-        let new_rest1 = stm :: (dots_list (u::urest) (d1::rest)) in
-        let new_rest2 = dots_list urest rest in
-        let (fv_rest1,mfv_rest1,fresh_rest1,inherited_rest1,s1) =
-          varlists new_rest1 in
-        let (fv_rest2,mfv_rest2,fresh_rest2,inherited_rest2,s2) =
-          varlists new_rest2 in
-        [d0;
-          {(Ast.make_term
-              (Ast.Disj
-                 [{(Ast.make_term(Ast.DOTS(new_rest1))) with
-                    Ast.node_line = l;
-                    Ast.free_vars = fv_rest1;
-                    Ast.minus_free_vars = mfv_rest1;
-                    Ast.fresh_vars = fresh_rest1;
-                    Ast.inherited = inherited_rest1;
-                    Ast.saved_witness = s1};
-                   {(Ast.make_term(Ast.DOTS(new_rest2))) with
-                     Ast.node_line = l;
-                     Ast.free_vars = fv_rest2;
-                     Ast.minus_free_vars = mfv_rest2;
-                     Ast.fresh_vars = fresh_rest2;
-                     Ast.inherited = inherited_rest2;
-                     Ast.saved_witness = s2}])) with
-            Ast.node_line = l;
-            Ast.free_vars = fv_rest1;
-            Ast.minus_free_vars = mfv_rest1;
-            Ast.fresh_vars = fresh_rest1;
-            Ast.inherited = inherited_rest1;
-            Ast.saved_witness = s1}]
-
-    | (Ast.OptStm(stm)::urest,_::rest) ->
-        let l = Ast.get_line stm in
-        let new_rest1 = dots_list urest rest in
-        let new_rest2 = stm::new_rest1 in
-        let (fv_rest1,mfv_rest1,fresh_rest1,inherited_rest1,s1) =
-          varlists new_rest1 in
-        let (fv_rest2,mfv_rest2,fresh_rest2,inherited_rest2,s2) =
-          varlists new_rest2 in
-        [{(Ast.make_term
-              (Ast.Disj
-                 [{(Ast.make_term(Ast.DOTS(new_rest2))) with
-                     Ast.node_line = l;
-                     Ast.free_vars = fv_rest2;
-                     Ast.minus_free_vars = mfv_rest2;
-                     Ast.fresh_vars = fresh_rest2;
-                     Ast.inherited = inherited_rest2;
-                     Ast.saved_witness = s2};
-                   {(Ast.make_term(Ast.DOTS(new_rest1))) with
-                    Ast.node_line = l;
-                    Ast.free_vars = fv_rest1;
-                    Ast.minus_free_vars = mfv_rest1;
-                    Ast.fresh_vars = fresh_rest1;
-                    Ast.inherited = inherited_rest1;
-                    Ast.saved_witness = s1}])) with
-            Ast.node_line = l;
-            Ast.free_vars = fv_rest2;
-            Ast.minus_free_vars = mfv_rest2;
-            Ast.fresh_vars = fresh_rest2;
-            Ast.inherited = inherited_rest2;
-            Ast.saved_witness = s2}]
-
-    | ([Ast.Dots(_,_,_,_);Ast.OptStm(stm)],[d1;_]) ->
-       let l = Ast.get_line stm in
-       let fv_stm = Ast.get_fvs stm in
-       let mfv_stm = Ast.get_mfvs stm in
-       let fresh_stm = Ast.get_fresh stm in
-       let inh_stm = Ast.get_inherited stm in
-       let saved_stm = Ast.get_saved stm in
-       let fv_d1 = Ast.get_fvs d1 in
-       let mfv_d1 = Ast.get_mfvs d1 in
-       let fresh_d1 = Ast.get_fresh d1 in
-       let inh_d1 = Ast.get_inherited d1 in
-       let saved_d1 = Ast.get_saved d1 in
-       let fv_both = Common.union_set fv_stm fv_d1 in
-       let mfv_both = Common.union_set mfv_stm mfv_d1 in
-       let fresh_both = Common.union_set fresh_stm fresh_d1 in
-       let inh_both = Common.union_set inh_stm inh_d1 in
-       let saved_both = Common.union_set saved_stm saved_d1 in
-       [d1;
-         {(Ast.make_term
-             (Ast.Disj
-                [{(Ast.make_term(Ast.DOTS([stm]))) with
-                   Ast.node_line = l;
-                   Ast.free_vars = fv_stm;
-                   Ast.minus_free_vars = mfv_stm;
-                   Ast.fresh_vars = fresh_stm;
-                   Ast.inherited = inh_stm;
-                   Ast.saved_witness = saved_stm};
-                  {(Ast.make_term(Ast.DOTS([d1]))) with
-                    Ast.node_line = l;
-                    Ast.free_vars = fv_d1;
-                    Ast.minus_free_vars = mfv_d1;
-                    Ast.fresh_vars = fresh_d1;
-                    Ast.inherited = inh_d1;
-                    Ast.saved_witness = saved_d1}])) with
-            Ast.node_line = l;
-            Ast.free_vars = fv_both;
-            Ast.minus_free_vars = mfv_both;
-            Ast.fresh_vars = fresh_both;
-            Ast.inherited = inh_both;
-            Ast.saved_witness = saved_both}]
-
-    | ([Ast.Nest(_,_,_,_,_);Ast.OptStm(stm)],[d1;_]) ->
-       let l = Ast.get_line stm in
-       let rw = Ast.rewrap stm in
-       let rwd = Ast.rewrap stm in
-       let dots = Ast.Dots(Ast.make_mcode "...",[],[],[]) in
-       [d1;rw(Ast.Disj
-                [rwd(Ast.DOTS([stm]));
-                  {(Ast.make_term(Ast.DOTS([rw dots])))
-                  with Ast.node_line = l}])]
-
-    | (_::urest,stm::rest) -> stm :: (dots_list urest rest)
-    | _ -> failwith "not possible" in
-
-  let stmtdotsfn r k d =
-    let d = k d in
-    Ast.rewrap d
-      (match Ast.unwrap d with
-       Ast.DOTS(l) -> Ast.DOTS(dots_list (List.map Ast.unwrap l) l)
-      | Ast.CIRCLES(l) -> failwith "elimopt: not supported"
-      | Ast.STARS(l) -> failwith "elimopt: not supported") in
-  
-  V.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing stmtdotsfn donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing
-
-(* --------------------------------------------------------------------- *)
-(* after management *)
-(* We need Guard for the following case:
-<...
- a
- <...
-  b
- ...>
-...>
-foo();
-
-Here the inner <... b ...> should not go past foo.  But foo is not the
-"after" of the body of the outer nest, because we don't want to search for
-it in the case where the body of the outer nest ends in something other
-than dots or a nest. *)
-
-(* what is the difference between tail and end??? *)
-
-type after = After of formula | Guard of formula | Tail | End | VeryEnd
-
-let a2n = function After x -> Guard x | a -> a
-
-let print_ctl x =
-  let pp_pred (x,_) = Pretty_print_engine.pp_predicate x in
-  let pp_meta (_,x) = Common.pp x in
-  Pretty_print_ctl.pp_ctl (pp_pred,pp_meta) false x;
-  Format.print_newline()
-
-let print_after = function
-    After ctl -> Printf.printf "After:\n"; print_ctl ctl
-  | Guard ctl -> Printf.printf "Guard:\n"; print_ctl ctl
-  | Tail -> Printf.printf "Tail\n"
-  | VeryEnd -> Printf.printf "Very End\n"
-  | End -> Printf.printf "End\n"
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-let fresh_var _ = string2var "_v"
-let fresh_pos _ = string2var "_pos" (* must be a constant *)
-
-let fresh_metavar _ = "_S"
-
-(* fvinfo is going to end up being from the whole associated statement.
-   it would be better if it were just the free variables in d, but free_vars.ml
-   doesn't keep track of free variables on + code *)
-let make_meta_rule_elem d fvinfo =
-  let nm = fresh_metavar() in
-  Ast.make_meta_rule_elem nm d fvinfo
-
-let get_unquantified quantified vars =
-  List.filter (function x -> not (List.mem x quantified)) vars
-
-let make_seq guard l =
-  let s = guard_to_strict guard in
-  foldr1 (function rest -> function cur -> ctl_and s cur (ctl_ax s rest)) l
-
-let make_seq_after2 guard first rest =
-  let s = guard_to_strict guard in
-  match rest with
-    After rest -> ctl_and s first (ctl_ax s (ctl_ax s rest))
-  | _ -> first
-
-let make_seq_after guard first rest =
-  match rest with
-    After rest -> make_seq guard [first;rest]
-  | _ -> first
-
-let opt_and guard first rest =
-  let s = guard_to_strict guard in
-  match first with
-    None -> rest
-  | Some first -> ctl_and s first rest
-
-let and_after guard first rest =
-  let s = guard_to_strict guard in
-  match rest with After rest -> ctl_and s first rest | _ -> first
-
-let contains_modif =
-  let bind x y = x or y in
-  let option_default = false in
-  let mcode r (_,_,kind,_) =
-    match kind with
-      Ast.MINUS(_,_) -> true
-    | Ast.PLUS -> failwith "not possible"
-    | Ast.CONTEXT(_,info) -> not (info = Ast.NOTHING) in
-  let do_nothing r k e = k e in
-  let rule_elem r k re =
-    let res = k re in
-    match Ast.unwrap re with
-      Ast.FunHeader(bef,_,fninfo,name,lp,params,rp) ->
-       bind (mcode r ((),(),bef,Ast.NoMetaPos)) res
-    | Ast.Decl(bef,_,decl) -> bind (mcode r ((),(),bef,Ast.NoMetaPos)) res
-    | _ -> res in
-  let recursor =
-    V.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      do_nothing do_nothing do_nothing do_nothing
-      do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-      do_nothing rule_elem do_nothing do_nothing do_nothing do_nothing in
-  recursor.V.combiner_rule_elem
-
-(* code is not a DisjRuleElem *)
-let make_match label guard code =
-  let v = fresh_var() in
-  let matcher = Lib_engine.Match(code) in
-  if contains_modif code && not guard
-  then CTL.Exists(true,v,predmaker guard (matcher,CTL.Modif v) label)
-  else
-    let iso_info = !Flag.track_iso_usage && not (Ast.get_isos code = []) in
-    (match (iso_info,!onlyModif,guard,
-           intersect !used_after (Ast.get_fvs code)) with
-      (false,true,_,[]) | (_,_,true,_) ->
-       predmaker guard (matcher,CTL.Control) label
-    | _ -> CTL.Exists(true,v,predmaker guard (matcher,CTL.UnModif v) label))
-
-let make_raw_match label guard code =
-  predmaker guard (Lib_engine.Match(code),CTL.Control) label
-    
-let rec seq_fvs quantified = function
-    [] -> []
-  | fv1::fvs ->
-      let t1fvs = get_unquantified quantified fv1 in
-      let termfvs =
-       List.fold_left Common.union_set []
-         (List.map (get_unquantified quantified) fvs) in
-      let bothfvs = Common.inter_set t1fvs termfvs in
-      let t1onlyfvs = Common.minus_set t1fvs bothfvs in
-      let new_quantified = Common.union_set bothfvs quantified in
-      (t1onlyfvs,bothfvs)::(seq_fvs new_quantified fvs)
-
-let quantify guard =
-  List.fold_right
-    (function cur ->
-      function code -> CTL.Exists (not guard && List.mem cur !saved,cur,code))
-
-let non_saved_quantify =
-  List.fold_right
-    (function cur -> function code -> CTL.Exists (false,cur,code))
-
-let intersectll lst nested_list =
-  List.filter (function x -> List.exists (List.mem x) nested_list) lst
-
-(* --------------------------------------------------------------------- *)
-(* Count depth of braces.  The translation of a closed brace appears deeply
-nested within the translation of the sequence term, so the name of the
-paren var has to take into account the names of the nested braces.  On the
-other hand the close brace does not escape, so we don't have to take into
-account other paren variable names. *)
-
-(* called repetitively, which is inefficient, but less trouble than adding a
-new field to Seq and FunDecl *)
-let count_nested_braces s =
-  let bind x y = max x y in
-  let option_default = 0 in
-  let stmt_count r k s =
-    match Ast.unwrap s with
-      Ast.Seq(_,_,_,_) | Ast.FunDecl(_,_,_,_,_) -> (k s) + 1
-    | _ -> k s in
-  let donothing r k e = k e in
-  let mcode r x = 0 in
-  let recursor = V.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing stmt_count donothing donothing donothing in
-  let res = string_of_int (recursor.V.combiner_statement s) in
-  string2var ("p"^res)
-
-let labelctr = ref 0
-let get_label_ctr _ =
-  let cur = !labelctr in
-  labelctr := cur + 1;
-  string2var (Printf.sprintf "l%d" cur)
-
-(* --------------------------------------------------------------------- *)
-(* annotate dots with before and after neighbors *)
-
-let print_bef_aft = function
-    Ast.WParen (re,n) ->
-      Printf.printf "bef/aft\n";
-      Pretty_print_cocci.rule_elem "" re;
-      Format.print_newline()
-  | Ast.Other s ->
-      Printf.printf "bef/aft\n";
-      Pretty_print_cocci.statement "" s;
-      Format.print_newline()
-  | Ast.Other_dots d ->
-      Printf.printf "bef/aft\n";
-      Pretty_print_cocci.statement_dots d;
-      Format.print_newline()
-
-(* [] can only occur if we are in a disj, where it comes from a ?  In that
-case, we want to use a, which accumulates all of the previous patterns in
-their entirety. *)
-let rec get_before_elem sl a =
-  match Ast.unwrap sl with
-    Ast.DOTS(x) ->
-      let rec loop sl a =
-       match sl with
-         [] -> ([],Common.Right a)
-       | [e] ->
-           let (e,ea) = get_before_e e a in
-           ([e],Common.Left ea)
-       | e::sl ->
-           let (e,ea) = get_before_e e a in
-           let (sl,sla) = loop sl ea in
-           (e::sl,sla) in
-      let (l,a) = loop x a in
-      (Ast.rewrap sl (Ast.DOTS(l)),a)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-and get_before sl a =
-  match get_before_elem sl a with
-    (term,Common.Left x) -> (term,x)
-  | (term,Common.Right x) -> (term,x)
-
-and get_before_whencode wc =
-  List.map
-    (function
-       Ast.WhenNot w -> let (w,_) = get_before w [] in Ast.WhenNot w
-      | Ast.WhenAlways w -> let (w,_) = get_before_e w [] in Ast.WhenAlways w
-      |        Ast.WhenModifier(x) -> Ast.WhenModifier(x)
-      | Ast.WhenNotTrue w -> Ast.WhenNotTrue w
-      | Ast.WhenNotFalse w -> Ast.WhenNotFalse w)
-    wc
-
-and get_before_e s a =
-  match Ast.unwrap s with
-    Ast.Dots(d,w,_,aft) ->
-      (Ast.rewrap s (Ast.Dots(d,get_before_whencode w,a,aft)),a)
-  | Ast.Nest(stmt_dots,w,multi,_,aft) ->
-      let w = get_before_whencode w in
-      let (sd,_) = get_before stmt_dots a in
-      let a =
-       List.filter
-         (function
-             Ast.Other a ->
-               let unifies =
-                 Unify_ast.unify_statement_dots
-                   (Ast.rewrap s (Ast.DOTS([a]))) stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | Ast.Other_dots a ->
-               let unifies = Unify_ast.unify_statement_dots a stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | _ -> true)
-         a in
-      (Ast.rewrap s (Ast.Nest(sd,w,multi,a,aft)),[Ast.Other_dots stmt_dots])
-  | Ast.Disj(stmt_dots_list) ->
-      let (dsl,dsla) =
-       List.split (List.map (function e -> get_before e a) stmt_dots_list) in
-      (Ast.rewrap s (Ast.Disj(dsl)),List.fold_left Common.union_set [] dsla)
-  | Ast.Atomic(ast) ->
-      (match Ast.unwrap ast with
-       Ast.MetaStmt(_,_,_,_) -> (s,[])
-      |        _ -> (s,[Ast.Other s]))
-  | Ast.Seq(lbrace,decls,body,rbrace) ->
-      let index = count_nested_braces s in
-      let (de,dea) = get_before decls [Ast.WParen(lbrace,index)] in
-      let (bd,_) = get_before body dea in
-      (Ast.rewrap s (Ast.Seq(lbrace,de,bd,rbrace)),
-       [Ast.WParen(rbrace,index)])
-  | Ast.Define(header,body) ->
-      let (body,_) = get_before body [] in
-      (Ast.rewrap s (Ast.Define(header,body)), [Ast.Other s])
-  | Ast.IfThen(ifheader,branch,aft) ->
-      let (br,_) = get_before_e branch [] in
-      (Ast.rewrap s (Ast.IfThen(ifheader,br,aft)), [Ast.Other s])
-  | Ast.IfThenElse(ifheader,branch1,els,branch2,aft) ->
-      let (br1,_) = get_before_e branch1 [] in
-      let (br2,_) = get_before_e branch2 [] in
-      (Ast.rewrap s (Ast.IfThenElse(ifheader,br1,els,br2,aft)),[Ast.Other s])
-  | Ast.While(header,body,aft) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.While(header,bd,aft)),[Ast.Other s])
-  | Ast.For(header,body,aft) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.For(header,bd,aft)),[Ast.Other s])
-  | Ast.Do(header,body,tail) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.Do(header,bd,tail)),[Ast.Other s])
-  | Ast.Iterator(header,body,aft) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.Iterator(header,bd,aft)),[Ast.Other s])
-  | Ast.Switch(header,lb,cases,rb) ->
-      let cases =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-               let (body,_) = get_before body [] in
-               Ast.rewrap case_line (Ast.CaseLine(header,body))
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      (Ast.rewrap s (Ast.Switch(header,lb,cases,rb)),[Ast.Other s])
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      let (de,dea) = get_before decls [] in
-      let (bd,_) = get_before body dea in
-      (Ast.rewrap s (Ast.FunDecl(header,lbrace,de,bd,rbrace)),[])
-  | _ -> failwith "get_before_e: not supported"
-
-let rec get_after sl a =
-  match Ast.unwrap sl with
-    Ast.DOTS(x) ->
-      let rec loop sl =
-       match sl with
-         [] -> ([],a)
-       | e::sl ->
-           let (sl,sla) = loop sl in
-           let (e,ea) = get_after_e e sla in
-           (e::sl,ea) in
-      let (l,a) = loop x in
-      (Ast.rewrap sl (Ast.DOTS(l)),a)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-and get_after_whencode a wc =
-  List.map
-    (function
-       Ast.WhenNot w -> let (w,_) = get_after w a (*?*) in Ast.WhenNot w
-      | Ast.WhenAlways w -> let (w,_) = get_after_e w a in Ast.WhenAlways w
-      |        Ast.WhenModifier(x) -> Ast.WhenModifier(x)
-      | Ast.WhenNotTrue w -> Ast.WhenNotTrue w
-      | Ast.WhenNotFalse w -> Ast.WhenNotFalse w)
-    wc
-
-and get_after_e s a =
-  match Ast.unwrap s with
-    Ast.Dots(d,w,bef,_) ->
-      (Ast.rewrap s (Ast.Dots(d,get_after_whencode a w,bef,a)),a)
-  | Ast.Nest(stmt_dots,w,multi,bef,_) ->
-      let w = get_after_whencode a w in
-      let (sd,_) = get_after stmt_dots a in
-      let a =
-       List.filter
-         (function
-             Ast.Other a ->
-               let unifies =
-                 Unify_ast.unify_statement_dots
-                   (Ast.rewrap s (Ast.DOTS([a]))) stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | Ast.Other_dots a ->
-               let unifies = Unify_ast.unify_statement_dots a stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | _ -> true)
-         a in
-      (Ast.rewrap s (Ast.Nest(sd,w,multi,bef,a)),[Ast.Other_dots stmt_dots])
-  | Ast.Disj(stmt_dots_list) ->
-      let (dsl,dsla) =
-       List.split (List.map (function e -> get_after e a) stmt_dots_list) in
-      (Ast.rewrap s (Ast.Disj(dsl)),List.fold_left Common.union_set [] dsla)
-  | Ast.Atomic(ast) ->
-      (match Ast.unwrap ast with
-       Ast.MetaStmt(nm,keep,Ast.SequencibleAfterDots _,i) ->
-         (* check "after" information for metavar optimization *)
-         (* if the error is not desired, could just return [], then
-            the optimization (check for EF) won't take place *)
-         List.iter
-           (function
-               Ast.Other x ->
-                 (match Ast.unwrap x with
-                   Ast.Dots(_,_,_,_) | Ast.Nest(_,_,_,_,_) ->
-                     failwith
-                       "dots/nest not allowed before and after stmt metavar"
-                 | _ -> ())
-             | Ast.Other_dots x ->
-                 (match Ast.undots x with
-                   x::_ ->
-                     (match Ast.unwrap x with
-                       Ast.Dots(_,_,_,_) | Ast.Nest(_,_,_,_,_) ->
-                         failwith
-                           ("dots/nest not allowed before and after stmt "^
-                            "metavar")
-                     | _ -> ())
-                 | _ -> ())
-             | _ -> ())
-           a;
-         (Ast.rewrap s
-            (Ast.Atomic
-               (Ast.rewrap s
-                  (Ast.MetaStmt(nm,keep,Ast.SequencibleAfterDots a,i)))),[])
-      |        Ast.MetaStmt(_,_,_,_) -> (s,[])
-      |        _ -> (s,[Ast.Other s]))
-  | Ast.Seq(lbrace,decls,body,rbrace) ->
-      let index = count_nested_braces s in
-      let (bd,bda) = get_after body [Ast.WParen(rbrace,index)] in
-      let (de,_) = get_after decls bda in
-      (Ast.rewrap s (Ast.Seq(lbrace,de,bd,rbrace)),
-       [Ast.WParen(lbrace,index)])
-  | Ast.Define(header,body) ->
-      let (body,_) = get_after body a in
-      (Ast.rewrap s (Ast.Define(header,body)), [Ast.Other s])
-  | Ast.IfThen(ifheader,branch,aft) ->
-      let (br,_) = get_after_e branch a in
-      (Ast.rewrap s (Ast.IfThen(ifheader,br,aft)),[Ast.Other s])
-  | Ast.IfThenElse(ifheader,branch1,els,branch2,aft) ->
-      let (br1,_) = get_after_e branch1 a in
-      let (br2,_) = get_after_e branch2 a in
-      (Ast.rewrap s (Ast.IfThenElse(ifheader,br1,els,br2,aft)),[Ast.Other s])
-  | Ast.While(header,body,aft) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.While(header,bd,aft)),[Ast.Other s])
-  | Ast.For(header,body,aft) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.For(header,bd,aft)),[Ast.Other s])
-  | Ast.Do(header,body,tail) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.Do(header,bd,tail)),[Ast.Other s])
-  | Ast.Iterator(header,body,aft) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.Iterator(header,bd,aft)),[Ast.Other s])
-  | Ast.Switch(header,lb,cases,rb) ->
-      let cases =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-               let (body,_) = get_after body [] in
-               Ast.rewrap case_line (Ast.CaseLine(header,body))
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      (Ast.rewrap s (Ast.Switch(header,lb,cases,rb)),[Ast.Other s])
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      let (bd,bda) = get_after body [] in
-      let (de,_) = get_after decls bda in
-      (Ast.rewrap s (Ast.FunDecl(header,lbrace,de,bd,rbrace)),[])
-  | _ -> failwith "get_after_e: not supported"
-
-let preprocess_dots sl =
-  let (sl,_) = get_before sl [] in
-  let (sl,_) = get_after sl [] in
-  sl
-
-let preprocess_dots_e sl =
-  let (sl,_) = get_before_e sl [] in
-  let (sl,_) = get_after_e sl [] in
-  sl
-
-(* --------------------------------------------------------------------- *)
-(* various return_related things *)
-
-let rec ends_in_return stmt_list =
-  match Ast.unwrap stmt_list with
-    Ast.DOTS(x) ->
-      (match List.rev x with
-       x::_ ->
-         (match Ast.unwrap x with
-           Ast.Atomic(x) ->
-             let rec loop x =
-               match Ast.unwrap x with
-                 Ast.Return(_,_) | Ast.ReturnExpr(_,_,_) -> true
-               | Ast.DisjRuleElem((_::_) as l) -> List.for_all loop l
-               | _ -> false in
-             loop x
-         | Ast.Disj(disjs) -> List.for_all ends_in_return disjs
-         | _ -> false)
-      |        _ -> false)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-(* --------------------------------------------------------------------- *)
-(* expressions *)
-
-let exptymatch l make_match make_guard_match =
-  let pos = fresh_pos() in
-  let matches_guard_matches =
-    List.map
-      (function x ->
-       let pos = Ast.make_mcode pos in
-       (make_match (Ast.set_pos x (Some pos)),
-        make_guard_match (Ast.set_pos x (Some pos))))
-      l in
-  let (matches,guard_matches) = List.split matches_guard_matches in
-  let rec suffixes = function
-      [] -> []
-    | x::xs -> xs::(suffixes xs) in
-  let prefixes = List.rev (suffixes (List.rev guard_matches)) in
-  let info = (* not null *)
-    List.map2
-      (function matcher ->
-       function negates ->
-         CTL.Exists
-           (false,pos,
-            ctl_and CTL.NONSTRICT matcher
-              (ctl_not
-                 (ctl_uncheck (List.fold_left ctl_or_fl CTL.False negates)))))
-      matches prefixes in
-  CTL.InnerAnd(List.fold_left ctl_or_fl CTL.False (List.rev info))
-
-(* code might be a DisjRuleElem, in which case we break it apart
-   code might contain an Exp or Ty
-   this one pushes the quantifier inwards *)
-let do_re_matches label guard res quantified minus_quantified =
-  let make_guard_match x =
-    let stmt_fvs = Ast.get_mfvs x in
-    let fvs = get_unquantified minus_quantified stmt_fvs in
-    non_saved_quantify fvs (make_match None true x) in
-  let make_match x =
-    let stmt_fvs = Ast.get_fvs x in
-    let fvs = get_unquantified quantified stmt_fvs in
-    quantify guard fvs (make_match None guard x) in
-  ctl_and CTL.NONSTRICT (label_pred_maker label)
-    (match List.map Ast.unwrap res with
-      [] -> failwith "unexpected empty disj"
-    | Ast.Exp(e)::rest -> exptymatch res make_match make_guard_match
-    | Ast.Ty(t)::rest  -> exptymatch res make_match make_guard_match
-    | all ->
-       if List.exists (function Ast.Exp(_) | Ast.Ty(_) -> true | _ -> false)
-           all
-       then failwith "unexpected exp or ty";
-       List.fold_left ctl_seqor CTL.False
-         (List.rev (List.map make_match res)))
-
-(* code might be a DisjRuleElem, in which case we break it apart
-   code doesn't contain an Exp or Ty
-   this one is for use when it is not practical to push the quantifier inwards
- *)
-let header_match label guard code : ('a, Ast.meta_name, 'b) CTL.generic_ctl =
-  match Ast.unwrap code with
-    Ast.DisjRuleElem(res) ->
-      let make_match = make_match None guard in
-      let orop = if guard then ctl_or else ctl_seqor in
-      ctl_and CTL.NONSTRICT (label_pred_maker label)
-      (List.fold_left orop CTL.False (List.map make_match res))
-  | _ -> make_match label guard code
-
-(* --------------------------------------------------------------------- *)
-(* control structures *)
-
-let end_control_structure fvs header body after_pred
-    after_checks no_after_checks (afvs,afresh,ainh,aft) after label guard =
-  (* aft indicates what is added after the whole if, which has to be added
-     to the endif node *)
-  let (aft_needed,after_branch) =
-    match aft with
-      Ast.CONTEXT(_,Ast.NOTHING) ->
-       (false,make_seq_after2 guard after_pred after)
-    | _ ->
-       let match_endif =
-         make_match label guard
-           (make_meta_rule_elem aft (afvs,afresh,ainh)) in
-       (true,
-        make_seq_after guard after_pred
-          (After(make_seq_after guard match_endif after))) in
-  let body = body after_branch in
-  let s = guard_to_strict guard in
-  (* the code *)
-  quantify guard fvs
-    (ctl_and s header
-       (opt_and guard
-         (match (after,aft_needed) with
-           (After _,_) (* pattern doesn't end here *)
-         | (_,true) (* + code added after *) -> after_checks
-         | _ -> no_after_checks)
-         (ctl_ax_absolute s body)))
-
-let ifthen ifheader branch ((afvs,_,_,_) as aft) after
-    quantified minus_quantified label llabel slabel recurse make_match guard =
-(* "if (test) thn" becomes:
-    if(test) & AX((TrueBranch & AX thn) v FallThrough v After)
-
-    "if (test) thn; after" becomes:
-    if(test) & AX((TrueBranch & AX thn) v FallThrough v (After & AXAX after))
-             & EX After
-*)
-  (* free variables *) 
-  let (efvs,bfvs) =
-    match seq_fvs quantified
-       [Ast.get_fvs ifheader;Ast.get_fvs branch;afvs] with
-      [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-    | _ -> failwith "not possible" in
-  let new_quantified = Common.union_set bfvs quantified in
-  let (mefvs,mbfvs) =
-    match seq_fvs minus_quantified
-       [Ast.get_mfvs ifheader;Ast.get_mfvs branch;[]] with
-      [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-    | _ -> failwith "not possible" in
-  let new_mquantified = Common.union_set mbfvs minus_quantified in
-  (* if header *)
-  let if_header = quantify guard efvs (make_match ifheader) in
-  (* then branch and after *)
-  let lv = get_label_ctr() in
-  let used = ref false in
-  let true_branch =
-    make_seq guard
-      [truepred label; recurse branch Tail new_quantified new_mquantified
-         (Some (lv,used)) llabel slabel guard] in
-  let after_pred = aftpred label in
-  let or_cases after_branch =
-    ctl_or true_branch (ctl_or (fallpred label) after_branch) in
-  let (if_header,wrapper) =
-    if !used
-    then
-      let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-      (ctl_and CTL.NONSTRICT(*???*) if_header label_pred,
-       (function body -> quantify true [lv] body))
-    else (if_header,function x -> x) in
-  wrapper
-    (end_control_structure bfvs if_header or_cases after_pred
-       (Some(ctl_ex after_pred)) None aft after label guard)
-
-let ifthenelse ifheader branch1 els branch2 ((afvs,_,_,_) as aft) after
-    quantified minus_quantified label llabel slabel recurse make_match guard =
-(*  "if (test) thn else els" becomes:
-    if(test) & AX((TrueBranch & AX thn) v
-                  (FalseBranch & AX (else & AX els)) v After)
-             & EX FalseBranch
-
-    "if (test) thn else els; after" becomes:
-    if(test) & AX((TrueBranch & AX thn) v
-                  (FalseBranch & AX (else & AX els)) v
-                  (After & AXAX after))
-             & EX FalseBranch
-             & EX After
-*)
-  (* free variables *)
-  let (e1fvs,b1fvs,s1fvs) =
-    match seq_fvs quantified
-       [Ast.get_fvs ifheader;Ast.get_fvs branch1;afvs] with
-      [(e1fvs,b1fvs);(s1fvs,b1afvs);_] ->
-       (e1fvs,Common.union_set b1fvs b1afvs,s1fvs)
-    | _ -> failwith "not possible" in
-  let (e2fvs,b2fvs,s2fvs) =
-    (* fvs on else? *)
-    match seq_fvs quantified
-       [Ast.get_fvs ifheader;Ast.get_fvs branch2;afvs] with
-      [(e2fvs,b2fvs);(s2fvs,b2afvs);_] ->
-       (e2fvs,Common.union_set b2fvs b2afvs,s2fvs)
-    | _ -> failwith "not possible" in
-  let bothfvs        = union (union b1fvs b2fvs) (intersect s1fvs s2fvs) in
-  let exponlyfvs     = intersect e1fvs e2fvs in
-  let new_quantified = union bothfvs quantified in
-  (* minus free variables *)
-  let (me1fvs,mb1fvs,ms1fvs) =
-    match seq_fvs minus_quantified
-       [Ast.get_mfvs ifheader;Ast.get_mfvs branch1;[]] with
-      [(e1fvs,b1fvs);(s1fvs,b1afvs);_] ->
-       (e1fvs,Common.union_set b1fvs b1afvs,s1fvs)
-    | _ -> failwith "not possible" in
-  let (me2fvs,mb2fvs,ms2fvs) =
-    (* fvs on else? *)
-    match seq_fvs minus_quantified
-       [Ast.get_mfvs ifheader;Ast.get_mfvs branch2;[]] with
-      [(e2fvs,b2fvs);(s2fvs,b2afvs);_] ->
-       (e2fvs,Common.union_set b2fvs b2afvs,s2fvs)
-    | _ -> failwith "not possible" in
-  let mbothfvs       = union (union mb1fvs mb2fvs) (intersect ms1fvs ms2fvs) in
-  let new_mquantified = union mbothfvs minus_quantified in
-  (* if header *)
-  let if_header = quantify guard exponlyfvs (make_match ifheader) in
-  (* then and else branches *)
-  let lv = get_label_ctr() in
-  let used = ref false in
-  let true_branch =
-    make_seq guard
-      [truepred label; recurse branch1 Tail new_quantified new_mquantified
-         (Some (lv,used)) llabel slabel guard] in
-  let false_branch =
-    make_seq guard
-      [falsepred label; make_match els;
-       recurse branch2 Tail new_quantified new_mquantified
-         (Some (lv,used)) llabel slabel guard] in
-  let after_pred = aftpred label in
-  let or_cases after_branch =
-    ctl_or true_branch (ctl_or false_branch after_branch) in
-  let s = guard_to_strict guard in
-  let (if_header,wrapper) =
-    if !used
-    then
-      let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-      (ctl_and CTL.NONSTRICT(*???*) if_header label_pred,
-       (function body -> quantify true [lv] body))
-    else (if_header,function x -> x) in
-  wrapper
-    (end_control_structure bothfvs if_header or_cases after_pred
-      (Some(ctl_and s (ctl_ex (falsepred label)) (ctl_ex after_pred)))
-      (Some(ctl_ex (falsepred label)))
-      aft after label guard)
-
-let forwhile header body ((afvs,_,_,_) as aft) after
-    quantified minus_quantified label recurse make_match guard =
-  let process _ =
-    (* the translation in this case is similar to that of an if with no else *)
-    (* free variables *) 
-    let (efvs,bfvs) =
-      match seq_fvs quantified [Ast.get_fvs header;Ast.get_fvs body;afvs] with
-       [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-      | _ -> failwith "not possible" in
-    let new_quantified = Common.union_set bfvs quantified in
-    (* minus free variables *) 
-    let (mefvs,mbfvs) =
-      match seq_fvs minus_quantified
-         [Ast.get_mfvs header;Ast.get_mfvs body;[]] with
-       [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-      | _ -> failwith "not possible" in
-    let new_mquantified = Common.union_set mbfvs minus_quantified in
-    (* loop header *)
-    let header = quantify guard efvs (make_match header) in
-    let lv = get_label_ctr() in
-    let used = ref false in
-    let body =
-      make_seq guard
-       [inlooppred label;
-         recurse body Tail new_quantified new_mquantified
-           (Some (lv,used)) (Some (lv,used)) None guard] in
-    let after_pred = fallpred label in
-    let or_cases after_branch = ctl_or body after_branch in
-    let (header,wrapper) =
-      if !used
-      then
-       let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-       (ctl_and CTL.NONSTRICT(*???*) header label_pred,
-        (function body -> quantify true [lv] body))
-      else (header,function x -> x) in
-    wrapper
-      (end_control_structure bfvs header or_cases after_pred
-        (Some(ctl_ex after_pred)) None aft after label guard) in
-  match (Ast.unwrap body,aft) with
-    (Ast.Atomic(re),(_,_,_,Ast.CONTEXT(_,Ast.NOTHING))) ->
-      (match Ast.unwrap re with
-       Ast.MetaStmt((_,_,Ast.CONTEXT(_,Ast.NOTHING),_),
-                    Type_cocci.Unitary,_,false) ->
-         let (efvs) =
-           match seq_fvs quantified [Ast.get_fvs header] with
-             [(efvs,_)] -> efvs
-           | _ -> failwith "not possible" in
-         quantify guard efvs (make_match header)
-      | _ -> process())
-  | _ -> process()
-  
-(* --------------------------------------------------------------------- *)
-(* statement metavariables *)
-
-(* issue: an S metavariable that is not an if branch/loop body
-   should not match an if branch/loop body, so check that the labels
-   of the nodes before the first node matched by the S are different
-   from the label of the first node matched by the S *)
-let sequencibility body label_pred process_bef_aft = function
-    Ast.Sequencible | Ast.SequencibleAfterDots [] ->
-      body
-       (function x ->
-         (ctl_and CTL.NONSTRICT (ctl_not (ctl_back_ax label_pred)) x))
-  | Ast.SequencibleAfterDots l ->
-      (* S appears after some dots.  l is the code that comes after the S.
-        want to search for that first, because S can match anything, while
-        the stuff after is probably more restricted *)
-      let afts = List.map process_bef_aft l in
-      let ors = foldl1 ctl_or afts in
-      ctl_and CTL.NONSTRICT
-       (ctl_ef (ctl_and CTL.NONSTRICT ors (ctl_back_ax label_pred)))
-       (body
-          (function x ->
-            ctl_and CTL.NONSTRICT (ctl_not (ctl_back_ax label_pred)) x))
-  | Ast.NotSequencible -> body (function x -> x)
-
-let svar_context_with_add_after stmt s label quantified d ast
-    seqible after process_bef_aft guard fvinfo =
-  let label_var = (*fresh_label_var*) string2var "_lab" in
-  let label_pred =
-    CTL.Pred (Lib_engine.Label(label_var),CTL.Control) in
-  let prelabel_pred =
-    CTL.Pred (Lib_engine.PrefixLabel(label_var),CTL.Control) in
-  let matcher d = make_match None guard (make_meta_rule_elem d fvinfo) in
-  let full_metamatch = matcher d in
-  let first_metamatch =
-    matcher
-      (match d with
-       Ast.CONTEXT(pos,Ast.BEFOREAFTER(bef,_)) ->
-         Ast.CONTEXT(pos,Ast.BEFORE(bef))
-      |        Ast.CONTEXT(pos,_) -> Ast.CONTEXT(pos,Ast.NOTHING)
-      | Ast.MINUS(_,_) | Ast.PLUS -> failwith "not possible") in
-  let middle_metamatch =
-    matcher
-      (match d with
-       Ast.CONTEXT(pos,_) -> Ast.CONTEXT(pos,Ast.NOTHING)
-      | Ast.MINUS(_,_) | Ast.PLUS -> failwith "not possible") in
-  let last_metamatch =
-    matcher
-      (match d with
-       Ast.CONTEXT(pos,Ast.BEFOREAFTER(_,aft)) ->
-         Ast.CONTEXT(pos,Ast.AFTER(aft))
-      |        Ast.CONTEXT(_,_) -> d
-      | Ast.MINUS(_,_) | Ast.PLUS -> failwith "not possible") in
-
-  let rest_nodes =
-    ctl_and CTL.NONSTRICT middle_metamatch prelabel_pred in  
-  let left_or = (* the whole statement is one node *)
-    make_seq guard
-      [full_metamatch; and_after guard (ctl_not prelabel_pred) after] in
-  let right_or = (* the statement covers multiple nodes *)
-    make_seq guard
-      [first_metamatch;
-        ctl_au CTL.NONSTRICT
-         rest_nodes
-         (make_seq guard
-            [ctl_and CTL.NONSTRICT last_metamatch label_pred;
-              and_after guard
-                (ctl_not prelabel_pred) after])] in
-  let body f =
-    ctl_and CTL.NONSTRICT label_pred
-       (f (ctl_and CTL.NONSTRICT
-           (make_raw_match label false ast) (ctl_or left_or right_or))) in
-  let stmt_fvs = Ast.get_fvs stmt in
-  let fvs = get_unquantified quantified stmt_fvs in
-  quantify guard (label_var::fvs)
-    (sequencibility body label_pred process_bef_aft seqible)
-
-let svar_minus_or_no_add_after stmt s label quantified d ast
-    seqible after process_bef_aft guard fvinfo =
-  let label_var = (*fresh_label_var*) string2var "_lab" in
-  let label_pred =
-    CTL.Pred (Lib_engine.Label(label_var),CTL.Control) in
-  let prelabel_pred =
-    CTL.Pred (Lib_engine.PrefixLabel(label_var),CTL.Control) in
-  let matcher d = make_match None guard (make_meta_rule_elem d fvinfo) in
-  let pure_d =
-    (* don't have to put anything before the beginning, so don't have to
-       distinguish the first node.  so don't have to bother about paths,
-       just use the label. label ensures that found nodes match up with
-       what they should because it is in the lhs of the andany. *)
-    match d with
-       Ast.MINUS(pos,[]) -> true
-      | Ast.CONTEXT(pos,Ast.NOTHING) -> true
-      | _ -> false in
-  let ender =
-    match (pure_d,after) with
-      (true,Tail) | (true,End) | (true,VeryEnd) ->
-       (* the label sharing makes it safe to use AndAny *)
-       CTL.HackForStmt(CTL.FORWARD,CTL.NONSTRICT,
-                       ctl_and CTL.NONSTRICT label_pred
-                         (make_raw_match label false ast),
-                       ctl_and CTL.NONSTRICT (matcher d) prelabel_pred)
-    | _ ->
-       (* more safe but less efficient *)
-       let first_metamatch = matcher d in
-       let rest_metamatch =
-         matcher
-           (match d with
-             Ast.MINUS(pos,_) -> Ast.MINUS(pos,[])
-           | Ast.CONTEXT(pos,_) -> Ast.CONTEXT(pos,Ast.NOTHING)
-           | Ast.PLUS -> failwith "not possible") in
-       let rest_nodes = ctl_and CTL.NONSTRICT rest_metamatch prelabel_pred in
-       let last_node = and_after guard (ctl_not prelabel_pred) after in
-       (ctl_and CTL.NONSTRICT (make_raw_match label false ast)
-          (make_seq guard
-             [first_metamatch;
-               ctl_au CTL.NONSTRICT rest_nodes last_node])) in
-  let body f = ctl_and CTL.NONSTRICT label_pred (f ender) in
-  let stmt_fvs = Ast.get_fvs stmt in
-  let fvs = get_unquantified quantified stmt_fvs in
-  quantify guard (label_var::fvs)
-    (sequencibility body label_pred process_bef_aft seqible)
-
-(* --------------------------------------------------------------------- *)
-(* dots and nests *)
-
-let dots_au is_strict toend label s wrapcode x seq_after y quantifier =
-  let matchgoto = gotopred None in
-  let matchbreak =
-    make_match None false
-      (wrapcode
-        (Ast.Break(Ast.make_mcode "break",Ast.make_mcode ";"))) in
-  let matchcontinue =
-     make_match None false
-      (wrapcode
-        (Ast.Continue(Ast.make_mcode "continue",Ast.make_mcode ";"))) in
-  let stop_early =
-    if quantifier = Exists
-    then Common.Left(CTL.False)
-    else if toend
-    then Common.Left(CTL.Or(aftpred label,exitpred label))
-    else if is_strict
-    then Common.Left(aftpred label)
-    else
-      Common.Right
-       (function v ->
-         let lv = get_label_ctr() in
-         let labelpred = CTL.Pred(Lib_engine.Label lv,CTL.Control) in
-         let preflabelpred = label_pred_maker (Some (lv,ref true)) in
-         ctl_or (aftpred label)
-           (quantify false [lv]
-              (ctl_and CTL.NONSTRICT
-                 (ctl_and CTL.NONSTRICT (truepred label) labelpred)
-                 (ctl_au CTL.NONSTRICT
-                    (ctl_and CTL.NONSTRICT (ctl_not v) preflabelpred)
-                    (ctl_and CTL.NONSTRICT preflabelpred
-                       (ctl_or (retpred None)
-                          (if !Flag_matcher.only_return_is_error_exit
-                          then CTL.True
-                          else
-                            (ctl_or matchcontinue
-                               (ctl_and CTL.NONSTRICT
-                                  (ctl_or matchgoto matchbreak)
-                                  (ctl_ag s (ctl_not seq_after))))))))))) in
-  let op = if quantifier = !exists then ctl_au else ctl_anti_au in
-  let v = get_let_ctr() in
-  op s x
-    (match stop_early with
-      Common.Left x -> ctl_or y x
-    | Common.Right stop_early ->
-       CTL.Let(v,y,ctl_or (CTL.Ref v) (stop_early (CTL.Ref v))))
-
-let rec dots_and_nests plus nest whencodes bef aft dotcode after label
-    process_bef_aft statement_list statement guard quantified wrapcode =
-  let ctl_and_ns = ctl_and CTL.NONSTRICT in
-  (* proces bef_aft *)
-  let shortest l =
-    List.fold_left ctl_or_fl CTL.False (List.map process_bef_aft l) in
-  let bef_aft = (* to be negated *)
-    try
-      let _ =
-       List.find
-         (function Ast.WhenModifier(Ast.WhenAny) -> true | _ -> false)
-         whencodes in
-      CTL.False
-    with Not_found -> shortest (Common.union_set bef aft) in
-  let is_strict =
-    List.exists
-      (function Ast.WhenModifier(Ast.WhenStrict) -> true | _ -> false)
-      whencodes in
-  let check_quantifier quant other =
-    if List.exists
-       (function Ast.WhenModifier(x) -> x = quant | _ -> false)
-       whencodes
-    then
-      if List.exists
-         (function Ast.WhenModifier(x) -> x = other | _ -> false)
-         whencodes
-      then failwith "inconsistent annotation on dots"
-      else true
-    else false in
-  let quantifier =
-    if check_quantifier Ast.WhenExists Ast.WhenForall
-    then Exists
-    else
-      if check_quantifier Ast.WhenForall Ast.WhenExists
-      then Forall
-      else !exists in
-  (* the following is used when we find a goto, etc and consider accepting
-     without finding the rest of the pattern *)
-  let aft = shortest aft in
-  (* process whencode *)
-  let labelled = label_pred_maker label in
-  let whencodes arg =
-    let (poswhen,negwhen) =
-      List.fold_left
-       (function (poswhen,negwhen) ->
-         function
-             Ast.WhenNot whencodes ->
-               (poswhen,ctl_or (statement_list whencodes) negwhen)
-           | Ast.WhenAlways stm ->
-               (ctl_and CTL.NONSTRICT (statement stm) poswhen,negwhen)
-           | Ast.WhenModifier(_) -> (poswhen,negwhen)
-           | Ast.WhenNotTrue(e) ->
-               (poswhen,
-                 ctl_or (whencond_true e label guard quantified) negwhen)
-           | Ast.WhenNotFalse(e) ->
-               (poswhen,
-                 ctl_or (whencond_false e label guard quantified) negwhen))
-       (CTL.True,bef_aft) (List.rev whencodes) in
-    let poswhen = ctl_and_ns arg poswhen in
-    let negwhen =
-(*    if !exists
-      then*)
-        (* add in After, because it's not part of the program *)
-       ctl_or (aftpred label) negwhen
-      (*else negwhen*) in
-    ctl_and_ns poswhen (ctl_not negwhen) in
-  (* process dot code, if any *)
-  let dotcode =
-    match (dotcode,guard) with
-      (None,_) | (_,true) -> CTL.True
-    | (Some dotcode,_) -> dotcode in
-  (* process nest code, if any *)
-  (* whencode goes in the negated part of the nest; if no nest, just goes
-      on the "true" in between code *)
-  let plus_var = if plus then get_label_ctr() else string2var "" in
-  let plus_var2 = if plus then get_label_ctr() else string2var "" in
-  let ornest =
-    match (nest,guard && not plus) with
-      (None,_) | (_,true) -> whencodes CTL.True
-    | (Some nest,false) ->
-       let v = get_let_ctr() in
-       let is_plus x =
-         if plus
-         then
-           (* the idea is that BindGood is sort of a witness; a witness to
-              having found the subterm in at least one place.  If there is
-              not a witness, then there is a risk that it will get thrown
-              away, if it is merged with a node that has an empty
-              environment.  See tests/nestplus.  But this all seems
-              rather suspicious *)
-           CTL.And(CTL.NONSTRICT,x,
-                   CTL.Exists(true,plus_var2,
-                              CTL.Pred(Lib_engine.BindGood(plus_var),
-                                       CTL.Modif plus_var2)))
-         else x in
-        CTL.Let(v,nest,
-               CTL.Or(is_plus (CTL.Ref v),
-                      whencodes (CTL.Not(ctl_uncheck (CTL.Ref v))))) in
-  let plus_modifier x =
-    if plus
-    then
-      CTL.Exists
-       (false,plus_var,
-        (CTL.And
-           (CTL.NONSTRICT,x,
-            CTL.Not(CTL.Pred(Lib_engine.BindBad(plus_var),CTL.Control)))))
-    else x in
-
-  let ender =
-    match after with
-      After f -> f
-    | Guard f -> ctl_uncheck f
-    | VeryEnd ->
-       let exit = endpred label in
-       let errorexit = exitpred label in
-       ctl_or exit errorexit
-    (* not at all sure what the next two mean... *)
-    | End -> CTL.True
-    | Tail ->
-       (match label with
-         Some (lv,used) -> used := true;
-           ctl_or (CTL.Pred(Lib_engine.Label lv,CTL.Control))
-             (ctl_back_ex (ctl_or (retpred label) (gotopred label)))
-       | None -> endpred label)
-         (* was the following, but not clear why sgrep should allow
-            incomplete patterns
-       let exit = endpred label in
-       let errorexit = exitpred label in
-       if !exists
-       then ctl_or exit errorexit (* end anywhere *)
-       else exit (* end at the real end of the function *) *) in
-  plus_modifier
-    (dots_au is_strict ((after = Tail) or (after = VeryEnd))
-       label (guard_to_strict guard) wrapcode
-      (ctl_and_ns dotcode (ctl_and_ns ornest labelled))
-      aft ender quantifier)
-
-and get_whencond_exps e =
-  match Ast.unwrap e with
-    Ast.Exp e -> [e]
-  | Ast.DisjRuleElem(res) ->
-      List.fold_left Common.union_set [] (List.map get_whencond_exps res)
-  | _ -> failwith "not possible"
-
-and make_whencond_headers e e1 label guard quantified =
-  let fvs = Ast.get_fvs e in
-  let header_pred h =
-    quantify guard (get_unquantified quantified fvs)
-      (make_match label guard h) in
-  let if_header e1 =
-    header_pred
-      (Ast.rewrap e
-        (Ast.IfHeader
-           (Ast.make_mcode "if",
-            Ast.make_mcode "(",e1,Ast.make_mcode ")"))) in
-  let while_header e1 =
-    header_pred
-      (Ast.rewrap e
-        (Ast.WhileHeader
-           (Ast.make_mcode "while",
-            Ast.make_mcode "(",e1,Ast.make_mcode ")"))) in
-  let for_header e1 =
-    header_pred
-      (Ast.rewrap e
-        (Ast.ForHeader
-           (Ast.make_mcode "for",Ast.make_mcode "(",None,Ast.make_mcode ";",
-            Some e1,Ast.make_mcode ";",None,Ast.make_mcode ")"))) in
-  let if_headers =
-    List.fold_left ctl_or CTL.False (List.map if_header e1) in
-  let while_headers =
-    List.fold_left ctl_or CTL.False (List.map while_header e1) in
-  let for_headers =
-    List.fold_left ctl_or CTL.False (List.map for_header e1) in
-  (if_headers, while_headers, for_headers)
-
-and whencond_true e label guard quantified =
-  let e1 = get_whencond_exps e in
-  let (if_headers, while_headers, for_headers) =
-    make_whencond_headers e e1 label guard quantified in
-  ctl_or
-    (ctl_and CTL.NONSTRICT (truepred label) (ctl_back_ex if_headers))
-    (ctl_and CTL.NONSTRICT
-       (inlooppred label) (ctl_back_ex (ctl_or while_headers for_headers)))
-
-and whencond_false e label guard quantified =
-  let e1 = get_whencond_exps e in
-  let (if_headers, while_headers, for_headers) =
-    make_whencond_headers e e1 label guard quantified in
-  ctl_or (ctl_and CTL.NONSTRICT (falsepred label) (ctl_back_ex if_headers))
-    (ctl_and CTL.NONSTRICT (fallpred label)
-       (ctl_or (ctl_back_ex if_headers)
-         (ctl_or (ctl_back_ex while_headers) (ctl_back_ex for_headers))))
-
-(* --------------------------------------------------------------------- *)
-(* the main translation loop *)
-  
-let rec statement_list stmt_list after quantified minus_quantified
-    label llabel slabel dots_before guard =
-  let isdots x =
-    (* include Disj to be on the safe side *)
-    match Ast.unwrap x with
-      Ast.Dots _ | Ast.Nest _ | Ast.Disj _ -> true | _ -> false in
-  let compute_label l e db = if db or isdots e then l else None in
-  match Ast.unwrap stmt_list with
-    Ast.DOTS(x) ->
-      let rec loop quantified minus_quantified dots_before label llabel slabel
-         = function
-         ([],_,_) -> (match after with After f -> f | _ -> CTL.True)
-       | ([e],_,_) ->
-           statement e after quantified minus_quantified
-             (compute_label label e dots_before)
-             llabel slabel guard
-       | (e::sl,fv::fvs,mfv::mfvs) ->
-           let shared = intersectll fv fvs in
-           let unqshared = get_unquantified quantified shared in
-           let new_quantified = Common.union_set unqshared quantified in
-           let minus_shared = intersectll mfv mfvs in
-           let munqshared =
-             get_unquantified minus_quantified minus_shared in
-           let new_mquantified =
-             Common.union_set munqshared minus_quantified in
-           quantify guard unqshared
-             (statement e
-                (After
-                   (let (label1,llabel1,slabel1) =
-                     match Ast.unwrap e with
-                       Ast.Atomic(re) ->
-                         (match Ast.unwrap re with
-                           Ast.Goto _ -> (None,None,None)
-                         | _ -> (label,llabel,slabel))
-                     | _ -> (label,llabel,slabel) in
-                   loop new_quantified new_mquantified (isdots e)
-                     label1 llabel1 slabel1
-                     (sl,fvs,mfvs)))
-                new_quantified new_mquantified
-                (compute_label label e dots_before) llabel slabel guard)
-       | _ -> failwith "not possible" in
-      loop quantified minus_quantified dots_before
-       label llabel slabel
-       (x,List.map Ast.get_fvs x,List.map Ast.get_mfvs x)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-(* llabel is the label of the enclosing loop and slabel is the label of the
-   enclosing switch *)
-and statement stmt after quantified minus_quantified
-    label llabel slabel guard =
-  let ctl_au     = ctl_au CTL.NONSTRICT in
-  let ctl_ax     = ctl_ax CTL.NONSTRICT in
-  let ctl_and    = ctl_and CTL.NONSTRICT in
-  let make_seq   = make_seq guard in
-  let make_seq_after = make_seq_after guard in
-  let real_make_match = make_match in
-  let make_match = header_match label guard in
-
-  let dots_done = ref false in (* hack for dots cases we can easily handle *)
-
-  let term =
-  match Ast.unwrap stmt with
-    Ast.Atomic(ast) ->
-      (match Ast.unwrap ast with
-       (* the following optimisation is not a good idea, because when S
-          is alone, we would like it not to match a declaration.
-          this makes more matching for things like when (...) S, but perhaps
-          that matching is not so costly anyway *)
-       (*Ast.MetaStmt(_,Type_cocci.Unitary,_,false) when guard -> CTL.True*)
-      |        Ast.MetaStmt((s,_,(Ast.CONTEXT(_,Ast.BEFOREAFTER(_,_)) as d),_),
-                    keep,seqible,_)
-      | Ast.MetaStmt((s,_,(Ast.CONTEXT(_,Ast.AFTER(_)) as d),_),
-                    keep,seqible,_)->
-         svar_context_with_add_after stmt s label quantified d ast seqible
-           after
-           (process_bef_aft quantified minus_quantified
-              label llabel slabel true)
-           guard
-           (Ast.get_fvs stmt, Ast.get_fresh stmt, Ast.get_inherited stmt)
-
-      |        Ast.MetaStmt((s,_,d,_),keep,seqible,_) ->
-         svar_minus_or_no_add_after stmt s label quantified d ast seqible
-           after
-           (process_bef_aft quantified minus_quantified
-              label llabel slabel true)
-           guard
-           (Ast.get_fvs stmt, Ast.get_fresh stmt, Ast.get_inherited stmt)
-
-      |        _ ->
-         let term =
-           match Ast.unwrap ast with
-             Ast.DisjRuleElem(res) ->
-               do_re_matches label guard res quantified minus_quantified
-           | Ast.Exp(_) | Ast.Ty(_) ->
-               let stmt_fvs = Ast.get_fvs stmt in
-               let fvs = get_unquantified quantified stmt_fvs in
-               CTL.InnerAnd(quantify guard fvs (make_match ast))
-           | _ ->
-               let stmt_fvs = Ast.get_fvs stmt in
-               let fvs = get_unquantified quantified stmt_fvs in
-               quantify guard fvs (make_match ast) in
-         match Ast.unwrap ast with
-           Ast.Break(brk,semi) ->
-             (match (llabel,slabel) with
-               (_,Some(lv,used)) -> (* use switch label if there is one *)
-                 ctl_and term (bclabel_pred_maker slabel)
-             | _ -> ctl_and term (bclabel_pred_maker llabel))
-         | Ast.Continue(brk,semi) -> ctl_and term (bclabel_pred_maker llabel)
-          | Ast.Return((_,info,retmc,pos),(_,_,semmc,_)) ->
-             (* discard pattern that comes after return *)
-             let normal_res = make_seq_after term after in
-             (* the following code tries to propagate the modifications on
-                return; to a close brace, in the case where the final return
-                is absent *)
-             let new_mc =
-               match (retmc,semmc) with
-                 (Ast.MINUS(_,l1),Ast.MINUS(_,l2)) when !Flag.sgrep_mode2 ->
-                   (* in sgrep mode, we can propagate the - *)
-                   Some (Ast.MINUS(Ast.NoPos,l1@l2))
-               | (Ast.MINUS(_,l1),Ast.MINUS(_,l2))
-               | (Ast.CONTEXT(_,Ast.BEFORE(l1)),
-                  Ast.CONTEXT(_,Ast.AFTER(l2))) ->
-                   Some (Ast.CONTEXT(Ast.NoPos,Ast.BEFORE(l1@l2)))
-               | (Ast.CONTEXT(_,Ast.BEFORE(_)),Ast.CONTEXT(_,Ast.NOTHING))
-               | (Ast.CONTEXT(_,Ast.NOTHING),Ast.CONTEXT(_,Ast.NOTHING)) ->
-                   Some retmc
-               | (Ast.CONTEXT(_,Ast.NOTHING),Ast.CONTEXT(_,Ast.AFTER(l))) ->
-                   Some (Ast.CONTEXT(Ast.NoPos,Ast.BEFORE(l)))
-               | _ -> None in
-             let ret = Ast.make_mcode "return" in
-             let edots =
-               Ast.rewrap ast (Ast.Edots(Ast.make_mcode "...",None)) in
-             let semi = Ast.make_mcode ";" in
-             let simple_return =
-               make_match(Ast.rewrap ast (Ast.Return(ret,semi))) in
-             let return_expr =
-               make_match(Ast.rewrap ast (Ast.ReturnExpr(ret,edots,semi))) in
-             (match new_mc with
-               Some new_mc ->
-                 let exit = endpred None in
-                 let mod_rbrace =
-                   Ast.rewrap ast (Ast.SeqEnd (("}",info,new_mc,pos))) in
-                 let stripped_rbrace =
-                   Ast.rewrap ast (Ast.SeqEnd(Ast.make_mcode "}")) in
-                 ctl_or normal_res
-                   (ctl_and (make_match mod_rbrace)
-                      (ctl_and
-                         (ctl_back_ax
-                            (ctl_not
-                               (ctl_uncheck
-                                  (ctl_or simple_return return_expr))))
-                         (ctl_au
-                            (make_match stripped_rbrace)
-                            (* error exit not possible; it is in the middle
-                               of code, so a return is needed *)
-                            exit)))
-             | _ ->
-                 (* some change in the middle of the return, so have to
-                    find an actual return *)
-                 normal_res)
-          | _ ->
-             (* should try to deal with the dots_bef_aft problem elsewhere,
-                but don't have the courage... *)
-             let term =
-               if guard
-               then term
-               else
-                 do_between_dots stmt term End
-                   quantified minus_quantified label llabel slabel guard in
-             dots_done := true;
-             make_seq_after term after)
-  | Ast.Seq(lbrace,decls,body,rbrace) ->
-      let (lbfvs,b1fvs,b2fvs,b3fvs,rbfvs) =
-       match
-         seq_fvs quantified
-           [Ast.get_fvs lbrace;Ast.get_fvs decls;
-             Ast.get_fvs body;Ast.get_fvs rbrace]
-       with
-         [(lbfvs,b1fvs);(_,b2fvs);(_,b3fvs);(rbfvs,_)] ->
-           (lbfvs,b1fvs,b2fvs,b3fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let (mlbfvs,mb1fvs,mb2fvs,mb3fvs,mrbfvs) =
-       match
-         seq_fvs minus_quantified
-           [Ast.get_mfvs lbrace;Ast.get_mfvs decls;
-             Ast.get_mfvs body;Ast.get_mfvs rbrace]
-       with
-         [(lbfvs,b1fvs);(_,b2fvs);(_,b3fvs);(rbfvs,_)] ->
-           (lbfvs,b1fvs,b2fvs,b3fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let pv = count_nested_braces stmt in
-      let lv = get_label_ctr() in
-      let paren_pred = CTL.Pred(Lib_engine.Paren pv,CTL.Control) in
-      let label_pred = CTL.Pred(Lib_engine.Label lv,CTL.Control) in
-      let start_brace =
-       ctl_and
-         (quantify guard lbfvs (make_match lbrace))
-         (ctl_and paren_pred label_pred) in
-      let empty_rbrace =
-       match Ast.unwrap rbrace with
-         Ast.SeqEnd((data,info,_,pos)) ->
-           Ast.rewrap rbrace(Ast.SeqEnd(Ast.make_mcode data))
-       | _ -> failwith "unexpected close brace" in
-      let end_brace =
-       (* label is not needed; paren_pred is enough *)
-       quantify guard rbfvs
-         (ctl_au (make_match empty_rbrace)
-            (ctl_and
-               (real_make_match None guard rbrace)
-               paren_pred)) in
-      let new_quantified2 =
-       Common.union_set b1fvs (Common.union_set b2fvs quantified) in
-      let new_quantified3 = Common.union_set b3fvs new_quantified2 in
-      let new_mquantified2 =
-       Common.union_set mb1fvs (Common.union_set mb2fvs minus_quantified) in
-      let new_mquantified3 = Common.union_set mb3fvs new_mquantified2 in
-      let pattern_as_given =
-       let new_quantified2 = Common.union_set [pv] new_quantified2 in
-       let new_quantified3 = Common.union_set [pv] new_quantified3 in
-       quantify true [pv;lv]
-         (quantify guard b1fvs
-            (make_seq
-               [start_brace;
-                 quantify guard b2fvs
-                   (statement_list decls
-                      (After
-                         (quantify guard b3fvs
-                            (statement_list body
-                               (After (make_seq_after end_brace after))
-                               new_quantified3 new_mquantified3
-                               (Some (lv,ref true)) (* label mostly useful *)
-                               llabel slabel true guard)))
-                      new_quantified2 new_mquantified2
-                      (Some (lv,ref true)) llabel slabel false guard)])) in
-      if ends_in_return body
-      then
-       (* matching error handling code *)
-       (* Cases:
-          1. The pattern as given
-          2. A goto, and then some close braces, and then the pattern as
-          given, but without the braces (only possible if there are no
-          decls, and open and close braces are unmodified)
-          3. Part of the pattern as given, then a goto, and then the rest
-          of the pattern.  For this case, we just check that all paths have
-          a goto within the current braces.  checking for a goto at every
-          point in the pattern seems expensive and not worthwhile. *)
-       let pattern2 =
-         let body = preprocess_dots body in (* redo, to drop braces *)
-         make_seq
-           [gotopred label;
-             ctl_au
-               (make_match empty_rbrace)
-               (ctl_ax (* skip the destination label *)
-                  (quantify guard b3fvs
-                     (statement_list body End
-                        new_quantified3 new_mquantified3 None llabel slabel
-                        true guard)))] in
-       let pattern3 =
-         let new_quantified2 = Common.union_set [pv] new_quantified2 in
-         let new_quantified3 = Common.union_set [pv] new_quantified3 in
-         quantify true [pv;lv]
-           (quantify guard b1fvs
-              (make_seq
-                 [start_brace;
-                   ctl_and
-                     (CTL.AU (* want AF even for sgrep *)
-                        (CTL.FORWARD,CTL.STRICT,
-                         CTL.Pred(Lib_engine.PrefixLabel(lv),CTL.Control),
-                         ctl_and (* brace must be eventually after goto *)
-                           (gotopred (Some (lv,ref true)))
-                           (* want AF even for sgrep *)
-                           (CTL.AF(CTL.FORWARD,CTL.STRICT,end_brace))))
-                     (quantify guard b2fvs
-                        (statement_list decls
-                           (After
-                              (quantify guard b3fvs
-                                 (statement_list body Tail
-                                       (*After
-                                          (make_seq_after
-                                             nopv_end_brace after)*)
-                                    new_quantified3 new_mquantified3
-                                    None llabel slabel true guard)))
-                           new_quantified2 new_mquantified2
-                           (Some (lv,ref true))
-                           llabel slabel false guard))])) in
-       ctl_or pattern_as_given
-         (match Ast.unwrap decls with
-           Ast.DOTS([]) -> ctl_or pattern2 pattern3
-         | Ast.DOTS(l) -> pattern3
-         | _ -> failwith "circles and stars not supported")
-      else pattern_as_given
-  | Ast.IfThen(ifheader,branch,aft) ->
-      ifthen ifheader branch aft after quantified minus_quantified
-         label llabel slabel statement make_match guard
-        
-  | Ast.IfThenElse(ifheader,branch1,els,branch2,aft) ->
-      ifthenelse ifheader branch1 els branch2 aft after quantified
-         minus_quantified label llabel slabel statement make_match guard
-
-  | Ast.While(header,body,aft) | Ast.For(header,body,aft)
-  | Ast.Iterator(header,body,aft) ->
-      forwhile header body aft after quantified minus_quantified
-       label statement make_match guard
-
-  | Ast.Disj(stmt_dots_list) -> (* list shouldn't be empty *)
-      ctl_and
-       (label_pred_maker label)
-       (List.fold_left ctl_seqor CTL.False
-          (List.map
-             (function sl ->
-               statement_list sl after quantified minus_quantified label
-                 llabel slabel true guard)
-             stmt_dots_list))
-
-  | Ast.Nest(stmt_dots,whencode,multi,bef,aft) ->
-      (* label in recursive call is None because label check is already
-        wrapped around the corresponding code *)
-
-      let bfvs =
-       match seq_fvs quantified [Ast.get_wcfvs whencode;Ast.get_fvs stmt_dots]
-       with
-         [(wcfvs,bothfvs);(bdfvs,_)] -> bothfvs
-       | _ -> failwith "not possible" in
-
-      (* no minus version because when code doesn't contain any minus code *)
-      let new_quantified = Common.union_set bfvs quantified in
-
-      quantify guard bfvs
-       (let dots_pattern =
-         statement_list stmt_dots (a2n after) new_quantified minus_quantified
-           None llabel slabel true guard in
-       dots_and_nests multi
-         (Some dots_pattern) whencode bef aft None after label
-         (process_bef_aft new_quantified minus_quantified
-            None llabel slabel true)
-         (function x ->
-           statement_list x Tail new_quantified minus_quantified None
-             llabel slabel true true)
-         (function x ->
-           statement x Tail new_quantified minus_quantified None
-             llabel slabel true)
-         guard quantified
-         (function x -> Ast.set_fvs [] (Ast.rewrap stmt x)))
-
-  | Ast.Dots((_,i,d,_),whencodes,bef,aft) ->
-      let dot_code =
-       match d with
-         Ast.MINUS(_,_) ->
-            (* no need for the fresh metavar, but ... is a bit wierd as a
-              variable name *)
-           Some(make_match (make_meta_rule_elem d ([],[],[])))
-       | _ -> None in
-      dots_and_nests false None whencodes bef aft dot_code after label
-       (process_bef_aft quantified minus_quantified None llabel slabel true)
-       (function x ->
-         statement_list x Tail quantified minus_quantified
-           None llabel slabel true true)
-       (function x ->
-         statement x Tail quantified minus_quantified None llabel slabel true)
-       guard quantified
-       (function x -> Ast.set_fvs [] (Ast.rewrap stmt x))
-
-  | Ast.Switch(header,lb,cases,rb) ->
-      let rec intersect_all = function
-         [] -> []
-       | [x] -> x
-       | x::xs -> intersect x (intersect_all xs) in
-      let rec union_all l = List.fold_left union [] l in
-      (* start normal variables *)
-      let header_fvs = Ast.get_fvs header in
-      let lb_fvs = Ast.get_fvs lb in
-      let case_fvs = List.map Ast.get_fvs cases in
-      let rb_fvs = Ast.get_fvs rb in
-      let (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-          all_casefvs,all_b3fvs,all_rbfvs) =
-       List.fold_left
-         (function (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-                    all_casefvs,all_b3fvs,all_rbfvs) ->
-           function case_fvs ->
-             match seq_fvs quantified [header_fvs;lb_fvs;case_fvs;rb_fvs] with
-               [(efvs,b1fvs);(lbfvs,b2fvs);(casefvs,b3fvs);(rbfvs,_)] ->
-                 (efvs::all_efvs,b1fvs::all_b1fvs,lbfvs::all_lbfvs,
-                  b2fvs::all_b2fvs,casefvs::all_casefvs,b3fvs::all_b3fvs,
-                  rbfvs::all_rbfvs)
-             | _ -> failwith "not possible")
-         ([],[],[],[],[],[],[]) case_fvs in
-      let (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-          all_casefvs,all_b3fvs,all_rbfvs) =
-       (List.rev all_efvs,List.rev all_b1fvs,List.rev all_lbfvs,
-        List.rev all_b2fvs,List.rev all_casefvs,List.rev all_b3fvs,
-        List.rev all_rbfvs) in
-      let exponlyfvs = intersect_all all_efvs in
-      let lbonlyfvs = intersect_all all_lbfvs in
-(* don't do anything with right brace.  Hope there is no + code on it *)
-(*      let rbonlyfvs = intersect_all all_rbfvs in*)
-      let b1fvs = union_all all_b1fvs in
-      let new1_quantified = union b1fvs quantified in
-      let b2fvs = union (union_all all_b1fvs) (intersect_all all_casefvs) in
-      let new2_quantified = union b2fvs new1_quantified in
-(*      let b3fvs = union_all all_b3fvs in*)
-      (* ------------------- start minus free variables *)
-      let header_mfvs = Ast.get_mfvs header in
-      let lb_mfvs = Ast.get_mfvs lb in
-      let case_mfvs = List.map Ast.get_mfvs cases in
-      let rb_mfvs = Ast.get_mfvs rb in
-      let (all_mefvs,all_mb1fvs,all_mlbfvs,all_mb2fvs,
-          all_mcasefvs,all_mb3fvs,all_mrbfvs) =
-       List.fold_left
-         (function (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-                    all_casefvs,all_b3fvs,all_rbfvs) ->
-           function case_mfvs ->
-             match
-               seq_fvs quantified
-                 [header_mfvs;lb_mfvs;case_mfvs;rb_mfvs] with
-               [(efvs,b1fvs);(lbfvs,b2fvs);(casefvs,b3fvs);(rbfvs,_)] ->
-                 (efvs::all_efvs,b1fvs::all_b1fvs,lbfvs::all_lbfvs,
-                  b2fvs::all_b2fvs,casefvs::all_casefvs,b3fvs::all_b3fvs,
-                  rbfvs::all_rbfvs)
-             | _ -> failwith "not possible")
-         ([],[],[],[],[],[],[]) case_mfvs in
-      let (all_mefvs,all_mb1fvs,all_mlbfvs,all_mb2fvs,
-          all_mcasefvs,all_mb3fvs,all_mrbfvs) =
-       (List.rev all_mefvs,List.rev all_mb1fvs,List.rev all_mlbfvs,
-        List.rev all_mb2fvs,List.rev all_mcasefvs,List.rev all_mb3fvs,
-        List.rev all_mrbfvs) in
-(* don't do anything with right brace.  Hope there is no + code on it *)
-(*      let rbonlyfvs = intersect_all all_rbfvs in*)
-      let mb1fvs = union_all all_mb1fvs in
-      let new1_mquantified = union mb1fvs quantified in
-      let mb2fvs = union (union_all all_mb1fvs) (intersect_all all_mcasefvs) in
-      let new2_mquantified = union mb2fvs new1_mquantified in
-(*      let b3fvs = union_all all_b3fvs in*)
-      (* ------------------- end collection of free variables *)
-      let switch_header = quantify guard exponlyfvs (make_match header) in
-      let lb = quantify guard lbonlyfvs (make_match lb) in
-(*      let rb = quantify guard rbonlyfvs (make_match rb) in*)
-      let case_headers =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-               let e1fvs =
-                 match seq_fvs new2_quantified [Ast.get_fvs header] with
-                   [(e1fvs,_)] -> e1fvs
-                 | _ -> failwith "not possible" in
-               quantify guard e1fvs (real_make_match label true header)
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      let no_header =
-       ctl_not (List.fold_left ctl_or_fl CTL.False case_headers) in
-      let lv = get_label_ctr() in
-      let used = ref false in
-      let case_code =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-                 let (e1fvs,b1fvs,s1fvs) =
-                   let fvs = [Ast.get_fvs header;Ast.get_fvs body] in
-                   match seq_fvs new2_quantified fvs with
-                     [(e1fvs,b1fvs);(s1fvs,_)] -> (e1fvs,b1fvs,s1fvs)
-                   | _ -> failwith "not possible" in
-                 let (me1fvs,mb1fvs,ms1fvs) =
-                   let fvs = [Ast.get_mfvs header;Ast.get_mfvs body] in
-                   match seq_fvs new2_mquantified fvs with
-                     [(e1fvs,b1fvs);(s1fvs,_)] -> (e1fvs,b1fvs,s1fvs)
-                   | _ -> failwith "not possible" in
-                 let case_header =
-                   quantify guard e1fvs (make_match header) in
-                 let new3_quantified = union b1fvs new2_quantified in
-                 let new3_mquantified = union mb1fvs new2_mquantified in
-                 let body =
-                   statement_list body Tail
-                     new3_quantified new3_mquantified label llabel
-                     (Some (lv,used)) true(*?*) guard in
-                 quantify guard b1fvs (make_seq [case_header; body])
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      let default_required =
-       if List.exists
-           (function case ->
-             match Ast.unwrap case with
-               Ast.CaseLine(header,_) ->
-                 (match Ast.unwrap header with
-                   Ast.Default(_,_) -> true
-                 | _ -> false)
-             | _ -> false)
-           cases
-       then function x -> x
-       else function x -> ctl_or (fallpred label) x in
-      let after_pred = aftpred label in
-      let body after_branch =
-       ctl_or
-         (default_required
-            (quantify guard b2fvs
-               (make_seq
-                  [ctl_and lb
-                      (List.fold_left ctl_and CTL.True
-                         (List.map ctl_ex case_headers));
-                    List.fold_left ctl_or_fl no_header case_code])))
-         after_branch in
-      let aft =
-       (rb_fvs,Ast.get_fresh rb,Ast.get_inherited rb,
-       match Ast.unwrap rb with
-         Ast.SeqEnd(rb) -> Ast.get_mcodekind rb
-       | _ -> failwith "not possible") in
-      let (switch_header,wrapper) =
-       if !used
-       then
-         let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-         (ctl_and switch_header label_pred,
-          (function body -> quantify true [lv] body))
-       else (switch_header,function x -> x) in
-      wrapper
-       (end_control_structure b1fvs switch_header body
-          after_pred (Some(ctl_ex after_pred)) None aft after label guard)
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      let (hfvs,b1fvs,lbfvs,b2fvs,b3fvs,b4fvs,rbfvs) =
-       match
-         seq_fvs quantified
-           [Ast.get_fvs header;Ast.get_fvs lbrace;Ast.get_fvs decls;
-             Ast.get_fvs body;Ast.get_fvs rbrace]
-       with
-         [(hfvs,b1fvs);(lbfvs,b2fvs);(_,b3fvs);(_,b4fvs);(rbfvs,_)] ->
-           (hfvs,b1fvs,lbfvs,b2fvs,b3fvs,b4fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let (mhfvs,mb1fvs,mlbfvs,mb2fvs,mb3fvs,mb4fvs,mrbfvs) =
-       match
-         seq_fvs quantified
-           [Ast.get_mfvs header;Ast.get_mfvs lbrace;Ast.get_mfvs decls;
-             Ast.get_mfvs body;Ast.get_mfvs rbrace]
-       with
-         [(hfvs,b1fvs);(lbfvs,b2fvs);(_,b3fvs);(_,b4fvs);(rbfvs,_)] ->
-           (hfvs,b1fvs,lbfvs,b2fvs,b3fvs,b4fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let function_header = quantify guard hfvs (make_match header) in
-      let start_brace = quantify guard lbfvs (make_match lbrace) in
-      let stripped_rbrace =
-       match Ast.unwrap rbrace with
-         Ast.SeqEnd((data,info,_,_)) ->
-           Ast.rewrap rbrace(Ast.SeqEnd (Ast.make_mcode data))
-       | _ -> failwith "unexpected close brace" in
-      let end_brace =
-       let exit = CTL.Pred (Lib_engine.Exit,CTL.Control) in
-       let errorexit = CTL.Pred (Lib_engine.ErrorExit,CTL.Control) in
-       let fake_brace = CTL.Pred (Lib_engine.FakeBrace,CTL.Control) in
-       ctl_and
-         (quantify guard rbfvs (make_match rbrace))
-         (ctl_and
-            (* the following finds the beginning of the fake braces,
-               if there are any, not completely sure how this works.
-            sse the examples sw and return *)
-            (ctl_back_ex (ctl_not fake_brace))
-            (ctl_au (make_match stripped_rbrace) (ctl_or exit errorexit))) in
-      let new_quantified3 =
-       Common.union_set b1fvs
-         (Common.union_set b2fvs (Common.union_set b3fvs quantified)) in
-      let new_quantified4 = Common.union_set b4fvs new_quantified3 in
-      let new_mquantified3 =
-       Common.union_set mb1fvs
-         (Common.union_set mb2fvs
-            (Common.union_set mb3fvs minus_quantified)) in
-      let new_mquantified4 = Common.union_set mb4fvs new_mquantified3 in
-      let fn_nest =
-       match (Ast.undots decls,Ast.undots body,contains_modif rbrace) with
-         ([],[body],false) ->
-           (match Ast.unwrap body with
-             Ast.Nest(stmt_dots,[],multi,_,_) ->
-               if multi
-               then None (* not sure how to optimize this case *)
-               else Some (Common.Left stmt_dots)
-           | Ast.Dots(_,whencode,_,_) when
-               (List.for_all
-                  (* flow sensitive, so not optimizable *)
-                  (function Ast.WhenNotTrue(_) | Ast.WhenNotFalse(_) ->
-                     false
-                | _ -> true) whencode) ->
-               Some (Common.Right whencode)
-           | _ -> None)
-       | _ -> None in
-      let body_code =
-       match fn_nest with
-         Some (Common.Left stmt_dots) ->
-           (* special case for function header + body - header is unambiguous
-              and unique, so we can just look for the nested body anywhere
-              else in the CFG *)
-           CTL.AndAny
-             (CTL.FORWARD,guard_to_strict guard,start_brace,
-              statement_list stmt_dots
-                (* discards match on right brace, but don't need it *)
-                (Guard (make_seq_after end_brace after))
-                new_quantified4 new_mquantified4
-                None llabel slabel true guard)
-       | Some (Common.Right whencode) ->
-           (* try to be more efficient for the case where the body is just
-              ...  Perhaps this is too much of a special case, but useful
-              for dropping a parameter and checking that it is never used. *)
-           make_seq
-             [start_brace;
-               match whencode with
-                 [] -> CTL.True
-               | _ ->
-                   let leftarg =
-                     ctl_and
-                       (ctl_not
-                          (List.fold_left
-                             (function prev ->
-                               function
-                                   Ast.WhenAlways(s) -> prev
-                                 | Ast.WhenNot(sl) ->
-                                     let x =
-                                       statement_list sl Tail
-                                         new_quantified4 new_mquantified4
-                                         label llabel slabel true true in
-                                     ctl_or prev x
-                                 | Ast.WhenNotTrue(_) | Ast.WhenNotFalse(_) ->
-                                     failwith "unexpected"
-                                 | Ast.WhenModifier(Ast.WhenAny) -> CTL.False
-                                 | Ast.WhenModifier(_) -> prev)
-                             CTL.False whencode))
-                        (List.fold_left
-                          (function prev ->
-                            function
-                                Ast.WhenAlways(s) ->
-                                  let x =
-                                    statement s Tail
-                                      new_quantified4 new_mquantified4
-                                      label llabel slabel true in
-                                  ctl_and prev x
-                              | Ast.WhenNot(sl) -> prev
-                              | Ast.WhenNotTrue(_) | Ast.WhenNotFalse(_) ->
-                                  failwith "unexpected"
-                              | Ast.WhenModifier(Ast.WhenAny) -> CTL.True
-                              | Ast.WhenModifier(_) -> prev)
-                          CTL.True whencode) in
-                   ctl_au leftarg (make_match stripped_rbrace)]
-       | None ->
-           make_seq
-             [start_brace;
-               quantify guard b3fvs
-                 (statement_list decls
-                    (After
-                       (quantify guard b4fvs
-                          (statement_list body
-                             (After (make_seq_after end_brace after))
-                             new_quantified4 new_mquantified4
-                             None llabel slabel true guard)))
-                    new_quantified3 new_mquantified3 None llabel slabel
-                    false guard)] in
-      quantify guard b1fvs
-       (make_seq [function_header; quantify guard b2fvs body_code])
-  | Ast.Define(header,body) ->
-      let (hfvs,bfvs,bodyfvs) =
-       match seq_fvs quantified [Ast.get_fvs header;Ast.get_fvs body]
-       with
-         [(hfvs,b1fvs);(bodyfvs,_)] -> (hfvs,b1fvs,bodyfvs)
-       | _ -> failwith "not possible" in
-      let (mhfvs,mbfvs,mbodyfvs) =
-       match seq_fvs minus_quantified [Ast.get_mfvs header;Ast.get_mfvs body]
-       with
-         [(hfvs,b1fvs);(bodyfvs,_)] -> (hfvs,b1fvs,bodyfvs)
-       | _ -> failwith "not possible" in
-      let define_header = quantify guard hfvs (make_match header) in
-      let body_code =
-       statement_list body after
-         (Common.union_set bfvs quantified)
-         (Common.union_set mbfvs minus_quantified)
-         None llabel slabel true guard in
-      quantify guard bfvs (make_seq [define_header; body_code])
-  | Ast.OptStm(stm) ->
-      failwith "OptStm should have been compiled away\n"
-  | Ast.UniqueStm(stm) -> failwith "arities not yet supported"
-  | _ -> failwith "not supported" in
-  if guard or !dots_done
-  then term
-  else
-    do_between_dots stmt term after quantified minus_quantified
-      label llabel slabel guard
-
-(* term is the translation of stmt *)
-and do_between_dots stmt term after quantified minus_quantified
-    label llabel slabel guard =
-    match Ast.get_dots_bef_aft stmt with
-      Ast.AddingBetweenDots (brace_term,n)
-    | Ast.DroppingBetweenDots (brace_term,n) ->
-       let match_brace =
-         statement brace_term after quantified minus_quantified
-           label llabel slabel guard in
-       let v = Printf.sprintf "_r_%d" n in
-       let case1 = ctl_and CTL.NONSTRICT (CTL.Ref v) match_brace in
-       let case2 = ctl_and CTL.NONSTRICT (ctl_not (CTL.Ref v)) term in
-       CTL.Let
-         (v,ctl_or
-            (ctl_back_ex (ctl_or (truepred label) (inlooppred label)))
-            (ctl_back_ex (ctl_back_ex (falsepred label))),
-          ctl_or case1 case2)   
-    | Ast.NoDots -> term
-
-(* un_process_bef_aft is because we don't want to do transformation in this
-  code, and thus don't case about braces before or after it *)
-and process_bef_aft quantified minus_quantified label llabel slabel guard =
-  function
-    Ast.WParen (re,n) ->
-      let paren_pred = CTL.Pred (Lib_engine.Paren n,CTL.Control) in
-      let s = guard_to_strict guard in
-      quantify true (get_unquantified quantified [n])
-       (ctl_and s (make_raw_match None guard re) paren_pred)
-  | Ast.Other s ->
-      statement s Tail quantified minus_quantified label llabel slabel guard
-  | Ast.Other_dots d ->
-      statement_list d Tail quantified minus_quantified
-       label llabel slabel true guard
-
-(* --------------------------------------------------------------------- *)
-(* cleanup: convert AX to EX for pdots.
-Concretely: AX(A[...] & E[...]) becomes AX(A[...]) & EX(E[...])
-This is what we wanted in the first place, but it wasn't possible to make
-because the AX and its argument are not created in the same place.
-Rather clunky... *)
-(* also cleanup XX, which is a marker for the case where the programmer
-specifies to change the quantifier on .... Assumed to only occur after one AX
-or EX, or at top level. *)
-
-let rec cleanup c =
-  let c = match c with CTL.XX(c) -> c | _ -> c in
-  match c with
-    CTL.False    -> CTL.False
-  | CTL.True     -> CTL.True
-  | CTL.Pred(p)  -> CTL.Pred(p)
-  | CTL.Not(phi) -> CTL.Not(cleanup phi)
-  | CTL.Exists(keep,v,phi) -> CTL.Exists(keep,v,cleanup phi)
-  | CTL.AndAny(dir,s,phi1,phi2) ->
-      CTL.AndAny(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.HackForStmt(dir,s,phi1,phi2) ->
-      CTL.HackForStmt(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.And(s,phi1,phi2)   -> CTL.And(s,cleanup phi1,cleanup phi2)
-  | CTL.Or(phi1,phi2)      -> CTL.Or(cleanup phi1,cleanup phi2)
-  | CTL.SeqOr(phi1,phi2)   -> CTL.SeqOr(cleanup phi1,cleanup phi2)
-  | CTL.Implies(phi1,phi2) -> CTL.Implies(cleanup phi1,cleanup phi2)
-  | CTL.AF(dir,s,phi1) -> CTL.AF(dir,s,cleanup phi1)
-  | CTL.AX(CTL.FORWARD,s,
-          CTL.Let(v1,e1,
-                  CTL.And(CTL.NONSTRICT,CTL.AU(CTL.FORWARD,s2,e2,e3),
-                          CTL.EU(CTL.FORWARD,e4,e5)))) ->
-    CTL.Let(v1,e1,
-           CTL.And(CTL.NONSTRICT,
-                   CTL.AX(CTL.FORWARD,s,CTL.AU(CTL.FORWARD,s2,e2,e3)),
-                   CTL.EX(CTL.FORWARD,CTL.EU(CTL.FORWARD,e4,e5))))
-  | CTL.AX(dir,s,CTL.XX(phi)) -> CTL.EX(dir,cleanup phi)
-  | CTL.EX(dir,CTL.XX((CTL.AU(_,s,_,_)) as phi)) ->
-      CTL.AX(dir,s,cleanup phi)
-  | CTL.XX(phi)               -> failwith "bad XX"
-  | CTL.AX(dir,s,phi1) -> CTL.AX(dir,s,cleanup phi1)
-  | CTL.AG(dir,s,phi1) -> CTL.AG(dir,s,cleanup phi1)
-  | CTL.EF(dir,phi1)   -> CTL.EF(dir,cleanup phi1)
-  | CTL.EX(dir,phi1)   -> CTL.EX(dir,cleanup phi1)
-  | CTL.EG(dir,phi1)   -> CTL.EG(dir,cleanup phi1)
-  | CTL.AW(dir,s,phi1,phi2) -> CTL.AW(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.AU(dir,s,phi1,phi2) -> CTL.AU(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.EU(dir,phi1,phi2)   -> CTL.EU(dir,cleanup phi1,cleanup phi2)
-  | CTL.Let (x,phi1,phi2)   -> CTL.Let (x,cleanup phi1,cleanup phi2)
-  | CTL.LetR (dir,x,phi1,phi2) -> CTL.LetR (dir,x,cleanup phi1,cleanup phi2)
-  | CTL.Ref(s) -> CTL.Ref(s)
-  | CTL.Uncheck(phi1)  -> CTL.Uncheck(cleanup phi1)
-  | CTL.InnerAnd(phi1) -> CTL.InnerAnd(cleanup phi1)
-
-(* --------------------------------------------------------------------- *)
-(* Function declaration *)
-
-let top_level name (ua,pos) t =
-  let ua = List.filter (function (nm,_) -> nm = name) ua in
-  used_after := ua;
-  saved := Ast.get_saved t;
-  let quantified = Common.minus_set ua pos in
-  quantify false quantified
-    (match Ast.unwrap t with
-      Ast.FILEINFO(old_file,new_file) -> failwith "not supported fileinfo"
-    | Ast.DECL(stmt) ->
-       let unopt = elim_opt.V.rebuilder_statement stmt in
-       let unopt = preprocess_dots_e unopt in
-       cleanup(statement unopt VeryEnd quantified [] None None None false)
-    | Ast.CODE(stmt_dots) ->
-       let unopt = elim_opt.V.rebuilder_statement_dots stmt_dots in
-       let unopt = preprocess_dots unopt in
-       let starts_with_dots =
-         match Ast.undots stmt_dots with
-           d::ds ->
-             (match Ast.unwrap d with
-               Ast.Dots(_,_,_,_) | Ast.Circles(_,_,_,_)
-             | Ast.Stars(_,_,_,_) -> true
-             | _ -> false)
-         | _ -> false in
-       let starts_with_brace =
-         match Ast.undots stmt_dots with
-           d::ds ->
-             (match Ast.unwrap d with
-               Ast.Seq(_) -> true
-             | _ -> false)
-         | _ -> false in
-       let res =
-         statement_list unopt VeryEnd quantified [] None None None
-           false false in
-       cleanup
-         (if starts_with_dots
-         then
-         (* EX because there is a loop on enter/top *)
-           ctl_and CTL.NONSTRICT (toppred None) (ctl_ex res)
-         else if starts_with_brace
-         then
-            ctl_and CTL.NONSTRICT
-             (ctl_not(CTL.EX(CTL.BACKWARD,(funpred None)))) res
-         else res)
-    | Ast.ERRORWORDS(exps) -> failwith "not supported errorwords")
-
-(* --------------------------------------------------------------------- *)
-(* Entry points *)
-
-let asttoctlz (name,(_,_,exists_flag),l) used_after positions =
-  letctr := 0;
-  labelctr := 0;
-  (match exists_flag with
-    Ast.Exists -> exists := Exists
-  | Ast.Forall -> exists := Forall
-  | Ast.ReverseForall -> exists := ReverseForall
-  | Ast.Undetermined ->
-      exists := if !Flag.sgrep_mode2 then Exists else Forall);
-
-  let (l,used_after) =
-    List.split
-      (List.filter
-        (function (t,_) ->
-          match Ast.unwrap t with Ast.ERRORWORDS(exps) -> false | _ -> true)
-        (List.combine l (List.combine used_after positions))) in
-  let res = List.map2 (top_level name) used_after l in
-  exists := Forall;
-  res
-
-let asttoctl r used_after positions =
-  match r with
-    Ast.ScriptRule _ -> []
-  | Ast.CocciRule (a,b,c,_) -> asttoctlz (a,b,c) used_after positions
-
-let pp_cocci_predicate (pred,modif) =
-  Pretty_print_engine.pp_predicate pred
-
-let cocci_predicate_to_string (pred,modif) =
-  Pretty_print_engine.predicate_to_string pred
diff --git a/engine/.#asttoctl2.ml.1.147 b/engine/.#asttoctl2.ml.1.147
deleted file mode 100644 (file)
index 990a323..0000000
+++ /dev/null
@@ -1,2319 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* for MINUS and CONTEXT, pos is always None in this file *)
-(*search for require*)
-(* true = don't see all matched nodes, only modified ones *)
-let onlyModif = ref true(*false*)
-
-type ex = Exists | Forall | ReverseForall
-let exists = ref Forall
-
-module Ast = Ast_cocci
-module V = Visitor_ast
-module CTL = Ast_ctl
-
-let warning s = Printf.fprintf stderr "warning: %s\n" s
-
-type cocci_predicate = Lib_engine.predicate * Ast.meta_name Ast_ctl.modif
-type formula =
-    (cocci_predicate,Ast.meta_name, Wrapper_ctl.info) Ast_ctl.generic_ctl
-
-let union = Common.union_set
-let intersect l1 l2 = List.filter (function x -> List.mem x l2) l1
-let subset l1 l2 = List.for_all (function x -> List.mem x l2) l1
-
-let foldl1 f xs = List.fold_left f (List.hd xs) (List.tl xs)
-let foldr1 f xs =
-  let xs = List.rev xs in List.fold_left f (List.hd xs) (List.tl xs)
-
-let used_after = ref ([] : Ast.meta_name list)
-let guard_to_strict guard = if guard then CTL.NONSTRICT else CTL.STRICT
-
-let saved = ref ([] : Ast.meta_name list)
-
-let string2var x = ("",x)
-
-(* --------------------------------------------------------------------- *)
-(* predicates matching various nodes in the graph *)
-
-let ctl_and s x y    =
-  match (x,y) with
-    (CTL.False,_) | (_,CTL.False) -> CTL.False
-  | (CTL.True,a) | (a,CTL.True) -> a
-  | _ -> CTL.And(s,x,y)
-
-let ctl_or x y     =
-  match (x,y) with
-    (CTL.True,_) | (_,CTL.True) -> CTL.True
-  | (CTL.False,a) | (a,CTL.False) -> a
-  | _ -> CTL.Or(x,y)
-
-let ctl_or_fl x y     =
-  match (x,y) with
-    (CTL.True,_) | (_,CTL.True) -> CTL.True
-  | (CTL.False,a) | (a,CTL.False) -> a
-  | _ -> CTL.Or(y,x)
-
-let ctl_seqor x y     =
-  match (x,y) with
-    (CTL.True,_) | (_,CTL.True) -> CTL.True
-  | (CTL.False,a) | (a,CTL.False) -> a
-  | _ -> CTL.SeqOr(x,y)
-
-let ctl_not = function
-    CTL.True -> CTL.False
-  | CTL.False -> CTL.True
-  | x -> CTL.Not(x)
-
-let ctl_ax s = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x ->
-      match !exists with
-       Exists -> CTL.EX(CTL.FORWARD,x)
-      |        Forall -> CTL.AX(CTL.FORWARD,s,x)
-      |        ReverseForall -> failwith "not supported"
-
-let ctl_ax_absolute s = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.AX(CTL.FORWARD,s,x)
-
-let ctl_ex = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.EX(CTL.FORWARD,x)
-
-(* This stays being AX even for sgrep_mode, because it is used to identify
-the structure of the term, not matching the pattern. *)
-let ctl_back_ax = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.AX(CTL.BACKWARD,CTL.NONSTRICT,x)
-
-let ctl_back_ex = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.EX(CTL.BACKWARD,x)
-
-let ctl_ef = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.EF(CTL.FORWARD,x)
-
-let ctl_ag s = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.AG(CTL.FORWARD,s,x)
-
-let ctl_au s x y =
-  match (x,!exists) with
-    (CTL.True,Exists) -> CTL.EF(CTL.FORWARD,y)
-  | (CTL.True,Forall) -> CTL.AF(CTL.FORWARD,s,y)
-  | (CTL.True,ReverseForall) -> failwith "not supported"
-  | (_,Exists) -> CTL.EU(CTL.FORWARD,x,y)
-  | (_,Forall) -> CTL.AU(CTL.FORWARD,s,x,y)
-  | (_,ReverseForall) -> failwith "not supported"
-
-let ctl_anti_au s x y = (* only for ..., where the quantifier is changed *)
-  CTL.XX
-    (match (x,!exists) with
-      (CTL.True,Exists) -> CTL.AF(CTL.FORWARD,s,y)
-    | (CTL.True,Forall) -> CTL.EF(CTL.FORWARD,y)
-    | (CTL.True,ReverseForall) -> failwith "not supported"
-    | (_,Exists) -> CTL.AU(CTL.FORWARD,s,x,y)
-    | (_,Forall) -> CTL.EU(CTL.FORWARD,x,y)
-    | (_,ReverseForall) -> failwith "not supported")
-
-let ctl_uncheck = function
-    CTL.True -> CTL.True
-  | CTL.False -> CTL.False
-  | x -> CTL.Uncheck x
-
-let label_pred_maker = function
-    None -> CTL.True
-  | Some (label_var,used) ->
-      used := true;
-      CTL.Pred(Lib_engine.PrefixLabel(label_var),CTL.Control)
-
-let bclabel_pred_maker = function
-    None -> CTL.True
-  | Some (label_var,used) ->
-      used := true;
-      CTL.Pred(Lib_engine.BCLabel(label_var),CTL.Control)
-
-let predmaker guard pred label =
-  ctl_and (guard_to_strict guard) (CTL.Pred pred) (label_pred_maker label)
-
-let aftpred     = predmaker false (Lib_engine.After,       CTL.Control)
-let retpred     = predmaker false (Lib_engine.Return,      CTL.Control)
-let funpred     = predmaker false (Lib_engine.FunHeader,   CTL.Control)
-let toppred     = predmaker false (Lib_engine.Top,         CTL.Control)
-let exitpred    = predmaker false (Lib_engine.ErrorExit,   CTL.Control)
-let endpred     = predmaker false (Lib_engine.Exit,        CTL.Control)
-let gotopred    = predmaker false (Lib_engine.Goto,        CTL.Control)
-let inlooppred  = predmaker false (Lib_engine.InLoop,      CTL.Control)
-let truepred    = predmaker false (Lib_engine.TrueBranch,  CTL.Control)
-let falsepred   = predmaker false (Lib_engine.FalseBranch, CTL.Control)
-let fallpred    = predmaker false (Lib_engine.FallThrough, CTL.Control)
-
-let aftret label_var f = ctl_or (aftpred label_var) (exitpred label_var)
-
-let letctr = ref 0
-let get_let_ctr _ =
-  let cur = !letctr in
-  letctr := cur + 1;
-  Printf.sprintf "r%d" cur
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Eliminate OptStm *)
-
-(* for optional thing with nothing after, should check that the optional thing
-never occurs.  otherwise the matching stops before it occurs *)
-let elim_opt =
-  let mcode x = x in
-  let donothing r k e = k e in
-
-  let fvlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_fvs l) in
-
-  let mfvlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_mfvs l) in
-
-  let freshlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_fresh l) in
-
-  let inheritedlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_inherited l) in
-
-  let savedlist l =
-    List.fold_left Common.union_set [] (List.map Ast.get_saved l) in
-
-  let varlists l =
-    (fvlist l, mfvlist l, freshlist l, inheritedlist l, savedlist l) in
-
-  let rec dots_list unwrapped wrapped =
-    match (unwrapped,wrapped) with
-      ([],_) -> []
-
-    | (Ast.Dots(_,_,_,_)::Ast.OptStm(stm)::(Ast.Dots(_,_,_,_) as u)::urest,
-       d0::s::d1::rest)
-    | (Ast.Nest(_,_,_,_,_)::Ast.OptStm(stm)::(Ast.Dots(_,_,_,_) as u)::urest,
-       d0::s::d1::rest) ->
-        let l = Ast.get_line stm in
-        let new_rest1 = stm :: (dots_list (u::urest) (d1::rest)) in
-        let new_rest2 = dots_list urest rest in
-        let (fv_rest1,mfv_rest1,fresh_rest1,inherited_rest1,s1) =
-          varlists new_rest1 in
-        let (fv_rest2,mfv_rest2,fresh_rest2,inherited_rest2,s2) =
-          varlists new_rest2 in
-        [d0;
-          {(Ast.make_term
-              (Ast.Disj
-                 [{(Ast.make_term(Ast.DOTS(new_rest1))) with
-                    Ast.node_line = l;
-                    Ast.free_vars = fv_rest1;
-                    Ast.minus_free_vars = mfv_rest1;
-                    Ast.fresh_vars = fresh_rest1;
-                    Ast.inherited = inherited_rest1;
-                    Ast.saved_witness = s1};
-                   {(Ast.make_term(Ast.DOTS(new_rest2))) with
-                     Ast.node_line = l;
-                     Ast.free_vars = fv_rest2;
-                     Ast.minus_free_vars = mfv_rest2;
-                     Ast.fresh_vars = fresh_rest2;
-                     Ast.inherited = inherited_rest2;
-                     Ast.saved_witness = s2}])) with
-            Ast.node_line = l;
-            Ast.free_vars = fv_rest1;
-            Ast.minus_free_vars = mfv_rest1;
-            Ast.fresh_vars = fresh_rest1;
-            Ast.inherited = inherited_rest1;
-            Ast.saved_witness = s1}]
-
-    | (Ast.OptStm(stm)::urest,_::rest) ->
-        let l = Ast.get_line stm in
-        let new_rest1 = dots_list urest rest in
-        let new_rest2 = stm::new_rest1 in
-        let (fv_rest1,mfv_rest1,fresh_rest1,inherited_rest1,s1) =
-          varlists new_rest1 in
-        let (fv_rest2,mfv_rest2,fresh_rest2,inherited_rest2,s2) =
-          varlists new_rest2 in
-        [{(Ast.make_term
-              (Ast.Disj
-                 [{(Ast.make_term(Ast.DOTS(new_rest2))) with
-                     Ast.node_line = l;
-                     Ast.free_vars = fv_rest2;
-                     Ast.minus_free_vars = mfv_rest2;
-                     Ast.fresh_vars = fresh_rest2;
-                     Ast.inherited = inherited_rest2;
-                     Ast.saved_witness = s2};
-                   {(Ast.make_term(Ast.DOTS(new_rest1))) with
-                    Ast.node_line = l;
-                    Ast.free_vars = fv_rest1;
-                    Ast.minus_free_vars = mfv_rest1;
-                    Ast.fresh_vars = fresh_rest1;
-                    Ast.inherited = inherited_rest1;
-                    Ast.saved_witness = s1}])) with
-            Ast.node_line = l;
-            Ast.free_vars = fv_rest2;
-            Ast.minus_free_vars = mfv_rest2;
-            Ast.fresh_vars = fresh_rest2;
-            Ast.inherited = inherited_rest2;
-            Ast.saved_witness = s2}]
-
-    | ([Ast.Dots(_,_,_,_);Ast.OptStm(stm)],[d1;_]) ->
-       let l = Ast.get_line stm in
-       let fv_stm = Ast.get_fvs stm in
-       let mfv_stm = Ast.get_mfvs stm in
-       let fresh_stm = Ast.get_fresh stm in
-       let inh_stm = Ast.get_inherited stm in
-       let saved_stm = Ast.get_saved stm in
-       let fv_d1 = Ast.get_fvs d1 in
-       let mfv_d1 = Ast.get_mfvs d1 in
-       let fresh_d1 = Ast.get_fresh d1 in
-       let inh_d1 = Ast.get_inherited d1 in
-       let saved_d1 = Ast.get_saved d1 in
-       let fv_both = Common.union_set fv_stm fv_d1 in
-       let mfv_both = Common.union_set mfv_stm mfv_d1 in
-       let fresh_both = Common.union_set fresh_stm fresh_d1 in
-       let inh_both = Common.union_set inh_stm inh_d1 in
-       let saved_both = Common.union_set saved_stm saved_d1 in
-       [d1;
-         {(Ast.make_term
-             (Ast.Disj
-                [{(Ast.make_term(Ast.DOTS([stm]))) with
-                   Ast.node_line = l;
-                   Ast.free_vars = fv_stm;
-                   Ast.minus_free_vars = mfv_stm;
-                   Ast.fresh_vars = fresh_stm;
-                   Ast.inherited = inh_stm;
-                   Ast.saved_witness = saved_stm};
-                  {(Ast.make_term(Ast.DOTS([d1]))) with
-                    Ast.node_line = l;
-                    Ast.free_vars = fv_d1;
-                    Ast.minus_free_vars = mfv_d1;
-                    Ast.fresh_vars = fresh_d1;
-                    Ast.inherited = inh_d1;
-                    Ast.saved_witness = saved_d1}])) with
-            Ast.node_line = l;
-            Ast.free_vars = fv_both;
-            Ast.minus_free_vars = mfv_both;
-            Ast.fresh_vars = fresh_both;
-            Ast.inherited = inh_both;
-            Ast.saved_witness = saved_both}]
-
-    | ([Ast.Nest(_,_,_,_,_);Ast.OptStm(stm)],[d1;_]) ->
-       let l = Ast.get_line stm in
-       let rw = Ast.rewrap stm in
-       let rwd = Ast.rewrap stm in
-       let dots = Ast.Dots(Ast.make_mcode "...",[],[],[]) in
-       [d1;rw(Ast.Disj
-                [rwd(Ast.DOTS([stm]));
-                  {(Ast.make_term(Ast.DOTS([rw dots])))
-                  with Ast.node_line = l}])]
-
-    | (_::urest,stm::rest) -> stm :: (dots_list urest rest)
-    | _ -> failwith "not possible" in
-
-  let stmtdotsfn r k d =
-    let d = k d in
-    Ast.rewrap d
-      (match Ast.unwrap d with
-       Ast.DOTS(l) -> Ast.DOTS(dots_list (List.map Ast.unwrap l) l)
-      | Ast.CIRCLES(l) -> failwith "elimopt: not supported"
-      | Ast.STARS(l) -> failwith "elimopt: not supported") in
-  
-  V.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing stmtdotsfn donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing
-
-(* --------------------------------------------------------------------- *)
-(* after management *)
-(* We need Guard for the following case:
-<...
- a
- <...
-  b
- ...>
-...>
-foo();
-
-Here the inner <... b ...> should not go past foo.  But foo is not the
-"after" of the body of the outer nest, because we don't want to search for
-it in the case where the body of the outer nest ends in something other
-than dots or a nest. *)
-
-(* what is the difference between tail and end??? *)
-
-type after = After of formula | Guard of formula | Tail | End | VeryEnd
-
-let a2n = function After x -> Guard x | a -> a
-
-let print_ctl x =
-  let pp_pred (x,_) = Pretty_print_engine.pp_predicate x in
-  let pp_meta (_,x) = Common.pp x in
-  Pretty_print_ctl.pp_ctl (pp_pred,pp_meta) false x;
-  Format.print_newline()
-
-let print_after = function
-    After ctl -> Printf.printf "After:\n"; print_ctl ctl
-  | Guard ctl -> Printf.printf "Guard:\n"; print_ctl ctl
-  | Tail -> Printf.printf "Tail\n"
-  | VeryEnd -> Printf.printf "Very End\n"
-  | End -> Printf.printf "End\n"
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-let fresh_var _ = string2var "_v"
-let fresh_pos _ = string2var "_pos" (* must be a constant *)
-
-let fresh_metavar _ = "_S"
-
-(* fvinfo is going to end up being from the whole associated statement.
-   it would be better if it were just the free variables in d, but free_vars.ml
-   doesn't keep track of free variables on + code *)
-let make_meta_rule_elem d fvinfo =
-  let nm = fresh_metavar() in
-  Ast.make_meta_rule_elem nm d fvinfo
-
-let get_unquantified quantified vars =
-  List.filter (function x -> not (List.mem x quantified)) vars
-
-let make_seq guard l =
-  let s = guard_to_strict guard in
-  foldr1 (function rest -> function cur -> ctl_and s cur (ctl_ax s rest)) l
-
-let make_seq_after2 guard first rest =
-  let s = guard_to_strict guard in
-  match rest with
-    After rest -> ctl_and s first (ctl_ax s (ctl_ax s rest))
-  | _ -> first
-
-let make_seq_after guard first rest =
-  match rest with
-    After rest -> make_seq guard [first;rest]
-  | _ -> first
-
-let opt_and guard first rest =
-  let s = guard_to_strict guard in
-  match first with
-    None -> rest
-  | Some first -> ctl_and s first rest
-
-let and_after guard first rest =
-  let s = guard_to_strict guard in
-  match rest with After rest -> ctl_and s first rest | _ -> first
-
-let contains_modif =
-  let bind x y = x or y in
-  let option_default = false in
-  let mcode r (_,_,kind,metapos) =
-    let modif =
-      match kind with
-       Ast.MINUS(_,_) -> true
-      | Ast.PLUS -> failwith "not possible"
-      | Ast.CONTEXT(_,info) -> not (info = Ast.NOTHING) in
-    let pos =
-      match metapos with
-       Ast.MetaPos(_,_,_,_,_) -> true
-      |        Ast.NoMetaPos -> false in
-    modif or pos in
-  let do_nothing r k e = k e in
-  let rule_elem r k re =
-    let res = k re in
-    match Ast.unwrap re with
-      Ast.FunHeader(bef,_,fninfo,name,lp,params,rp) ->
-       bind (mcode r ((),(),bef,Ast.NoMetaPos)) res
-    | Ast.Decl(bef,_,decl) -> bind (mcode r ((),(),bef,Ast.NoMetaPos)) res
-    | _ -> res in
-  let recursor =
-    V.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      do_nothing do_nothing do_nothing do_nothing
-      do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-      do_nothing rule_elem do_nothing do_nothing do_nothing do_nothing in
-  recursor.V.combiner_rule_elem
-
-(* code is not a DisjRuleElem *)
-let make_match label guard code =
-  let v = fresh_var() in
-  let matcher = Lib_engine.Match(code) in
-  if contains_modif code && not guard
-  then CTL.Exists(true,v,predmaker guard (matcher,CTL.Modif v) label)
-  else
-    let iso_info = !Flag.track_iso_usage && not (Ast.get_isos code = []) in
-    (match (iso_info,!onlyModif,guard,
-           intersect !used_after (Ast.get_fvs code)) with
-      (false,true,_,[]) | (_,_,true,_) ->
-       predmaker guard (matcher,CTL.Control) label
-    | _ -> CTL.Exists(true,v,predmaker guard (matcher,CTL.UnModif v) label))
-
-let make_raw_match label guard code =
-  predmaker guard (Lib_engine.Match(code),CTL.Control) label
-    
-let rec seq_fvs quantified = function
-    [] -> []
-  | fv1::fvs ->
-      let t1fvs = get_unquantified quantified fv1 in
-      let termfvs =
-       List.fold_left Common.union_set []
-         (List.map (get_unquantified quantified) fvs) in
-      let bothfvs = Common.inter_set t1fvs termfvs in
-      let t1onlyfvs = Common.minus_set t1fvs bothfvs in
-      let new_quantified = Common.union_set bothfvs quantified in
-      (t1onlyfvs,bothfvs)::(seq_fvs new_quantified fvs)
-
-let quantify guard =
-  List.fold_right
-    (function cur ->
-      function code -> CTL.Exists (not guard && List.mem cur !saved,cur,code))
-
-let non_saved_quantify =
-  List.fold_right
-    (function cur -> function code -> CTL.Exists (false,cur,code))
-
-let intersectll lst nested_list =
-  List.filter (function x -> List.exists (List.mem x) nested_list) lst
-
-(* --------------------------------------------------------------------- *)
-(* Count depth of braces.  The translation of a closed brace appears deeply
-nested within the translation of the sequence term, so the name of the
-paren var has to take into account the names of the nested braces.  On the
-other hand the close brace does not escape, so we don't have to take into
-account other paren variable names. *)
-
-(* called repetitively, which is inefficient, but less trouble than adding a
-new field to Seq and FunDecl *)
-let count_nested_braces s =
-  let bind x y = max x y in
-  let option_default = 0 in
-  let stmt_count r k s =
-    match Ast.unwrap s with
-      Ast.Seq(_,_,_,_) | Ast.FunDecl(_,_,_,_,_) -> (k s) + 1
-    | _ -> k s in
-  let donothing r k e = k e in
-  let mcode r x = 0 in
-  let recursor = V.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing stmt_count donothing donothing donothing in
-  let res = string_of_int (recursor.V.combiner_statement s) in
-  string2var ("p"^res)
-
-let labelctr = ref 0
-let get_label_ctr _ =
-  let cur = !labelctr in
-  labelctr := cur + 1;
-  string2var (Printf.sprintf "l%d" cur)
-
-(* --------------------------------------------------------------------- *)
-(* annotate dots with before and after neighbors *)
-
-let print_bef_aft = function
-    Ast.WParen (re,n) ->
-      Printf.printf "bef/aft\n";
-      Pretty_print_cocci.rule_elem "" re;
-      Format.print_newline()
-  | Ast.Other s ->
-      Printf.printf "bef/aft\n";
-      Pretty_print_cocci.statement "" s;
-      Format.print_newline()
-  | Ast.Other_dots d ->
-      Printf.printf "bef/aft\n";
-      Pretty_print_cocci.statement_dots d;
-      Format.print_newline()
-
-(* [] can only occur if we are in a disj, where it comes from a ?  In that
-case, we want to use a, which accumulates all of the previous patterns in
-their entirety. *)
-let rec get_before_elem sl a =
-  match Ast.unwrap sl with
-    Ast.DOTS(x) ->
-      let rec loop sl a =
-       match sl with
-         [] -> ([],Common.Right a)
-       | [e] ->
-           let (e,ea) = get_before_e e a in
-           ([e],Common.Left ea)
-       | e::sl ->
-           let (e,ea) = get_before_e e a in
-           let (sl,sla) = loop sl ea in
-           (e::sl,sla) in
-      let (l,a) = loop x a in
-      (Ast.rewrap sl (Ast.DOTS(l)),a)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-and get_before sl a =
-  match get_before_elem sl a with
-    (term,Common.Left x) -> (term,x)
-  | (term,Common.Right x) -> (term,x)
-
-and get_before_whencode wc =
-  List.map
-    (function
-       Ast.WhenNot w -> let (w,_) = get_before w [] in Ast.WhenNot w
-      | Ast.WhenAlways w -> let (w,_) = get_before_e w [] in Ast.WhenAlways w
-      |        Ast.WhenModifier(x) -> Ast.WhenModifier(x)
-      | Ast.WhenNotTrue w -> Ast.WhenNotTrue w
-      | Ast.WhenNotFalse w -> Ast.WhenNotFalse w)
-    wc
-
-and get_before_e s a =
-  match Ast.unwrap s with
-    Ast.Dots(d,w,_,aft) ->
-      (Ast.rewrap s (Ast.Dots(d,get_before_whencode w,a,aft)),a)
-  | Ast.Nest(stmt_dots,w,multi,_,aft) ->
-      let w = get_before_whencode w in
-      let (sd,_) = get_before stmt_dots a in
-      let a =
-       List.filter
-         (function
-             Ast.Other a ->
-               let unifies =
-                 Unify_ast.unify_statement_dots
-                   (Ast.rewrap s (Ast.DOTS([a]))) stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | Ast.Other_dots a ->
-               let unifies = Unify_ast.unify_statement_dots a stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | _ -> true)
-         a in
-      (Ast.rewrap s (Ast.Nest(sd,w,multi,a,aft)),[Ast.Other_dots stmt_dots])
-  | Ast.Disj(stmt_dots_list) ->
-      let (dsl,dsla) =
-       List.split (List.map (function e -> get_before e a) stmt_dots_list) in
-      (Ast.rewrap s (Ast.Disj(dsl)),List.fold_left Common.union_set [] dsla)
-  | Ast.Atomic(ast) ->
-      (match Ast.unwrap ast with
-       Ast.MetaStmt(_,_,_,_) -> (s,[])
-      |        _ -> (s,[Ast.Other s]))
-  | Ast.Seq(lbrace,decls,body,rbrace) ->
-      let index = count_nested_braces s in
-      let (de,dea) = get_before decls [Ast.WParen(lbrace,index)] in
-      let (bd,_) = get_before body dea in
-      (Ast.rewrap s (Ast.Seq(lbrace,de,bd,rbrace)),
-       [Ast.WParen(rbrace,index)])
-  | Ast.Define(header,body) ->
-      let (body,_) = get_before body [] in
-      (Ast.rewrap s (Ast.Define(header,body)), [Ast.Other s])
-  | Ast.IfThen(ifheader,branch,aft) ->
-      let (br,_) = get_before_e branch [] in
-      (Ast.rewrap s (Ast.IfThen(ifheader,br,aft)), [Ast.Other s])
-  | Ast.IfThenElse(ifheader,branch1,els,branch2,aft) ->
-      let (br1,_) = get_before_e branch1 [] in
-      let (br2,_) = get_before_e branch2 [] in
-      (Ast.rewrap s (Ast.IfThenElse(ifheader,br1,els,br2,aft)),[Ast.Other s])
-  | Ast.While(header,body,aft) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.While(header,bd,aft)),[Ast.Other s])
-  | Ast.For(header,body,aft) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.For(header,bd,aft)),[Ast.Other s])
-  | Ast.Do(header,body,tail) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.Do(header,bd,tail)),[Ast.Other s])
-  | Ast.Iterator(header,body,aft) ->
-      let (bd,_) = get_before_e body [] in
-      (Ast.rewrap s (Ast.Iterator(header,bd,aft)),[Ast.Other s])
-  | Ast.Switch(header,lb,cases,rb) ->
-      let cases =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-               let (body,_) = get_before body [] in
-               Ast.rewrap case_line (Ast.CaseLine(header,body))
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      (Ast.rewrap s (Ast.Switch(header,lb,cases,rb)),[Ast.Other s])
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      let (de,dea) = get_before decls [] in
-      let (bd,_) = get_before body dea in
-      (Ast.rewrap s (Ast.FunDecl(header,lbrace,de,bd,rbrace)),[])
-  | _ ->
-      Pretty_print_cocci.statement "" s; Format.print_newline();
-      failwith "get_before_e: not supported"
-
-let rec get_after sl a =
-  match Ast.unwrap sl with
-    Ast.DOTS(x) ->
-      let rec loop sl =
-       match sl with
-         [] -> ([],a)
-       | e::sl ->
-           let (sl,sla) = loop sl in
-           let (e,ea) = get_after_e e sla in
-           (e::sl,ea) in
-      let (l,a) = loop x in
-      (Ast.rewrap sl (Ast.DOTS(l)),a)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-and get_after_whencode a wc =
-  List.map
-    (function
-       Ast.WhenNot w -> let (w,_) = get_after w a (*?*) in Ast.WhenNot w
-      | Ast.WhenAlways w -> let (w,_) = get_after_e w a in Ast.WhenAlways w
-      |        Ast.WhenModifier(x) -> Ast.WhenModifier(x)
-      | Ast.WhenNotTrue w -> Ast.WhenNotTrue w
-      | Ast.WhenNotFalse w -> Ast.WhenNotFalse w)
-    wc
-
-and get_after_e s a =
-  match Ast.unwrap s with
-    Ast.Dots(d,w,bef,_) ->
-      (Ast.rewrap s (Ast.Dots(d,get_after_whencode a w,bef,a)),a)
-  | Ast.Nest(stmt_dots,w,multi,bef,_) ->
-      let w = get_after_whencode a w in
-      let (sd,_) = get_after stmt_dots a in
-      let a =
-       List.filter
-         (function
-             Ast.Other a ->
-               let unifies =
-                 Unify_ast.unify_statement_dots
-                   (Ast.rewrap s (Ast.DOTS([a]))) stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | Ast.Other_dots a ->
-               let unifies = Unify_ast.unify_statement_dots a stmt_dots in
-               (match unifies with
-                 Unify_ast.MAYBE -> false
-               | _ -> true)
-           | _ -> true)
-         a in
-      (Ast.rewrap s (Ast.Nest(sd,w,multi,bef,a)),[Ast.Other_dots stmt_dots])
-  | Ast.Disj(stmt_dots_list) ->
-      let (dsl,dsla) =
-       List.split (List.map (function e -> get_after e a) stmt_dots_list) in
-      (Ast.rewrap s (Ast.Disj(dsl)),List.fold_left Common.union_set [] dsla)
-  | Ast.Atomic(ast) ->
-      (match Ast.unwrap ast with
-       Ast.MetaStmt(nm,keep,Ast.SequencibleAfterDots _,i) ->
-         (* check "after" information for metavar optimization *)
-         (* if the error is not desired, could just return [], then
-            the optimization (check for EF) won't take place *)
-         List.iter
-           (function
-               Ast.Other x ->
-                 (match Ast.unwrap x with
-                   Ast.Dots(_,_,_,_) | Ast.Nest(_,_,_,_,_) ->
-                     failwith
-                       "dots/nest not allowed before and after stmt metavar"
-                 | _ -> ())
-             | Ast.Other_dots x ->
-                 (match Ast.undots x with
-                   x::_ ->
-                     (match Ast.unwrap x with
-                       Ast.Dots(_,_,_,_) | Ast.Nest(_,_,_,_,_) ->
-                         failwith
-                           ("dots/nest not allowed before and after stmt "^
-                            "metavar")
-                     | _ -> ())
-                 | _ -> ())
-             | _ -> ())
-           a;
-         (Ast.rewrap s
-            (Ast.Atomic
-               (Ast.rewrap s
-                  (Ast.MetaStmt(nm,keep,Ast.SequencibleAfterDots a,i)))),[])
-      |        Ast.MetaStmt(_,_,_,_) -> (s,[])
-      |        _ -> (s,[Ast.Other s]))
-  | Ast.Seq(lbrace,decls,body,rbrace) ->
-      let index = count_nested_braces s in
-      let (bd,bda) = get_after body [Ast.WParen(rbrace,index)] in
-      let (de,_) = get_after decls bda in
-      (Ast.rewrap s (Ast.Seq(lbrace,de,bd,rbrace)),
-       [Ast.WParen(lbrace,index)])
-  | Ast.Define(header,body) ->
-      let (body,_) = get_after body a in
-      (Ast.rewrap s (Ast.Define(header,body)), [Ast.Other s])
-  | Ast.IfThen(ifheader,branch,aft) ->
-      let (br,_) = get_after_e branch a in
-      (Ast.rewrap s (Ast.IfThen(ifheader,br,aft)),[Ast.Other s])
-  | Ast.IfThenElse(ifheader,branch1,els,branch2,aft) ->
-      let (br1,_) = get_after_e branch1 a in
-      let (br2,_) = get_after_e branch2 a in
-      (Ast.rewrap s (Ast.IfThenElse(ifheader,br1,els,br2,aft)),[Ast.Other s])
-  | Ast.While(header,body,aft) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.While(header,bd,aft)),[Ast.Other s])
-  | Ast.For(header,body,aft) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.For(header,bd,aft)),[Ast.Other s])
-  | Ast.Do(header,body,tail) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.Do(header,bd,tail)),[Ast.Other s])
-  | Ast.Iterator(header,body,aft) ->
-      let (bd,_) = get_after_e body a in
-      (Ast.rewrap s (Ast.Iterator(header,bd,aft)),[Ast.Other s])
-  | Ast.Switch(header,lb,cases,rb) ->
-      let cases =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-               let (body,_) = get_after body [] in
-               Ast.rewrap case_line (Ast.CaseLine(header,body))
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      (Ast.rewrap s (Ast.Switch(header,lb,cases,rb)),[Ast.Other s])
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      let (bd,bda) = get_after body [] in
-      let (de,_) = get_after decls bda in
-      (Ast.rewrap s (Ast.FunDecl(header,lbrace,de,bd,rbrace)),[])
-  | _ -> failwith "get_after_e: not supported"
-
-let preprocess_dots sl =
-  let (sl,_) = get_before sl [] in
-  let (sl,_) = get_after sl [] in
-  sl
-
-let preprocess_dots_e sl =
-  let (sl,_) = get_before_e sl [] in
-  let (sl,_) = get_after_e sl [] in
-  sl
-
-(* --------------------------------------------------------------------- *)
-(* various return_related things *)
-
-let rec ends_in_return stmt_list =
-  match Ast.unwrap stmt_list with
-    Ast.DOTS(x) ->
-      (match List.rev x with
-       x::_ ->
-         (match Ast.unwrap x with
-           Ast.Atomic(x) ->
-             let rec loop x =
-               match Ast.unwrap x with
-                 Ast.Return(_,_) | Ast.ReturnExpr(_,_,_) -> true
-               | Ast.DisjRuleElem((_::_) as l) -> List.for_all loop l
-               | _ -> false in
-             loop x
-         | Ast.Disj(disjs) -> List.for_all ends_in_return disjs
-         | _ -> false)
-      |        _ -> false)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-(* --------------------------------------------------------------------- *)
-(* expressions *)
-
-let exptymatch l make_match make_guard_match =
-  let pos = fresh_pos() in
-  let matches_guard_matches =
-    List.map
-      (function x ->
-       let pos = Ast.make_mcode pos in
-       (make_match (Ast.set_pos x (Some pos)),
-        make_guard_match (Ast.set_pos x (Some pos))))
-      l in
-  let (matches,guard_matches) = List.split matches_guard_matches in
-  let rec suffixes = function
-      [] -> []
-    | x::xs -> xs::(suffixes xs) in
-  let prefixes = List.rev (suffixes (List.rev guard_matches)) in
-  let info = (* not null *)
-    List.map2
-      (function matcher ->
-       function negates ->
-         CTL.Exists
-           (false,pos,
-            ctl_and CTL.NONSTRICT matcher
-              (ctl_not
-                 (ctl_uncheck (List.fold_left ctl_or_fl CTL.False negates)))))
-      matches prefixes in
-  CTL.InnerAnd(List.fold_left ctl_or_fl CTL.False (List.rev info))
-
-(* code might be a DisjRuleElem, in which case we break it apart
-   code might contain an Exp or Ty
-   this one pushes the quantifier inwards *)
-let do_re_matches label guard res quantified minus_quantified =
-  let make_guard_match x =
-    let stmt_fvs = Ast.get_mfvs x in
-    let fvs = get_unquantified minus_quantified stmt_fvs in
-    non_saved_quantify fvs (make_match None true x) in
-  let make_match x =
-    let stmt_fvs = Ast.get_fvs x in
-    let fvs = get_unquantified quantified stmt_fvs in
-    quantify guard fvs (make_match None guard x) in
-  ctl_and CTL.NONSTRICT (label_pred_maker label)
-    (match List.map Ast.unwrap res with
-      [] -> failwith "unexpected empty disj"
-    | Ast.Exp(e)::rest -> exptymatch res make_match make_guard_match
-    | Ast.Ty(t)::rest  -> exptymatch res make_match make_guard_match
-    | all ->
-       if List.exists (function Ast.Exp(_) | Ast.Ty(_) -> true | _ -> false)
-           all
-       then failwith "unexpected exp or ty";
-       List.fold_left ctl_seqor CTL.False
-         (List.rev (List.map make_match res)))
-
-(* code might be a DisjRuleElem, in which case we break it apart
-   code doesn't contain an Exp or Ty
-   this one is for use when it is not practical to push the quantifier inwards
- *)
-let header_match label guard code : ('a, Ast.meta_name, 'b) CTL.generic_ctl =
-  match Ast.unwrap code with
-    Ast.DisjRuleElem(res) ->
-      let make_match = make_match None guard in
-      let orop = if guard then ctl_or else ctl_seqor in
-      ctl_and CTL.NONSTRICT (label_pred_maker label)
-      (List.fold_left orop CTL.False (List.map make_match res))
-  | _ -> make_match label guard code
-
-(* --------------------------------------------------------------------- *)
-(* control structures *)
-
-let end_control_structure fvs header body after_pred
-    after_checks no_after_checks (afvs,afresh,ainh,aft) after label guard =
-  (* aft indicates what is added after the whole if, which has to be added
-     to the endif node *)
-  let (aft_needed,after_branch) =
-    match aft with
-      Ast.CONTEXT(_,Ast.NOTHING) ->
-       (false,make_seq_after2 guard after_pred after)
-    | _ ->
-       let match_endif =
-         make_match label guard
-           (make_meta_rule_elem aft (afvs,afresh,ainh)) in
-       (true,
-        make_seq_after guard after_pred
-          (After(make_seq_after guard match_endif after))) in
-  let body = body after_branch in
-  let s = guard_to_strict guard in
-  (* the code *)
-  quantify guard fvs
-    (ctl_and s header
-       (opt_and guard
-         (match (after,aft_needed) with
-           (After _,_) (* pattern doesn't end here *)
-         | (_,true) (* + code added after *) -> after_checks
-         | _ -> no_after_checks)
-         (ctl_ax_absolute s body)))
-
-let ifthen ifheader branch ((afvs,_,_,_) as aft) after
-    quantified minus_quantified label llabel slabel recurse make_match guard =
-(* "if (test) thn" becomes:
-    if(test) & AX((TrueBranch & AX thn) v FallThrough v After)
-
-    "if (test) thn; after" becomes:
-    if(test) & AX((TrueBranch & AX thn) v FallThrough v (After & AXAX after))
-             & EX After
-*)
-  (* free variables *) 
-  let (efvs,bfvs) =
-    match seq_fvs quantified
-       [Ast.get_fvs ifheader;Ast.get_fvs branch;afvs] with
-      [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-    | _ -> failwith "not possible" in
-  let new_quantified = Common.union_set bfvs quantified in
-  let (mefvs,mbfvs) =
-    match seq_fvs minus_quantified
-       [Ast.get_mfvs ifheader;Ast.get_mfvs branch;[]] with
-      [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-    | _ -> failwith "not possible" in
-  let new_mquantified = Common.union_set mbfvs minus_quantified in
-  (* if header *)
-  let if_header = quantify guard efvs (make_match ifheader) in
-  (* then branch and after *)
-  let lv = get_label_ctr() in
-  let used = ref false in
-  let true_branch =
-    make_seq guard
-      [truepred label; recurse branch Tail new_quantified new_mquantified
-         (Some (lv,used)) llabel slabel guard] in
-  let after_pred = aftpred label in
-  let or_cases after_branch =
-    ctl_or true_branch (ctl_or (fallpred label) after_branch) in
-  let (if_header,wrapper) =
-    if !used
-    then
-      let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-      (ctl_and CTL.NONSTRICT(*???*) if_header label_pred,
-       (function body -> quantify true [lv] body))
-    else (if_header,function x -> x) in
-  wrapper
-    (end_control_structure bfvs if_header or_cases after_pred
-       (Some(ctl_ex after_pred)) None aft after label guard)
-
-let ifthenelse ifheader branch1 els branch2 ((afvs,_,_,_) as aft) after
-    quantified minus_quantified label llabel slabel recurse make_match guard =
-(*  "if (test) thn else els" becomes:
-    if(test) & AX((TrueBranch & AX thn) v
-                  (FalseBranch & AX (else & AX els)) v After)
-             & EX FalseBranch
-
-    "if (test) thn else els; after" becomes:
-    if(test) & AX((TrueBranch & AX thn) v
-                  (FalseBranch & AX (else & AX els)) v
-                  (After & AXAX after))
-             & EX FalseBranch
-             & EX After
-*)
-  (* free variables *)
-  let (e1fvs,b1fvs,s1fvs) =
-    match seq_fvs quantified
-       [Ast.get_fvs ifheader;Ast.get_fvs branch1;afvs] with
-      [(e1fvs,b1fvs);(s1fvs,b1afvs);_] ->
-       (e1fvs,Common.union_set b1fvs b1afvs,s1fvs)
-    | _ -> failwith "not possible" in
-  let (e2fvs,b2fvs,s2fvs) =
-    (* fvs on else? *)
-    match seq_fvs quantified
-       [Ast.get_fvs ifheader;Ast.get_fvs branch2;afvs] with
-      [(e2fvs,b2fvs);(s2fvs,b2afvs);_] ->
-       (e2fvs,Common.union_set b2fvs b2afvs,s2fvs)
-    | _ -> failwith "not possible" in
-  let bothfvs        = union (union b1fvs b2fvs) (intersect s1fvs s2fvs) in
-  let exponlyfvs     = intersect e1fvs e2fvs in
-  let new_quantified = union bothfvs quantified in
-  (* minus free variables *)
-  let (me1fvs,mb1fvs,ms1fvs) =
-    match seq_fvs minus_quantified
-       [Ast.get_mfvs ifheader;Ast.get_mfvs branch1;[]] with
-      [(e1fvs,b1fvs);(s1fvs,b1afvs);_] ->
-       (e1fvs,Common.union_set b1fvs b1afvs,s1fvs)
-    | _ -> failwith "not possible" in
-  let (me2fvs,mb2fvs,ms2fvs) =
-    (* fvs on else? *)
-    match seq_fvs minus_quantified
-       [Ast.get_mfvs ifheader;Ast.get_mfvs branch2;[]] with
-      [(e2fvs,b2fvs);(s2fvs,b2afvs);_] ->
-       (e2fvs,Common.union_set b2fvs b2afvs,s2fvs)
-    | _ -> failwith "not possible" in
-  let mbothfvs       = union (union mb1fvs mb2fvs) (intersect ms1fvs ms2fvs) in
-  let new_mquantified = union mbothfvs minus_quantified in
-  (* if header *)
-  let if_header = quantify guard exponlyfvs (make_match ifheader) in
-  (* then and else branches *)
-  let lv = get_label_ctr() in
-  let used = ref false in
-  let true_branch =
-    make_seq guard
-      [truepred label; recurse branch1 Tail new_quantified new_mquantified
-         (Some (lv,used)) llabel slabel guard] in
-  let false_branch =
-    make_seq guard
-      [falsepred label; make_match els;
-       recurse branch2 Tail new_quantified new_mquantified
-         (Some (lv,used)) llabel slabel guard] in
-  let after_pred = aftpred label in
-  let or_cases after_branch =
-    ctl_or true_branch (ctl_or false_branch after_branch) in
-  let s = guard_to_strict guard in
-  let (if_header,wrapper) =
-    if !used
-    then
-      let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-      (ctl_and CTL.NONSTRICT(*???*) if_header label_pred,
-       (function body -> quantify true [lv] body))
-    else (if_header,function x -> x) in
-  wrapper
-    (end_control_structure bothfvs if_header or_cases after_pred
-      (Some(ctl_and s (ctl_ex (falsepred label)) (ctl_ex after_pred)))
-      (Some(ctl_ex (falsepred label)))
-      aft after label guard)
-
-let forwhile header body ((afvs,_,_,_) as aft) after
-    quantified minus_quantified label recurse make_match guard =
-  let process _ =
-    (* the translation in this case is similar to that of an if with no else *)
-    (* free variables *) 
-    let (efvs,bfvs) =
-      match seq_fvs quantified [Ast.get_fvs header;Ast.get_fvs body;afvs] with
-       [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-      | _ -> failwith "not possible" in
-    let new_quantified = Common.union_set bfvs quantified in
-    (* minus free variables *) 
-    let (mefvs,mbfvs) =
-      match seq_fvs minus_quantified
-         [Ast.get_mfvs header;Ast.get_mfvs body;[]] with
-       [(efvs,b1fvs);(_,b2fvs);_] -> (efvs,Common.union_set b1fvs b2fvs)
-      | _ -> failwith "not possible" in
-    let new_mquantified = Common.union_set mbfvs minus_quantified in
-    (* loop header *)
-    let header = quantify guard efvs (make_match header) in
-    let lv = get_label_ctr() in
-    let used = ref false in
-    let body =
-      make_seq guard
-       [inlooppred label;
-         recurse body Tail new_quantified new_mquantified
-           (Some (lv,used)) (Some (lv,used)) None guard] in
-    let after_pred = fallpred label in
-    let or_cases after_branch = ctl_or body after_branch in
-    let (header,wrapper) =
-      if !used
-      then
-       let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-       (ctl_and CTL.NONSTRICT(*???*) header label_pred,
-        (function body -> quantify true [lv] body))
-      else (header,function x -> x) in
-    wrapper
-      (end_control_structure bfvs header or_cases after_pred
-        (Some(ctl_ex after_pred)) None aft after label guard) in
-  match (Ast.unwrap body,aft) with
-    (Ast.Atomic(re),(_,_,_,Ast.CONTEXT(_,Ast.NOTHING))) ->
-      (match Ast.unwrap re with
-       Ast.MetaStmt((_,_,Ast.CONTEXT(_,Ast.NOTHING),_),
-                    Type_cocci.Unitary,_,false) ->
-         let (efvs) =
-           match seq_fvs quantified [Ast.get_fvs header] with
-             [(efvs,_)] -> efvs
-           | _ -> failwith "not possible" in
-         quantify guard efvs (make_match header)
-      | _ -> process())
-  | _ -> process()
-  
-(* --------------------------------------------------------------------- *)
-(* statement metavariables *)
-
-(* issue: an S metavariable that is not an if branch/loop body
-   should not match an if branch/loop body, so check that the labels
-   of the nodes before the first node matched by the S are different
-   from the label of the first node matched by the S *)
-let sequencibility body label_pred process_bef_aft = function
-    Ast.Sequencible | Ast.SequencibleAfterDots [] ->
-      body
-       (function x ->
-         (ctl_and CTL.NONSTRICT (ctl_not (ctl_back_ax label_pred)) x))
-  | Ast.SequencibleAfterDots l ->
-      (* S appears after some dots.  l is the code that comes after the S.
-        want to search for that first, because S can match anything, while
-        the stuff after is probably more restricted *)
-      let afts = List.map process_bef_aft l in
-      let ors = foldl1 ctl_or afts in
-      ctl_and CTL.NONSTRICT
-       (ctl_ef (ctl_and CTL.NONSTRICT ors (ctl_back_ax label_pred)))
-       (body
-          (function x ->
-            ctl_and CTL.NONSTRICT (ctl_not (ctl_back_ax label_pred)) x))
-  | Ast.NotSequencible -> body (function x -> x)
-
-let svar_context_with_add_after stmt s label quantified d ast
-    seqible after process_bef_aft guard fvinfo =
-  let label_var = (*fresh_label_var*) string2var "_lab" in
-  let label_pred =
-    CTL.Pred (Lib_engine.Label(label_var),CTL.Control) in
-  let prelabel_pred =
-    CTL.Pred (Lib_engine.PrefixLabel(label_var),CTL.Control) in
-  let matcher d = make_match None guard (make_meta_rule_elem d fvinfo) in
-  let full_metamatch = matcher d in
-  let first_metamatch =
-    matcher
-      (match d with
-       Ast.CONTEXT(pos,Ast.BEFOREAFTER(bef,_)) ->
-         Ast.CONTEXT(pos,Ast.BEFORE(bef))
-      |        Ast.CONTEXT(pos,_) -> Ast.CONTEXT(pos,Ast.NOTHING)
-      | Ast.MINUS(_,_) | Ast.PLUS -> failwith "not possible") in
-  let middle_metamatch =
-    matcher
-      (match d with
-       Ast.CONTEXT(pos,_) -> Ast.CONTEXT(pos,Ast.NOTHING)
-      | Ast.MINUS(_,_) | Ast.PLUS -> failwith "not possible") in
-  let last_metamatch =
-    matcher
-      (match d with
-       Ast.CONTEXT(pos,Ast.BEFOREAFTER(_,aft)) ->
-         Ast.CONTEXT(pos,Ast.AFTER(aft))
-      |        Ast.CONTEXT(_,_) -> d
-      | Ast.MINUS(_,_) | Ast.PLUS -> failwith "not possible") in
-
-  let rest_nodes =
-    ctl_and CTL.NONSTRICT middle_metamatch prelabel_pred in  
-  let left_or = (* the whole statement is one node *)
-    make_seq guard
-      [full_metamatch; and_after guard (ctl_not prelabel_pred) after] in
-  let right_or = (* the statement covers multiple nodes *)
-    make_seq guard
-      [first_metamatch;
-        ctl_au CTL.NONSTRICT
-         rest_nodes
-         (make_seq guard
-            [ctl_and CTL.NONSTRICT last_metamatch label_pred;
-              and_after guard
-                (ctl_not prelabel_pred) after])] in
-  let body f =
-    ctl_and CTL.NONSTRICT label_pred
-       (f (ctl_and CTL.NONSTRICT
-           (make_raw_match label false ast) (ctl_or left_or right_or))) in
-  let stmt_fvs = Ast.get_fvs stmt in
-  let fvs = get_unquantified quantified stmt_fvs in
-  quantify guard (label_var::fvs)
-    (sequencibility body label_pred process_bef_aft seqible)
-
-let svar_minus_or_no_add_after stmt s label quantified d ast
-    seqible after process_bef_aft guard fvinfo =
-  let label_var = (*fresh_label_var*) string2var "_lab" in
-  let label_pred =
-    CTL.Pred (Lib_engine.Label(label_var),CTL.Control) in
-  let prelabel_pred =
-    CTL.Pred (Lib_engine.PrefixLabel(label_var),CTL.Control) in
-  let matcher d = make_match None guard (make_meta_rule_elem d fvinfo) in
-  let pure_d =
-    (* don't have to put anything before the beginning, so don't have to
-       distinguish the first node.  so don't have to bother about paths,
-       just use the label. label ensures that found nodes match up with
-       what they should because it is in the lhs of the andany. *)
-    match d with
-       Ast.MINUS(pos,[]) -> true
-      | Ast.CONTEXT(pos,Ast.NOTHING) -> true
-      | _ -> false in
-  let ender =
-    match (pure_d,after) with
-      (true,Tail) | (true,End) | (true,VeryEnd) ->
-       (* the label sharing makes it safe to use AndAny *)
-       CTL.HackForStmt(CTL.FORWARD,CTL.NONSTRICT,
-                       ctl_and CTL.NONSTRICT label_pred
-                         (make_raw_match label false ast),
-                       ctl_and CTL.NONSTRICT (matcher d) prelabel_pred)
-    | _ ->
-       (* more safe but less efficient *)
-       let first_metamatch = matcher d in
-       let rest_metamatch =
-         matcher
-           (match d with
-             Ast.MINUS(pos,_) -> Ast.MINUS(pos,[])
-           | Ast.CONTEXT(pos,_) -> Ast.CONTEXT(pos,Ast.NOTHING)
-           | Ast.PLUS -> failwith "not possible") in
-       let rest_nodes = ctl_and CTL.NONSTRICT rest_metamatch prelabel_pred in
-       let last_node = and_after guard (ctl_not prelabel_pred) after in
-       (ctl_and CTL.NONSTRICT (make_raw_match label false ast)
-          (make_seq guard
-             [first_metamatch;
-               ctl_au CTL.NONSTRICT rest_nodes last_node])) in
-  let body f = ctl_and CTL.NONSTRICT label_pred (f ender) in
-  let stmt_fvs = Ast.get_fvs stmt in
-  let fvs = get_unquantified quantified stmt_fvs in
-  quantify guard (label_var::fvs)
-    (sequencibility body label_pred process_bef_aft seqible)
-
-(* --------------------------------------------------------------------- *)
-(* dots and nests *)
-
-let dots_au is_strict toend label s wrapcode x seq_after y quantifier =
-  let matchgoto = gotopred None in
-  let matchbreak =
-    make_match None false
-      (wrapcode
-        (Ast.Break(Ast.make_mcode "break",Ast.make_mcode ";"))) in
-  let matchcontinue =
-     make_match None false
-      (wrapcode
-        (Ast.Continue(Ast.make_mcode "continue",Ast.make_mcode ";"))) in
-  let stop_early =
-    if quantifier = Exists
-    then Common.Left(CTL.False)
-    else if toend
-    then Common.Left(CTL.Or(aftpred label,exitpred label))
-    else if is_strict
-    then Common.Left(aftpred label)
-    else
-      Common.Right
-       (function v ->
-         let lv = get_label_ctr() in
-         let labelpred = CTL.Pred(Lib_engine.Label lv,CTL.Control) in
-         let preflabelpred = label_pred_maker (Some (lv,ref true)) in
-         ctl_or (aftpred label)
-           (quantify false [lv]
-              (ctl_and CTL.NONSTRICT
-                 (ctl_and CTL.NONSTRICT (truepred label) labelpred)
-                 (ctl_au CTL.NONSTRICT
-                    (ctl_and CTL.NONSTRICT (ctl_not v) preflabelpred)
-                    (ctl_and CTL.NONSTRICT preflabelpred
-                       (ctl_or (retpred None)
-                          (if !Flag_matcher.only_return_is_error_exit
-                          then CTL.True
-                          else
-                            (ctl_or matchcontinue
-                               (ctl_and CTL.NONSTRICT
-                                  (ctl_or matchgoto matchbreak)
-                                  (ctl_ag s (ctl_not seq_after))))))))))) in
-  let op = if quantifier = !exists then ctl_au else ctl_anti_au in
-  let v = get_let_ctr() in
-  op s x
-    (match stop_early with
-      Common.Left x -> ctl_or y x
-    | Common.Right stop_early ->
-       CTL.Let(v,y,ctl_or (CTL.Ref v) (stop_early (CTL.Ref v))))
-
-let rec dots_and_nests plus nest whencodes bef aft dotcode after label
-    process_bef_aft statement_list statement guard quantified wrapcode =
-  let ctl_and_ns = ctl_and CTL.NONSTRICT in
-  (* proces bef_aft *)
-  let shortest l =
-    List.fold_left ctl_or_fl CTL.False (List.map process_bef_aft l) in
-  let bef_aft = (* to be negated *)
-    try
-      let _ =
-       List.find
-         (function Ast.WhenModifier(Ast.WhenAny) -> true | _ -> false)
-         whencodes in
-      CTL.False
-    with Not_found -> shortest (Common.union_set bef aft) in
-  let is_strict =
-    List.exists
-      (function Ast.WhenModifier(Ast.WhenStrict) -> true | _ -> false)
-      whencodes in
-  let check_quantifier quant other =
-    if List.exists
-       (function Ast.WhenModifier(x) -> x = quant | _ -> false)
-       whencodes
-    then
-      if List.exists
-         (function Ast.WhenModifier(x) -> x = other | _ -> false)
-         whencodes
-      then failwith "inconsistent annotation on dots"
-      else true
-    else false in
-  let quantifier =
-    if check_quantifier Ast.WhenExists Ast.WhenForall
-    then Exists
-    else
-      if check_quantifier Ast.WhenForall Ast.WhenExists
-      then Forall
-      else !exists in
-  (* the following is used when we find a goto, etc and consider accepting
-     without finding the rest of the pattern *)
-  let aft = shortest aft in
-  (* process whencode *)
-  let labelled = label_pred_maker label in
-  let whencodes arg =
-    let (poswhen,negwhen) =
-      List.fold_left
-       (function (poswhen,negwhen) ->
-         function
-             Ast.WhenNot whencodes ->
-               (poswhen,ctl_or (statement_list whencodes) negwhen)
-           | Ast.WhenAlways stm ->
-               (ctl_and CTL.NONSTRICT (statement stm) poswhen,negwhen)
-           | Ast.WhenModifier(_) -> (poswhen,negwhen)
-           | Ast.WhenNotTrue(e) ->
-               (poswhen,
-                 ctl_or (whencond_true e label guard quantified) negwhen)
-           | Ast.WhenNotFalse(e) ->
-               (poswhen,
-                 ctl_or (whencond_false e label guard quantified) negwhen))
-       (CTL.True,bef_aft) (List.rev whencodes) in
-    let poswhen = ctl_and_ns arg poswhen in
-    let negwhen =
-(*    if !exists
-      then*)
-        (* add in After, because it's not part of the program *)
-       ctl_or (aftpred label) negwhen
-      (*else negwhen*) in
-    ctl_and_ns poswhen (ctl_not negwhen) in
-  (* process dot code, if any *)
-  let dotcode =
-    match (dotcode,guard) with
-      (None,_) | (_,true) -> CTL.True
-    | (Some dotcode,_) -> dotcode in
-  (* process nest code, if any *)
-  (* whencode goes in the negated part of the nest; if no nest, just goes
-      on the "true" in between code *)
-  let plus_var = if plus then get_label_ctr() else string2var "" in
-  let plus_var2 = if plus then get_label_ctr() else string2var "" in
-  let ornest =
-    match (nest,guard && not plus) with
-      (None,_) | (_,true) -> whencodes CTL.True
-    | (Some nest,false) ->
-       let v = get_let_ctr() in
-       let is_plus x =
-         if plus
-         then
-           (* the idea is that BindGood is sort of a witness; a witness to
-              having found the subterm in at least one place.  If there is
-              not a witness, then there is a risk that it will get thrown
-              away, if it is merged with a node that has an empty
-              environment.  See tests/nestplus.  But this all seems
-              rather suspicious *)
-           CTL.And(CTL.NONSTRICT,x,
-                   CTL.Exists(true,plus_var2,
-                              CTL.Pred(Lib_engine.BindGood(plus_var),
-                                       CTL.Modif plus_var2)))
-         else x in
-        CTL.Let(v,nest,
-               CTL.Or(is_plus (CTL.Ref v),
-                      whencodes (CTL.Not(ctl_uncheck (CTL.Ref v))))) in
-  let plus_modifier x =
-    if plus
-    then
-      CTL.Exists
-       (false,plus_var,
-        (CTL.And
-           (CTL.NONSTRICT,x,
-            CTL.Not(CTL.Pred(Lib_engine.BindBad(plus_var),CTL.Control)))))
-    else x in
-
-  let ender =
-    match after with
-      After f -> f
-    | Guard f -> ctl_uncheck f
-    | VeryEnd ->
-       let exit = endpred label in
-       let errorexit = exitpred label in
-       ctl_or exit errorexit
-    (* not at all sure what the next two mean... *)
-    | End -> CTL.True
-    | Tail ->
-       (match label with
-         Some (lv,used) -> used := true;
-           ctl_or (CTL.Pred(Lib_engine.Label lv,CTL.Control))
-             (ctl_back_ex (ctl_or (retpred label) (gotopred label)))
-       | None -> endpred label)
-         (* was the following, but not clear why sgrep should allow
-            incomplete patterns
-       let exit = endpred label in
-       let errorexit = exitpred label in
-       if !exists
-       then ctl_or exit errorexit (* end anywhere *)
-       else exit (* end at the real end of the function *) *) in
-  plus_modifier
-    (dots_au is_strict ((after = Tail) or (after = VeryEnd))
-       label (guard_to_strict guard) wrapcode
-      (ctl_and_ns dotcode (ctl_and_ns ornest labelled))
-      aft ender quantifier)
-
-and get_whencond_exps e =
-  match Ast.unwrap e with
-    Ast.Exp e -> [e]
-  | Ast.DisjRuleElem(res) ->
-      List.fold_left Common.union_set [] (List.map get_whencond_exps res)
-  | _ -> failwith "not possible"
-
-and make_whencond_headers e e1 label guard quantified =
-  let fvs = Ast.get_fvs e in
-  let header_pred h =
-    quantify guard (get_unquantified quantified fvs)
-      (make_match label guard h) in
-  let if_header e1 =
-    header_pred
-      (Ast.rewrap e
-        (Ast.IfHeader
-           (Ast.make_mcode "if",
-            Ast.make_mcode "(",e1,Ast.make_mcode ")"))) in
-  let while_header e1 =
-    header_pred
-      (Ast.rewrap e
-        (Ast.WhileHeader
-           (Ast.make_mcode "while",
-            Ast.make_mcode "(",e1,Ast.make_mcode ")"))) in
-  let for_header e1 =
-    header_pred
-      (Ast.rewrap e
-        (Ast.ForHeader
-           (Ast.make_mcode "for",Ast.make_mcode "(",None,Ast.make_mcode ";",
-            Some e1,Ast.make_mcode ";",None,Ast.make_mcode ")"))) in
-  let if_headers =
-    List.fold_left ctl_or CTL.False (List.map if_header e1) in
-  let while_headers =
-    List.fold_left ctl_or CTL.False (List.map while_header e1) in
-  let for_headers =
-    List.fold_left ctl_or CTL.False (List.map for_header e1) in
-  (if_headers, while_headers, for_headers)
-
-and whencond_true e label guard quantified =
-  let e1 = get_whencond_exps e in
-  let (if_headers, while_headers, for_headers) =
-    make_whencond_headers e e1 label guard quantified in
-  ctl_or
-    (ctl_and CTL.NONSTRICT (truepred label) (ctl_back_ex if_headers))
-    (ctl_and CTL.NONSTRICT
-       (inlooppred label) (ctl_back_ex (ctl_or while_headers for_headers)))
-
-and whencond_false e label guard quantified =
-  let e1 = get_whencond_exps e in
-  let (if_headers, while_headers, for_headers) =
-    make_whencond_headers e e1 label guard quantified in
-  ctl_or (ctl_and CTL.NONSTRICT (falsepred label) (ctl_back_ex if_headers))
-    (ctl_and CTL.NONSTRICT (fallpred label)
-       (ctl_or (ctl_back_ex if_headers)
-         (ctl_or (ctl_back_ex while_headers) (ctl_back_ex for_headers))))
-
-(* --------------------------------------------------------------------- *)
-(* the main translation loop *)
-  
-let rec statement_list stmt_list after quantified minus_quantified
-    label llabel slabel dots_before guard =
-  let isdots x =
-    (* include Disj to be on the safe side *)
-    match Ast.unwrap x with
-      Ast.Dots _ | Ast.Nest _ | Ast.Disj _ -> true | _ -> false in
-  let compute_label l e db = if db or isdots e then l else None in
-  match Ast.unwrap stmt_list with
-    Ast.DOTS(x) ->
-      let rec loop quantified minus_quantified dots_before label llabel slabel
-         = function
-         ([],_,_) -> (match after with After f -> f | _ -> CTL.True)
-       | ([e],_,_) ->
-           statement e after quantified minus_quantified
-             (compute_label label e dots_before)
-             llabel slabel guard
-       | (e::sl,fv::fvs,mfv::mfvs) ->
-           let shared = intersectll fv fvs in
-           let unqshared = get_unquantified quantified shared in
-           let new_quantified = Common.union_set unqshared quantified in
-           let minus_shared = intersectll mfv mfvs in
-           let munqshared =
-             get_unquantified minus_quantified minus_shared in
-           let new_mquantified =
-             Common.union_set munqshared minus_quantified in
-           quantify guard unqshared
-             (statement e
-                (After
-                   (let (label1,llabel1,slabel1) =
-                     match Ast.unwrap e with
-                       Ast.Atomic(re) ->
-                         (match Ast.unwrap re with
-                           Ast.Goto _ -> (None,None,None)
-                         | _ -> (label,llabel,slabel))
-                     | _ -> (label,llabel,slabel) in
-                   loop new_quantified new_mquantified (isdots e)
-                     label1 llabel1 slabel1
-                     (sl,fvs,mfvs)))
-                new_quantified new_mquantified
-                (compute_label label e dots_before) llabel slabel guard)
-       | _ -> failwith "not possible" in
-      loop quantified minus_quantified dots_before
-       label llabel slabel
-       (x,List.map Ast.get_fvs x,List.map Ast.get_mfvs x)
-  | Ast.CIRCLES(x) -> failwith "not supported"
-  | Ast.STARS(x) -> failwith "not supported"
-
-(* llabel is the label of the enclosing loop and slabel is the label of the
-   enclosing switch *)
-and statement stmt after quantified minus_quantified
-    label llabel slabel guard =
-  let ctl_au     = ctl_au CTL.NONSTRICT in
-  let ctl_ax     = ctl_ax CTL.NONSTRICT in
-  let ctl_and    = ctl_and CTL.NONSTRICT in
-  let make_seq   = make_seq guard in
-  let make_seq_after = make_seq_after guard in
-  let real_make_match = make_match in
-  let make_match = header_match label guard in
-
-  let dots_done = ref false in (* hack for dots cases we can easily handle *)
-
-  let term =
-  match Ast.unwrap stmt with
-    Ast.Atomic(ast) ->
-      (match Ast.unwrap ast with
-       (* the following optimisation is not a good idea, because when S
-          is alone, we would like it not to match a declaration.
-          this makes more matching for things like when (...) S, but perhaps
-          that matching is not so costly anyway *)
-       (*Ast.MetaStmt(_,Type_cocci.Unitary,_,false) when guard -> CTL.True*)
-      |        Ast.MetaStmt((s,_,(Ast.CONTEXT(_,Ast.BEFOREAFTER(_,_)) as d),_),
-                    keep,seqible,_)
-      | Ast.MetaStmt((s,_,(Ast.CONTEXT(_,Ast.AFTER(_)) as d),_),
-                    keep,seqible,_)->
-         svar_context_with_add_after stmt s label quantified d ast seqible
-           after
-           (process_bef_aft quantified minus_quantified
-              label llabel slabel true)
-           guard
-           (Ast.get_fvs stmt, Ast.get_fresh stmt, Ast.get_inherited stmt)
-
-      |        Ast.MetaStmt((s,_,d,_),keep,seqible,_) ->
-         svar_minus_or_no_add_after stmt s label quantified d ast seqible
-           after
-           (process_bef_aft quantified minus_quantified
-              label llabel slabel true)
-           guard
-           (Ast.get_fvs stmt, Ast.get_fresh stmt, Ast.get_inherited stmt)
-
-      |        _ ->
-         let term =
-           match Ast.unwrap ast with
-             Ast.DisjRuleElem(res) ->
-               do_re_matches label guard res quantified minus_quantified
-           | Ast.Exp(_) | Ast.Ty(_) ->
-               let stmt_fvs = Ast.get_fvs stmt in
-               let fvs = get_unquantified quantified stmt_fvs in
-               CTL.InnerAnd(quantify guard fvs (make_match ast))
-           | _ ->
-               let stmt_fvs = Ast.get_fvs stmt in
-               let fvs = get_unquantified quantified stmt_fvs in
-               quantify guard fvs (make_match ast) in
-         match Ast.unwrap ast with
-           Ast.Break(brk,semi) ->
-             (match (llabel,slabel) with
-               (_,Some(lv,used)) -> (* use switch label if there is one *)
-                 ctl_and term (bclabel_pred_maker slabel)
-             | _ -> ctl_and term (bclabel_pred_maker llabel))
-         | Ast.Continue(brk,semi) -> ctl_and term (bclabel_pred_maker llabel)
-          | Ast.Return((_,info,retmc,pos),(_,_,semmc,_)) ->
-             (* discard pattern that comes after return *)
-             let normal_res = make_seq_after term after in
-             (* the following code tries to propagate the modifications on
-                return; to a close brace, in the case where the final return
-                is absent *)
-             let new_mc =
-               match (retmc,semmc) with
-                 (Ast.MINUS(_,l1),Ast.MINUS(_,l2)) when !Flag.sgrep_mode2 ->
-                   (* in sgrep mode, we can propagate the - *)
-                   Some (Ast.MINUS(Ast.NoPos,l1@l2))
-               | (Ast.MINUS(_,l1),Ast.MINUS(_,l2))
-               | (Ast.CONTEXT(_,Ast.BEFORE(l1)),
-                  Ast.CONTEXT(_,Ast.AFTER(l2))) ->
-                   Some (Ast.CONTEXT(Ast.NoPos,Ast.BEFORE(l1@l2)))
-               | (Ast.CONTEXT(_,Ast.BEFORE(_)),Ast.CONTEXT(_,Ast.NOTHING))
-               | (Ast.CONTEXT(_,Ast.NOTHING),Ast.CONTEXT(_,Ast.NOTHING)) ->
-                   Some retmc
-               | (Ast.CONTEXT(_,Ast.NOTHING),Ast.CONTEXT(_,Ast.AFTER(l))) ->
-                   Some (Ast.CONTEXT(Ast.NoPos,Ast.BEFORE(l)))
-               | _ -> None in
-             let ret = Ast.make_mcode "return" in
-             let edots =
-               Ast.rewrap ast (Ast.Edots(Ast.make_mcode "...",None)) in
-             let semi = Ast.make_mcode ";" in
-             let simple_return =
-               make_match(Ast.rewrap ast (Ast.Return(ret,semi))) in
-             let return_expr =
-               make_match(Ast.rewrap ast (Ast.ReturnExpr(ret,edots,semi))) in
-             (match new_mc with
-               Some new_mc ->
-                 let exit = endpred None in
-                 let mod_rbrace =
-                   Ast.rewrap ast (Ast.SeqEnd (("}",info,new_mc,pos))) in
-                 let stripped_rbrace =
-                   Ast.rewrap ast (Ast.SeqEnd(Ast.make_mcode "}")) in
-                 ctl_or normal_res
-                   (ctl_and (make_match mod_rbrace)
-                      (ctl_and
-                         (ctl_back_ax
-                            (ctl_not
-                               (ctl_uncheck
-                                  (ctl_or simple_return return_expr))))
-                         (ctl_au
-                            (make_match stripped_rbrace)
-                            (* error exit not possible; it is in the middle
-                               of code, so a return is needed *)
-                            exit)))
-             | _ ->
-                 (* some change in the middle of the return, so have to
-                    find an actual return *)
-                 normal_res)
-          | _ ->
-             (* should try to deal with the dots_bef_aft problem elsewhere,
-                but don't have the courage... *)
-             let term =
-               if guard
-               then term
-               else
-                 do_between_dots stmt term End
-                   quantified minus_quantified label llabel slabel guard in
-             dots_done := true;
-             make_seq_after term after)
-  | Ast.Seq(lbrace,decls,body,rbrace) ->
-      let (lbfvs,b1fvs,b2fvs,b3fvs,rbfvs) =
-       match
-         seq_fvs quantified
-           [Ast.get_fvs lbrace;Ast.get_fvs decls;
-             Ast.get_fvs body;Ast.get_fvs rbrace]
-       with
-         [(lbfvs,b1fvs);(_,b2fvs);(_,b3fvs);(rbfvs,_)] ->
-           (lbfvs,b1fvs,b2fvs,b3fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let (mlbfvs,mb1fvs,mb2fvs,mb3fvs,mrbfvs) =
-       match
-         seq_fvs minus_quantified
-           [Ast.get_mfvs lbrace;Ast.get_mfvs decls;
-             Ast.get_mfvs body;Ast.get_mfvs rbrace]
-       with
-         [(lbfvs,b1fvs);(_,b2fvs);(_,b3fvs);(rbfvs,_)] ->
-           (lbfvs,b1fvs,b2fvs,b3fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let pv = count_nested_braces stmt in
-      let lv = get_label_ctr() in
-      let paren_pred = CTL.Pred(Lib_engine.Paren pv,CTL.Control) in
-      let label_pred = CTL.Pred(Lib_engine.Label lv,CTL.Control) in
-      let start_brace =
-       ctl_and
-         (quantify guard lbfvs (make_match lbrace))
-         (ctl_and paren_pred label_pred) in
-      let empty_rbrace =
-       match Ast.unwrap rbrace with
-         Ast.SeqEnd((data,info,_,pos)) ->
-           Ast.rewrap rbrace(Ast.SeqEnd(Ast.make_mcode data))
-       | _ -> failwith "unexpected close brace" in
-      let end_brace =
-       (* label is not needed; paren_pred is enough *)
-       quantify guard rbfvs
-         (ctl_au (make_match empty_rbrace)
-            (ctl_and
-               (real_make_match None guard rbrace)
-               paren_pred)) in
-      let new_quantified2 =
-       Common.union_set b1fvs (Common.union_set b2fvs quantified) in
-      let new_quantified3 = Common.union_set b3fvs new_quantified2 in
-      let new_mquantified2 =
-       Common.union_set mb1fvs (Common.union_set mb2fvs minus_quantified) in
-      let new_mquantified3 = Common.union_set mb3fvs new_mquantified2 in
-      let pattern_as_given =
-       let new_quantified2 = Common.union_set [pv] new_quantified2 in
-       let new_quantified3 = Common.union_set [pv] new_quantified3 in
-       quantify true [pv;lv]
-         (quantify guard b1fvs
-            (make_seq
-               [start_brace;
-                 quantify guard b2fvs
-                   (statement_list decls
-                      (After
-                         (quantify guard b3fvs
-                            (statement_list body
-                               (After (make_seq_after end_brace after))
-                               new_quantified3 new_mquantified3
-                               (Some (lv,ref true)) (* label mostly useful *)
-                               llabel slabel true guard)))
-                      new_quantified2 new_mquantified2
-                      (Some (lv,ref true)) llabel slabel false guard)])) in
-      if ends_in_return body
-      then
-       (* matching error handling code *)
-       (* Cases:
-          1. The pattern as given
-          2. A goto, and then some close braces, and then the pattern as
-          given, but without the braces (only possible if there are no
-          decls, and open and close braces are unmodified)
-          3. Part of the pattern as given, then a goto, and then the rest
-          of the pattern.  For this case, we just check that all paths have
-          a goto within the current braces.  checking for a goto at every
-          point in the pattern seems expensive and not worthwhile. *)
-       let pattern2 =
-         let body = preprocess_dots body in (* redo, to drop braces *)
-         make_seq
-           [gotopred label;
-             ctl_au
-               (make_match empty_rbrace)
-               (ctl_ax (* skip the destination label *)
-                  (quantify guard b3fvs
-                     (statement_list body End
-                        new_quantified3 new_mquantified3 None llabel slabel
-                        true guard)))] in
-       let pattern3 =
-         let new_quantified2 = Common.union_set [pv] new_quantified2 in
-         let new_quantified3 = Common.union_set [pv] new_quantified3 in
-         quantify true [pv;lv]
-           (quantify guard b1fvs
-              (make_seq
-                 [start_brace;
-                   ctl_and
-                     (CTL.AU (* want AF even for sgrep *)
-                        (CTL.FORWARD,CTL.STRICT,
-                         CTL.Pred(Lib_engine.PrefixLabel(lv),CTL.Control),
-                         ctl_and (* brace must be eventually after goto *)
-                           (gotopred (Some (lv,ref true)))
-                           (* want AF even for sgrep *)
-                           (CTL.AF(CTL.FORWARD,CTL.STRICT,end_brace))))
-                     (quantify guard b2fvs
-                        (statement_list decls
-                           (After
-                              (quantify guard b3fvs
-                                 (statement_list body Tail
-                                       (*After
-                                          (make_seq_after
-                                             nopv_end_brace after)*)
-                                    new_quantified3 new_mquantified3
-                                    None llabel slabel true guard)))
-                           new_quantified2 new_mquantified2
-                           (Some (lv,ref true))
-                           llabel slabel false guard))])) in
-       ctl_or pattern_as_given
-         (match Ast.unwrap decls with
-           Ast.DOTS([]) -> ctl_or pattern2 pattern3
-         | Ast.DOTS(l) -> pattern3
-         | _ -> failwith "circles and stars not supported")
-      else pattern_as_given
-  | Ast.IfThen(ifheader,branch,aft) ->
-      ifthen ifheader branch aft after quantified minus_quantified
-         label llabel slabel statement make_match guard
-        
-  | Ast.IfThenElse(ifheader,branch1,els,branch2,aft) ->
-      ifthenelse ifheader branch1 els branch2 aft after quantified
-         minus_quantified label llabel slabel statement make_match guard
-
-  | Ast.While(header,body,aft) | Ast.For(header,body,aft)
-  | Ast.Iterator(header,body,aft) ->
-      forwhile header body aft after quantified minus_quantified
-       label statement make_match guard
-
-  | Ast.Disj(stmt_dots_list) -> (* list shouldn't be empty *)
-      ctl_and
-       (label_pred_maker label)
-       (List.fold_left ctl_seqor CTL.False
-          (List.map
-             (function sl ->
-               statement_list sl after quantified minus_quantified label
-                 llabel slabel true guard)
-             stmt_dots_list))
-
-  | Ast.Nest(stmt_dots,whencode,multi,bef,aft) ->
-      (* label in recursive call is None because label check is already
-        wrapped around the corresponding code *)
-
-      let bfvs =
-       match seq_fvs quantified [Ast.get_wcfvs whencode;Ast.get_fvs stmt_dots]
-       with
-         [(wcfvs,bothfvs);(bdfvs,_)] -> bothfvs
-       | _ -> failwith "not possible" in
-
-      (* no minus version because when code doesn't contain any minus code *)
-      let new_quantified = Common.union_set bfvs quantified in
-
-      quantify guard bfvs
-       (let dots_pattern =
-         statement_list stmt_dots (a2n after) new_quantified minus_quantified
-           None llabel slabel true guard in
-       dots_and_nests multi
-         (Some dots_pattern) whencode bef aft None after label
-         (process_bef_aft new_quantified minus_quantified
-            None llabel slabel true)
-         (function x ->
-           statement_list x Tail new_quantified minus_quantified None
-             llabel slabel true true)
-         (function x ->
-           statement x Tail new_quantified minus_quantified None
-             llabel slabel true)
-         guard quantified
-         (function x -> Ast.set_fvs [] (Ast.rewrap stmt x)))
-
-  | Ast.Dots((_,i,d,_),whencodes,bef,aft) ->
-      let dot_code =
-       match d with
-         Ast.MINUS(_,_) ->
-            (* no need for the fresh metavar, but ... is a bit wierd as a
-              variable name *)
-           Some(make_match (make_meta_rule_elem d ([],[],[])))
-       | _ -> None in
-      dots_and_nests false None whencodes bef aft dot_code after label
-       (process_bef_aft quantified minus_quantified None llabel slabel true)
-       (function x ->
-         statement_list x Tail quantified minus_quantified
-           None llabel slabel true true)
-       (function x ->
-         statement x Tail quantified minus_quantified None llabel slabel true)
-       guard quantified
-       (function x -> Ast.set_fvs [] (Ast.rewrap stmt x))
-
-  | Ast.Switch(header,lb,cases,rb) ->
-      let rec intersect_all = function
-         [] -> []
-       | [x] -> x
-       | x::xs -> intersect x (intersect_all xs) in
-      let rec union_all l = List.fold_left union [] l in
-      (* start normal variables *)
-      let header_fvs = Ast.get_fvs header in
-      let lb_fvs = Ast.get_fvs lb in
-      let case_fvs = List.map Ast.get_fvs cases in
-      let rb_fvs = Ast.get_fvs rb in
-      let (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-          all_casefvs,all_b3fvs,all_rbfvs) =
-       List.fold_left
-         (function (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-                    all_casefvs,all_b3fvs,all_rbfvs) ->
-           function case_fvs ->
-             match seq_fvs quantified [header_fvs;lb_fvs;case_fvs;rb_fvs] with
-               [(efvs,b1fvs);(lbfvs,b2fvs);(casefvs,b3fvs);(rbfvs,_)] ->
-                 (efvs::all_efvs,b1fvs::all_b1fvs,lbfvs::all_lbfvs,
-                  b2fvs::all_b2fvs,casefvs::all_casefvs,b3fvs::all_b3fvs,
-                  rbfvs::all_rbfvs)
-             | _ -> failwith "not possible")
-         ([],[],[],[],[],[],[]) case_fvs in
-      let (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-          all_casefvs,all_b3fvs,all_rbfvs) =
-       (List.rev all_efvs,List.rev all_b1fvs,List.rev all_lbfvs,
-        List.rev all_b2fvs,List.rev all_casefvs,List.rev all_b3fvs,
-        List.rev all_rbfvs) in
-      let exponlyfvs = intersect_all all_efvs in
-      let lbonlyfvs = intersect_all all_lbfvs in
-(* don't do anything with right brace.  Hope there is no + code on it *)
-(*      let rbonlyfvs = intersect_all all_rbfvs in*)
-      let b1fvs = union_all all_b1fvs in
-      let new1_quantified = union b1fvs quantified in
-      let b2fvs = union (union_all all_b1fvs) (intersect_all all_casefvs) in
-      let new2_quantified = union b2fvs new1_quantified in
-(*      let b3fvs = union_all all_b3fvs in*)
-      (* ------------------- start minus free variables *)
-      let header_mfvs = Ast.get_mfvs header in
-      let lb_mfvs = Ast.get_mfvs lb in
-      let case_mfvs = List.map Ast.get_mfvs cases in
-      let rb_mfvs = Ast.get_mfvs rb in
-      let (all_mefvs,all_mb1fvs,all_mlbfvs,all_mb2fvs,
-          all_mcasefvs,all_mb3fvs,all_mrbfvs) =
-       List.fold_left
-         (function (all_efvs,all_b1fvs,all_lbfvs,all_b2fvs,
-                    all_casefvs,all_b3fvs,all_rbfvs) ->
-           function case_mfvs ->
-             match
-               seq_fvs quantified
-                 [header_mfvs;lb_mfvs;case_mfvs;rb_mfvs] with
-               [(efvs,b1fvs);(lbfvs,b2fvs);(casefvs,b3fvs);(rbfvs,_)] ->
-                 (efvs::all_efvs,b1fvs::all_b1fvs,lbfvs::all_lbfvs,
-                  b2fvs::all_b2fvs,casefvs::all_casefvs,b3fvs::all_b3fvs,
-                  rbfvs::all_rbfvs)
-             | _ -> failwith "not possible")
-         ([],[],[],[],[],[],[]) case_mfvs in
-      let (all_mefvs,all_mb1fvs,all_mlbfvs,all_mb2fvs,
-          all_mcasefvs,all_mb3fvs,all_mrbfvs) =
-       (List.rev all_mefvs,List.rev all_mb1fvs,List.rev all_mlbfvs,
-        List.rev all_mb2fvs,List.rev all_mcasefvs,List.rev all_mb3fvs,
-        List.rev all_mrbfvs) in
-(* don't do anything with right brace.  Hope there is no + code on it *)
-(*      let rbonlyfvs = intersect_all all_rbfvs in*)
-      let mb1fvs = union_all all_mb1fvs in
-      let new1_mquantified = union mb1fvs quantified in
-      let mb2fvs = union (union_all all_mb1fvs) (intersect_all all_mcasefvs) in
-      let new2_mquantified = union mb2fvs new1_mquantified in
-(*      let b3fvs = union_all all_b3fvs in*)
-      (* ------------------- end collection of free variables *)
-      let switch_header = quantify guard exponlyfvs (make_match header) in
-      let lb = quantify guard lbonlyfvs (make_match lb) in
-(*      let rb = quantify guard rbonlyfvs (make_match rb) in*)
-      let case_headers =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-               let e1fvs =
-                 match seq_fvs new2_quantified [Ast.get_fvs header] with
-                   [(e1fvs,_)] -> e1fvs
-                 | _ -> failwith "not possible" in
-               quantify guard e1fvs (real_make_match label true header)
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      let no_header =
-       ctl_not (List.fold_left ctl_or_fl CTL.False case_headers) in
-      let lv = get_label_ctr() in
-      let used = ref false in
-      let case_code =
-       List.map
-         (function case_line ->
-           match Ast.unwrap case_line with
-             Ast.CaseLine(header,body) ->
-                 let (e1fvs,b1fvs,s1fvs) =
-                   let fvs = [Ast.get_fvs header;Ast.get_fvs body] in
-                   match seq_fvs new2_quantified fvs with
-                     [(e1fvs,b1fvs);(s1fvs,_)] -> (e1fvs,b1fvs,s1fvs)
-                   | _ -> failwith "not possible" in
-                 let (me1fvs,mb1fvs,ms1fvs) =
-                   let fvs = [Ast.get_mfvs header;Ast.get_mfvs body] in
-                   match seq_fvs new2_mquantified fvs with
-                     [(e1fvs,b1fvs);(s1fvs,_)] -> (e1fvs,b1fvs,s1fvs)
-                   | _ -> failwith "not possible" in
-                 let case_header =
-                   quantify guard e1fvs (make_match header) in
-                 let new3_quantified = union b1fvs new2_quantified in
-                 let new3_mquantified = union mb1fvs new2_mquantified in
-                 let body =
-                   statement_list body Tail
-                     new3_quantified new3_mquantified label llabel
-                     (Some (lv,used)) true(*?*) guard in
-                 quantify guard b1fvs (make_seq [case_header; body])
-           | Ast.OptCase(case_line) -> failwith "not supported")
-         cases in
-      let default_required =
-       if List.exists
-           (function case ->
-             match Ast.unwrap case with
-               Ast.CaseLine(header,_) ->
-                 (match Ast.unwrap header with
-                   Ast.Default(_,_) -> true
-                 | _ -> false)
-             | _ -> false)
-           cases
-       then function x -> x
-       else function x -> ctl_or (fallpred label) x in
-      let after_pred = aftpred label in
-      let body after_branch =
-       ctl_or
-         (default_required
-            (quantify guard b2fvs
-               (make_seq
-                  [ctl_and lb
-                      (List.fold_left ctl_and CTL.True
-                         (List.map ctl_ex case_headers));
-                    List.fold_left ctl_or_fl no_header case_code])))
-         after_branch in
-      let aft =
-       (rb_fvs,Ast.get_fresh rb,Ast.get_inherited rb,
-       match Ast.unwrap rb with
-         Ast.SeqEnd(rb) -> Ast.get_mcodekind rb
-       | _ -> failwith "not possible") in
-      let (switch_header,wrapper) =
-       if !used
-       then
-         let label_pred = CTL.Pred (Lib_engine.Label(lv),CTL.Control) in
-         (ctl_and switch_header label_pred,
-          (function body -> quantify true [lv] body))
-       else (switch_header,function x -> x) in
-      wrapper
-       (end_control_structure b1fvs switch_header body
-          after_pred (Some(ctl_ex after_pred)) None aft after label guard)
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      let (hfvs,b1fvs,lbfvs,b2fvs,b3fvs,b4fvs,rbfvs) =
-       match
-         seq_fvs quantified
-           [Ast.get_fvs header;Ast.get_fvs lbrace;Ast.get_fvs decls;
-             Ast.get_fvs body;Ast.get_fvs rbrace]
-       with
-         [(hfvs,b1fvs);(lbfvs,b2fvs);(_,b3fvs);(_,b4fvs);(rbfvs,_)] ->
-           (hfvs,b1fvs,lbfvs,b2fvs,b3fvs,b4fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let (mhfvs,mb1fvs,mlbfvs,mb2fvs,mb3fvs,mb4fvs,mrbfvs) =
-       match
-         seq_fvs quantified
-           [Ast.get_mfvs header;Ast.get_mfvs lbrace;Ast.get_mfvs decls;
-             Ast.get_mfvs body;Ast.get_mfvs rbrace]
-       with
-         [(hfvs,b1fvs);(lbfvs,b2fvs);(_,b3fvs);(_,b4fvs);(rbfvs,_)] ->
-           (hfvs,b1fvs,lbfvs,b2fvs,b3fvs,b4fvs,rbfvs)
-       | _ -> failwith "not possible" in
-      let function_header = quantify guard hfvs (make_match header) in
-      let start_brace = quantify guard lbfvs (make_match lbrace) in
-      let stripped_rbrace =
-       match Ast.unwrap rbrace with
-         Ast.SeqEnd((data,info,_,_)) ->
-           Ast.rewrap rbrace(Ast.SeqEnd (Ast.make_mcode data))
-       | _ -> failwith "unexpected close brace" in
-      let end_brace =
-       let exit = CTL.Pred (Lib_engine.Exit,CTL.Control) in
-       let errorexit = CTL.Pred (Lib_engine.ErrorExit,CTL.Control) in
-       let fake_brace = CTL.Pred (Lib_engine.FakeBrace,CTL.Control) in
-       ctl_and
-         (quantify guard rbfvs (make_match rbrace))
-         (ctl_and
-            (* the following finds the beginning of the fake braces,
-               if there are any, not completely sure how this works.
-            sse the examples sw and return *)
-            (ctl_back_ex (ctl_not fake_brace))
-            (ctl_au (make_match stripped_rbrace) (ctl_or exit errorexit))) in
-      let new_quantified3 =
-       Common.union_set b1fvs
-         (Common.union_set b2fvs (Common.union_set b3fvs quantified)) in
-      let new_quantified4 = Common.union_set b4fvs new_quantified3 in
-      let new_mquantified3 =
-       Common.union_set mb1fvs
-         (Common.union_set mb2fvs
-            (Common.union_set mb3fvs minus_quantified)) in
-      let new_mquantified4 = Common.union_set mb4fvs new_mquantified3 in
-      let fn_nest =
-       match (Ast.undots decls,Ast.undots body,contains_modif rbrace) with
-         ([],[body],false) ->
-           (match Ast.unwrap body with
-             Ast.Nest(stmt_dots,[],multi,_,_) ->
-               if multi
-               then None (* not sure how to optimize this case *)
-               else Some (Common.Left stmt_dots)
-           | Ast.Dots(_,whencode,_,_) when
-               (List.for_all
-                  (* flow sensitive, so not optimizable *)
-                  (function Ast.WhenNotTrue(_) | Ast.WhenNotFalse(_) ->
-                     false
-                | _ -> true) whencode) ->
-               Some (Common.Right whencode)
-           | _ -> None)
-       | _ -> None in
-      let body_code =
-       match fn_nest with
-         Some (Common.Left stmt_dots) ->
-           (* special case for function header + body - header is unambiguous
-              and unique, so we can just look for the nested body anywhere
-              else in the CFG *)
-           CTL.AndAny
-             (CTL.FORWARD,guard_to_strict guard,start_brace,
-              statement_list stmt_dots
-                (* discards match on right brace, but don't need it *)
-                (Guard (make_seq_after end_brace after))
-                new_quantified4 new_mquantified4
-                None llabel slabel true guard)
-       | Some (Common.Right whencode) ->
-           (* try to be more efficient for the case where the body is just
-              ...  Perhaps this is too much of a special case, but useful
-              for dropping a parameter and checking that it is never used. *)
-           make_seq
-             [start_brace;
-               match whencode with
-                 [] -> CTL.True
-               | _ ->
-                   let leftarg =
-                     ctl_and
-                       (ctl_not
-                          (List.fold_left
-                             (function prev ->
-                               function
-                                   Ast.WhenAlways(s) -> prev
-                                 | Ast.WhenNot(sl) ->
-                                     let x =
-                                       statement_list sl Tail
-                                         new_quantified4 new_mquantified4
-                                         label llabel slabel true true in
-                                     ctl_or prev x
-                                 | Ast.WhenNotTrue(_) | Ast.WhenNotFalse(_) ->
-                                     failwith "unexpected"
-                                 | Ast.WhenModifier(Ast.WhenAny) -> CTL.False
-                                 | Ast.WhenModifier(_) -> prev)
-                             CTL.False whencode))
-                        (List.fold_left
-                          (function prev ->
-                            function
-                                Ast.WhenAlways(s) ->
-                                  let x =
-                                    statement s Tail
-                                      new_quantified4 new_mquantified4
-                                      label llabel slabel true in
-                                  ctl_and prev x
-                              | Ast.WhenNot(sl) -> prev
-                              | Ast.WhenNotTrue(_) | Ast.WhenNotFalse(_) ->
-                                  failwith "unexpected"
-                              | Ast.WhenModifier(Ast.WhenAny) -> CTL.True
-                              | Ast.WhenModifier(_) -> prev)
-                          CTL.True whencode) in
-                   ctl_au leftarg (make_match stripped_rbrace)]
-       | None ->
-           make_seq
-             [start_brace;
-               quantify guard b3fvs
-                 (statement_list decls
-                    (After
-                       (quantify guard b4fvs
-                          (statement_list body
-                             (After (make_seq_after end_brace after))
-                             new_quantified4 new_mquantified4
-                             None llabel slabel true guard)))
-                    new_quantified3 new_mquantified3 None llabel slabel
-                    false guard)] in
-      quantify guard b1fvs
-       (make_seq [function_header; quantify guard b2fvs body_code])
-  | Ast.Define(header,body) ->
-      let (hfvs,bfvs,bodyfvs) =
-       match seq_fvs quantified [Ast.get_fvs header;Ast.get_fvs body]
-       with
-         [(hfvs,b1fvs);(bodyfvs,_)] -> (hfvs,b1fvs,bodyfvs)
-       | _ -> failwith "not possible" in
-      let (mhfvs,mbfvs,mbodyfvs) =
-       match seq_fvs minus_quantified [Ast.get_mfvs header;Ast.get_mfvs body]
-       with
-         [(hfvs,b1fvs);(bodyfvs,_)] -> (hfvs,b1fvs,bodyfvs)
-       | _ -> failwith "not possible" in
-      let define_header = quantify guard hfvs (make_match header) in
-      let body_code =
-       statement_list body after
-         (Common.union_set bfvs quantified)
-         (Common.union_set mbfvs minus_quantified)
-         None llabel slabel true guard in
-      quantify guard bfvs (make_seq [define_header; body_code])
-  | Ast.OptStm(stm) ->
-      failwith "OptStm should have been compiled away\n"
-  | Ast.UniqueStm(stm) -> failwith "arities not yet supported"
-  | _ -> failwith "not supported" in
-  if guard or !dots_done
-  then term
-  else
-    do_between_dots stmt term after quantified minus_quantified
-      label llabel slabel guard
-
-(* term is the translation of stmt *)
-and do_between_dots stmt term after quantified minus_quantified
-    label llabel slabel guard =
-    match Ast.get_dots_bef_aft stmt with
-      Ast.AddingBetweenDots (brace_term,n)
-    | Ast.DroppingBetweenDots (brace_term,n) ->
-       let match_brace =
-         statement brace_term after quantified minus_quantified
-           label llabel slabel guard in
-       let v = Printf.sprintf "_r_%d" n in
-       let case1 = ctl_and CTL.NONSTRICT (CTL.Ref v) match_brace in
-       let case2 = ctl_and CTL.NONSTRICT (ctl_not (CTL.Ref v)) term in
-       CTL.Let
-         (v,ctl_or
-            (ctl_back_ex (ctl_or (truepred label) (inlooppred label)))
-            (ctl_back_ex (ctl_back_ex (falsepred label))),
-          ctl_or case1 case2)   
-    | Ast.NoDots -> term
-
-(* un_process_bef_aft is because we don't want to do transformation in this
-  code, and thus don't case about braces before or after it *)
-and process_bef_aft quantified minus_quantified label llabel slabel guard =
-  function
-    Ast.WParen (re,n) ->
-      let paren_pred = CTL.Pred (Lib_engine.Paren n,CTL.Control) in
-      let s = guard_to_strict guard in
-      quantify true (get_unquantified quantified [n])
-       (ctl_and s (make_raw_match None guard re) paren_pred)
-  | Ast.Other s ->
-      statement s Tail quantified minus_quantified label llabel slabel guard
-  | Ast.Other_dots d ->
-      statement_list d Tail quantified minus_quantified
-       label llabel slabel true guard
-
-(* --------------------------------------------------------------------- *)
-(* cleanup: convert AX to EX for pdots.
-Concretely: AX(A[...] & E[...]) becomes AX(A[...]) & EX(E[...])
-This is what we wanted in the first place, but it wasn't possible to make
-because the AX and its argument are not created in the same place.
-Rather clunky... *)
-(* also cleanup XX, which is a marker for the case where the programmer
-specifies to change the quantifier on .... Assumed to only occur after one AX
-or EX, or at top level. *)
-
-let rec cleanup c =
-  let c = match c with CTL.XX(c) -> c | _ -> c in
-  match c with
-    CTL.False    -> CTL.False
-  | CTL.True     -> CTL.True
-  | CTL.Pred(p)  -> CTL.Pred(p)
-  | CTL.Not(phi) -> CTL.Not(cleanup phi)
-  | CTL.Exists(keep,v,phi) -> CTL.Exists(keep,v,cleanup phi)
-  | CTL.AndAny(dir,s,phi1,phi2) ->
-      CTL.AndAny(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.HackForStmt(dir,s,phi1,phi2) ->
-      CTL.HackForStmt(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.And(s,phi1,phi2)   -> CTL.And(s,cleanup phi1,cleanup phi2)
-  | CTL.Or(phi1,phi2)      -> CTL.Or(cleanup phi1,cleanup phi2)
-  | CTL.SeqOr(phi1,phi2)   -> CTL.SeqOr(cleanup phi1,cleanup phi2)
-  | CTL.Implies(phi1,phi2) -> CTL.Implies(cleanup phi1,cleanup phi2)
-  | CTL.AF(dir,s,phi1) -> CTL.AF(dir,s,cleanup phi1)
-  | CTL.AX(CTL.FORWARD,s,
-          CTL.Let(v1,e1,
-                  CTL.And(CTL.NONSTRICT,CTL.AU(CTL.FORWARD,s2,e2,e3),
-                          CTL.EU(CTL.FORWARD,e4,e5)))) ->
-    CTL.Let(v1,e1,
-           CTL.And(CTL.NONSTRICT,
-                   CTL.AX(CTL.FORWARD,s,CTL.AU(CTL.FORWARD,s2,e2,e3)),
-                   CTL.EX(CTL.FORWARD,CTL.EU(CTL.FORWARD,e4,e5))))
-  | CTL.AX(dir,s,CTL.XX(phi)) -> CTL.EX(dir,cleanup phi)
-  | CTL.EX(dir,CTL.XX((CTL.AU(_,s,_,_)) as phi)) ->
-      CTL.AX(dir,s,cleanup phi)
-  | CTL.XX(phi)               -> failwith "bad XX"
-  | CTL.AX(dir,s,phi1) -> CTL.AX(dir,s,cleanup phi1)
-  | CTL.AG(dir,s,phi1) -> CTL.AG(dir,s,cleanup phi1)
-  | CTL.EF(dir,phi1)   -> CTL.EF(dir,cleanup phi1)
-  | CTL.EX(dir,phi1)   -> CTL.EX(dir,cleanup phi1)
-  | CTL.EG(dir,phi1)   -> CTL.EG(dir,cleanup phi1)
-  | CTL.AW(dir,s,phi1,phi2) -> CTL.AW(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.AU(dir,s,phi1,phi2) -> CTL.AU(dir,s,cleanup phi1,cleanup phi2)
-  | CTL.EU(dir,phi1,phi2)   -> CTL.EU(dir,cleanup phi1,cleanup phi2)
-  | CTL.Let (x,phi1,phi2)   -> CTL.Let (x,cleanup phi1,cleanup phi2)
-  | CTL.LetR (dir,x,phi1,phi2) -> CTL.LetR (dir,x,cleanup phi1,cleanup phi2)
-  | CTL.Ref(s) -> CTL.Ref(s)
-  | CTL.Uncheck(phi1)  -> CTL.Uncheck(cleanup phi1)
-  | CTL.InnerAnd(phi1) -> CTL.InnerAnd(cleanup phi1)
-
-(* --------------------------------------------------------------------- *)
-(* Function declaration *)
-
-let top_level name (ua,pos) t =
-  let ua = List.filter (function (nm,_) -> nm = name) ua in
-  used_after := ua;
-  saved := Ast.get_saved t;
-  let quantified = Common.minus_set ua pos in
-  quantify false quantified
-    (match Ast.unwrap t with
-      Ast.FILEINFO(old_file,new_file) -> failwith "not supported fileinfo"
-    | Ast.DECL(stmt) ->
-       let unopt = elim_opt.V.rebuilder_statement stmt in
-       let unopt = preprocess_dots_e unopt in
-       cleanup(statement unopt VeryEnd quantified [] None None None false)
-    | Ast.CODE(stmt_dots) ->
-       let unopt = elim_opt.V.rebuilder_statement_dots stmt_dots in
-       let unopt = preprocess_dots unopt in
-       let starts_with_dots =
-         match Ast.undots stmt_dots with
-           d::ds ->
-             (match Ast.unwrap d with
-               Ast.Dots(_,_,_,_) | Ast.Circles(_,_,_,_)
-             | Ast.Stars(_,_,_,_) -> true
-             | _ -> false)
-         | _ -> false in
-       let starts_with_brace =
-         match Ast.undots stmt_dots with
-           d::ds ->
-             (match Ast.unwrap d with
-               Ast.Seq(_) -> true
-             | _ -> false)
-         | _ -> false in
-       let res =
-         statement_list unopt VeryEnd quantified [] None None None
-           false false in
-       cleanup
-         (if starts_with_dots
-         then
-         (* EX because there is a loop on enter/top *)
-           ctl_and CTL.NONSTRICT (toppred None) (ctl_ex res)
-         else if starts_with_brace
-         then
-            ctl_and CTL.NONSTRICT
-             (ctl_not(CTL.EX(CTL.BACKWARD,(funpred None)))) res
-         else res)
-    | Ast.ERRORWORDS(exps) -> failwith "not supported errorwords")
-
-(* --------------------------------------------------------------------- *)
-(* Entry points *)
-
-let asttoctlz (name,(_,_,exists_flag),l) used_after positions =
-  letctr := 0;
-  labelctr := 0;
-  (match exists_flag with
-    Ast.Exists -> exists := Exists
-  | Ast.Forall -> exists := Forall
-  | Ast.ReverseForall -> exists := ReverseForall
-  | Ast.Undetermined ->
-      exists := if !Flag.sgrep_mode2 then Exists else Forall);
-
-  let (l,used_after) =
-    List.split
-      (List.filter
-        (function (t,_) ->
-          match Ast.unwrap t with Ast.ERRORWORDS(exps) -> false | _ -> true)
-        (List.combine l (List.combine used_after positions))) in
-  let res = List.map2 (top_level name) used_after l in
-  exists := Forall;
-  res
-
-let asttoctl r used_after positions =
-  match r with
-    Ast.ScriptRule _ -> []
-  | Ast.CocciRule (a,b,c,_) -> asttoctlz (a,b,c) used_after positions
-
-let pp_cocci_predicate (pred,modif) =
-  Pretty_print_engine.pp_predicate pred
-
-let cocci_predicate_to_string (pred,modif) =
-  Pretty_print_engine.predicate_to_string pred
diff --git a/engine/.#c_vs_c.ml.1.9 b/engine/.#c_vs_c.ml.1.9
deleted file mode 100644 (file)
index 4391933..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-open Common
-
-open Ast_c
-
-(* For the moment I do only eq_type and not eq_expr, etc. The reason
- * for eq_type is related to the typedef and struct isomorphism. Sometimes
- * one use the typedef and sometimes the structname.
- * 
- * TODO: should use the isomorphisms engine of julia.
- * Maybe I can transform my ast_c in ast_cocci, and use julia's code ?
- * Maybe I can add some Disj in my ast_c ?
- *)
-
-
-module type PARAM = 
-  sig 
-    type tin
-    type 'x tout
-
-    type 'a matcher = 'a -> 'a  -> tin -> 'a tout
-
-    val (>>=): 
-      (tin -> 'a tout)  -> 
-      ('a -> (tin -> 'b tout)) -> 
-      (tin -> 'b tout)
-
-    val (>&&>) : bool -> (tin -> 'x tout) -> (tin -> 'x tout)
-
-    val return : 'a -> tin -> 'a tout
-    val fail : tin -> 'a tout
-end
-
-
-module C_VS_C =
-  functor (X : PARAM) -> 
-struct
-
-type 'a matcher = 'a -> 'a  -> X.tin -> 'a X.tout
-
-let (>>=) = X.(>>=)
-let (>&&>) = X.(>&&>)
-let return = X.return
-let fail = X.fail
-
-let (option: 'a matcher -> ('a option matcher)) = fun f t1 t2 ->
-  match (t1,t2) with
-  | (Some t1, Some t2) -> 
-      f t1 t2 >>= (fun t -> 
-        return (Some t)
-      )
-  | (None, None) -> return None
-  | _ -> fail
-
-
-let rec fullType a b = 
-  let ((qua,iiqa), tya) = a in
-  let ((qub,iiqb), tyb) = b in
-  (qua.const =:= qub.const && qua.volatile =:= qub.volatile) >&&>
-
-    let (qu,iiq) = (qua, iiqa) in 
-    typeC tya tyb >>= (fun ty -> 
-      return ((qu,iiq), ty)
-    )
-
-and typeC tya tyb = 
-  let (a, iia) = tya in
-  let (b, iib) = tyb in
-
-  let iix = iia in
-
-  match a, b with
-  | BaseType a, BaseType b -> 
-      a =*= b >&&> return (BaseType a, iix)
-  | Pointer a, Pointer b -> 
-      fullType a b >>= (fun x -> return (Pointer x, iix))
-
-  | StructUnionName (sua, sa), StructUnionName (sub, sb) -> 
-      (sua =*= sub && sa =$= sb) >&&> 
-        return (StructUnionName (sua, sa), iix)
-
-  | TypeName (sa, opta), TypeName (sb, optb) -> 
-      (* assert compatible opta optb ? *)
-      (*option fullType opta optb*)
-      sa =$= sb >&&> 
-       let opt = 
-         (match opta, optb with
-         | None, None -> None
-         | Some x, _ 
-         | _, Some x 
-             -> Some x
-         ) 
-       in
-       return (TypeName (sa, opt), iix)
-      
-
-  | Array (ea, a), Array (eb,b) -> 
-      let get_option f = function Some x -> Some (f x) | None -> None in
-      let ea = get_option Lib_parsing_c.al_expr ea in
-      let eb = get_option Lib_parsing_c.al_expr eb in
-      ea =*= eb >&&> fullType a b >>= (fun x -> return (Array (ea, x), iix))
-
-  | FunctionType (returna, paramsa), FunctionType (returnb, paramsb) -> 
-      let (tsa, (ba,iihas3dotsa)) = paramsa in
-      let (tsb, (bb,iihas3dotsb)) = paramsb in
-
-      let bx = ba in
-      let iihas3dotsx = iihas3dotsa in
-
-      (ba = bb && List.length tsa = List.length tsb) >&&>
-      fullType returna returnb >>= (fun returnx -> 
-
-      Common.zip tsa tsb +> List.fold_left 
-        (fun acc ((parama,iia),(paramb,iib))->
-          let iix = iia in
-          acc >>= (fun xs -> 
-
-            let (((ba, saopt, ta), ii_b_sa)) = parama in
-            let (((bb, sbopt, tb), ii_b_sb)) = paramb in
-
-            let bx = ba in
-            let sxopt = saopt in
-            let ii_b_sx = ii_b_sa in
-
-            (ba =:= bb && saopt =*= sbopt) >&&>
-            fullType ta tb >>= (fun tx -> 
-              let paramx = (((bx, sxopt, tx), ii_b_sx)) in
-              return ((paramx,iix)::xs)
-            )
-          )
-        ) (return [])
-      >>= (fun tsx -> 
-        let paramsx = (List.rev tsx, (bx, iihas3dotsx)) in
-        return (FunctionType (returnx, paramsx), iix)
-      ))
-
-  | Enum (saopt, enuma), Enum (sbopt, enumb) -> 
-      (saopt =*= sbopt &&
-      List.length enuma = List.length enumb && 
-      Common.zip enuma enumb +> List.for_all (fun 
-        ((((sa, eopta),ii_s_eqa), iicommaa), (((sb, eoptb),ii_s_eqb),iicommab))
-          -> 
-            sa =$= sb && 
-            eopta =*= eoptb 
-        )
-      ) >&&>
-        return (Enum (saopt, enuma), iix)
-
-  | EnumName sa, EnumName sb -> sa =$= sb >&&> return (EnumName sa, iix)
-
-  | ParenType a, ParenType b -> 
-      (* iso here ? *)
-      fullType a b >>= (fun x -> 
-        return (ParenType x, iix)
-      )
-
-  | TypeOfExpr ea, TypeOfExpr eb -> 
-      let ea = Lib_parsing_c.al_expr ea in
-      let eb = Lib_parsing_c.al_expr eb in
-      ea =*= eb >&&> return (TypeOfExpr ea, iix)
-
-  | TypeOfType a, TypeOfType b -> 
-      fullType a b >>= (fun x -> return (TypeOfType x, iix))
-
-(*  | TypeOfType a, b -> 
-    | a, TypeOfType b -> 
-*)
-
-
-  | StructUnion (sua, saopt, sta), StructUnion (sub, sbopt, stb) -> 
-      (sua =*= sub && saopt =*= sbopt && List.length sta = List.length stb) 
-      >&&> 
-      Common.zip sta stb +> List.fold_left 
-        (fun acc ((xfielda, iia), (xfieldb, iib)) -> 
-          let iix = iia in
-          acc >>= (fun xs -> 
-            match xfielda, xfieldb with 
-            | EmptyField, EmptyField -> return ((EmptyField, iix)::xs)
-
-            | DeclarationField (FieldDeclList (fa, iipta)), 
-              DeclarationField (FieldDeclList (fb, iiptb)) -> 
-                let iipt = iipta in (* TODO ?*)
-                (List.length fa =|= List.length fb) >&&> 
-
-                Common.zip fa fb +> List.fold_left 
-                  (fun acc2 ((fielda,iia),(fieldb,iib))-> 
-                    let iix = iia in
-                    acc2 >>= (fun xs -> 
-                      let (fa, ii2a) = fielda in
-                      let (fb, ii2b) = fieldb in
-                      let ii2x = ii2a in
-                      match fa, fb with
-                      | Simple (saopt, ta), Simple (sbopt, tb) -> 
-                          saopt =*= sbopt >&&> 
-                          fullType ta tb >>= (fun tx -> 
-                            return (((Simple (saopt, tx), ii2x), iix)::xs)
-                          )
-                          
-                      | BitField (sopta, ta, ea), BitField (soptb, tb, eb) -> 
-                          (sopta =*= soptb && ea =*= eb) >&&> 
-                          fullType ta tb >>= (fun tx -> 
-                            return (((BitField (sopta,tx,ea), ii2x), iix)::xs)
-                          )
-                      | _,_ -> fail
-                    )
-                  ) (return [])
-                 >>= (fun fx -> 
-                   return (((DeclarationField 
-                               (FieldDeclList (List.rev fx,iipt))), iix)::xs)
-                 )
-            | _ -> fail
-          )
-
-
-        ) (return [])
-        >>= (fun stx -> 
-          return (StructUnion (sua, saopt, List.rev stx), iix)
-        )
-
-
-
-  (* choose the lub.
-   * subtil: in the return must put iia, not iix, and in following case
-   * must put iib and not iix, because we want the token corresponding
-   * to the typedef.
-   *)
-  | TypeName (s, Some a), _ -> 
-      fullType a (Ast_c.nQ, tyb) >>= (fun x -> 
-        return (TypeName (s, Some x), iia) 
-      )
-
-  | _, TypeName (s, Some b) -> 
-      fullType b (Ast_c.nQ, tya) >>= (fun x -> 
-        return (TypeName (s, Some x), iib) (* subtil: *)
-      )
-
-  | _, _ -> fail
-
-
-
-end
-
-module XEQ = struct
-  type tin = unit
-  type 'a tout = 'a option
-
-  type 'a matcher = 'a -> 'a -> tin -> 'a tout
-
-  let return x = fun tin -> Some x
-  let fail = fun tin -> None
-
-  let (>>=) m f = fun tin -> 
-    match m tin with
-    | None -> None
-    | Some x -> f x tin
-
-  let (>&&>) b m = fun tin -> 
-    if b then m tin
-    else fail tin
-
-end
-
-module EQ = C_VS_C (XEQ)
-
-
-let eq_type2 a b = EQ.fullType a b () <> None
-let merge_type2 a b = Common.some (EQ.fullType a b ())
-
-let eq_type a b = 
-  Common.profile_code "C_vs_c" (fun () -> eq_type2 a b)
-
-let merge_type a b = 
-  Common.profile_code "C_vs_c" (fun () -> merge_type2 a b)
diff --git a/engine/.#check_reachability.ml.1.18 b/engine/.#check_reachability.ml.1.18
deleted file mode 100644 (file)
index 297a7d4..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* ---------------------------------------------------------------- *)
-(* code to check for ambiguities *)
-
-(* Idea: for each node that is said to be modified in any witness tree, we
-  check that all backward paths end up at the root of some witness tree
-  that says that the node should be modified.  We then give a warning, if
-  the node itself appears more than once in such a path, because then there
-  could be some instances that are modified and some that are not.  An
-  example is as follows:
-
-  f(); ... g(); ... - h();
-
-  with C code: f(); while(E) { h(); g(); } g(); h();
-
-  Then the h() in the while loop matches both the first ... and the - h();
-
-  Concretely, if a node 47 is in the witness tree rooted at 1 and the
-  witness tree rooted at 2, then we give an error if 47 is not in the set
-  of nodes satisfying AF[1v2] and give a warning if 47 is in the set of
-  nodes satisfying EXEF(47 & EXEF(1v2)). (Note that the root of a witness
-  tree here is the node causing the pattern to match; there might not be
-  any witnesses associated with this node.)
-
-  Another try on the exists formula:
-  !(1v2) & EXE[!(1v2) U 47]
-  The first !(1v2) is to discard immediately cases where the beginning and
-  end of the path are the same.  Afterwards, it would only seem necessary to
-  serach up to the next occurrence of 47 (leaf), ensuring that there are not
-  1s or 2s (starting points) along the way.  Then the second 47 would be in
-  the path, but possible not transformed.
- *)
-
-module G = Ograph_extended
-module CTL = Ast_ctl
-
-(* Step 1: for each tree, make a mapping from the modified nodes to the root
-of the tree *)
-
-let modified = (Hashtbl.create(25) : (G.nodei, G.nodei list ref) Hashtbl.t)
-
-let build_modified (n,_,wits) =
-  let rec loop = function
-      CTL.Wit(st,[CTL.Subst(x,Wrapper_ctl.PredVal(CTL.Modif(v)))],anno,wit) ->
-       let cell =
-         try Hashtbl.find modified st
-         with Not_found ->
-           let cell = ref [] in Hashtbl.add modified st cell; cell in
-       cell := n :: !cell;
-       List.iter loop wit
-    |  CTL.Wit(st,_,anno,wit) -> List.iter loop wit
-    |  CTL.NegWit(wit) -> () in
-  List.iter loop wits
-    
-(* Step 2: For each node in the hash table, create the error and warning
-   formulas *)
-
-type 'a nodes = Node of 'a | After
-    
-let create_formulas _ =
-  Hashtbl.fold
-    (function node ->
-      function roots ->
-       function acc ->
-         (*let exef f =
-           wrap
-             (Ast_ctl.EX
-                (Ast_ctl.BACKWARD,wrap(Ast_ctl.EF(Ast_ctl.BACKWARD,f)))) in*)
-         let match_node = Ast_ctl.Pred(Node(node)) in
-         let match_roots =
-           List.map (function n -> Ast_ctl.Pred(Node(n)))
-             (List.sort compare !roots) in
-         let roots =
-           List.fold_left
-             (function prev -> function cur -> Ast_ctl.Or(prev,cur))
-             (List.hd match_roots) (List.tl match_roots) in
-         (node,
-          Ast_ctl.AF(Ast_ctl.BACKWARD,Ast_ctl.NONSTRICT,
-                     Ast_ctl.Or(roots,Ast_ctl.Pred(After))),
-          Ast_ctl.And
-            (Ast_ctl.NONSTRICT,
-             Ast_ctl.Not(roots),
-             Ast_ctl.EX
-               (Ast_ctl.BACKWARD,
-                Ast_ctl.EU(Ast_ctl.BACKWARD,roots,match_node))))
-          (*exef
-             (wrap(Ast_ctl.And(Ast_ctl.NONSTRICT,match_node,exef(roots))))*)
-         :: acc)
-    modified []
-
-(* Step 3: check the formula on the control-flow graph *)
-
-module PRED = 
-  struct
-    type t = Ograph_extended.nodei nodes
-    let print_predicate = function
-       After -> Format.print_string "after"
-      |        Node x -> Format.print_string (string_of_int x)
-  end
-
-module ENV =
-  struct
-    type value = unit
-    type mvar = unit
-    let eq_mvar x x'   = failwith "should not be invoked"
-    let eq_val v v'    = failwith "should not be invoked"
-    let merge_val v v' = failwith "should not be invoked"
-
-    let print_mvar s   = failwith "should not be invoked"
-    let print_value x  = failwith "should not be invoked"
-  end
-
-
-module CFG = 
-  struct
-    type node = Ograph_extended.nodei
-    type cfg = 
-        (Control_flow_c.node, Control_flow_c.edge) 
-          Ograph_extended.ograph_mutable
-    let predecessors cfg n = List.map fst ((cfg#predecessors n)#tolist)
-    let successors   cfg n = List.map fst ((cfg#successors n)#tolist)
-    let extract_is_loop cfg n =
-      Control_flow_c.extract_is_loop (cfg#nodes#find n)
-    let print_node i = Format.print_string (string_of_int i)
-    let size cfg = cfg#nodes#length
-  end
-
-module ENGINE = Ctl_engine.CTL_ENGINE (ENV) (CFG) (PRED)
-
-let test_formula state formula cfg =
-    let label = function
-       Node pred -> [(pred,[],[])]
-      |        After ->
-         List.concat
-           (List.map
-              (fun (nodei, node) ->
-                match Control_flow_c.unwrap node with
-                  Control_flow_c.AfterNode -> [(nodei,[],[])]
-                | _ -> [])
-              cfg#nodes#tolist) in
-    let verbose = !Flag_ctl.verbose_ctl_engine in
-    let pm = !Flag_ctl.partial_match in
-    Flag_ctl.verbose_ctl_engine := false;
-    Flag_ctl.partial_match := false;
-    let res =
-      ENGINE.sat (cfg,label,List.map fst cfg#nodes#tolist)
-       (CTL.And(CTL.NONSTRICT,CTL.Pred(Node(state)),formula))
-       [[Node(state)]] in
-    Flag_ctl.verbose_ctl_engine := verbose;
-    Flag_ctl.partial_match := pm;
-    match res with [] -> false | _ -> true
-
-(* ---------------------------------------------------------------- *)
-(* Entry point *)
-
-(* The argument is a list of triples with a node name, an empty environment
-and a witness tree *)
-
-type witness =
-    (Ograph_extended.nodei, unit,
-     (Ograph_extended.nodei, unit, unit) Ast_ctl.generic_ctl list)
-      Ast_ctl.generic_witnesstree
-
-type ('a,'b,'c,'d,'e) triples =
-    (Ograph_extended.nodei * 'a *
-     (Ograph_extended.nodei,
-      ('b, ('c, 'd) Wrapper_ctl.wrapped_binding) CTL.generic_subst list, 'e)
-     CTL.generic_witnesstree list) list
-
-let check_reachability triples cfg =
-  Hashtbl.clear modified;
-  List.iter build_modified triples;
-  let formulas = create_formulas() in
-  List.iter
-    (function (node,af_formula,ef_formula) ->
-      if test_formula node af_formula cfg
-      then
-       if test_formula node ef_formula cfg
-       then
-         Printf.printf "warning: node %d may be inconsistently modified\n"
-           node
-       else ()
-      else
-       failwith
-         (Printf.sprintf
-            "node %d reachable by inconsistent control-flow paths" node))
-    formulas
diff --git a/engine/.#ctlcocci_integration.ml.1.116 b/engine/.#ctlcocci_integration.ml.1.116
deleted file mode 100644 (file)
index 134089c..0000000
+++ /dev/null
@@ -1,423 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-open Common
-
-open Ograph_extended
-
-module F = Control_flow_c
-
-(*****************************************************************************)
-(* Debugging functions *)
-(*****************************************************************************)
-let show_or_not_predicate pred = 
-  if !Flag_matcher.debug_engine then begin 
-    indent_do (fun () -> 
-      adjust_pp_with_indent_and_header "labeling: pred = " (fun () -> 
-        Pretty_print_engine.pp_predicate pred;
-      );
-    )
-  end
-
-let show_or_not_nodes nodes =
-  if !Flag_matcher.debug_engine  then begin 
-    indent_do (fun () -> 
-      adjust_pp_with_indent_and_header "labeling: result = " (fun () -> 
-        Common.pp_do_in_box (fun () -> 
-          pp "{";
-          Common.print_between 
-            (fun () -> pp ";"; Format.print_cut())
-            (fun (nodei, (_predTODO, subst)) -> 
-              Format.print_int nodei;
-              Common.pp_do_in_box (fun () -> 
-                Pretty_print_engine.pp_binding2_ctlsubst subst
-              )
-            ) nodes;
-          pp "}";
-        );
-      )
-    )
-  end
-
-let show_isos rule_elem =
-  match Ast_cocci.get_isos rule_elem with
-    [] -> ()
-  | isos ->
-      let line = Ast_cocci.get_line rule_elem in
-      Printf.printf "rule elem: ";
-      Pretty_print_cocci.rule_elem "" rule_elem;
-      Format.print_newline();
-      List.iter
-       (function (nm,x) ->
-         Printf.printf "    iso: %s(%d): " nm line;
-         Pretty_print_cocci.pp_print_anything x;
-         Format.print_newline())
-       isos
-
-(*****************************************************************************)
-(* Labeling function *)
-(*****************************************************************************)
-let (-->) x v = Ast_ctl.Subst (x,v);;
-
-(* Take list of predicate and for each predicate returns where in the
- * control flow it matches, and the set of subsitutions for this match. 
- *)
-let (labels_for_ctl: string list (* dropped isos *) ->
- (nodei * F.node) list -> Lib_engine.metavars_binding -> 
- Lib_engine.label_ctlcocci) =
-  fun dropped_isos nodes binding ->
-
-   (fun p -> 
-     show_or_not_predicate p;
-
-     let nodes' = nodes +> List.map (fun (nodei, node) -> 
-      (* todo? put part of this code in pattern ? *)
-      (match p, F.unwrap node with
-      | Lib_engine.Paren s,  (F.SeqStart (_, bracelevel, _)) -> 
-         let make_var x = ("",i_to_s x) in
-          [(nodei, (p,[(s --> (Lib_engine.ParenVal (make_var bracelevel)))]))]
-      | Lib_engine.Paren s,  (F.SeqEnd (bracelevel, _)) -> 
-         let make_var x = ("",i_to_s x) in
-          [(nodei, (p,[(s --> (Lib_engine.ParenVal (make_var bracelevel)))]))]
-      | Lib_engine.Paren _, _ -> []
-      | Lib_engine.Label s, _ -> 
-          let labels = F.extract_labels node in
-          [(nodei, (p,[(s --> (Lib_engine.LabelVal labels))]))]
-      | Lib_engine.BCLabel s, _ -> 
-         (match F.extract_bclabels node with
-           [] -> [] (* null for all nodes that are not break or continue *)
-         | labels ->
-              [(nodei, (p,[(s --> (Lib_engine.LabelVal labels))]))])
-      | Lib_engine.PrefixLabel s, _ -> 
-          let labels = F.extract_labels node in
-          let prefixes = Common.inits labels +> Common.tail in
-          prefixes +> List.map (fun prefixlabels -> 
-            (nodei, (p,[(s --> (Lib_engine.LabelVal prefixlabels))]))
-          )
-
-      | Lib_engine.Match (re), _unwrapnode -> 
-          let substs = 
-            Pattern_c.match_re_node dropped_isos re node binding
-            +> List.map (fun (re', subst) -> 
-              Lib_engine.Match (re'), subst
-            )
-          in
-          substs +> List.map (fun (p', subst) -> 
-            (nodei, 
-              (p', 
-                subst +> List.map (fun (s, meta) -> 
-                  s --> Lib_engine.NormalMetaVal meta
-                ))))
-
-      | Lib_engine.InLoop,      F.InLoopNode ->  [nodei, (p,[])]
-      | Lib_engine.TrueBranch , F.TrueNode ->  [nodei, (p,[])]
-      | Lib_engine.FalseBranch, F.FalseNode -> [nodei, (p,[])]
-      | Lib_engine.After,       F.AfterNode -> [nodei, (p,[])]
-      | Lib_engine.FallThrough, F.FallThroughNode -> [nodei,(p,[])]
-      | Lib_engine.FunHeader,   F.FunHeader _ -> [nodei, (p,[])]
-      | Lib_engine.Top,         F.TopNode ->   [nodei, (p,[])]
-      | Lib_engine.Exit,        F.Exit ->      [nodei, (p,[])]
-      | Lib_engine.ErrorExit,   F.ErrorExit -> [nodei, (p,[])]
-      |        Lib_engine.Goto,        F.Goto(_,_) -> [nodei, (p,[])]
-
-      | Lib_engine.InLoop , _ -> []
-      | Lib_engine.TrueBranch , _ -> []
-      | Lib_engine.FalseBranch, _ -> []
-      | Lib_engine.After, _ -> []
-      | Lib_engine.FallThrough, _ -> []
-      | Lib_engine.FunHeader, _  -> []
-      | Lib_engine.Top, _  -> []
-      | Lib_engine.Exit, _  -> []
-      | Lib_engine.ErrorExit, _  -> []
-      | Lib_engine.Goto, _  -> []
-
-      |        Lib_engine.BindGood s, _ -> [(nodei, (p,[(s --> Lib_engine.GoodVal)]))]
-      |        Lib_engine.BindBad s, _ ->  [(nodei, (p,[(s --> Lib_engine.BadVal)]))]
-      |        Lib_engine.FakeBrace, _ ->
-         if F.extract_is_fake node then [nodei, (p,[])] else []
-
-      | Lib_engine.Return, node -> 
-          (match node with
-            (* todo? should match the Exit code ? 
-             * todo: one day try also to match the special function
-             * such as panic(); 
-             *)
-          | F.Return _ ->  [nodei, (p,[])]
-          | F.ReturnExpr _ -> [nodei, (p,[])]
-          | _ -> []
-          )
-      )
-     ) +> List.concat
-     in
-
-     show_or_not_nodes nodes';
-     nodes'
-   ) 
-
-(*****************************************************************************)
-(* Some fix flow, for CTL, for unparse *)
-(*****************************************************************************)
-(* could erase info on nodes, and edge, because they are not used by rene *)
-let (control_flow_for_ctl: F.cflow -> ('a, 'b) ograph_mutable) = 
- fun cflow -> cflow
-
-
-
-(* Just make the final node of the control flow loop over itself. 
- * It seems that one hypothesis of the SAT algorithm is that each node as at
- * least a successor.
- * 
- * update: do same for errorexit node.
- * 
- * update: also erase the fake nodes (and adjust the edges accordingly), 
- * so that AX in CTL can now work.
- * Indeed, Ã  la fin de la branche then (et else), on devrait aller directement
- * au suivant du endif, sinon si ecrit if(1) { foo(); }; bar();
- * sans '...' entre le if et bar(), alors ca matchera pas car le CTL
- * generera un AX bar()  qui il tombera d'abord sur le [endif] :( 
- * Mais chiant de changer l'algo de generation, marche pas tres bien avec 
- * ma facon de faire recursive et compositionnel.
- * => faire une fonction qui applique des fixes autour de ce control flow,
- * comme ca passe un bon flow a rene, mais garde un flow a moi pour pouvoir 
- * facilement generate back the ast.
- * alt: faire un wrapper autourde mon graphe pour lui passer dans le module CFG
- * une fonction qui passe a travers les Fake, mais bof.
- * 
- * update: also make loop the deadcode nodes, the one that have
- * no predecessor.
- *)
-let (fix_flow_ctl2: F.cflow -> F.cflow) = fun flow ->
-  let g = ref flow in
-
-  let topi = F.first_node !g in
-  !g#add_arc ((topi, topi), F.Direct);
-
-  (* for the #define CFG who have no Exit but have at least a EndNode *)
-  (try 
-      let endi  = F.find_node (fun x -> x = F.EndNode) !g in
-      !g#add_arc ((endi, endi), F.Direct);
-    with Not_found -> ()
-  );
-
-  (* for the regular functions *)
-  (try 
-    let exitnodei  = F.find_node (fun x -> x = F.Exit) !g in
-    let errornodei = F.find_node (fun x -> x = F.ErrorExit) !g in
-    
-    !g#add_arc ((exitnodei, exitnodei), F.Direct);
-    
-    if null ((!g#successors   errornodei)#tolist) &&
-       null ((!g#predecessors errornodei)#tolist)
-    then !g#del_node errornodei
-    else !g#add_arc ((errornodei, errornodei), F.Direct);
-   with Not_found -> ()
-  );
-
-  let fake_nodes = !g#nodes#tolist +> List.filter (fun (nodei, node) -> 
-    match F.unwrap node with
-    | F.CaseNode _ 
-    | F.Enter
-    (*| F.Fake*) (* [endif], [endswitch], ... *)
-      -> true
-    | _ -> false 
-    ) in
-  
-  fake_nodes +> List.iter (fun (nodei, node) -> F.remove_one_node nodei !g);
-
-  (* even when have deadcode, julia want loop over those nodes *)
-  !g#nodes#tolist +> List.iter (fun (nodei, node) -> 
-    if (!g#predecessors nodei)#null 
-    then begin
-      let fakei = !g#add_node (F.mk_node F.Fake [] [] "DEADCODELOOP") in
-      !g#add_arc ((fakei, nodei), F.Direct);
-      !g#add_arc ((fakei, fakei), F.Direct);
-    end
-  );
-
-  !g#nodes#tolist +> List.iter (fun (nodei, node) -> 
-    assert (List.length ((!g#successors nodei)#tolist) >= 1); 
-    (* no:  && List.length ((!g#predecessors nodei)#tolist) >= 1  
-       because    the enter node at least have no predecessors *)
-    );
-
-  !g
-let fix_flow_ctl a = 
-  Common.profile_code "fix_flow" (fun () -> fix_flow_ctl2 a)
-
-
-
-
-
-(*****************************************************************************)
-(* subtil: the label must operate on newflow, not (old) cflow 
- * update: now I supposed that we give me a fixed_flow
- *)
-let model_for_ctl dropped_isos cflow binding = 
- let newflow = cflow (* old: fix_flow_ctl (control_flow_for_ctl cflow) *) in
- let labels = labels_for_ctl dropped_isos (newflow#nodes#tolist) binding  in
- let states = List.map fst  newflow#nodes#tolist  in
- newflow, labels, states
-
-(*****************************************************************************)
-
-module PRED = 
-  struct
-    type t = Lib_engine.predicate
-    let print_predicate x = 
-      Pretty_print_cocci.print_plus_flag := false;
-      Pretty_print_cocci.print_minus_flag := false;
-      Pretty_print_engine.pp_predicate x
-  end
-
-module ENV =
-  struct
-    type value = Lib_engine.metavar_binding_kind2
-    type mvar = Ast_cocci.meta_name
-    let eq_mvar x x' = x = x'
-    let eq_val v v' =
-      (* v = v' *)
-      match (v,v') with
-       (Lib_engine.NormalMetaVal(Ast_c.MetaPosVal(min1,max1)),
-        Lib_engine.NormalMetaVal(Ast_c.MetaPosVal(min2,max2))) ->
-          ((min1 <= min2) && (max1 >= max2)) or
-          ((min2 <= min1) && (max2 >= max1))
-      |        (Lib_engine.NormalMetaVal(Ast_c.MetaTypeVal a),
-        Lib_engine.NormalMetaVal(Ast_c.MetaTypeVal b)) ->
-          C_vs_c.eq_type a b
-      |        _ -> v = v'
-    let merge_val v v' = (* values guaranteed to be compatible *)
-      (* v *)
-      match (v,v') with
-       (Lib_engine.NormalMetaVal(Ast_c.MetaPosVal(min1,max1)),
-        Lib_engine.NormalMetaVal(Ast_c.MetaPosVal(min2,max2))) ->
-          if (min1 <= min2) && (max1 >= max2)
-          then Lib_engine.NormalMetaVal(Ast_c.MetaPosVal(min1,max1))
-          else
-            if (min2 <= min1) && (max2 >= max1)
-            then Lib_engine.NormalMetaVal(Ast_c.MetaPosVal(min2,max2))
-            else failwith "incompatible positions give to merge"
-      |        (Lib_engine.NormalMetaVal(Ast_c.MetaTypeVal a),
-        Lib_engine.NormalMetaVal(Ast_c.MetaTypeVal b)) ->
-          Lib_engine.NormalMetaVal (Ast_c.MetaTypeVal (C_vs_c.merge_type a b))
-
-      |        _ -> v
-    let print_mvar (_,s) = Format.print_string s
-    let print_value x = Pretty_print_engine.pp_binding_kind2 x
-  end
-
-module CFG = 
-  struct
-    type node = int
-    type cfg = (F.node, F.edge) Ograph_extended.ograph_mutable
-    let predecessors cfg n = List.map fst ((cfg#predecessors n)#tolist)
-    let successors   cfg n = List.map fst ((cfg#successors n)#tolist)
-    let extract_is_loop cfg n =
-      Control_flow_c.extract_is_loop (cfg#nodes#find n)
-    let print_node i = Format.print_string (i_to_s i)
-    let size cfg = cfg#nodes#length
-  end
-
-
-module WRAPPED_ENGINE = Wrapper_ctl.CTL_ENGINE_BIS (ENV) (CFG) (PRED)
-
-let print_bench _ = WRAPPED_ENGINE.print_bench()
-
-type pred = Lib_engine.predicate * Ast_cocci.meta_name Ast_ctl.modif
-
-(*****************************************************************************)
-let metavars_binding2_to_binding   binding2 = 
-  binding2 +> Common.map_filter (fun (s, kind2) -> 
-    match kind2 with
-    | Lib_engine.NormalMetaVal kind -> Some (s, kind)
-    (* I thought it was Impossible to have this when called from
-       satbis_to_trans_info but it does not seems so *)
-    | Lib_engine.ParenVal _ -> None
-    | Lib_engine.LabelVal _ -> None
-    | Lib_engine.BadVal     -> None (* should not occur *)
-    | Lib_engine.GoodVal    -> None (* should not occur *)
-   )
-
-let metavars_binding_to_binding2 binding = 
-  binding +> List.map (fun (s, kind) -> s, Lib_engine.NormalMetaVal kind)
-
-
-let (satbis_to_trans_info: 
-  (nodei * Lib_engine.metavars_binding2 * Lib_engine.predicate) list -> 
-  (nodei * Lib_engine.metavars_binding * Ast_cocci.rule_elem) list) = 
-  fun xs -> 
-    xs +> List.fold_left (fun prev (nodei, binding2, pred) -> 
-         match pred with
-           | Lib_engine.Match (rule_elem) ->
-              if !Flag.track_iso_usage then show_isos rule_elem;
-              (nodei, metavars_binding2_to_binding binding2, rule_elem)
-              ::prev
-            (* see BindGood in asttotctl2 *)
-           | Lib_engine.BindGood (_) -> prev
-           | _ -> raise Impossible
-         ) []
-
-(*****************************************************************************)
-
-let rec coalesce_positions = function
-    [] -> []
-  | (x,Ast_c.MetaPosValList l)::rest ->
-      let (same,others) = List.partition (function (x1,_) -> x = x1) rest in
-      let ls =
-       List.concat
-         (List.map
-            (function
-                (_,Ast_c.MetaPosValList l) -> l
-              | _ -> failwith "unexpected non-position")
-            same) in
-      let new_ls = List.sort compare (l@ls) in
-      (x,Ast_c.MetaPosValList new_ls) :: coalesce_positions others
-  | x::rest -> x :: coalesce_positions rest
-
-(*****************************************************************************)
-(* Call ctl engine *)
-(*****************************************************************************)
-let (mysat2:
-  Lib_engine.model ->
-  (Lib_engine.ctlcocci * (pred list list)) -> 
-  (Lib_engine.mvar list*Lib_engine.metavars_binding) ->
-  (Lib_engine.transformation_info * bool * Lib_engine.metavars_binding *
-     Lib_engine.metavars_binding list)) =
-  fun (flow, label, states) ctl (used_after, binding) -> 
-    let binding2 = metavars_binding_to_binding2 binding in
-    let (triples,(trans_info2, returned_any_states, used_after_envs)) = 
-      WRAPPED_ENGINE.satbis (flow, label, states) ctl (used_after, binding2)
-    in
-    if not (!Flag_parsing_cocci.sgrep_mode || !Flag.sgrep_mode2 ||
-            !Flag_matcher.allow_inconsistent_paths)
-    then Check_reachability.check_reachability triples flow;
-    let (trans_info2,used_after_fresh_envs) =
-      Postprocess_transinfo.process used_after binding2 trans_info2 in
-    let used_after_envs =
-      Common.uniq(List.map2 (@) used_after_fresh_envs used_after_envs) in
-    let trans_info = satbis_to_trans_info trans_info2 in
-    let newbindings = List.map metavars_binding2_to_binding used_after_envs in
-    let newbindings = List.map coalesce_positions newbindings in
-    (trans_info, returned_any_states, binding, newbindings)
-
-let mysat a b c = 
-  Common.profile_code "mysat" (fun () -> mysat2 a b c)
diff --git a/engine/.#postprocess_transinfo.ml.1.12 b/engine/.#postprocess_transinfo.ml.1.12
deleted file mode 100644 (file)
index 89b30b7..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* two goals: first drop from the environments things that are not used,
-   and second prompt for the names of fresh variables that are used *)
-
-(* have to add in the whole inherited env because inherited variables are
-not returned by get_fvs.  It would be better if that were the case, but
-since at the moment I think we can only inherit one value per variable,
-perhaps it doesn't matter - these bindings will always be the same no matter
-how we reached a particular match *)
-
-module Ast = Ast_cocci
-
-let extra_counter = ref 0
-let get_extra _ =
-  let ctr = !extra_counter in
-  extra_counter := !extra_counter + 1;
-  "__extra_counter__"^(string_of_int ctr)
-
-let read_fresh_id () =
-  try 
-    let s = read_line () in
-    match Parse_c.tokens_string s with
-      [Parser_c.TIdent _; Parser_c.EOF _] -> s
-    | _ -> failwith ("wrong fresh id: " ^ s)
-  with End_of_file -> get_extra()
-
-let get_vars = function
-    Lib_engine.Match(re) -> (Ast.get_fvs re, Ast.get_fresh re)
-  | _ -> ([],[])
-
-let string2val str = Lib_engine.NormalMetaVal(Ast_c.MetaIdVal(str))
-
-(* ----------------------------------------------------------------------- *)
-(* Get values for fresh variables *)
-
-let process_tree inherited_env l =
-  let (all_fresh,local_freshs,new_triples) =
-    List.fold_left
-      (function (all_fresh,local_freshs,new_triples) ->
-       function (node,env,pred) ->
-         let (other,fresh) = get_vars pred in
-         let env = List.filter (function (x,_) -> List.mem x other) env in
-         (Common.union_set fresh all_fresh,
-          fresh::local_freshs,
-          (node,env@inherited_env,pred)::new_triples))
-      ([],[],[]) l in
-  let local_freshs = List.rev local_freshs in
-  let new_triples = List.rev new_triples in
-  let fresh_env =
-    List.map
-      (function ((r,n) as fresh) ->
-       Printf.printf "%s: name for %s: " r n; (* not debugging code!!! *)
-       flush stdout;
-       (fresh,string2val(read_fresh_id())))
-      all_fresh in
-  let (_,res) =
-    List.split
-      (List.fold_left
-        (function freshs_node_env_preds ->
-          function (fresh,_) as elem ->
-            List.map
-              (function (freshs,((node,env,pred) as cur)) ->
-                if List.mem fresh freshs
-                then (freshs,(node,elem::env,pred))
-                else (freshs,cur))
-              freshs_node_env_preds)
-        (List.combine local_freshs new_triples)
-        fresh_env) in
-  (List.rev res, fresh_env)
-
-(* ----------------------------------------------------------------------- *)
-(* Create the environment to be used afterwards *)
-
-let collect_used_after used_after envs =
-  List.map (List.filter (function (v,vl) -> List.mem v used_after)) envs
-
-(* ----------------------------------------------------------------------- *)
-(* entry point *)
-
-let process used_after inherited_env l =
-  extra_counter := 0;
-  let (trees, fresh_envs) =
-    List.split (List.map (process_tree inherited_env) l) in
-  (Common.uniq(List.concat trees), collect_used_after used_after fresh_envs)
diff --git a/engine/.#pretty_print_engine.ml.1.42 b/engine/.#pretty_print_engine.ml.1.42
deleted file mode 100644 (file)
index 0dd3bb3..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-open Common.Infix
-
-open Lib_engine
-
-
-let pp = Common.pp 
-
-let pp_meta (_,x) = pp x
-
-let rec pp_binding_kind = function
-  | Ast_c.MetaIdVal        s -> pp ("id " ^ s)
-  | Ast_c.MetaFuncVal      s -> pp ("func " ^ s)
-  | Ast_c.MetaLocalFuncVal s -> pp ("localfunc " ^ s)
-  | Ast_c.MetaExprVal      expr -> 
-      Pretty_print_c.pp_expression_simple expr
-  | Ast_c.MetaExprListVal  expr_list -> pp "<<exprlist>>"
-  | Ast_c.MetaTypeVal      typ -> 
-      Pretty_print_c.pp_type_simple typ
-  | Ast_c.MetaStmtVal      statement -> 
-      Pretty_print_c.pp_statement_simple statement
-  | Ast_c.MetaParamVal     params -> pp "<<param>>"
-  | Ast_c.MetaParamListVal params -> pp "<<paramlist>>"
-  | Ast_c.MetaListlenVal n -> pp (string_of_int n)
-  | Ast_c.MetaPosVal (pos1, pos2) ->
-      let print_pos = function
-         Ast_cocci.Real x -> string_of_int x
-       | Ast_cocci.Virt(x,off) -> Printf.sprintf "%d+%d" x off in
-      pp (Common.sprintf ("pos(%s,%s)") (print_pos pos1) (print_pos pos2))
-  | Ast_c.MetaPosValList l -> 
-      pp (Common.sprintf ("poss[%s]")
-           (String.concat ", "
-              (List.map
-                 (function (fl,(minl,minc),(maxl,maxc)) ->
-                   Printf.sprintf "(%s,(%d,%d),(%d,%d))"
-                     fl minl minc maxl maxc)
-                 l)))
-
-and pp_binding subst = 
-  begin
-    pp "[";
-    Common.print_between (fun () -> pp ";"; Format.print_cut() ) 
-      (fun ((_,s), kind) -> pp s; pp " --> "; pp_binding_kind kind)
-      subst;
-    pp "]";
-  end
-
-
-let pp_binding_kind2 = function
-  | ParenVal s -> pp "pv("; pp_meta s; pp ")"
-  | NormalMetaVal x -> pp_binding_kind x
-  | LabelVal xs -> 
-      begin
-        pp "labelval";
-        pp "(";
-        Common.print_between (fun () -> pp ",") Format.print_int xs;
-        pp ")";
-      end
-  | GoodVal -> pp "goodval"
-  | BadVal ->  pp "badval"
-
-  
-let rec pp_predicate = function 
-  | InLoop -> pp "InLoop"
-  | TrueBranch -> pp "TrueBranch"
-  | FalseBranch -> pp "FalseBranch"
-  | After -> pp "After"
-  | FallThrough -> pp "FallThrough"
-  | Return -> pp "Return"
-  | FunHeader -> pp "FunHeader"
-  | Top -> pp "Top"
-  | ErrorExit -> pp "ErrorExit"
-  | Exit -> pp "Exit"
-  | Goto -> pp "Goto"
-  | Paren s -> pp "Paren("; pp_meta s; pp ")"
-  | Match (re) -> Pretty_print_cocci.print_rule_elem re
-  | Label s -> pp "Label("; pp_meta s; pp ")"
-  | BCLabel s -> pp "BreakContinueLabel("; pp_meta s; pp ")"
-  | PrefixLabel s -> pp "PrefixLabel("; pp_meta s; pp ")"
-  | BindGood s -> pp "BindGood("; pp_meta s; pp ")"
-  | BindBad s ->  pp "BindBad(";  pp_meta s; pp ")"
-  | FakeBrace -> pp "FakeBrace"
-
-and pp_binding2 subst = 
-  begin
-    pp "[";
-    Common.print_between (fun () -> pp ";";Format.print_cut(); ) 
-      (fun (s, kind) -> pp s; pp " --> "; pp_binding_kind2 kind)
-      subst;
-    pp "]";
-  end
-
-and pp_binding2_ctlsubst subst = 
-  begin
-    pp "[";
-    Common.print_between (fun () -> pp ";"; Format.print_cut(); ) 
-      (function
-          Ast_ctl.Subst (s, kind) ->
-           pp_meta s; pp " --> ";  pp_binding_kind2 kind;
-       | Ast_ctl.NegSubst (s, kind) ->
-          pp_meta s; pp " -/-> "; pp_binding_kind2 kind;
-      )
-      subst;
-    pp "]";
-  end
-
-let predicate_to_string pred =
-  Common.format_to_string (function _ -> pp_predicate pred)
-
-
-let pp_pred_smodif = fun (pred, smodif) -> 
-  begin
-    pp_predicate pred;
-(*
-  (match smodif with
-  |  Ast_ctl.Modif x | Ast_ctl.UnModif x -> pp " with <modifTODO>"
-  | Ast_ctl.Control -> ()
-  )
-*)
-  end
-
-
-let pp_ctlcocci show_plus inline_let_def ctl = 
-  begin
-    if show_plus 
-    then begin
-      Pretty_print_cocci.print_plus_flag := true;
-      Pretty_print_cocci.print_minus_flag := true;
-    end
-    else begin
-      Pretty_print_cocci.print_plus_flag := false;
-      Pretty_print_cocci.print_minus_flag := false;
-    end;
-    Common.pp_do_in_box (fun () -> 
-      Pretty_print_ctl.pp_ctl (pp_pred_smodif,(fun s -> pp_meta s))
-        inline_let_def ctl;
-      );
-  end
-
-
diff --git a/engine/.cvsignore b/engine/.cvsignore
deleted file mode 100644 (file)
index 0a2d2b3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.depend
-*.cma
dissimilarity index 99%
index 4c9bde7..3ef9a54 100644 (file)
-asttoctl.cmi: ../ctl/wrapper_ctl.cmi lib_engine.cmo ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi 
-asttoctl2.cmi: ../ctl/wrapper_ctl.cmi lib_engine.cmo ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi 
-asttomember.cmi: lib_engine.cmo ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi 
-c_vs_c.cmi: ../parsing_c/ast_c.cmo 
-check_reachability.cmi: ../ctl/wrapper_ctl.cmi ../commons/ograph_extended.cmi \
-    ../parsing_c/control_flow_c.cmi ../ctl/ast_ctl.cmo 
-cocci_vs_c.cmi: ../parsing_c/control_flow_c.cmi ../commons/common.cmi \
-    ../parsing_cocci/ast_cocci.cmi ../parsing_c/ast_c.cmo 
-ctlcocci_integration.cmi: ../commons/ograph_extended.cmi lib_engine.cmo \
-    ../parsing_c/control_flow_c.cmi ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi 
-ctltotex.cmi: ../ctl/wrapper_ctl.cmi lib_engine.cmo ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi 
-lib_matcher_c.cmi: ../commons/ograph_extended.cmi \
-    ../parsing_c/control_flow_c.cmi ../parsing_cocci/ast_cocci.cmi \
-    ../parsing_c/ast_c.cmo 
-pattern_c.cmi: lib_engine.cmo ../parsing_c/control_flow_c.cmi \
-    ../parsing_cocci/ast_cocci.cmi 
-postprocess_transinfo.cmi: ../commons/ograph_extended.cmi lib_engine.cmo \
-    ../parsing_cocci/ast_cocci.cmi 
-pretty_print_engine.cmi: lib_engine.cmo ../ctl/ast_ctl.cmo \
-    ../parsing_c/ast_c.cmo 
-transformation_c.cmi: lib_engine.cmo ../parsing_c/control_flow_c.cmi 
-asttoctl.cmo: ../ctl/wrapper_ctl.cmi ../parsing_cocci/visitor_ast.cmi \
-    ../parsing_cocci/unify_ast.cmi pretty_print_engine.cmi lib_engine.cmo \
-    ../parsing_cocci/free_vars.cmi ../commons/common.cmi ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi asttoctl.cmi 
-asttoctl.cmx: ../ctl/wrapper_ctl.cmx ../parsing_cocci/visitor_ast.cmx \
-    ../parsing_cocci/unify_ast.cmx pretty_print_engine.cmx lib_engine.cmx \
-    ../parsing_cocci/free_vars.cmx ../commons/common.cmx ../ctl/ast_ctl.cmx \
-    ../parsing_cocci/ast_cocci.cmx asttoctl.cmi 
-asttoctl2.cmo: ../ctl/wrapper_ctl.cmi ../parsing_cocci/visitor_ast.cmi \
-    ../parsing_cocci/unify_ast.cmi ../parsing_cocci/type_cocci.cmi \
-    pretty_print_engine.cmi ../ctl/pretty_print_ctl.cmi \
-    ../parsing_cocci/pretty_print_cocci.cmi lib_engine.cmo flag_matcher.cmo \
-    ../globals/flag.cmo ../commons/common.cmi ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi asttoctl2.cmi 
-asttoctl2.cmx: ../ctl/wrapper_ctl.cmx ../parsing_cocci/visitor_ast.cmx \
-    ../parsing_cocci/unify_ast.cmx ../parsing_cocci/type_cocci.cmx \
-    pretty_print_engine.cmx ../ctl/pretty_print_ctl.cmx \
-    ../parsing_cocci/pretty_print_cocci.cmx lib_engine.cmx flag_matcher.cmx \
-    ../globals/flag.cmx ../commons/common.cmx ../ctl/ast_ctl.cmx \
-    ../parsing_cocci/ast_cocci.cmx asttoctl2.cmi 
-asttomember.cmo: ../parsing_cocci/visitor_ast.cmi \
-    ../parsing_cocci/pretty_print_cocci.cmi lib_engine.cmo \
-    ../commons/common.cmi ../ctl/ast_ctl.cmo ../parsing_cocci/ast_cocci.cmi \
-    asttomember.cmi 
-asttomember.cmx: ../parsing_cocci/visitor_ast.cmx \
-    ../parsing_cocci/pretty_print_cocci.cmx lib_engine.cmx \
-    ../commons/common.cmx ../ctl/ast_ctl.cmx ../parsing_cocci/ast_cocci.cmx \
-    asttomember.cmi 
-c_vs_c.cmo: ../parsing_c/lib_parsing_c.cmo ../commons/common.cmi \
-    ../parsing_c/ast_c.cmo c_vs_c.cmi 
-c_vs_c.cmx: ../parsing_c/lib_parsing_c.cmx ../commons/common.cmx \
-    ../parsing_c/ast_c.cmx c_vs_c.cmi 
-check_exhaustive_pattern.cmo: ../parsing_c/control_flow_c.cmi \
-    ../parsing_cocci/ast_cocci.cmi ../parsing_c/ast_c.cmo 
-check_exhaustive_pattern.cmx: ../parsing_c/control_flow_c.cmx \
-    ../parsing_cocci/ast_cocci.cmx ../parsing_c/ast_c.cmx 
-check_reachability.cmo: ../ctl/wrapper_ctl.cmi ../commons/ograph_extended.cmi \
-    ../ctl/flag_ctl.cmo ../ctl/ctl_engine.cmi ../parsing_c/control_flow_c.cmi \
-    ../ctl/ast_ctl.cmo check_reachability.cmi 
-check_reachability.cmx: ../ctl/wrapper_ctl.cmx ../commons/ograph_extended.cmx \
-    ../ctl/flag_ctl.cmx ../ctl/ctl_engine.cmx ../parsing_c/control_flow_c.cmx \
-    ../ctl/ast_ctl.cmx check_reachability.cmi 
-cocci_vs_c.cmo: ../parsing_cocci/type_cocci.cmi \
-    ../parsing_c/lib_parsing_c.cmo flag_matcher.cmo \
-    ../parsing_c/control_flow_c.cmi ../commons/common.cmi c_vs_c.cmi \
-    ../parsing_cocci/ast_cocci.cmi ../parsing_c/ast_c.cmo cocci_vs_c.cmi 
-cocci_vs_c.cmx: ../parsing_cocci/type_cocci.cmx \
-    ../parsing_c/lib_parsing_c.cmx flag_matcher.cmx \
-    ../parsing_c/control_flow_c.cmx ../commons/common.cmx c_vs_c.cmx \
-    ../parsing_cocci/ast_cocci.cmx ../parsing_c/ast_c.cmx cocci_vs_c.cmi 
-ctlcocci_integration.cmo: ../ctl/wrapper_ctl.cmi pretty_print_engine.cmi \
-    ../parsing_cocci/pretty_print_cocci.cmi postprocess_transinfo.cmi \
-    pattern_c.cmi ../commons/ograph_extended.cmi lib_engine.cmo \
-    ../parsing_cocci/flag_parsing_cocci.cmo flag_matcher.cmo \
-    ../globals/flag.cmo ../parsing_c/control_flow_c.cmi ../commons/common.cmi \
-    check_reachability.cmi c_vs_c.cmi ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi ../parsing_c/ast_c.cmo \
-    ctlcocci_integration.cmi 
-ctlcocci_integration.cmx: ../ctl/wrapper_ctl.cmx pretty_print_engine.cmx \
-    ../parsing_cocci/pretty_print_cocci.cmx postprocess_transinfo.cmx \
-    pattern_c.cmx ../commons/ograph_extended.cmx lib_engine.cmx \
-    ../parsing_cocci/flag_parsing_cocci.cmx flag_matcher.cmx \
-    ../globals/flag.cmx ../parsing_c/control_flow_c.cmx ../commons/common.cmx \
-    check_reachability.cmx c_vs_c.cmx ../ctl/ast_ctl.cmx \
-    ../parsing_cocci/ast_cocci.cmx ../parsing_c/ast_c.cmx \
-    ctlcocci_integration.cmi 
-ctltotex.cmo: ../parsing_cocci/pretty_print_cocci.cmi lib_engine.cmo \
-    ../ctl/ast_ctl.cmo ctltotex.cmi 
-ctltotex.cmx: ../parsing_cocci/pretty_print_cocci.cmx lib_engine.cmx \
-    ../ctl/ast_ctl.cmx ctltotex.cmi 
-isomorphisms_c_c.cmo: ../commons/common.cmi ../parsing_c/ast_c.cmo 
-isomorphisms_c_c.cmx: ../commons/common.cmx ../parsing_c/ast_c.cmx 
-lib_engine.cmo: ../ctl/wrapper_ctl.cmi ../commons/ograph_extended.cmi \
-    ../parsing_c/control_flow_c.cmi ../commons/common.cmi ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi ../parsing_c/ast_c.cmo 
-lib_engine.cmx: ../ctl/wrapper_ctl.cmx ../commons/ograph_extended.cmx \
-    ../parsing_c/control_flow_c.cmx ../commons/common.cmx ../ctl/ast_ctl.cmx \
-    ../parsing_cocci/ast_cocci.cmx ../parsing_c/ast_c.cmx 
-lib_matcher_c.cmo: ../parsing_c/visitor_c.cmi pattern_c.cmi \
-    ../commons/ograph_extended.cmi ../parsing_c/lib_parsing_c.cmo \
-    ../parsing_c/control_flow_c.cmi ../commons/common.cmi \
-    ../parsing_cocci/ast_cocci.cmi ../parsing_c/ast_c.cmo lib_matcher_c.cmi 
-lib_matcher_c.cmx: ../parsing_c/visitor_c.cmx pattern_c.cmx \
-    ../commons/ograph_extended.cmx ../parsing_c/lib_parsing_c.cmx \
-    ../parsing_c/control_flow_c.cmx ../commons/common.cmx \
-    ../parsing_cocci/ast_cocci.cmx ../parsing_c/ast_c.cmx lib_matcher_c.cmi 
-main.cmo: ../parsing_cocci/parse_cocci.cmi ctltotex.cmi asttoctl.cmi 
-main.cmx: ../parsing_cocci/parse_cocci.cmx ctltotex.cmx asttoctl.cmx 
-pattern_c.cmo: ../parsing_c/visitor_c.cmi ../parsing_c/lib_parsing_c.cmo \
-    lib_engine.cmo flag_matcher.cmo ../commons/common.cmi cocci_vs_c.cmi \
-    ../parsing_cocci/ast_cocci.cmi ../parsing_c/ast_c.cmo pattern_c.cmi 
-pattern_c.cmx: ../parsing_c/visitor_c.cmx ../parsing_c/lib_parsing_c.cmx \
-    lib_engine.cmx flag_matcher.cmx ../commons/common.cmx cocci_vs_c.cmx \
-    ../parsing_cocci/ast_cocci.cmx ../parsing_c/ast_c.cmx pattern_c.cmi 
-postprocess_transinfo.cmo: ../parsing_c/parser_c.cmi ../parsing_c/parse_c.cmi \
-    lib_engine.cmo ../commons/common.cmi ../parsing_cocci/ast_cocci.cmi \
-    ../parsing_c/ast_c.cmo postprocess_transinfo.cmi 
-postprocess_transinfo.cmx: ../parsing_c/parser_c.cmx ../parsing_c/parse_c.cmx \
-    lib_engine.cmx ../commons/common.cmx ../parsing_cocci/ast_cocci.cmx \
-    ../parsing_c/ast_c.cmx postprocess_transinfo.cmi 
-pretty_print_engine.cmo: ../ctl/pretty_print_ctl.cmi \
-    ../parsing_cocci/pretty_print_cocci.cmi ../parsing_c/pretty_print_c.cmi \
-    lib_engine.cmo ../commons/common.cmi ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi ../parsing_c/ast_c.cmo \
-    pretty_print_engine.cmi 
-pretty_print_engine.cmx: ../ctl/pretty_print_ctl.cmx \
-    ../parsing_cocci/pretty_print_cocci.cmx ../parsing_c/pretty_print_c.cmx \
-    lib_engine.cmx ../commons/common.cmx ../ctl/ast_ctl.cmx \
-    ../parsing_cocci/ast_cocci.cmx ../parsing_c/ast_c.cmx \
-    pretty_print_engine.cmi 
-sgrep.cmo: ../parsing_cocci/ast_cocci.cmi ../parsing_c/ast_c.cmo 
-sgrep.cmx: ../parsing_cocci/ast_cocci.cmx ../parsing_c/ast_c.cmx 
-transformation_c.cmo: ../parsing_c/visitor_c.cmi \
-    ../parsing_cocci/type_cocci.cmi ../parsing_c/lib_parsing_c.cmo \
-    lib_engine.cmo flag_matcher.cmo ../parsing_c/control_flow_c.cmi \
-    ../commons/common.cmi cocci_vs_c.cmi ../parsing_cocci/ast_cocci.cmi \
-    ../parsing_c/ast_c.cmo transformation_c.cmi 
-transformation_c.cmx: ../parsing_c/visitor_c.cmx \
-    ../parsing_cocci/type_cocci.cmx ../parsing_c/lib_parsing_c.cmx \
-    lib_engine.cmx flag_matcher.cmx ../parsing_c/control_flow_c.cmx \
-    ../commons/common.cmx cocci_vs_c.cmx ../parsing_cocci/ast_cocci.cmx \
-    ../parsing_c/ast_c.cmx transformation_c.cmi 
+asttoctl.cmi: lib_engine.cmo 
+asttoctl2.cmi: lib_engine.cmo 
+asttomember.cmi: lib_engine.cmo 
+ctlcocci_integration.cmi: lib_engine.cmo 
+ctltotex.cmi: lib_engine.cmo 
+pattern_c.cmi: lib_engine.cmo 
+postprocess_transinfo.cmi: lib_engine.cmo 
+pretty_print_engine.cmi: lib_engine.cmo 
+transformation_c.cmi: lib_engine.cmo 
+asttoctl.cmo: pretty_print_engine.cmi lib_engine.cmo asttoctl.cmi 
+asttoctl.cmx: pretty_print_engine.cmx lib_engine.cmx asttoctl.cmi 
+asttoctl2.cmo: pretty_print_engine.cmi lib_engine.cmo flag_matcher.cmo \
+    asttoctl2.cmi 
+asttoctl2.cmx: pretty_print_engine.cmx lib_engine.cmx flag_matcher.cmx \
+    asttoctl2.cmi 
+asttomember.cmo: lib_engine.cmo asttomember.cmi 
+asttomember.cmx: lib_engine.cmx asttomember.cmi 
+c_vs_c.cmo: c_vs_c.cmi 
+c_vs_c.cmx: c_vs_c.cmi 
+check_reachability.cmo: check_reachability.cmi 
+check_reachability.cmx: check_reachability.cmi 
+cocci_vs_c.cmo: flag_matcher.cmo c_vs_c.cmi cocci_vs_c.cmi 
+cocci_vs_c.cmx: flag_matcher.cmx c_vs_c.cmx cocci_vs_c.cmi 
+ctlcocci_integration.cmo: pretty_print_engine.cmi postprocess_transinfo.cmi \
+    pattern_c.cmi lib_engine.cmo flag_matcher.cmo check_reachability.cmi \
+    c_vs_c.cmi ctlcocci_integration.cmi 
+ctlcocci_integration.cmx: pretty_print_engine.cmx postprocess_transinfo.cmx \
+    pattern_c.cmx lib_engine.cmx flag_matcher.cmx check_reachability.cmx \
+    c_vs_c.cmx ctlcocci_integration.cmi 
+ctltotex.cmo: lib_engine.cmo ctltotex.cmi 
+ctltotex.cmx: lib_engine.cmx ctltotex.cmi 
+lib_matcher_c.cmo: pattern_c.cmi lib_matcher_c.cmi 
+lib_matcher_c.cmx: pattern_c.cmx lib_matcher_c.cmi 
+main.cmo: ctltotex.cmi asttoctl.cmi 
+main.cmx: ctltotex.cmx asttoctl.cmx 
+pattern_c.cmo: lib_engine.cmo flag_matcher.cmo cocci_vs_c.cmi pattern_c.cmi 
+pattern_c.cmx: lib_engine.cmx flag_matcher.cmx cocci_vs_c.cmx pattern_c.cmi 
+postprocess_transinfo.cmo: lib_engine.cmo postprocess_transinfo.cmi 
+postprocess_transinfo.cmx: lib_engine.cmx postprocess_transinfo.cmi 
+pretty_print_engine.cmo: lib_engine.cmo pretty_print_engine.cmi 
+pretty_print_engine.cmx: lib_engine.cmx pretty_print_engine.cmi 
+transformation_c.cmo: lib_engine.cmo flag_matcher.cmo cocci_vs_c.cmi \
+    transformation_c.cmi 
+transformation_c.cmx: lib_engine.cmx flag_matcher.cmx cocci_vs_c.cmx \
+    transformation_c.cmi 
index 80d5b28..c989683 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+# Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 # This file is part of Coccinelle.
 # 
@@ -65,7 +65,7 @@ OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
 OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
 OCAMLLEX=ocamllex$(OPTBIN) #-ml
 OCAMLYACC=ocamlyacc -v
-OCAMLDEP=ocamldep$(OPTBIN) $(INCLUDES)
+OCAMLDEP=ocamldep$(OPTBIN) #$(INCLUDES)
 OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
 
 
index 05e445f..a569a97 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 561acff..865a633 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -347,7 +347,6 @@ let elim_opt =
   
   V.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing stmtdotsfn donothing
     donothing donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing donothing
@@ -449,7 +448,6 @@ let contains_modif =
   let recursor =
     V.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       do_nothing do_nothing do_nothing do_nothing
       do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
       do_nothing rule_elem do_nothing do_nothing do_nothing do_nothing in
@@ -473,7 +471,6 @@ let contains_pos =
   let recursor =
     V.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       do_nothing do_nothing do_nothing do_nothing
       do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
       do_nothing rule_elem do_nothing do_nothing do_nothing do_nothing in
@@ -540,7 +537,6 @@ let count_nested_braces s =
   let mcode r x = 0 in
   let recursor = V.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing
       donothing donothing donothing donothing donothing donothing
       donothing donothing stmt_count donothing donothing donothing in
@@ -1275,14 +1271,18 @@ let dots_au is_strict toend label s wrapcode x seq_after y quantifier =
                  (ctl_au CTL.NONSTRICT
                     (ctl_and CTL.NONSTRICT (ctl_not v) preflabelpred)
                     (ctl_and CTL.NONSTRICT preflabelpred
-                       (ctl_or (retpred None)
-                          (if !Flag_matcher.only_return_is_error_exit
-                          then CTL.True
-                          else
-                            (ctl_or matchcontinue
-                               (ctl_and CTL.NONSTRICT
-                                  (ctl_or matchgoto matchbreak)
-                                  (ctl_ag s (ctl_not seq_after))))))))))) in
+                       (if !Flag_matcher.only_return_is_error_exit
+                       then
+                         (ctl_and CTL.NONSTRICT
+                            (retpred None) (ctl_not seq_after))
+                       else
+                         (ctl_or
+                            (ctl_and CTL.NONSTRICT
+                               (ctl_or (retpred None) matchcontinue)
+                               (ctl_not seq_after))
+                            (ctl_and CTL.NONSTRICT
+                               (ctl_or matchgoto matchbreak)
+                               (ctl_ag s (ctl_not seq_after)))))))))) in
   let op = if quantifier = !exists then ctl_au else ctl_anti_au in
   let v = get_let_ctr() in
   op s x
@@ -2329,7 +2329,9 @@ let asttoctlz (name,(_,_,exists_flag),l) used_after positions =
 let asttoctl r used_after positions =
   match r with
     Ast.ScriptRule _ -> []
-  | Ast.CocciRule (a,b,c,_) -> asttoctlz (a,b,c) used_after positions
+  | Ast.CocciRule (a,b,c,_,Ast_cocci.Normal) ->
+      asttoctlz (a,b,c) used_after positions
+  | Ast.CocciRule (a,b,c,_,Ast_cocci.Generated) -> [CTL.True]
 
 let pp_cocci_predicate (pred,modif) =
   Pretty_print_engine.pp_predicate pred
index 7a1d34f..d0c70af 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -53,7 +53,7 @@ let contains_modif used_after x =
     let recursor =
       V.combiner bind option_default
        mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-       mcode mcode
+       mcode
        do_nothing do_nothing do_nothing do_nothing
        do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
        do_nothing rule_elem do_nothing do_nothing do_nothing do_nothing in
@@ -78,7 +78,7 @@ let contains_constant x =
       let recursor =
        V.combiner bind option_default
          mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-         mcode mcode
+         mcode
          do_nothing do_nothing do_nothing do_nothing
          ident expr do_nothing do_nothing do_nothing do_nothing
          do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing in
@@ -120,7 +120,6 @@ let strip =
   let recursor =
     V.rebuilder
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       do_nothing do_nothing do_nothing do_nothing
       do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
       do_nothing rule_elem do_nothing do_nothing
@@ -323,5 +322,5 @@ let asttomemberz (_,_,l) used_after =
 let asttomember r used_after =
   match r with
     Ast.ScriptRule _ -> []
-  | Ast.CocciRule (a,b,c,_) -> asttomemberz (a,b,c) used_after
+  | Ast.CocciRule (a,b,c,_,_) -> asttomemberz (a,b,c) used_after
 
index 303be64..baa7f9f 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 2914b42..3bd7e1a 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -133,12 +133,13 @@ let dumb_astcocci_fulltype = function
 
 let dumb_astcocci_type = function
  | A.MetaType(ida,_,_) -> ()
- | A.BaseType (basea, signaopt) -> ()
- | A.ImplicitInt (signa) -> ()
+ | A.BaseType (basea,strings) -> ()
+ | A.SignedT (signa,tya) -> ()
  | A.Pointer (typa, _) -> ()
  | A.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) -> ()
  | A.FunctionType _ -> ()
  | A.Array (typa, _, eaopt, _) -> ()
+ | A.EnumName(en, ena) -> ()
  | A.StructUnionName(sa, sua) -> ()
  | A.StructUnionDef(ty, lb, decls, rb) -> ()
  | A.TypeName sa -> ()
index 53e041f..da6758b 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 7cf2233..181e174 100644 (file)
@@ -1,16 +1,24 @@
-(* Copyright (C) 2006, 2007, 2008 Yoann Padioleau
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License (GPL)
- * version 2 as published by the Free Software Foundation.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * file license.txt for more details.
- * 
- * This file was part of Coccinelle.
- *)
+(*
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
+* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
+* This file is part of Coccinelle.
+* 
+* Coccinelle is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, according to version 2 of the License.
+* 
+* Coccinelle is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
+* 
+* The authors reserve the right to distribute this or future versions of
+* Coccinelle under other licenses.
+*)
+
 
 open Common
 
@@ -2338,11 +2346,7 @@ and (fullTypebis: (A.typeC, Ast_c.fullType) matcher) =
         return (ta, (qub, typb))
       )
 
-
-and (typeC: (A.typeC, Ast_c.typeC) matcher) = 
-  fun ta tb -> 
-  match A.unwrap ta, tb with
-  | A.BaseType (basea, signaopt), (B.BaseType baseb, ii) -> 
+and simulate_signed ta basea stringsa signaopt tb baseb ii rebuilda =
       (* In ii there is a list, sometimes of length 1 or 2 or 3.
        * And even if in baseb we have a Signed Int, that does not mean
        * that ii is of length 2, cos Signed is the default, so if in signa
@@ -2355,49 +2359,53 @@ and (typeC: (A.typeC, Ast_c.typeC) matcher) =
         
       (* handle some iso on type ? (cf complex C rule for possible implicit
         casting) *)
-      (match term basea, baseb with
+      match basea, baseb with
       | A.VoidType,  B.Void 
       | A.FloatType, B.FloatType (B.CFloat)
       | A.DoubleType, B.FloatType (B.CDouble) -> 
            assert (signaopt = None); 
+          let stringa = tuple_of_list1 stringsa in
            let (ibaseb) = tuple_of_list1 ii in 
-           tokenf basea ibaseb >>= (fun basea ibaseb -> 
+           tokenf stringa ibaseb >>= (fun stringa ibaseb -> 
              return (
-               (A.BaseType (basea, signaopt)) +> A.rewrap ta,
+               (rebuilda ([stringa], signaopt)) +> A.rewrap ta,
                (B.BaseType baseb, [ibaseb])
              ))
             
       | A.CharType,  B.IntType B.CChar when signaopt = None -> 
+         let stringa = tuple_of_list1 stringsa in
           let ibaseb = tuple_of_list1 ii in
-           tokenf basea ibaseb >>= (fun basea ibaseb -> 
+           tokenf stringa ibaseb >>= (fun stringa ibaseb -> 
              return (
-               (A.BaseType (basea, signaopt)) +> A.rewrap ta,
+               (rebuilda ([stringa], signaopt)) +> A.rewrap ta,
                (B.BaseType (B.IntType B.CChar), [ibaseb])
              ))
             
       | A.CharType,B.IntType (B.Si (_sign, B.CChar2)) when signaopt <> None -> 
+         let stringa = tuple_of_list1 stringsa in
           let ibaseb = tuple_of_list1 iibaseb in
           sign signaopt signbopt >>= (fun signaopt iisignbopt -> 
-          tokenf basea ibaseb >>= (fun basea ibaseb -> 
+          tokenf stringa ibaseb >>= (fun stringa ibaseb -> 
             return (
-               (A.BaseType (basea, signaopt)) +> A.rewrap ta,
+               (rebuilda ([stringa], signaopt)) +> A.rewrap ta,
                (B.BaseType (baseb), iisignbopt ++ [ibaseb])
                )))
           
       | A.ShortType, B.IntType (B.Si (_, B.CShort)) 
       | A.IntType,   B.IntType (B.Si (_, B.CInt))   
       | A.LongType,  B.IntType (B.Si (_, B.CLong))  ->
+         let stringa = tuple_of_list1 stringsa in
           (match iibaseb with 
           | [] -> 
               (* iso-by-presence ? *)
               (* when unsigned int in SP,  allow have just unsigned in C ? *)
-              if mcode_contain_plus (mcodekind basea)
+              if mcode_contain_plus (mcodekind stringa)
               then fail
               else 
                 
                 sign signaopt signbopt >>= (fun signaopt iisignbopt -> 
                     return (
-                      (A.BaseType (basea, signaopt)) +> A.rewrap ta,
+                      (rebuilda ([stringa], signaopt)) +> A.rewrap ta,
                       (B.BaseType (baseb), iisignbopt ++ [])
                     ))
               
@@ -2409,9 +2417,9 @@ and (typeC: (A.typeC, Ast_c.typeC) matcher) =
 
           | [ibaseb] -> 
           sign signaopt signbopt >>= (fun signaopt iisignbopt -> 
-          tokenf basea ibaseb >>= (fun basea ibaseb -> 
+          tokenf stringa ibaseb >>= (fun stringa ibaseb -> 
             return (
-               (A.BaseType (basea, signaopt)) +> A.rewrap ta,
+               (rebuilda ([stringa], signaopt)) +> A.rewrap ta,
                (B.BaseType (baseb), iisignbopt ++ [ibaseb])
                )))
           | _ -> raise Impossible
@@ -2419,19 +2427,98 @@ and (typeC: (A.typeC, Ast_c.typeC) matcher) =
           )
 
             
-      | _, B.IntType (B.Si (_, B.CLongLong)) 
+      | A.LongLongType, B.IntType (B.Si (_, B.CLongLong)) ->
+         let (string1a,string2a) = tuple_of_list2 stringsa in
+          (match iibaseb with 
+            [ibase1b;ibase2b] -> 
+              sign signaopt signbopt >>= (fun signaopt iisignbopt -> 
+              tokenf string1a ibase1b >>= (fun base1a ibase1b -> 
+              tokenf string2a ibase2b >>= (fun base2a ibase2b -> 
+              return (
+               (rebuilda ([base1a;base2a], signaopt)) +> A.rewrap ta,
+               (B.BaseType (baseb), iisignbopt ++ [ibase1b;ibase2b])
+              ))))
+         | [] -> fail (* should something be done in this case? *)
+         | _ -> raise Impossible)
+
+
       | _, B.FloatType B.CLongDouble 
           -> 
           pr2_once 
-            "warning: long long or long double not handled by ast_cocci";
+            "warning: long double not handled by ast_cocci";
           fail
 
       | _, (B.Void|B.FloatType _|B.IntType _) -> fail
 
+and simulate_signed_meta ta basea signaopt tb baseb ii rebuilda =
+      (* In ii there is a list, sometimes of length 1 or 2 or 3.
+       * And even if in baseb we have a Signed Int, that does not mean
+       * that ii is of length 2, cos Signed is the default, so if in signa
+       * we have Signed explicitely ? we cant "accrocher" this mcode to 
+       * something :( So for the moment when there is signed in cocci,
+       * we force that there is a signed in c too (done in pattern.ml).
+       *)
+      let signbopt, iibaseb = split_signb_baseb_ii (baseb, ii) in
+
+      let match_to_type rebaseb = 
+       sign signaopt signbopt >>= (fun signaopt iisignbopt -> 
+       let ibaseb = tuple_of_list1 iibaseb in
+       let fta = A.rewrap basea (A.Type(None,basea)) in
+       let ftb = Ast_c.nQ,(B.BaseType (rebaseb), [ibaseb]) in
+       fullType fta ftb >>= (fun fta (_,tb) ->
+         (match A.unwrap fta,tb with
+           A.Type(_,basea), (B.BaseType baseb, ii) ->
+             let ibaseb = tuple_of_list1 ii in
+             return (
+             (rebuilda (basea, signaopt)) +> A.rewrap ta,
+             (B.BaseType (baseb), iisignbopt ++ [ibaseb])
+               )
+         | _ -> failwith "not possible"))) in
+        
+      (* handle some iso on type ? (cf complex C rule for possible implicit
+        casting) *)
+      match baseb with
+      | B.IntType (B.Si (_sign, B.CChar2)) ->
+         match_to_type (B.IntType B.CChar)
           
-      )
+      | B.IntType (B.Si (_, ty)) ->
+          (match iibaseb with 
+          | [] -> fail (* metavariable has to match something *)
+
+          | [x;y] -> 
+              pr2_once 
+                "warning: long int or short int not handled by ast_cocci";
+              fail
+
+          | [ibaseb] -> match_to_type (B.IntType (B.Si (B.Signed, ty)))
+          | _ -> raise Impossible
 
-    | A.ImplicitInt (signa),   (B.BaseType baseb, ii) -> 
+          )
+
+      | (B.Void|B.FloatType _|B.IntType _) -> fail
+
+and (typeC: (A.typeC, Ast_c.typeC) matcher) = 
+  fun ta tb -> 
+  match A.unwrap ta, tb with
+    | A.BaseType (basea,stringsa), (B.BaseType baseb, ii) -> 
+       simulate_signed ta basea stringsa None tb baseb ii
+         (function (stringsa, signaopt) -> A.BaseType (basea,stringsa))
+    | A.SignedT (signaopt, Some basea), (B.BaseType baseb, ii) -> 
+       (match A.unwrap basea with
+         A.BaseType (basea1,strings1) ->
+           simulate_signed ta basea1 strings1 (Some signaopt) tb baseb ii
+             (function (strings1, Some signaopt) ->
+               A.SignedT
+                 (signaopt,
+                  Some (A.rewrap basea (A.BaseType (basea1,strings1))))
+               | _ -> failwith "not possible")
+       | A.MetaType(ida,keep,inherited) ->
+           simulate_signed_meta ta basea (Some signaopt) tb baseb ii
+             (function (basea, Some signaopt) ->
+               A.SignedT(signaopt,Some basea)
+               | _ -> failwith "not possible")
+       | _ -> failwith "not possible")
+    | A.SignedT (signa,None),   (B.BaseType baseb, ii) -> 
         let signbopt, iibaseb = split_signb_baseb_ii (baseb, ii) in
         (match iibaseb, baseb with
         | [], B.IntType (B.Si (_sign, B.CInt)) -> 
@@ -2440,7 +2527,7 @@ and (typeC: (A.typeC, Ast_c.typeC) matcher) =
               | None -> raise Impossible
               | Some signa -> 
                   return (
-                    (A.ImplicitInt (signa)) +> A.rewrap ta,
+                    (A.SignedT (signa,None)) +> A.rewrap ta,
                     (B.BaseType baseb, iisignbopt)
                   )
             )
@@ -2647,13 +2734,21 @@ and (typeC: (A.typeC, Ast_c.typeC) matcher) =
     | _, (B.TypeOfType e, ii) -> fail
 
     | _, (B.ParenType e, ii) -> fail (* todo ?*)
-    | _, (B.EnumName _, _) -> fail (* todo cocci ?*)
+    | A.EnumName(en,namea), (B.EnumName nameb, ii) ->
+        let (ib1,ib2) = tuple_of_list2 ii in
+       ident DontKnow namea (nameb, ib2) >>= (fun namea (nameb, ib2) -> 
+          tokenf en ib1 >>= (fun en ib1 -> 
+          return (
+          (A.EnumName (en, namea)) +> A.rewrap ta,
+          (B.EnumName nameb, [ib1;ib2])
+          )))
+
     | _, (B.Enum _, _) -> fail (* todo cocci ?*)
 
     | _,
-     ((B.TypeName (_, _)|B.StructUnionName (_, _)|
-      B.StructUnion (_, _, _)|
-      B.FunctionType _|B.Array (_, _)|B.Pointer _|
+     ((B.TypeName (_, _) | B.StructUnionName (_, _) | B.EnumName _ |
+      B.StructUnion (_, _, _) |
+      B.FunctionType _ | B.Array (_, _) | B.Pointer _ |
       B.BaseType _),
      _)
      -> fail
@@ -2746,44 +2841,76 @@ and fullType_optional_allminus allminus tya retb =
 
 
 (*---------------------------------------------------------------------------*)
-and compatible_type a (b,_local) = 
+
+and compatible_base_type a signa b =
   let ok  = return ((),()) in
 
-  let rec loop = function
-    | Type_cocci.BaseType (a, signa), (qua, (B.BaseType b,ii)) -> 
-       (match a, b with
-       | Type_cocci.VoidType, B.Void -> 
-            assert (signa = None);
-            ok
-       | Type_cocci.CharType, B.IntType B.CChar when signa = None -> 
-            ok
-       | Type_cocci.CharType, B.IntType (B.Si (signb, B.CChar2)) -> 
-            compatible_sign signa signb 
-       | Type_cocci.ShortType, B.IntType (B.Si (signb, B.CShort)) -> 
-            compatible_sign signa signb
-       | Type_cocci.IntType, B.IntType (B.Si (signb, B.CInt)) -> 
-            compatible_sign signa signb
-       | Type_cocci.LongType, B.IntType (B.Si (signb, B.CLong)) -> 
-            compatible_sign signa signb
-       | _, B.IntType (B.Si (signb, B.CLongLong)) -> 
-            pr2_once "no longlong in cocci";
-            fail
-       | Type_cocci.FloatType, B.FloatType B.CFloat ->
-           assert (signa = None); 
-            ok
-       | Type_cocci.DoubleType, B.FloatType B.CDouble ->
-           assert (signa = None); 
-            ok
-       | _, B.FloatType B.CLongDouble -> 
-            pr2_once "no longdouble in cocci";
-            fail
-       | Type_cocci.BoolType, _ -> failwith "no booltype in C"
+  match a, b with
+  | Type_cocci.VoidType, B.Void -> 
+      assert (signa = None);
+      ok
+  | Type_cocci.CharType, B.IntType B.CChar when signa = None -> 
+      ok
+  | Type_cocci.CharType, B.IntType (B.Si (signb, B.CChar2)) -> 
+      compatible_sign signa signb 
+  | Type_cocci.ShortType, B.IntType (B.Si (signb, B.CShort)) -> 
+      compatible_sign signa signb
+  | Type_cocci.IntType, B.IntType (B.Si (signb, B.CInt)) -> 
+      compatible_sign signa signb
+  | Type_cocci.LongType, B.IntType (B.Si (signb, B.CLong)) -> 
+      compatible_sign signa signb
+  | _, B.IntType (B.Si (signb, B.CLongLong)) -> 
+      pr2_once "no longlong in cocci";
+      fail
+  | Type_cocci.FloatType, B.FloatType B.CFloat ->
+      assert (signa = None); 
+      ok
+  | Type_cocci.DoubleType, B.FloatType B.CDouble ->
+      assert (signa = None); 
+      ok
+  | _, B.FloatType B.CLongDouble -> 
+      pr2_once "no longdouble in cocci";
+      fail
+  | Type_cocci.BoolType, _ -> failwith "no booltype in C"
+       
+  | _, (B.Void|B.FloatType _|B.IntType _) -> fail
+
+and compatible_base_type_meta a signa qua b ii local =
+  match a, b with
+  | Type_cocci.MetaType(ida,keep,inherited),
+    B.IntType (B.Si (signb, B.CChar2)) -> 
+      compatible_sign signa signb >>= fun _ _ ->
+       let newb = ((qua, (B.BaseType (B.IntType B.CChar),ii)),local) in
+       compatible_type a newb
+  | Type_cocci.MetaType(ida,keep,inherited), B.IntType (B.Si (signb, ty)) -> 
+      compatible_sign signa signb >>= fun _ _ ->
+       let newb =
+         ((qua, (B.BaseType (B.IntType (B.Si (B.Signed, ty))),ii)),local) in
+       compatible_type a newb
+  | _, B.FloatType B.CLongDouble -> 
+      pr2_once "no longdouble in cocci";
+      fail
+       
+  | _, (B.Void|B.FloatType _|B.IntType _) -> fail
 
 
-        | _, (B.Void|B.FloatType _|B.IntType _) -> fail
-      )
+and compatible_type a (b,local) = 
+  let ok  = return ((),()) in
+
+  let rec loop = function
+    | Type_cocci.BaseType a, (qua, (B.BaseType b,ii)) -> 
+       compatible_base_type a None b
 
+    | Type_cocci.SignedT (signa,None), (qua, (B.BaseType b,ii)) -> 
+       compatible_base_type Type_cocci.IntType (Some signa) b
 
+    | Type_cocci.SignedT (signa,Some ty), (qua, (B.BaseType b,ii)) -> 
+       (match ty with
+         Type_cocci.BaseType ty ->
+           compatible_base_type ty (Some signa) b
+       | Type_cocci.MetaType(ida,keep,inherited) ->
+           compatible_base_type_meta ty (Some signa) qua b ii local
+       | _ -> failwith "not possible")
 
     | Type_cocci.Pointer  a, (qub, (B.Pointer b, ii)) -> 
        loop (a,b)
@@ -2798,7 +2925,11 @@ and compatible_type a (b,_local) =
          if equal_structUnion_type_cocci sua sub && sa = sb
          then ok
          else fail
-
+    | Type_cocci.EnumName (_, sa),
+       (qub, (B.EnumName (sb),ii)) -> 
+         if sa = sb
+         then ok
+         else fail
     | Type_cocci.TypeName sa, (qub, (B.TypeName (sb,_typb), ii)) -> 
        if sa = sb 
        then ok
index 1c04b18..65403a6 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 20b188e..092c766 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
similarity index 66%
rename from ctl/.#flag_ctl.ml.1.12
rename to engine/flag_engine.ml
index 97a487d..5783e6b 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
 *)
 
 
-(* option -verbose_ctl_engine *)
-let verbose_ctl_engine = ref false
+let debug_engine = ref false
 
-(* cheap partial matches using assttomember *)
-let verbose_match = ref false
+(* false = simpler formulas, only for debugging *)
+let useEU = ref true
 
-let partial_match = ref false
+let disallow_nested_exps = ref false
 
-let poswits_only = ref false
-
-let loop_in_src_code = ref false
-
-let bench = ref 0
-
-let steps = ref (None : int option)
+(* if this flag is not set, then break and continue are also error exits *)
+let only_return_is_error_exit = ref false
 
+(* a hack to allow adding code in some more sgrep-like uses *)
+let allow_inconsistent_paths = ref false
similarity index 65%
rename from ctl/.#flag_ctl.ml.1.13
rename to engine/flag_matcher.ml
index 6bbb66a..887be68 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
 *)
 
 
-(* option -verbose_ctl_engine *)
-let verbose_ctl_engine = ref false
+let debug_engine = ref false
 
-(* cheap partial matches using assttomember *)
-let verbose_match = ref false
+(* false = simpler formulas, only for debugging *)
+let useEU = ref true
 
-let partial_match = ref false
+let disallow_nested_exps = ref false
 
-let poswits_only = ref false
+(* if this flag is not set, then break and continue are also error exits *)
+let only_return_is_error_exit = ref false
 
-let loop_in_src_code = ref false
+(* a hack to allow adding code in some more sgrep-like uses *)
+let allow_inconsistent_paths = ref false
 
-let bench = ref 0
-
-let steps = ref (None : int option)
-
-let graphical_trace = ref false
+let show_misc = ref true
index d4a4074..151544b 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 8b9bf26..859844e 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 1210e5c..87b0a72 100644 (file)
@@ -1,3 +1,25 @@
+(*
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
+* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
+* This file is part of Coccinelle.
+* 
+* Coccinelle is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, according to version 2 of the License.
+* 
+* Coccinelle is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
+* 
+* The authors reserve the right to distribute this or future versions of
+* Coccinelle under other licenses.
+*)
+
+
 open Common
 
 (*****************************************************************************)
index 01311b0..833a032 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 68cde1e..142893f 100644 (file)
@@ -1,16 +1,25 @@
-(* Copyright (C) 2006, 2007 Yoann Padioleau
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License (GPL)
- * version 2 as published by the Free Software Foundation.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * file license.txt for more details.
- * 
- * This file was part of Coccinelle.
- *)
+(*
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
+* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
+* This file is part of Coccinelle.
+* 
+* Coccinelle is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, according to version 2 of the License.
+* 
+* Coccinelle is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
+* 
+* The authors reserve the right to distribute this or future versions of
+* Coccinelle under other licenses.
+*)
+
+
 open Common
 
 module Flag_engine = Flag_matcher
index f442ef3..564a278 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 0b913a4..03fafd2 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 1c00137..ed6dd49 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index ec3a2b0..8dc3f98 100644 (file)
@@ -1,21 +1,29 @@
-(* Copyright (C) 2006, 2007 Yoann Padioleau
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License (GPL)
- * version 2 as published by the Free Software Foundation.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * file license.txt for more details.
- * 
- * This file was part of Coccinelle.
- *)
+(*
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
+* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
+* This file is part of Coccinelle.
+* 
+* Coccinelle is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, according to version 2 of the License.
+* 
+* Coccinelle is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
+* 
+* The authors reserve the right to distribute this or future versions of
+* Coccinelle under other licenses.
+*)
+
+
 open Common
 
 module F = Control_flow_c
 
-module Flag = Flag_matcher
 (*****************************************************************************)
 (* The functor argument  *) 
 (*****************************************************************************)
@@ -203,7 +211,7 @@ module XTRANS = struct
     | _ -> 
         if (oldmcode, oldenv) = (mck, tin.binding)
         then begin
-          if !Flag.show_misc 
+          if !Flag_matcher.show_misc 
           then pr2 "already tagged but with same mcode, so safe";
           ib
         end
@@ -503,7 +511,7 @@ let (transform2: string (* rule name *) -> string list (* dropped_isos *) ->
       (* subtil: not cflow#nodes but acc#nodes *)
       let node  = acc#nodes#assoc nodei in 
 
-      if !Flag.show_misc 
+      if !Flag.show_transinfo
       then pr2 "transform one node";
       
       let tin = {
diff --git a/extra/.cvsignore b/extra/.cvsignore
deleted file mode 100644 (file)
index 0a2d2b3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.depend
-*.cma
dissimilarity index 100%
index 8c6112e..c3ba0c6 100644 (file)
@@ -1,9 +1,6 @@
-classic_patch.cmi: ../commons/common.cmi 
-kbuild.cmi: ../commons/common.cmi 
-maintainers.cmi: ../commons/common.cmi 
-classic_patch.cmo: ../commons/common.cmi classic_patch.cmi 
-classic_patch.cmx: ../commons/common.cmx classic_patch.cmi 
-kbuild.cmo: ../commons/common.cmi kbuild.cmi 
-kbuild.cmx: ../commons/common.cmx kbuild.cmi 
-maintainers.cmo: ../commons/common.cmi maintainers.cmi 
-maintainers.cmx: ../commons/common.cmx maintainers.cmi 
+classic_patch.cmo: classic_patch.cmi 
+classic_patch.cmx: classic_patch.cmi 
+kbuild.cmo: kbuild.cmi 
+kbuild.cmx: kbuild.cmi 
+maintainers.cmo: maintainers.cmi 
+maintainers.cmx: maintainers.cmi 
index c70c5a3..2dd7e18 100644 (file)
@@ -12,7 +12,7 @@ INCLUDES= -I ../commons -I ../globals -I  ../parsing_cocci -I  ../parsing_c
 OCAMLCFLAGS ?= -g -dtypes
 OCAMLC =ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
 OCAMLOPT = ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
-OCAMLDEP = ocamldep$(OPTBIN) $(INCLUDES)
+OCAMLDEP = ocamldep$(OPTBIN) #$(INCLUDES)
 OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
 
 
index fae3229..3d7e415 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -31,16 +31,15 @@ let show_diff = ref true
 let show_flow = ref false
 let show_before_fixed_flow = ref false
 
-let show_ctl_tex = ref false
-let show_ctl_text = ref true
+let show_ctl_tex =  ref false
+let show_ctl_text = ref false
 
 let inline_let_ctl = ref false
 let show_mcodekind_in_ctl = ref false
 
 (* the "underived" outputs *)
-let show_transinfo = ref true
 let show_binding_in_out = ref false
-let show_dependencies = ref false
+let show_dependencies =   ref false
 
 let windows = ref false
 
@@ -48,14 +47,15 @@ let popl = ref false
 
 let ifdef_to_if = ref false
 
-let all_includes = ref false
+type include_options =
+    I_UNSPECIFIED | I_NO_INCLUDES | I_NORMAL_INCLUDES | I_ALL_INCLUDES
+let include_options = ref I_UNSPECIFIED
+
 let include_path = ref "include"
 (* if true then when have a #include "../../xx.h", we look also for xx.h in
  * current directory. This is because of how works extract_c_and_res
  *)
 
-let no_includes = ref false (* no includes at all, not even the local ones *)
-
 let relax_include_path = ref false 
 
 let timeout = ref (None : int option)
diff --git a/globals/.#config.ml.1.2 b/globals/.#config.ml.1.2
deleted file mode 100644 (file)
index c5516d9..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-let version = "0.1.1"
-
-let path = 
-  try (Sys.getenv "COCCINELLE_HOME") 
-  with Not_found->"/usr/local/share/coccinelle"
-
-let std_iso = ref (Filename.concat path "standard.iso")
-let std_h   = ref (Filename.concat path "standard.h")
diff --git a/globals/.cvsignore b/globals/.cvsignore
deleted file mode 100644 (file)
index 0a2d2b3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.depend
-*.cma
index ef2cffa..a235bbb 100644 (file)
@@ -5,8 +5,8 @@ TARGET=globals
 
 SRC= flag.ml config.ml
 
-LIBS=../commons/commons.cma
-INCLUDES= -I ../commons
+LIBS=
+INCLUDES=
 
 ##############################################################################
 # Generic variables
@@ -14,7 +14,7 @@ INCLUDES= -I ../commons
 OCAMLCFLAGS ?= -g -dtypes
 OCAMLC =ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
 OCAMLOPT = ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
-OCAMLDEP = ocamldep$(OPTBIN) $(INCLUDES)
+OCAMLDEP = ocamldep$(OPTBIN) #$(INCLUDES)
 OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
 
 OBJS= $(SRC:.ml=.cmo)
@@ -28,7 +28,6 @@ all: $(TARGET).cma
 
 all.opt: $(TARGET).cmxa
 
-
 $(TARGET).cma: $(OBJS) $(LIBS)
        $(OCAMLC) -a -o $(TARGET).cma $(OBJS)
 
index 92821be..755de16 100644 (file)
@@ -1,4 +1,4 @@
-let version = "0.1.3"
+let version = "0.1.4"
 
 let path = 
   try (Sys.getenv "COCCINELLE_HOME") 
index 0e9c29e..c177bca 100644 (file)
@@ -2,6 +2,8 @@ let sgrep_mode2 = ref false
 
 let show_misc = ref true
 
+let show_transinfo = ref false
+
 let show_trying = ref false
 
 let track_iso_usage = ref false
diff --git a/main.ml b/main.ml
index 1b00f0d..393cc31 100644 (file)
--- a/main.ml
+++ b/main.ml
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -21,6 +21,7 @@
 
 
 open Common
+module FC = Flag_cocci
 
 (*****************************************************************************)
 (* Flags *)
@@ -71,19 +72,19 @@ let quiet_profile = (
   [
   ],
   [
-    (* Flag_cocci.show_diff;   just leave this as it is *)
+    (* FC.show_diff;   just leave this as it is *)
 
     Flag.show_misc;
     Flag.show_trying;
+    Flag.show_transinfo;
 
-    Flag_cocci.show_c;
-    Flag_cocci.show_cocci;
-    Flag_cocci.show_flow;
-    Flag_cocci.show_before_fixed_flow;
-    Flag_cocci.show_ctl_tex;
-    Flag_cocci.show_ctl_text;
-    Flag_cocci.show_transinfo;
-    Flag_cocci.show_binding_in_out;
+    FC.show_c;
+    FC.show_cocci;
+    FC.show_flow;
+    FC.show_before_fixed_flow;
+    FC.show_ctl_tex;
+    FC.show_ctl_text;
+    FC.show_binding_in_out;
 
     Flag_parsing_cocci.show_SP;
     Flag_parsing_cocci.show_iso_failures;
@@ -95,22 +96,53 @@ let quiet_profile = (
     Flag_parsing_c.verbose_parsing;
   ])
 
+(* some information that is useful in seeing why a semantic patch doesn't
+work properly *)
+let debug_profile = (
+  [
+    Flag.show_misc;
+    FC.show_diff;
+    FC.show_cocci;
+    FC.show_binding_in_out;
+    FC.show_dependencies;
+    Flag.show_transinfo;
+    Flag_parsing_cocci.show_iso_failures;
+  ],
+  [
+
+    Flag.show_misc;
+
+    FC.show_c;
+    FC.show_flow;
+    FC.show_before_fixed_flow;
+    FC.show_ctl_tex;
+    FC.show_ctl_text;
+
+    Flag_parsing_cocci.show_SP;
+    Flag_ctl.verbose_ctl_engine;
+    Flag_ctl.verbose_match;
+    Flag_matcher.debug_engine;
+    Flag_parsing_c.debug_unparsing;
+    Flag_parsing_c.verbose_type;
+    Flag_parsing_c.verbose_parsing;
+  ])
+
 let pad_profile = (
   [
-    Flag_cocci.show_diff;
+    FC.show_diff;
   ],
   [
 
     Flag.show_misc;
+    Flag.show_transinfo;
 
-    Flag_cocci.show_c;
-    Flag_cocci.show_cocci;
-    Flag_cocci.show_flow;
-    Flag_cocci.show_before_fixed_flow;
-    Flag_cocci.show_ctl_tex;
-    Flag_cocci.show_ctl_text;
-    Flag_cocci.show_transinfo;
-    Flag_cocci.show_binding_in_out;
+    FC.show_c;
+    FC.show_cocci;
+    FC.show_flow;
+    FC.show_before_fixed_flow;
+    FC.show_ctl_tex;
+    FC.show_ctl_text;
+    FC.show_binding_in_out;
 
     Flag_parsing_cocci.show_SP;
     Flag_parsing_cocci.show_iso_failures;
@@ -122,6 +154,11 @@ let pad_profile = (
     Flag_parsing_c.verbose_parsing;
   ])
 
+let run_profile p =
+  let (set_to_true, set_to_false) = p in
+  List.iter (fun x -> x := false) set_to_false;
+  List.iter (fun x -> x := true) set_to_true
+
 (*****************************************************************************)
 (* The spatch options *)
 (*****************************************************************************)
@@ -166,19 +203,24 @@ let short_options = [
   "-macro_file", Arg.Set_string Config.std_h,
   " <file> (default=" ^ !Config.std_h ^ ")";
 
-  "-all_includes",   Arg.Set Flag_cocci.all_includes,
+  "-all_includes",
+  Arg.Unit (function _ -> FC.include_options := FC.I_ALL_INCLUDES),
   "  causes all available include files to be used";
-  "-no_includes",   Arg.Set Flag_cocci.no_includes,
+  "-no_includes",
+  Arg.Unit (function _ -> FC.include_options := FC.I_NO_INCLUDES),
   "  causes not even local include files to be used";
-  "-I",   Arg.Set_string Flag_cocci.include_path,
+  "-local_includes",
+  Arg.Unit (function _ -> FC.include_options := FC.I_NORMAL_INCLUDES),
+  "  causes local include files to be used";
+  "-include_headers", Arg.Set include_headers,
+  "    process header files independently";
+  "-I",   Arg.Set_string FC.include_path,
   "  <dir> containing the Linux headers (optional)";
 
 
   "-dir", Arg.Set dir,
   "    <dir> process all files in directory recursively";
 
-  "-include_headers", Arg.Set include_headers,
-  "    process header files independently";
   "-use_glimpse", Arg.Set Flag.use_glimpse,
   "    works with -dir, use info generated by glimpseindex";
   "-patch", Arg.String (function s -> Flag.patch := Some s),
@@ -197,7 +239,7 @@ let short_options = [
     "  guess what";
 
   "-date",   Arg.Unit (fun () -> 
-    pr2 "version: $Date: 2008/11/18 20:37:55 $";
+    pr2 "version: $Date: 2009/01/02 10:28:28 $";
     raise (Common.UnixExit 0)
     ), 
   "   guess what";
@@ -242,46 +284,56 @@ let other_options = [
   "most useful show options", 
   "",
   [
-    "-show_diff"           , Arg.Set Flag_cocci.show_diff, " ";
-    "-no_show_diff"           , Arg.Clear Flag_cocci.show_diff, " ";
-    "-show_flow"              , Arg.Set Flag_cocci.show_flow,        " ";
-    "-no_show_ctl_text"       , Arg.Clear Flag_cocci.show_ctl_text,  " ";
-    (* works in conjunction with -show_ctl *)
-    "-ctl_inline_let",       Arg.Set Flag_cocci.inline_let_ctl, " ";
-    "-ctl_show_mcodekind",   Arg.Set Flag_cocci.show_mcodekind_in_ctl, " ";
-    "-show_binding_in_out",  Arg.Set Flag_cocci.show_binding_in_out, " ";
-    "-no_show_transinfo",    Arg.Clear Flag_cocci.show_transinfo, " ";
-    "-no_show_misc",         Arg.Clear Flag.show_misc, " ";
+    "-show_diff"           , Arg.Set FC.show_diff, " ";
+    "-no_show_diff"           , Arg.Clear FC.show_diff, " ";
+    "-show_flow"              , Arg.Set FC.show_flow,        " ";
+    (* works in conjunction with -show_ctl_text *)
+    "-ctl_inline_let",   
+    Arg.Unit
+    (function _ -> FC.show_ctl_text := true; FC.inline_let_ctl := true), " ";
+    "-ctl_show_mcodekind",
+    Arg.Unit
+    (function _ -> FC.show_ctl_text := true; FC.show_mcodekind_in_ctl := true),
+    " ";
+    "-show_bindings",        Arg.Set FC.show_binding_in_out, " ";
+    "-show_transinfo",    Arg.Set Flag.show_transinfo, " ";
+    "-show_misc",         Arg.Set Flag.show_misc, " ";
     "-show_trying",          Arg.Set Flag.show_trying,
     " show the name of each function being processed";
     "-show_dependencies",
-    Arg.Unit (function _ -> Flag_cocci.show_dependencies := true;
-      Flag_cocci.show_binding_in_out := true),
+    Arg.Unit (function _ -> FC.show_dependencies := true;
+      FC.show_binding_in_out := true),
     " show the dependencies related to each rule";
   ];
 
   "verbose subsystems options",  
   "",
   [
-    "-verbose_ctl_engine",   Arg.Set Flag_ctl.verbose_ctl_engine, " ";
+    "-verbose_ctl_engine",
+    Arg.Unit (function _ ->
+      Flag_ctl.verbose_ctl_engine := true; FC.show_ctl_text := true) , " ";
     "-verbose_match",        Arg.Set Flag_ctl.verbose_match, " ";
     "-verbose_engine",       Arg.Set Flag_matcher.debug_engine,    " ";
     "-graphical_trace",      Arg.Set Flag_ctl.graphical_trace, "  generate a pdf file representing the matching process";
-    "-gt_without_label",     Arg.Set Flag_ctl.gt_without_label, "  remove graph label (requires option -graphical_trace)";
+    "-gt_without_label",
+     Arg.Unit (function _ ->
+       Flag_ctl.graphical_trace := true; Flag_ctl.gt_without_label := true),
+       "  remove graph label (requires option -graphical_trace)";
 
-    "-no_parse_error_msg", Arg.Clear Flag_parsing_c.verbose_parsing, " ";
-    "-no_type_error_msg",  Arg.Clear Flag_parsing_c.verbose_type, " ";
+    "-parse_error_msg", Arg.Set Flag_parsing_c.verbose_parsing, " ";
+    "-type_error_msg",  Arg.Set Flag_parsing_c.verbose_type, " ";
     (* could also use Flag_parsing_c.options_verbose *)
   ];
 
   "other show options",
   "",
   [
-    "-show_c"                 , Arg.Set Flag_cocci.show_c,           " ";
-    "-show_cocci"             , Arg.Set Flag_cocci.show_cocci,       " ";
-    "-show_before_fixed_flow" , Arg.Set Flag_cocci.show_before_fixed_flow,  " ";
-    "-show_ctl_tex"           , Arg.Set Flag_cocci.show_ctl_tex,     " ";
-    "-show_SP_julia"       ,    Arg.Set Flag_parsing_cocci.show_SP,  " ";
+    "-show_c"                 , Arg.Set FC.show_c,           " ";
+    "-show_cocci"             , Arg.Set FC.show_cocci,       " ";
+    "-show_before_fixed_flow" , Arg.Set FC.show_before_fixed_flow,  " ";
+    "-show_ctl_tex"           , Arg.Set FC.show_ctl_tex,     " ";
+    "-show_ctl_text"          , Arg.Set FC.show_ctl_text,     " ";
+    "-show_SP"             ,    Arg.Set Flag_parsing_cocci.show_SP,  " ";
   ];
 
 
@@ -297,8 +349,8 @@ let other_options = [
     "  filter some cpp message when the macro is a \"known\" cpp construct";
     "-filter_define_error",Arg.Set Flag_parsing_c.filter_define_error,"  ";
     "-filter_passed_level", Arg.Set_int Flag_parsing_c.filter_passed_level,"  ";
-
-    "-debug_cfg",          Arg.Set Flag_parsing_c.debug_cfg , "  ";
+(*  debug cfg doesn't seem to have any effect, so drop it as an option *)
+(*  "-debug_cfg",          Arg.Set Flag_parsing_c.debug_cfg , "  "; *)
     "-debug_unparsing",      Arg.Set  Flag_parsing_c.debug_unparsing, "  ";
 
   ];
@@ -309,17 +361,9 @@ let other_options = [
   "",
   [
     (* todo: other profile ? *)
-    "-quiet",   Arg.Unit (fun () -> 
-      let (set_to_true, set_to_false) = quiet_profile in
-      List.iter (fun x -> x := false) set_to_false;
-      List.iter (fun x -> x := true) set_to_true;
-    ), " ";
-
-    "-pad",   Arg.Unit (fun () -> 
-      let (set_to_true, set_to_false) = pad_profile in
-      List.iter (fun x -> x := false) set_to_false;
-      List.iter (fun x -> x := true) set_to_true;
-    ), " ";
+    "-quiet",   Arg.Unit (fun () -> run_profile quiet_profile), " ";
+    "-debug",   Arg.Unit (fun () -> run_profile debug_profile), " ";
+    "-pad",     Arg.Unit (fun () -> run_profile pad_profile),   " ";
 
   ];
 
@@ -330,7 +374,7 @@ let other_options = [
     "   gather timing information about the main coccinelle functions";
     "-bench", Arg.Int (function x -> Flag_ctl.bench := x), 
     "   <level> for profiling the CTL engine";
-    "-timeout", Arg.Int (fun x -> Flag_cocci.timeout := Some x), 
+    "-timeout", Arg.Int (fun x -> FC.timeout := Some x), 
     "   <sec> timeout in seconds";
     "-steps", Arg.Int (fun x -> Flag_ctl.steps := Some x), 
     "   max number of model checking steps per code unit";
@@ -348,26 +392,28 @@ let other_options = [
   "change of algorithm options",
   "", 
   [  
-    "-popl", Arg.Set Flag_cocci.popl, 
+    "-popl", Arg.Set FC.popl, 
     "    simplified SmPL, for the popl paper";
 
     "-popl_mark_all",
     Arg.Unit
-    (function _ -> Flag_cocci.popl := true; Flag_popl.mark_all := true), 
+    (function _ -> FC.popl := true; Flag_popl.mark_all := true), 
     "    simplified SmPL, for the popl paper";
 
     "-popl_keep_all_wits",
     Arg.Unit
-    (function _ -> Flag_cocci.popl := true; Flag_popl.keep_all_wits := true), 
+    (function _ -> FC.popl := true; Flag_popl.keep_all_wits := true), 
     "    simplified SmPL, for the popl paper";
 
-    "-hrule", Arg.String (function s -> Flag.make_hrule := Some s),
+    "-hrule", Arg.String
+    (function s ->
+      Flag.make_hrule := Some s; FC.include_options := FC.I_NO_INCLUDES),
     "    semantic patch generation";
 
     "-loop",              Arg.Set Flag_ctl.loop_in_src_code,    " ";
 
     "-l1",                Arg.Clear Flag_parsing_c.label_strategy_2, " ";
-    "-ifdef_to_if",              Arg.Set Flag_cocci.ifdef_to_if, 
+    "-ifdef_to_if",              Arg.Set FC.ifdef_to_if, 
     "   convert ifdef to if (experimental)";
 
     "-noif0_passing",   Arg.Clear Flag_parsing_c.if0_passing, 
@@ -378,7 +424,7 @@ let other_options = [
 
     "-disallow_nested_exps", Arg.Set Flag_matcher.disallow_nested_exps,
        "disallow an expresion pattern from matching a term and its subterm";
-    "-disable_worth_trying_opt", Arg.Clear Flag_cocci.worth_trying_opt,
+    "-disable_worth_trying_opt", Arg.Clear FC.worth_trying_opt,
     "  ";
     "-only_return_is_error_exit",
     Arg.Set Flag_matcher.only_return_is_error_exit,
@@ -436,7 +482,7 @@ let other_options = [
 
     "-compare_with_expected", Arg.Set compare_with_expected, 
     "   use also file.res"; 
-    "-relax_include_path", Arg.Set Flag_cocci.relax_include_path,
+    "-relax_include_path", Arg.Set FC.relax_include_path,
     " ";
     
   ];
@@ -518,11 +564,11 @@ let adjust_stdin cfile k =
     Common.redirect_stdin_opt newin k
 
 let glimpse_filter (coccifile, isofile) dir = 
-  let (astcocci,_free_var_lists,_negated_positions,
+  let (_metavars,astcocci,_free_var_lists,_negated_positions,
        _used_after_lists,_positions_lists,_,query) =
     Cocci.sp_of_file coccifile (Some isofile) in
   match query with
-    None -> pr2 "no glimpse keyword infered from snippet"; None
+    None -> pr2 "no glimpse keyword inferred from snippet"; None
   | Some query ->
       let suffixes = if !include_headers then ["c";"h"] else ["c"] in
       pr2 ("glimpse request = " ^ query);
@@ -557,9 +603,6 @@ let main () =
       end);
     args := List.rev !args;
 
-    (if !Flag_cocci.all_includes && !Flag_cocci.no_includes
-    then failwith "cannot set both all_includes and no_includes");
-
     if !cocci_file <> "" && (not (!cocci_file =~ ".*\\.\\(sgrep\\|spatch\\)$"))
     then cocci_file := Common.adjust_ext_if_needed !cocci_file ".cocci";
 
@@ -584,19 +627,19 @@ let main () =
     (* The test framework. Works with tests/ or .ok and .failed  *)
     (* --------------------------------------------------------- *)
     | [x] when !test_mode    -> 
-        Flag_cocci.include_path := "tests/include";
+        FC.include_path := "tests/include";
         Testing.testone x !compare_with_expected
 
     | []  when !test_all -> 
-        Flag_cocci.include_path := "tests/include";
+        FC.include_path := "tests/include";
         Testing.testall ()
 
     | [] when !test_regression_okfailed -> 
         Testing.test_regression_okfailed ()
 
     | x::xs when !test_okfailed -> 
-        (* do its own timeout on Flag_cocci.timeout internally *)
-        Flag_cocci.relax_include_path := true;
+        (* do its own timeout on FC.timeout internally *)
+        FC.relax_include_path := true;
        adjust_stdin x (fun () -> 
           Testing.test_okfailed !cocci_file (x::xs)
         )
@@ -716,7 +759,7 @@ let main () =
             Common.profile_code "Main.outfiles computation" (fun () -> 
              infiles +> List.map (fun cfiles -> 
                pr2 ("HANDLING: " ^ (join " " cfiles));
-               Common.timeout_function_opt !Flag_cocci.timeout (fun () -> 
+               Common.timeout_function_opt !FC.timeout (fun () -> 
                Common.report_if_take_time 10 (join " " cfiles) (fun () -> 
                     (* Unix.sleep 1; *)
                   try 
@@ -790,6 +833,7 @@ let main () =
 (*****************************************************************************)
 let _ =
   Common.main_boilerplate (fun () -> 
+    run_profile quiet_profile;
     main ();
     Ctlcocci_integration.print_bench();
   )
diff --git a/menhirlib/.cvsignore b/menhirlib/.cvsignore
deleted file mode 100644 (file)
index 0a2d2b3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.depend
-*.cma
index 71a01e8..347c951 100644 (file)
@@ -23,7 +23,7 @@ OCAMLOPT= ocamlopt$(OPTBIN) $(OPTFLAGS) $(EXTRAOPT)   $(INCLUDES)
 OCAMLOPT2=ocamlopt$(OPTBIN) $(OPTFLAGS)              $(INCLUDES) 
 OCAMLLEX=ocamllex$(OPTBIN)
 OCAMLYACC=ocamlyacc -v
-OCAMLDEP=ocamldep$(OPTBIN)  $(INCLUDES)
+OCAMLDEP=ocamldep$(OPTBIN) #$(INCLUDES)
 OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
 
 OBJS= $(SRC:.ml=.cmo)
diff --git a/parsing_c/.cvsignore b/parsing_c/.cvsignore
deleted file mode 100644 (file)
index 3f95352..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.depend
-*.cma
-lexer_c.ml
-parser_c.ml
-parser_c.mli
-parser_c.output
dissimilarity index 80%
index c705566..b88c717 100644 (file)
-ast_to_flow.cmi: control_flow_c.cmi ../commons/common.cmi ast_c.cmo 
-compare_c.cmi: ../commons/common.cmi 
-control_flow_c.cmi: ../commons/ograph_extended.cmi ast_c.cmo 
-cpp_ast_c.cmi: parsing_stat.cmo parse_c.cmi ../commons/common.cmi ast_c.cmo 
-lexer_parser.cmi: ../commons/common.cmi 
-parse_c.cmi: parsing_stat.cmo parsing_hacks.cmi parser_c.cmi \
-    ../commons/common.cmi ast_c.cmo 
-parser_c.cmi: ast_c.cmo 
-parsing_hacks.cmi: parser_c.cmi ../commons/common.cmi 
-pretty_print_c.cmi: ../commons/ograph_extended.cmi control_flow_c.cmi \
-    ast_c.cmo 
-test_parsing_c.cmi: ../commons/common.cmi 
-token_helpers.cmi: parser_c.cmi ../commons/common.cmi ast_c.cmo 
-type_annoter_c.cmi: ../commons/common.cmi ast_c.cmo 
-type_c.cmi: ast_c.cmo 
-unparse_c.cmi: parse_c.cmi ../commons/common.cmi 
-unparse_cocci.cmi: pretty_print_c.cmi ../parsing_cocci/ast_cocci.cmi \
-    ast_c.cmo 
-unparse_hrule.cmi: parse_c.cmi ../commons/common.cmi 
-visitor_c.cmi: control_flow_c.cmi ../commons/common.cmi ast_c.cmo 
-ast_c.cmo: ../commons/common.cmi ../parsing_cocci/ast_cocci.cmi 
-ast_c.cmx: ../commons/common.cmx ../parsing_cocci/ast_cocci.cmx 
-ast_to_flow.cmo: visitor_c.cmi ../commons/ograph_extended.cmi \
-    ../commons/ocollection/oassocb.cmo ../commons/oassoc.cmi \
-    flag_parsing_c.cmo control_flow_c.cmi ../commons/common.cmi ast_c.cmo \
-    ast_to_flow.cmi 
-ast_to_flow.cmx: visitor_c.cmx ../commons/ograph_extended.cmx \
-    ../commons/ocollection/oassocb.cmx ../commons/oassoc.cmx \
-    flag_parsing_c.cmx control_flow_c.cmx ../commons/common.cmx ast_c.cmx \
-    ast_to_flow.cmi 
-compare_c.cmo: visitor_c.cmi token_helpers.cmi parser_c.cmi parse_c.cmi \
-    lib_parsing_c.cmo flag_parsing_c.cmo ../commons/common.cmi ast_c.cmo \
-    compare_c.cmi 
-compare_c.cmx: visitor_c.cmx token_helpers.cmx parser_c.cmx parse_c.cmx \
-    lib_parsing_c.cmx flag_parsing_c.cmx ../commons/common.cmx ast_c.cmx \
-    compare_c.cmi 
-control_flow_c.cmo: ../commons/ograph_extended.cmi flag_parsing_c.cmo \
-    ../commons/common.cmi ast_c.cmo control_flow_c.cmi 
-control_flow_c.cmx: ../commons/ograph_extended.cmx flag_parsing_c.cmx \
-    ../commons/common.cmx ast_c.cmx control_flow_c.cmi 
-cpp_ast_c.cmo: visitor_c.cmi parse_c.cmi flag_parsing_c.cmo \
-    ../commons/common.cmi ast_c.cmo cpp_ast_c.cmi 
-cpp_ast_c.cmx: visitor_c.cmx parse_c.cmx flag_parsing_c.cmx \
-    ../commons/common.cmx ast_c.cmx cpp_ast_c.cmi 
-flag_parsing_c.cmo: ../commons/common.cmi 
-flag_parsing_c.cmx: ../commons/common.cmx 
-lexer_c.cmo: parser_c.cmi flag_parsing_c.cmo ../commons/common.cmi ast_c.cmo 
-lexer_c.cmx: parser_c.cmx flag_parsing_c.cmx ../commons/common.cmx ast_c.cmx 
-lexer_parser.cmo: flag_parsing_c.cmo ../commons/common.cmi lexer_parser.cmi 
-lexer_parser.cmx: flag_parsing_c.cmx ../commons/common.cmx lexer_parser.cmi 
-lib_parsing_c.cmo: visitor_c.cmi ../globals/flag.cmo ../commons/common.cmi \
-    ../parsing_cocci/ast_cocci.cmi ast_c.cmo 
-lib_parsing_c.cmx: visitor_c.cmx ../globals/flag.cmx ../commons/common.cmx \
-    ../parsing_cocci/ast_cocci.cmx ast_c.cmx 
-parse_c.cmo: visitor_c.cmi token_helpers.cmi semantic_c.cmo parsing_stat.cmo \
-    parsing_hacks.cmi parser_c.cmi lexer_parser.cmi lexer_c.cmo \
-    flag_parsing_c.cmo ../commons/common.cmi ast_c.cmo parse_c.cmi 
-parse_c.cmx: visitor_c.cmx token_helpers.cmx semantic_c.cmx parsing_stat.cmx \
-    parsing_hacks.cmx parser_c.cmx lexer_parser.cmx lexer_c.cmx \
-    flag_parsing_c.cmx ../commons/common.cmx ast_c.cmx parse_c.cmi 
-parser_c.cmo: semantic_c.cmo parsing_stat.cmo lexer_parser.cmi \
-    flag_parsing_c.cmo ../commons/common.cmi ast_c.cmo parser_c.cmi 
-parser_c.cmx: semantic_c.cmx parsing_stat.cmx lexer_parser.cmx \
-    flag_parsing_c.cmx ../commons/common.cmx ast_c.cmx parser_c.cmi 
-parsing_hacks.cmo: token_helpers.cmi parsing_stat.cmo parser_c.cmi \
-    lexer_parser.cmi flag_parsing_c.cmo ../commons/common.cmi ast_c.cmo \
-    parsing_hacks.cmi 
-parsing_hacks.cmx: token_helpers.cmx parsing_stat.cmx parser_c.cmx \
-    lexer_parser.cmx flag_parsing_c.cmx ../commons/common.cmx ast_c.cmx \
-    parsing_hacks.cmi 
-parsing_stat.cmo: ../commons/common.cmi 
-parsing_stat.cmx: ../commons/common.cmx 
-pretty_print_c.cmo: ../commons/ograph_extended.cmi lib_parsing_c.cmo \
-    flag_parsing_c.cmo control_flow_c.cmi ../commons/common.cmi ast_c.cmo \
-    pretty_print_c.cmi 
-pretty_print_c.cmx: ../commons/ograph_extended.cmx lib_parsing_c.cmx \
-    flag_parsing_c.cmx control_flow_c.cmx ../commons/common.cmx ast_c.cmx \
-    pretty_print_c.cmi 
-semantic_c.cmo: ../commons/common.cmi 
-semantic_c.cmx: ../commons/common.cmx 
-test_parsing_c.cmo: visitor_c.cmi unparse_c.cmi type_annoter_c.cmi \
-    parsing_stat.cmo parse_c.cmi ../commons/ograph_extended.cmi \
-    flag_parsing_c.cmo cpp_ast_c.cmi compare_c.cmi ../commons/common.cmi \
-    ast_to_flow.cmi ast_c.cmo test_parsing_c.cmi 
-test_parsing_c.cmx: visitor_c.cmx unparse_c.cmx type_annoter_c.cmx \
-    parsing_stat.cmx parse_c.cmx ../commons/ograph_extended.cmx \
-    flag_parsing_c.cmx cpp_ast_c.cmx compare_c.cmx ../commons/common.cmx \
-    ast_to_flow.cmx ast_c.cmx test_parsing_c.cmi 
-token_helpers.cmo: parser_c.cmi ../commons/common.cmi ast_c.cmo \
-    token_helpers.cmi 
-token_helpers.cmx: parser_c.cmx ../commons/common.cmx ast_c.cmx \
-    token_helpers.cmi 
-type_annoter_c.cmo: visitor_c.cmi type_c.cmi parse_c.cmi lib_parsing_c.cmo \
-    flag_parsing_c.cmo ../commons/common.cmi ast_c.cmo type_annoter_c.cmi 
-type_annoter_c.cmx: visitor_c.cmx type_c.cmx parse_c.cmx lib_parsing_c.cmx \
-    flag_parsing_c.cmx ../commons/common.cmx ast_c.cmx type_annoter_c.cmi 
-type_c.cmo: ../commons/common.cmi ast_c.cmo type_c.cmi 
-type_c.cmx: ../commons/common.cmx ast_c.cmx type_c.cmi 
-unparse_c.cmo: visitor_c.cmi unparse_cocci.cmi token_helpers.cmi \
-    pretty_print_c.cmi parser_c.cmi flag_parsing_c.cmo ../commons/common.cmi \
-    ../parsing_cocci/ast_cocci.cmi ast_c.cmo unparse_c.cmi 
-unparse_c.cmx: visitor_c.cmx unparse_cocci.cmx token_helpers.cmx \
-    pretty_print_c.cmx parser_c.cmx flag_parsing_c.cmx ../commons/common.cmx \
-    ../parsing_cocci/ast_cocci.cmx ast_c.cmx unparse_c.cmi 
-unparse_cocci.cmo: pretty_print_c.cmi ../commons/common.cmi \
-    ../parsing_cocci/ast_cocci.cmi ast_c.cmo unparse_cocci.cmi 
-unparse_cocci.cmx: pretty_print_c.cmx ../commons/common.cmx \
-    ../parsing_cocci/ast_cocci.cmx ast_c.cmx unparse_cocci.cmi 
-unparse_hrule.cmo: unparse_c.cmi token_helpers.cmi pretty_print_c.cmi \
-    parser_c.cmi ../commons/common.cmi ../parsing_cocci/ast_cocci.cmi \
-    ast_c.cmo unparse_hrule.cmi 
-unparse_hrule.cmx: unparse_c.cmx token_helpers.cmx pretty_print_c.cmx \
-    parser_c.cmx ../commons/common.cmx ../parsing_cocci/ast_cocci.cmx \
-    ast_c.cmx unparse_hrule.cmi 
-visitor_c.cmo: control_flow_c.cmi ../commons/common.cmi ast_c.cmo \
-    visitor_c.cmi 
-visitor_c.cmx: control_flow_c.cmx ../commons/common.cmx ast_c.cmx \
-    visitor_c.cmi 
+ast_to_flow.cmi: control_flow_c.cmi ast_c.cmo 
+control_flow_c.cmi: ast_c.cmo 
+cpp_ast_c.cmi: parsing_stat.cmo parse_c.cmi ast_c.cmo 
+parse_c.cmi: parsing_stat.cmo parsing_hacks.cmi parser_c.cmi ast_c.cmo 
+parser_c.cmi: ast_c.cmo 
+parsing_hacks.cmi: parser_c.cmi 
+pretty_print_c.cmi: control_flow_c.cmi ast_c.cmo 
+token_helpers.cmi: parser_c.cmi ast_c.cmo 
+type_annoter_c.cmi: ast_c.cmo 
+type_c.cmi: ast_c.cmo 
+unparse_c.cmi: parse_c.cmi 
+unparse_cocci.cmi: pretty_print_c.cmi ast_c.cmo 
+unparse_hrule.cmi: ast_c.cmo 
+visitor_c.cmi: control_flow_c.cmi ast_c.cmo 
+ast_to_flow.cmo: visitor_c.cmi flag_parsing_c.cmo control_flow_c.cmi \
+    ast_c.cmo ast_to_flow.cmi 
+ast_to_flow.cmx: visitor_c.cmx flag_parsing_c.cmx control_flow_c.cmx \
+    ast_c.cmx ast_to_flow.cmi 
+compare_c.cmo: visitor_c.cmi token_helpers.cmi parser_c.cmi parse_c.cmi \
+    lib_parsing_c.cmo flag_parsing_c.cmo ast_c.cmo compare_c.cmi 
+compare_c.cmx: visitor_c.cmx token_helpers.cmx parser_c.cmx parse_c.cmx \
+    lib_parsing_c.cmx flag_parsing_c.cmx ast_c.cmx compare_c.cmi 
+control_flow_c.cmo: flag_parsing_c.cmo ast_c.cmo control_flow_c.cmi 
+control_flow_c.cmx: flag_parsing_c.cmx ast_c.cmx control_flow_c.cmi 
+cpp_ast_c.cmo: visitor_c.cmi parse_c.cmi flag_parsing_c.cmo ast_c.cmo \
+    cpp_ast_c.cmi 
+cpp_ast_c.cmx: visitor_c.cmx parse_c.cmx flag_parsing_c.cmx ast_c.cmx \
+    cpp_ast_c.cmi 
+lexer_c.cmo: parser_c.cmi flag_parsing_c.cmo ast_c.cmo 
+lexer_c.cmx: parser_c.cmx flag_parsing_c.cmx ast_c.cmx 
+lexer_parser.cmo: flag_parsing_c.cmo lexer_parser.cmi 
+lexer_parser.cmx: flag_parsing_c.cmx lexer_parser.cmi 
+lib_parsing_c.cmo: visitor_c.cmi ast_c.cmo 
+lib_parsing_c.cmx: visitor_c.cmx ast_c.cmx 
+parse_c.cmo: visitor_c.cmi token_helpers.cmi semantic_c.cmo parsing_stat.cmo \
+    parsing_hacks.cmi parser_c.cmi lexer_parser.cmi lexer_c.cmo \
+    flag_parsing_c.cmo ast_c.cmo parse_c.cmi 
+parse_c.cmx: visitor_c.cmx token_helpers.cmx semantic_c.cmx parsing_stat.cmx \
+    parsing_hacks.cmx parser_c.cmx lexer_parser.cmx lexer_c.cmx \
+    flag_parsing_c.cmx ast_c.cmx parse_c.cmi 
+parser_c.cmo: semantic_c.cmo parsing_stat.cmo lexer_parser.cmi \
+    flag_parsing_c.cmo ast_c.cmo parser_c.cmi 
+parser_c.cmx: semantic_c.cmx parsing_stat.cmx lexer_parser.cmx \
+    flag_parsing_c.cmx ast_c.cmx parser_c.cmi 
+parsing_hacks.cmo: token_helpers.cmi parsing_stat.cmo parser_c.cmi \
+    lexer_parser.cmi flag_parsing_c.cmo ast_c.cmo parsing_hacks.cmi 
+parsing_hacks.cmx: token_helpers.cmx parsing_stat.cmx parser_c.cmx \
+    lexer_parser.cmx flag_parsing_c.cmx ast_c.cmx parsing_hacks.cmi 
+pretty_print_c.cmo: lib_parsing_c.cmo flag_parsing_c.cmo control_flow_c.cmi \
+    ast_c.cmo pretty_print_c.cmi 
+pretty_print_c.cmx: lib_parsing_c.cmx flag_parsing_c.cmx control_flow_c.cmx \
+    ast_c.cmx pretty_print_c.cmi 
+test_parsing_c.cmo: visitor_c.cmi unparse_c.cmi type_annoter_c.cmi \
+    parsing_stat.cmo parse_c.cmi flag_parsing_c.cmo cpp_ast_c.cmi \
+    compare_c.cmi ast_to_flow.cmi ast_c.cmo test_parsing_c.cmi 
+test_parsing_c.cmx: visitor_c.cmx unparse_c.cmx type_annoter_c.cmx \
+    parsing_stat.cmx parse_c.cmx flag_parsing_c.cmx cpp_ast_c.cmx \
+    compare_c.cmx ast_to_flow.cmx ast_c.cmx test_parsing_c.cmi 
+token_helpers.cmo: parser_c.cmi ast_c.cmo token_helpers.cmi 
+token_helpers.cmx: parser_c.cmx ast_c.cmx token_helpers.cmi 
+type_annoter_c.cmo: visitor_c.cmi type_c.cmi parse_c.cmi lib_parsing_c.cmo \
+    flag_parsing_c.cmo ast_c.cmo type_annoter_c.cmi 
+type_annoter_c.cmx: visitor_c.cmx type_c.cmx parse_c.cmx lib_parsing_c.cmx \
+    flag_parsing_c.cmx ast_c.cmx type_annoter_c.cmi 
+type_c.cmo: ast_c.cmo type_c.cmi 
+type_c.cmx: ast_c.cmx type_c.cmi 
+unparse_c.cmo: visitor_c.cmi unparse_cocci.cmi token_helpers.cmi \
+    pretty_print_c.cmi parser_c.cmi flag_parsing_c.cmo ast_c.cmo \
+    unparse_c.cmi 
+unparse_c.cmx: visitor_c.cmx unparse_cocci.cmx token_helpers.cmx \
+    pretty_print_c.cmx parser_c.cmx flag_parsing_c.cmx ast_c.cmx \
+    unparse_c.cmi 
+unparse_cocci.cmo: pretty_print_c.cmi ast_c.cmo unparse_cocci.cmi 
+unparse_cocci.cmx: pretty_print_c.cmx ast_c.cmx unparse_cocci.cmi 
+unparse_hrule.cmo: visitor_c.cmi unparse_cocci.cmi pretty_print_c.cmi \
+    ast_c.cmo unparse_hrule.cmi 
+unparse_hrule.cmx: visitor_c.cmx unparse_cocci.cmx pretty_print_c.cmx \
+    ast_c.cmx unparse_hrule.cmi 
+visitor_c.cmo: control_flow_c.cmi ast_c.cmo visitor_c.cmi 
+visitor_c.cmx: control_flow_c.cmx ast_c.cmx visitor_c.cmi 
index 79db28e..6a38ace 100644 (file)
@@ -48,7 +48,7 @@ OCAMLC=ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
 OCAMLOPT=ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
 OCAMLLEX=ocamllex$(OPTBIN) #-ml
 OCAMLYACC=ocamlyacc -v
-OCAMLDEP=ocamldep$(OPTBIN) $(INCLUDES)
+OCAMLDEP=ocamldep$(OPTBIN) #$(INCLUDES)
 OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
 
 
index 30a3cf2..bd90312 100644 (file)
@@ -265,8 +265,8 @@ and expression = (expressionbis * exp_info ref (* semantic: *)) wrap
   | CondExpr       of expression * expression option * expression
 
   (* should be considered as statements, bad C langage *)
-  | Sequence       of expression * expression                   
-  | Assignment     of expression * assignOp * expression        
+  | Sequence       of expression * expression
+  | Assignment     of expression * assignOp * expression
 
 
   | Postfix        of expression * fixOp
@@ -844,7 +844,8 @@ let compare_pos ii1 ii2 =
   let pos1 = get_pos (pinfo_of_info ii1) in
   let pos2 = get_pos (pinfo_of_info ii2) in
   match (pos1,pos2) with
-    (Real p1, Real p2) -> compare p1.Common.charpos p2.Common.charpos
+    (Real p1, Real p2) ->
+      compare p1.Common.charpos p2.Common.charpos
   | (Virt (p1,_), Real p2) ->
       if (compare p1.Common.charpos p2.Common.charpos) = (-1) then (-1) else 1
   | (Real p1, Virt (p2,_)) ->
index 1931509..52b2382 100644 (file)
@@ -1,6 +1,7 @@
 parsing_c library - Yoann Padioleau
 
-Copyright (C) 2002, 2005, 2006, 2007, 2008 Yoann Padioleau
+Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009 Yoann Padioleau, 
+Ecole des Mines de Nantes, University of Urbana Champaign, Université de Rennes.
 
   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License (GPL)
index 9633b4f..3d711d6 100644 (file)
@@ -1,3 +1,14 @@
+(* Copyright (C) 2008, 2009 University of Urbana Champaign
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License (GPL)
+ * version 2 as published by the Free Software Foundation.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * file license.txt for more details.
+ *)
 open Common
 
 open Ast_c
diff --git a/parsing_c/orig.mly b/parsing_c/orig.mly
new file mode 100644 (file)
index 0000000..a4e30b0
--- /dev/null
@@ -0,0 +1,323 @@
+%{
+(* src: ocamlyaccified from 
+ *  http://www.lysator.liu.se/c/ANSI-C-grammar-y.html 
+ *)
+open Common
+open AbstractSyntax
+exception Parsing of string
+%}
+
+%token <string * AbstractSyntax.fullType> TString
+%token <string> TIdent
+%token <int * AbstractSyntax.intType> TInt
+%token <float * AbstractSyntax.floatType> TFloat
+
+/*(* conflicts *)*/
+%token <string> TypedefIdent
+
+%token TOPar TCPar TOBrace TCBrace TOCro TCCro 
+%token TDot TComma TPtrOp 
+%token TInc TDec
+%token <AbstractSyntax.assignOp> TAssign 
+%token TEq
+%token TWhy TDotDot TPtVirg TTilde TBang
+%token TEllipsis
+
+%token TOrLog TAndLog TOrIncl TOrExcl TAnd  TEqEq TNotEq TInf TSup TInfEq TSupEq  TShl TShr 
+       TPlus TMinus TMul TDiv TMod 
+
+%token Tchar Tshort Tint Tdouble Tfloat Tlong Tunsigned Tsigned Tvoid
+       Tauto Tregister Textern Tstatic 
+       Tconst Tvolatile
+       Tstruct Tenum Ttypedef Tunion
+       Tbreak Telse Tswitch Tcase Tcontinue Tfor Tdo Tif  Twhile Treturn Tgoto Tdefault
+       Tsizeof  
+
+%token EOF
+
+
+%left TOrLog
+%left TAndLog
+%left TOrIncl
+%left TOrExcl
+%left TAnd 
+%left TEqEq TNotEq
+%left TInf TSup TInfEq TSupEq 
+%left TShl TShr
+%left TPlus TMinus
+%left TMul TDiv TMod 
+
+%start main
+%type <int list> main
+%%
+
+main:  translation_unit EOF     { [] }
+
+/********************************************************************************/
+/*
+ expression
+ statement
+ declaration
+ main
+*/
+
+/********************************************************************************/
+
+expr: assign_expr             {  }
+    | expr TComma assign_expr {  }
+
+assign_expr: cond_expr                      {  }
+           | unary_expr TAssign assign_expr {  }
+           | unary_expr TEq     assign_expr {  }
+
+cond_expr: arith_expr                             {}
+        | arith_expr TWhy expr TDotDot cond_expr {}
+
+arith_expr: cast_expr {}
+         | arith_expr TMul    arith_expr {}
+         | arith_expr TDiv    arith_expr {}
+         | arith_expr TMod    arith_expr {}
+         | arith_expr TPlus   arith_expr {}
+         | arith_expr TMinus  arith_expr {}
+         | arith_expr TShl    arith_expr {}
+         | arith_expr TShr    arith_expr {}
+         | arith_expr TInf    arith_expr {}
+         | arith_expr TSup    arith_expr {}
+         | arith_expr TInfEq  arith_expr {}
+         | arith_expr TSupEq  arith_expr {}
+         | arith_expr TEqEq   arith_expr {}
+         | arith_expr TNotEq  arith_expr {}
+         | arith_expr TAnd    arith_expr {}
+         | arith_expr TOrExcl arith_expr {}
+         | arith_expr TOrIncl arith_expr {}
+         | arith_expr TAndLog arith_expr {}
+         | arith_expr TOrLog arith_expr {}
+
+cast_expr: unary_expr {}
+        | TOPar type_name TCPar cast_expr {}
+
+unary_expr: postfix_expr {}
+         | TInc unary_expr {}
+         | TDec unary_expr {}
+         | unary_op cast_expr {}
+         | Tsizeof unary_expr {}
+         | Tsizeof TOPar type_name TCPar {}
+
+unary_op: TAnd  {}
+       | TMul  {}
+       | TPlus {}
+       | TMinus{}
+       | TTilde{}
+       | TBang {}
+
+postfix_expr: primary_expr  {}
+           | postfix_expr TOCro expr TCCro {}
+           | postfix_expr TOPar argument_expr_list TCPar  {}
+           | postfix_expr TOPar  TCPar  {}
+           | postfix_expr TDot TIdent {}
+           | postfix_expr TPtrOp TIdent {}
+           | postfix_expr TInc {}
+           | postfix_expr TDec {}
+
+argument_expr_list: assign_expr { }
+                 | argument_expr_list TComma assign_expr {}
+
+primary_expr: TIdent  {}
+            | TInt    {}
+           | TFloat  {}
+           | TString {}
+           | TOPar expr TCPar {}
+
+const_expr: cond_expr {}
+/********************************************************************************/
+
+statement: labeled   {}
+        | compound  {}
+        | expr_statement {}
+        | selection {}
+        | iteration {}
+        | jump TPtVirg      {}
+
+labeled: TIdent TDotDot statement {}
+       | Tcase const_expr TDotDot statement {}
+       | Tdefault TDotDot statement {}
+
+compound: TOBrace                          TCBrace {}
+        | TOBrace statement_list           TCBrace {}
+        | TOBrace decl_list                TCBrace {}
+        | TOBrace decl_list statement_list TCBrace {}
+
+decl_list: decl {}
+        | decl decl_list {}
+
+statement_list: statement {}
+             | statement statement_list {}
+
+expr_statement: TPtVirg {}
+             | expr TPtVirg {}
+
+selection: Tif TOPar expr TCPar statement {}
+        | Tif TOPar expr TCPar statement Telse statement {}
+        | Tswitch TOPar expr TCPar statement {}
+
+iteration: Twhile TOPar expr TCPar statement {}
+        | Tdo statement Twhile TOPar expr TCPar TPtVirg {}
+        | Tfor TOPar expr_statement expr_statement TCPar statement {}
+        | Tfor TOPar expr_statement expr_statement expr TCPar statement {}
+
+jump: Tgoto TIdent {} 
+    | Tcontinue {}
+    | Tbreak {}
+    | Treturn {} 
+    | Treturn expr {}
+
+/********************************************************************************/
+
+/*------------------------------------------------------------------------------*/
+decl: decl_spec TPtVirg {}
+    | decl_spec init_declarator_list TPtVirg {}
+
+/*------------------------------------------------------------------------------*/
+decl_spec: storage_class_spec {}
+         | storage_class_spec decl_spec {}
+        | type_spec {}
+        | type_spec decl_spec {}
+        | type_qualif {}
+        | type_qualif decl_spec {}
+
+storage_class_spec: Tstatic {}
+                 | Textern {}
+                 | Tauto {}
+                 | Tregister {}
+                 | Ttypedef {}
+type_spec: Tvoid {}
+         | Tchar {}
+        | Tshort {}
+        | Tint {}
+        | Tlong {}
+        | Tfloat {}
+        | Tdouble {}
+        | Tsigned {}
+        | Tunsigned {}
+        | struct_or_union_spec {}
+        | enum_spec {}
+/*TODO  | TIdent {} */
+         | TypedefIdent {} 
+
+type_qualif: Tconst {}
+          | Tvolatile {}
+
+/*------------------------------------------------------------------------------*/
+struct_or_union_spec: struct_or_union TIdent TOBrace struct_decl_list TCBrace {}
+                   | struct_or_union        TOBrace struct_decl_list TCBrace {}
+                   | struct_or_union TIdent {}
+
+struct_or_union: Tstruct {}
+              | Tunion  {}
+
+struct_decl_list: struct_decl {}
+               | struct_decl_list struct_decl  {}
+
+struct_decl: spec_qualif_list struct_declarator_list TPtVirg {}
+
+spec_qualif_list: type_spec {}
+               | type_spec spec_qualif_list {}
+               | type_qualif {}
+               | type_qualif spec_qualif_list {}
+
+struct_declarator_list: struct_declarator {}
+                     | struct_declarator_list TComma struct_declarator {}
+struct_declarator: declarator  {}
+                | TDotDot const_expr {}
+                | declarator TDotDot const_expr {}
+/*------------------------------------------------------------------------------*/
+enum_spec: Tenum        TOBrace enumerator_list TCBrace {}
+         | Tenum TIdent TOBrace enumerator_list TCBrace {}
+         | Tenum TIdent   {}
+
+enumerator_list: enumerator {}
+              | enumerator_list TComma enumerator {}
+
+enumerator: TIdent {}
+          | TIdent TEq const_expr {}
+/*------------------------------------------------------------------------------*/
+            
+init_declarator_list: init_declarator {}
+                   | init_declarator_list TComma init_declarator {}
+
+init_declarator: declarator {}
+              | declarator TEq initialize {}
+
+/*------------------------------------------------------------------------------*/
+declarator: pointer direct_declarator {}
+          | direct_declarator {}
+
+pointer: TMul  {}
+       | TMul type_qualif_list {}
+       | TMul pointer {}
+       | TMul type_qualif_list pointer {}
+
+direct_declarator: TIdent {}
+                 | TOPar declarator TCPar {}
+                | direct_declarator TOCro const_expr TCCro {}
+                | direct_declarator TOCro            TCCro {}
+                | direct_declarator TOPar TCPar {}
+                | direct_declarator TOPar parameter_type_list TCPar {}
+                | direct_declarator TOPar identifier_list     TCPar {}
+
+type_qualif_list: type_qualif {}
+               | type_qualif_list type_qualif {}
+
+parameter_type_list: parameter_list {}
+                  | parameter_list TComma TEllipsis {}
+
+parameter_list: parameter_decl {}
+             | parameter_list TComma parameter_decl {}
+
+parameter_decl: decl_spec declarator {}
+             | decl_spec abstract_declarator {}
+             | decl_spec {}
+identifier_list:  TIdent {}
+               | identifier_list TComma TIdent {}
+/*------------------------------------------------------------------------------*/
+
+type_name: spec_qualif_list {}
+        | spec_qualif_list abstract_declarator {}
+
+abstract_declarator: pointer {}
+                  |         direct_abstract_declarator {}
+                  | pointer direct_abstract_declarator {}
+
+direct_abstract_declarator: TOPar abstract_declarator TCPar {}
+                         | TOCro            TCCro {}
+                         | TOCro const_expr TCCro {}
+                         | direct_abstract_declarator TOCro            TCCro {}
+                         | direct_abstract_declarator TOCro const_expr TCCro {}
+                         | TOPar TCPar {}
+                         | TOPar parameter_type_list TCPar {}
+                         | direct_abstract_declarator TOPar TCPar {}
+                         | direct_abstract_declarator TOPar parameter_type_list TCPar {}
+                         
+/*------------------------------------------------------------------------------*/
+initialize: assign_expr {}
+          | TOBrace initialize_list TCBrace {}
+          | TOBrace initialize_list TComma TCBrace {}
+
+initialize_list: initialize {}
+              | initialize_list TComma initialize {}
+
+/********************************************************************************/
+
+translation_unit: external_declaration {}
+               | translation_unit external_declaration {}
+
+external_declaration: function_definition {}
+                   | decl {}
+
+function_definition: decl_spec declarator decl_list compound {}
+                  | decl_spec declarator           compound {}
+                  | declarator decl_list compound {}
+                  | declarator compound {}
+
+
+
index e7ed48a..b69da55 100644 (file)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2007, 2008 Yoann Padioleau
+(* Copyright (C) 2007, 2008 Ecole des Mines de Nantes
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License (GPL)
index edbe3b3..40607a2 100644 (file)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006, 2007, 2008 Yoann Padioleau
+(* Copyright (C) 2006, 2007, 2008 Ecole des Mines de Nantes
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License (GPL)
@@ -42,11 +42,7 @@ let rec pp_expression_gen pr_elem pr_space =
     | Constant (c),         [i]     -> pr_elem i 
     | FunCall  (e, es),     [i1;i2] -> 
         pp_expression e; pr_elem i1; 
-        es +> List.iter (fun (e, opt) -> 
-          assert (List.length opt <= 1); (* opt must be a comma? *)
-          opt +> List.iter (function x -> pr_elem x; pr_space());
-          pp_argument_gen pr_elem pr_space e;
-        );
+       pp_arg_list_gen pr_elem pr_space es;
         pr_elem i2;
         
     | CondExpr (e1, e2, e3),    [i1;i2]    -> 
@@ -130,6 +126,11 @@ let rec pp_expression_gen pr_elem pr_space =
   in
   pp_expression
 
+and pp_arg_list_gen pr_elem pr_space es =
+  es +> List.iter (fun (e, opt) -> 
+    assert (List.length opt <= 1); (* opt must be a comma? *)
+    opt +> List.iter (function x -> pr_elem x; pr_space());
+    pp_argument_gen pr_elem pr_space e)
 
 and pp_argument_gen pr_elem pr_space argument = 
   let rec pp_action = function 
@@ -326,8 +327,9 @@ and (pp_type_with_ident_gen:
       fullType -> attribute list ->
       unit) = 
   fun pr_elem pr_space ->
-    fun ident sto ((qu, iiqu), (ty, iity)) attrs -> 
+    fun ident sto ((qu, iiqu), (ty, iity)) attrs ->
       pp_base_type_gen pr_elem pr_space ((qu, iiqu), (ty, iity))  sto;
+      (match ident with None -> () | Some _ -> pr_space());
       pp_type_with_ident_rest_gen pr_elem pr_space ident
        ((qu, iiqu), (ty, iity)) attrs
 
@@ -348,7 +350,7 @@ and (pp_base_type_gen:
           let all_ii = get_sto sto ++ iiqu in
           all_ii 
           +> List.sort Ast_c.compare_pos
-          +> List.iter pr_elem;
+          +> Common.print_between pr_space pr_elem(*List.iter pr_elem*);
           
         in
         let print_sto_qu_ty (sto, (qu, iiqu), iity) = 
@@ -360,10 +362,10 @@ and (pp_base_type_gen:
             (* TODO in fact for pointer, the qualifier is after the type 
              * cf -test strangeorder
              *)
-            pr2 "STRANGEORDER"; 
-            all_ii2 +> List.iter pr_elem 
+            pr2 "STRANGEORDER";
+            all_ii2 +> Common.print_between pr_space pr_elem(*List.iter pr_elem*)
           end
-          else all_ii2 +> List.iter pr_elem
+          else all_ii2 +> Common.print_between pr_space pr_elem(*List.iter pr_elem*)
         in
 
         match ty, iity with
index 76c5dca..2a2c94b 100644 (file)
@@ -4,6 +4,8 @@ type pr_space_func = unit -> unit
 
 val pp_expression_gen :
     pr_elem_func -> pr_space_func -> Ast_c.expression -> unit
+val pp_arg_list_gen :
+    pr_elem_func -> pr_space_func -> Ast_c.argument Ast_c.wrap2 list -> unit
 val pp_statement_gen : pr_elem_func -> pr_space_func -> Ast_c.statement -> unit
 val pp_decl_gen : pr_elem_func -> pr_space_func -> Ast_c.declaration -> unit
 val pp_init_gen : pr_elem_func -> pr_space_func -> Ast_c.initialiser -> unit
index 56215b0..3295644 100644 (file)
@@ -1,4 +1,5 @@
-(* Copyright (C) 2007, 2008 Yoann Padioleau
+(* Copyright (C) 2007, 2008 Ecole des Mines de Nantes, University of 
+ * Urbana Champaign
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License (GPL)
index 806ad4f..5243a23 100644 (file)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006, 2007, 2008 Yoann Padioleau
+(* Copyright (C) 2006, 2007, 2008 Ecole des Mines de Nantes
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License (GPL)
@@ -315,27 +315,28 @@ let expand_mcode toks =
     *)
 
     (* patch: when need full coccinelle transformation *)
+    let unparser = Unparse_cocci.pp_list_list_any args_pp false in
     match mcode with
     | Ast_cocci.MINUS (_,any_xxs) -> 
         (* Why adding ? because I want to have all the information, the whole
          * set of tokens, so I can then process and remove the 
          * is_between_two_minus for instance *)
         add_elem t true;
-        Unparse_cocci.pp_list_list_any args_pp any_xxs Unparse_cocci.InPlace
+        unparser any_xxs Unparse_cocci.InPlace
     | Ast_cocci.CONTEXT (_,any_befaft) -> 
         (match any_befaft with
         | Ast_cocci.NOTHING -> 
             add_elem t false
         | Ast_cocci.BEFORE xxs -> 
-            Unparse_cocci.pp_list_list_any args_pp xxs Unparse_cocci.Before;
+            unparser xxs Unparse_cocci.Before;
             add_elem t false
         | Ast_cocci.AFTER xxs -> 
             add_elem t false;
-            Unparse_cocci.pp_list_list_any args_pp xxs Unparse_cocci.After;
+            unparser xxs Unparse_cocci.After;
         | Ast_cocci.BEFOREAFTER (xxs, yys) -> 
-            Unparse_cocci.pp_list_list_any args_pp xxs Unparse_cocci.Before;
+            unparser xxs Unparse_cocci.Before;
             add_elem t false;
-            Unparse_cocci.pp_list_list_any args_pp yys Unparse_cocci.After;
+            unparser yys Unparse_cocci.After;
         )
     | Ast_cocci.PLUS -> raise Impossible
 
@@ -468,6 +469,23 @@ let remove_minus_and_between_and_expanded_and_fake xs =
   ) in
   xs
 
+(* normally, in C code, a semicolon is not preceded by a space or newline *)
+let adjust_before_semicolon toks =
+  let toks = List.rev toks in
+  let rec loop = function
+      [] -> []
+    | ((T2(_,false,_)) as x)::xs ->
+       if List.mem (str_of_token2 x) [";";")";","]
+       then
+         let (spaces, rest) = Common.span is_minusable_comment xs in
+         (match rest with
+           (T2(_,true,_))::_ | (Cocci2 _)::_ ->
+             (* only drop spaces if something was actually changed before *)
+             x :: loop rest
+         | _ -> x :: loop xs)
+       else x :: loop xs
+    | x::xs -> x :: loop xs in
+  List.rev (loop toks)
 
 let is_ident_like s = s ==~ Common.regexp_alpha
 
@@ -478,7 +496,7 @@ let rec add_space xs =
   | x::y::xs -> 
       let sx = str_of_token2 x in
       let sy = str_of_token2 y in
-      if is_ident_like sx && is_ident_like sy 
+      if is_ident_like sx && is_ident_like sy
       then x::C2 " "::(add_space (y::xs))
       else x::(add_space (y::xs))
 
@@ -758,6 +776,7 @@ let pp_program2 xs outfile  =
           (* phase2: can now start to filter and adjust *)
           let toks = adjust_indentation toks in
           let toks = remove_minus_and_between_and_expanded_and_fake toks in
+         let toks = adjust_before_semicolon toks in
           (* assert Origin + Cocci + C and no minus *)
           let toks = add_space toks in
           let toks = fix_tokens toks in
index 7c5dd58..b53e58c 100644 (file)
@@ -20,7 +20,7 @@ exception CantBeInPlus
 type pos = Before | After | InPlace
 
 let rec pp_list_list_any (env, pr, pr_elem, pr_space, indent, unindent)
-    xxs before =
+    generating xxs before =
 
 (* Just to be able to copy paste the code from pretty_print_cocci.ml. *)
 let print_string = pr in
@@ -36,31 +36,105 @@ let print_option = Common.do_option in
 let print_between = Common.print_between in
 
 (* --------------------------------------------------------------------- *)
+(* Only for make_hrule, print plus code, unbound metavariables *)
 
-let handle_metavar name fn = 
-  match (Common.optionise (fun () -> List.assoc (term name) env)) with
-  | None ->
-      let name_string (_,s) = s in
-      failwith (Printf.sprintf "SP line %d: Not found a value in env for: %s"
-                 (Ast_cocci.get_mcode_line name) (name_string (term name)))
-  | Some e  -> fn e
-in
+(* avoid polyvariance problems *)
+let anything : (Ast.anything -> unit) ref = ref (function _ -> ()) in
 
-(* --------------------------------------------------------------------- *)
-(* Here we don't care about the annotation on s. *)
-let mcode fn (s,info,_,_) =
-  List.iter (function str -> print_string str; print_string "\n")
-    info.Ast.strbef;
-  if info.Ast.column > 0 && not(info.Ast.strbef = [])
-  then print_string (String.make info.Ast.column ' ');
-  fn s;
-  match info.Ast.straft with
+let rec print_anything = function
+    [] -> ()
+  | stream ->
+      start_block();
+      print_between force_newline print_anything_list stream;
+      end_block()
+
+and print_anything_list = function
     [] -> ()
-  | aft ->
-      List.iter (function str -> print_string "\n"; print_string str) aft;
-      print_string "\n"; (*XXX pr current_tabbing *)
+  | [x] -> !anything x
+  | bef::((aft::_) as rest) ->
+      !anything bef;
+      let space =
+       (match bef with
+         Ast.Rule_elemTag(_) | Ast.AssignOpTag(_) | Ast.BinaryOpTag(_)
+       | Ast.ArithOpTag(_) | Ast.LogicalOpTag(_)
+       | Ast.Token("if",_) | Ast.Token("while",_) -> true | _ -> false) or
+       (match aft with
+         Ast.Rule_elemTag(_) | Ast.AssignOpTag(_) | Ast.BinaryOpTag(_)
+       | Ast.ArithOpTag(_) | Ast.LogicalOpTag(_) | Ast.Token("{",_) -> true
+       | _ -> false) in
+      if space then print_string " ";
+      print_anything_list rest in
+
+let print_around printer term = function
+    Ast.NOTHING -> printer term
+  | Ast.BEFORE(bef) -> print_anything bef; printer term
+  | Ast.AFTER(aft) -> printer term; print_anything aft
+  | Ast.BEFOREAFTER(bef,aft) ->
+      print_anything bef; printer term; print_anything aft in
+
+let print_string_befaft fn x info =
+  List.iter (function s -> print_string s; force_newline())
+    info.Ast.strbef;
+  fn x;
+  List.iter (function s -> force_newline(); print_string s)
+    info.Ast.straft in
+
+let print_meta (r,x) = print_string x in
+
+let print_pos = function
+    Ast.MetaPos(name,_,_,_,_) ->
+      let name = Ast.unwrap_mcode name in
+      print_string "@"; print_meta name
+  | _ -> () in
+
+(* --------------------------------------------------------------------- *)
+
+let mcode fn arg =
+  match (generating,arg) with
+    (false,(s,info,_,_)) ->
+    (* printing for transformation *)
+    (* Here we don't care about the annotation on s. *)
+      List.iter (function str -> print_string str; print_string "\n")
+       info.Ast.strbef;
+      if info.Ast.column > 0 && not(info.Ast.strbef = [])
+      then print_string (String.make info.Ast.column ' ');
+      fn s;
+      (match info.Ast.straft with
+       [] -> ()
+      | aft ->
+         List.iter (function str -> print_string "\n"; print_string str) aft;
+         print_string "\n") (*XXX pr current_tabbing *)
+      (* printing for rule generation *)
+  | (true, (x, _, Ast.MINUS(_,plus_stream), pos)) ->
+      print_string "\n- ";
+      fn x; print_pos pos;
+      print_anything plus_stream
+  | (true, (x, _, Ast.CONTEXT(_,plus_streams), pos)) ->
+      let fn x = print_string "\n "; fn x; print_pos pos in
+      print_around fn x plus_streams
+  | (true,( x, info, Ast.PLUS, pos)) ->
+      let fn x = print_string "\n+ "; fn x; print_pos pos in
+      print_string_befaft fn x info
 in
 
+
+(* --------------------------------------------------------------------- *)
+
+let handle_metavar name fn =
+  match (Common.optionise (fun () -> List.assoc (term name) env)) with
+  | None ->
+      let name_string (_,s) = s in
+      if generating
+      then pr (name_string (term name))
+      else
+       failwith
+         (Printf.sprintf "SP line %d: Not found a value in env for: %s"
+            (Ast_cocci.get_mcode_line name) (name_string (term name)))
+  | Some e  ->
+      if generating
+      then mcode (function _ -> fn e) name
+      else fn e
+in
 (* --------------------------------------------------------------------- *)
 let dots between fn d =
   match Ast.unwrap d with
@@ -69,6 +143,23 @@ let dots between fn d =
   | Ast.STARS(l) -> print_between between fn l
 in
 
+let nest_dots multi fn f d =
+  let mo s = if multi then "<+"^s else "<"^s in
+  let mc s = if multi then s^"+>" else s^">" in
+  match Ast.unwrap d with
+    Ast.DOTS(l) ->
+      print_string (mo "..."); f(); start_block();
+      print_between force_newline fn l;
+      end_block(); print_string (mc "...")
+  | Ast.CIRCLES(l) ->
+      print_string (mo "ooo"); f(); start_block();
+      print_between force_newline fn l;
+      end_block(); print_string (mc "ooo")
+  | Ast.STARS(l) ->
+      print_string (mo "***"); f(); start_block();
+      print_between force_newline fn l;
+      end_block(); print_string (mc "***")
+in
 
 (* --------------------------------------------------------------------- *)
 (* Identifier *)
@@ -100,6 +191,14 @@ in
 (* --------------------------------------------------------------------- *)
 (* Expression *)
 
+let print_disj_list fn l =
+  force_newline(); print_string "("; force_newline();
+  print_between
+    (function _ ->
+      force_newline(); print_string "|"; force_newline())
+    fn l;
+  force_newline(); print_string ")"; force_newline() in
+
 let rec expression e =
   match Ast.unwrap e with
     Ast.Ident(id) -> ident id
@@ -150,21 +249,45 @@ let rec expression e =
   | Ast.MetaExpr (name,_,_,_typedontcare,_formdontcare,_) ->
       handle_metavar name  (function
         | Ast_c.MetaExprVal exp -> 
-            Pretty_print_c.pp_expression_gen pr_elem pr_space  exp
+            Pretty_print_c.pp_expression_gen pr_elem pr_space exp
         | _ -> raise Impossible
       )
 
   | Ast.MetaExprList (name,_,_,_) -> 
-      failwith "not handling MetaExprList"
-      
+      handle_metavar name  (function
+        | Ast_c.MetaExprListVal args -> 
+            Pretty_print_c.pp_arg_list_gen pr_elem pr_space args
+        | _ -> raise Impossible
+      )
+
   | Ast.EComma(cm) -> mcode print_string cm; print_space()
 
-  | Ast.DisjExpr _ 
-  | Ast.NestExpr(_) 
-  | Ast.Edots(_)
-  | Ast.Ecircles(_)
-  | Ast.Estars(_) 
-    -> raise CantBeInPlus
+  | Ast.DisjExpr(exp_list) ->
+      if generating
+      then print_disj_list expression exp_list
+      else raise CantBeInPlus
+  | Ast.NestExpr(expr_dots,Some whencode,multi) when generating ->
+      nest_dots multi expression
+       (function _ -> print_string "   when != "; expression whencode)
+       expr_dots
+  | Ast.NestExpr(expr_dots,None,multi) when generating ->
+      nest_dots multi expression (function _ -> ()) expr_dots
+  | Ast.NestExpr(_) -> raise CantBeInPlus
+  | Ast.Edots(dots,Some whencode)
+  | Ast.Ecircles(dots,Some whencode)
+  | Ast.Estars(dots,Some whencode) ->
+      if generating
+      then
+       (mcode print_string dots;
+        print_string "   when != ";
+        expression whencode)
+      else raise CantBeInPlus
+  | Ast.Edots(dots,None)
+  | Ast.Ecircles(dots,None)
+  | Ast.Estars(dots,None) ->
+      if generating
+      then mcode print_string dots
+      else raise CantBeInPlus
 
   | Ast.OptExp(exp) | Ast.UniqueExp(exp) -> 
       raise CantBeInPlus
@@ -241,8 +364,10 @@ and print_function_type (ty,lp1,params,rp1) fn =
 
 and typeC ty =
   match Ast.unwrap ty with
-    Ast.BaseType(ty,sgn) -> print_option (mcode sign) sgn; mcode baseType ty
-  | Ast.ImplicitInt(sgn) -> mcode signns sgn
+    Ast.BaseType(ty,strings) ->
+      print_between pr_space (mcode print_string) strings
+  | Ast.SignedT(sgn,Some ty) -> mcode sign sgn; typeC ty
+  | Ast.SignedT(sgn,None) -> mcode signns sgn
   | Ast.Pointer(ty,star) -> fullType ty; ft_space ty; mcode print_string star
   | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
       print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
@@ -252,6 +377,8 @@ and typeC ty =
   | Ast.Array(ty,lb,size,rb) ->
       fullType ty; mcode print_string lb; print_option expression size;
       mcode print_string rb
+  | Ast.EnumName(kind,name) -> mcode print_string kind; print_string " ";
+      ident name
   | Ast.StructUnionName(kind,name) ->
       mcode structUnion kind;
       print_option ident name
@@ -275,6 +402,7 @@ and baseType = function
   | Ast.DoubleType -> print_string "double"
   | Ast.FloatType -> print_string "float"
   | Ast.LongType -> print_string "long"
+  | Ast.LongLongType -> print_string "long long"
 
 and structUnion = function
     Ast.Struct -> print_string "struct "
@@ -425,9 +553,9 @@ and parameterTypeDef p =
       failwith "not handling MetaParamList"
 
   | Ast.PComma(cm) -> mcode print_string cm; print_space()
-  | Ast.Pdots(dots) 
-  | Ast.Pcircles(dots) 
-    ->  raise CantBeInPlus
+  | Ast.Pdots(dots) | Ast.Pcircles(dots) when generating ->
+      mcode print_string dots
+  | Ast.Pdots(dots) | Ast.Pcircles(dots) -> raise CantBeInPlus
   | Ast.OptParam(param) | Ast.UniqueParam(param) -> raise CantBeInPlus
 
 and parameter_list l = dots (function _ -> ()) parameterTypeDef l
@@ -535,7 +663,17 @@ and rule_elem arity re =
   | Ast.Case(case,exp,colon) ->
       mcode print_string case; print_string " "; expression exp;
       mcode print_string colon; print_string " "
-  | Ast.DisjRuleElem(res) -> raise CantBeInPlus
+  | Ast.DisjRuleElem(res) ->
+      if generating
+      then
+       (print_string arity;
+        force_newline(); print_string "("; force_newline();
+        print_between
+          (function _ -> force_newline(); print_string "|"; force_newline())
+          (rule_elem arity)
+          res;
+        force_newline(); print_string ")")
+      else raise CantBeInPlus
 
   | Ast.MetaRuleElem(name,_,_) ->
       raise Impossible
@@ -572,6 +710,13 @@ and print_fninfo = function
   | Ast.FInline(inline) -> mcode print_string inline; print_string " "
   | Ast.FAttr(attr) -> mcode print_string attr; print_string " " in
 
+let indent_if_needed s f =
+  match Ast.unwrap s with
+    Ast.Seq(lbrace,decls,body,rbrace) -> f()
+  | _ ->
+      (*no newline at the end - someone else will do that*)
+      start_block(); f(); unindent() in
+
 let rec statement arity s =
   match Ast.unwrap s with
     Ast.Seq(lbrace,decls,body,rbrace) ->
@@ -581,20 +726,28 @@ let rec statement arity s =
       rule_elem arity rbrace
 
   | Ast.IfThen(header,branch,_) ->
-      rule_elem arity header; statement arity branch
+      rule_elem arity header;
+      indent_if_needed branch (function _ -> statement arity branch)
   | Ast.IfThenElse(header,branch1,els,branch2,_) ->
-      rule_elem arity header; statement arity branch1; print_string " ";
-      rule_elem arity els; statement arity branch2
+      rule_elem arity header;
+      indent_if_needed branch1 (function _ -> statement arity branch1);
+      print_string " ";
+      rule_elem arity els;
+      indent_if_needed branch2 (function _ -> statement arity branch2)
 
   | Ast.While(header,body,_) ->
-      rule_elem arity header; statement arity body
+      rule_elem arity header;
+      indent_if_needed body (function _ -> statement arity body)
   | Ast.Do(header,body,tail) ->
-      rule_elem arity header; statement arity body;
+      rule_elem arity header;
+      indent_if_needed body (function _ -> statement arity body);
       rule_elem arity tail
   | Ast.For(header,body,_) ->
-      rule_elem arity header; statement arity body
+      rule_elem arity header;
+      indent_if_needed body (function _ -> statement arity body)
   | Ast.Iterator(header,body,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity body;
+      rule_elem arity header;
+      indent_if_needed body (function _ -> statement arity body);
       mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
 
   | Ast.Switch(header,lb,cases,rb) ->
@@ -613,13 +766,61 @@ let rec statement arity s =
       rule_elem arity header; print_string " ";
       dots force_newline (statement arity) body
 
-  | Ast.Disj(_)| Ast.Nest(_)
-  | Ast.Dots(_) | Ast.Circles(_) | Ast.Stars(_) ->
-      raise CantBeInPlus
+  | Ast.Disj([stmt_dots]) ->
+      if generating
+      then
+       (print_string arity;
+        dots force_newline (statement arity) stmt_dots)
+      else raise CantBeInPlus
+  | Ast.Disj(stmt_dots_list) -> (* ignores newline directive for readability *)
+      if generating
+      then
+       (print_string arity;
+        force_newline(); print_string "("; force_newline();
+        print_between
+          (function _ -> force_newline();print_string "|"; force_newline())
+          (dots force_newline (statement arity))
+          stmt_dots_list;
+        force_newline(); print_string ")")
+      else raise CantBeInPlus
+  | Ast.Nest(stmt_dots,whn,multi,_,_) when generating ->
+      print_string arity;
+      nest_dots multi (statement arity)
+       (function _ ->
+         print_between force_newline
+           (whencode (dots force_newline (statement "")) (statement "")) whn;
+         force_newline())
+       stmt_dots
+  | Ast.Nest(_) -> raise CantBeInPlus
+  | Ast.Dots(d,whn,_,_) | Ast.Circles(d,whn,_,_) | Ast.Stars(d,whn,_,_) ->
+      if generating
+      then
+       (print_string arity; mcode print_string d;
+        print_between force_newline
+          (whencode (dots force_newline (statement "")) (statement "")) whn;
+        force_newline())
+      else raise CantBeInPlus
 
   | Ast.OptStm(s) | Ast.UniqueStm(s) -> 
       raise CantBeInPlus
 
+and whencode notfn alwaysfn = function
+    Ast.WhenNot a ->
+      print_string "   WHEN != "; notfn a
+  | Ast.WhenAlways a ->
+      print_string "   WHEN = "; alwaysfn a
+  | Ast.WhenModifier x -> print_string "   WHEN "; print_when_modif x
+  | Ast.WhenNotTrue a ->
+      print_string "   WHEN != TRUE "; rule_elem "" a
+  | Ast.WhenNotFalse a ->
+      print_string "   WHEN != FALSE "; rule_elem "" a
+
+and print_when_modif = function
+  | Ast.WhenAny    -> print_string "ANY"
+  | Ast.WhenStrict -> print_string "STRICT"
+  | Ast.WhenForall -> print_string "FORALL"
+  | Ast.WhenExists -> print_string "EXISTS"
+
 and case_line arity c =
   match Ast.unwrap c with
     Ast.CaseLine(header,code) ->
@@ -685,7 +886,8 @@ let rec pp_any = function
          (match x with
            (*"return" |*) "else" -> print_string " "
          | _ -> ()))
-       (x,info,(),Ast.NoMetaPos);
+       (let nomcodekind = Ast.CONTEXT(Ast.DontCarePos,Ast.NOTHING) in
+       (x,info,nomcodekind,Ast.NoMetaPos));
       if_open_brace x
 
   | Ast.Code(x) -> let _ = top_level x in false
@@ -703,6 +905,8 @@ let rec pp_any = function
   | Ast.SgrepEndTag(x) -> failwith "unexpected end tag"
 in
 
+  anything := (function x -> let _ = pp_any x in ());
+
   (* todo? imitate what is in pretty_print_cocci ? *)
   match xxs with
     [] -> ()
index 3db061d..9500a99 100644 (file)
@@ -7,5 +7,5 @@ val pp_list_list_any :
   (string -> unit) (* pr cocci *) * Pretty_print_c.pr_elem_func (* pr c *) *
     (unit -> unit) (* pr space *) *
     (unit -> unit) (* indent *) * (unit -> unit) (* unindent *) -> 
-  Ast_cocci.anything list list -> pos ->
+  bool (*true if generating*) -> Ast_cocci.anything list list -> pos ->
   unit
index c7b29f8..4eee1e1 100644 (file)
@@ -1,38 +1,11 @@
-module TH = Token_helpers
+module Ast = Ast_cocci
+module V = Visitor_ast
 
-let names = ref ([] : (string * int ref) list)
-
-(* ----------------------------------------------------------------------- *)
-(* drop tokens representing the function header and the final close brace *)
-
-let drop_header_toks toks_e =
-  let remove t =
-    if not (TH.is_comment_or_space t)
-    then
-      (TH.info_of_tok t).Ast_c.cocci_tag :=
-       (Ast_cocci.MINUS(Ast_cocci.DontCarePos,[]),[]) in
-  let rec drop_up_to_brace = function
-      [] -> ()
-    | ((Parser_c.TOBrace _) as t) :: _ -> remove t
-    | x :: rest -> remove x; drop_up_to_brace rest in
-  let drop_final_brace toks =
-    match List.rev toks with
-      ((Parser_c.TCBrace _) as t) :: _ -> remove t
-    | _ -> failwith "unexpected end of function" in
-  drop_up_to_brace toks_e;
-  drop_final_brace toks_e
-
-(* ----------------------------------------------------------------------- *)
-(* remove coments from tokens *)
+let error x s =
+  failwith
+    (Printf.sprintf "unparse_hrule: line: %d, %s" (Ast.get_line x) s)
 
-let strip_comments toks =
- let toks = List.filter (function x -> not (TH.is_just_comment x)) toks in
-  List.iter
-    (function t ->
-      (TH.info_of_tok t).Ast_c.comments_tag :=
-       {Ast_c.mbefore = []; Ast_c.mafter = [];})
-    toks;
- toks
+let names = ref ([] : (string * int ref) list)
 
 (* ----------------------------------------------------------------------- *)
 (* Create rule to check for header include *)
@@ -55,58 +28,291 @@ let print_header_rule pr srcfile =
        | x::xs -> loop xs in
       loop l
 
+(* ----------------------------------------------------------------------- *)
+(* Print check that we are not in the defining function *)
+
+let print_check_rule pr function_name header_req =
+  (if header_req
+  then pr "@same depends on header@\n"
+  else pr "@same@\n");
+  pr "position p;\n";
+  pr "@@\n\n";
+  pr function_name; pr "@p(...) { ... }\n\n"
+
+(* ----------------------------------------------------------------------- *)
+(* get paramaters of the matched function *)
+
+let rec env_lookup fn = function
+    [] -> failwith "no binding"
+  | (nm,vl)::rest when fn nm -> vl
+  | _::rest -> env_lookup fn rest
+
+let get_paramst env =
+  let argname = ref ("","") in
+  let fn ((_,nm) as name) =
+    if nm = "ARGS"
+    then (argname := name; true)
+    else false in
+  match env_lookup fn env with
+    Ast_c.MetaParamListVal(paramst) -> (paramst,!argname)
+  | _ -> failwith "not possible"
+
+let get_function_name rule env =
+  let donothing r k e = k e in
+  let option_default = [] in
+  let bind = Common.union_set in
+  let do_any_list_list r any_list_list =
+    List.fold_left
+      (List.fold_left
+        (function prev -> function cur ->
+          bind (r.V.combiner_anything cur) prev))
+      [] any_list_list in
+  let mcode r mc =
+    match Ast.get_mcodekind mc with
+      Ast.MINUS(_,any_list_list) -> do_any_list_list r any_list_list
+    | Ast.CONTEXT(_,any_befaft) ->
+       (match any_befaft with
+         Ast.BEFORE(any_list_list) | Ast.AFTER(any_list_list) ->
+           do_any_list_list r any_list_list
+       | Ast.BEFOREAFTER(ba,aa) ->
+           bind (do_any_list_list r ba) (do_any_list_list r aa)
+       | Ast.NOTHING -> [])
+    | Ast.PLUS -> [] in
+  let expression r k e =
+    bind (k e)
+    (match Ast.unwrap e with
+      Ast.FunCall(fn,lp,args,rp) ->
+       (match Ast.undots args with
+         [e] ->
+           (match Ast.unwrap e with
+             Ast.MetaExprList(nm,_,_,_) ->
+               (match Ast.unwrap_mcode nm with
+                 (_,"ARGS") when Ast.get_mcodekind nm = Ast.PLUS ->
+                   (match Ast.unwrap fn with
+                     Ast.Ident(id) ->
+                       (match Ast.unwrap id with
+                         Ast.MetaId(nm,_,_,_)
+                       | Ast.MetaFunc(nm,_,_,_)
+                       | Ast.MetaLocalFunc(nm,_,_,_) ->
+                           [Ast.unwrap_mcode nm]
+                       | _ -> [])
+                   | _ -> [])
+               | _ -> [])
+           | _ -> [])
+       | _ -> [])
+    | _ -> []) in
+  let names =
+    (V.combiner bind option_default
+      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
+      donothing donothing donothing donothing
+      donothing expression donothing donothing donothing donothing donothing
+      donothing donothing donothing donothing donothing).V.combiner_top_level
+      rule in
+  match names with
+    [name] ->
+      (match env_lookup (function nm -> nm = name) env with
+       Ast_c.MetaIdVal(s) | Ast_c.MetaFuncVal(s)
+      | Ast_c.MetaLocalFuncVal(s) -> s
+      |        _ -> error rule "not possible")
+  | _ -> error rule "inconsistent rule generation"
+
 (* ----------------------------------------------------------------------- *)
 (* Print metavariable declarations *)
 
-let rec print_typedef typedefs pr = function
+let rec print_typedef pr typedefs = function
     (Ast_c.TypeName(s,_),_) ->
       if not (List.mem s !typedefs)
       then (typedefs := s::!typedefs; pr "typedef "; pr s; pr ";\n")
-  | (Ast_c.Pointer(_,ty),_) -> print_typedef typedefs pr ty
+  | (Ast_c.Pointer(_,ty),_) -> print_typedef pr typedefs ty
   | _ -> ()
 
+let rewrap_str s ii =
+  {ii with Ast_c.pinfo =
+    (match ii.Ast_c.pinfo with
+      Ast_c.OriginTok pi ->
+       Ast_c.OriginTok { pi with Common.str = s;}
+    | Ast_c.ExpandedTok (pi,vpi) ->
+       Ast_c.ExpandedTok ({ pi with Common.str = s;},vpi)
+    | Ast_c.FakeTok (_,vpi) -> Ast_c.FakeTok (s,vpi)
+    | Ast_c.AbstractLineTok pi ->
+       Ast_c.AbstractLineTok { pi with Common.str = s;})}
+
 let print_metavar pr typedefs = function
     ((_,Some param,(_,(Ast_c.Pointer(_,(Ast_c.BaseType(Ast_c.Void),_)),_))),_)
     ->
-      pr "expression "; pr param
+      pr "expression _"; pr param
   | (((_,Some param,(_,ty)),il) : Ast_c.parameterType) ->
-      print_typedef typedefs pr ty;
+      let il =
+       match List.rev il with
+         name::rest -> (rewrap_str ("_"^param) name) :: rest
+       | _ -> failwith "no name" in
+      print_typedef pr typedefs ty;
       Pretty_print_c.pp_param_gen
        (function x ->
          let str = Ast_c.str_of_info x in
          if not (List.mem str ["const";"volatile"])
-         then (pr str; pr " "))
+         then pr str)
        (function _ -> pr " ")
        ((false,Some param,
          (({Ast_c.const = false; Ast_c.volatile = false},[]),ty)),
         il)
   | _ -> failwith "function must have named parameters"
 
-let print_metavariables pr defn header_req =
-  let {Ast_c.f_name = s; f_type = (_, (paramst, (b, iib))); } = defn in
+let make_exp = function
+    (((_,Some name,ty),param_ii),comma_ii) ->
+      let no_info = (None,Ast_c.NotTest) in
+      let nm = "_"^name in
+      let exp =
+       ((Ast_c.Ident nm,ref no_info),
+        [rewrap_str nm (List.hd(List.rev param_ii))]) in
+      (name,(Common.Left exp,comma_ii))
+  | _ -> failwith "bad parameter"
+
+let print_extra_typedefs pr typedefs env =
+  let bigf =
+    { Visitor_c.default_visitor_c with
+      Visitor_c.ktype = (fun (k, bigf) ty -> 
+       match ty with
+         (_,((Ast_c.TypeName(_,_),_) as ty)) -> print_typedef pr typedefs ty
+       | _ -> k ty) } in
+  List.iter
+    (function (_,vl) ->
+      match vl with
+       Ast_c.MetaIdVal(_) | Ast_c.MetaFuncVal(_)
+      | Ast_c.MetaLocalFuncVal(_) -> ()
+      | Ast_c.MetaExprVal(exp) -> Visitor_c.vk_expr bigf exp
+      | Ast_c.MetaExprListVal(args) -> Visitor_c.vk_argument_list bigf args
+      | Ast_c.MetaParamVal(param) -> Visitor_c.vk_param bigf param
+      | Ast_c.MetaParamListVal(params) -> Visitor_c.vk_param_list bigf params
+
+      | Ast_c.MetaTypeVal(ty) -> Visitor_c.vk_type bigf ty
+      | Ast_c.MetaStmtVal(stm) -> Visitor_c.vk_statement bigf stm
+      | Ast_c.MetaPosVal _ | Ast_c.MetaPosValList _
+      | Ast_c.MetaListlenVal _ -> ())
+    env
+
+let rename argids env =
+  let argenv = List.map (function arg -> (arg,"_"^arg)) argids in
+  let lookup x = try List.assoc x argenv with Not_found -> x in
+  let bigf =
+    { Visitor_c.default_visitor_c_s with
+    Visitor_c.kexpr_s = (fun (k,bigf) e -> 
+      match e with
+       ((Ast_c.Ident s, info), [ii]) ->
+         let new_name = lookup s in
+         ((Ast_c.Ident new_name, info), [rewrap_str new_name ii])
+      | _ -> k e) } in
+  List.map
+    (function (x,vl) ->
+      (x,
+       match vl with
+        Ast_c.MetaIdVal(_) | Ast_c.MetaFuncVal(_)
+       | Ast_c.MetaLocalFuncVal(_) -> vl
+       | Ast_c.MetaExprVal(exp) ->
+          Ast_c.MetaExprVal(Visitor_c.vk_expr_s bigf exp)
+       | Ast_c.MetaExprListVal(args) ->
+          Ast_c.MetaExprListVal(Visitor_c.vk_arguments_s bigf args)
+       | Ast_c.MetaParamVal(param) ->
+          Ast_c.MetaParamVal(Visitor_c.vk_param_s bigf param)
+       | Ast_c.MetaParamListVal(params) ->
+          Ast_c.MetaParamListVal(Visitor_c.vk_params_s bigf params)
+
+       | Ast_c.MetaTypeVal(ty) ->
+          Ast_c.MetaTypeVal(Visitor_c.vk_type_s bigf ty)
+       | Ast_c.MetaStmtVal(stm) ->
+          Ast_c.MetaStmtVal(Visitor_c.vk_statement_s bigf stm)
+       | Ast_c.MetaPosVal _ | Ast_c.MetaPosValList _
+       | Ast_c.MetaListlenVal _ -> vl))
+    env
+
+let print_types pr = function
+    None -> ()
+  | Some [ty] -> pr (Type_cocci.type2c ty)
+  | Some types ->
+      pr "{";
+      Common.print_between (function _ -> pr ", ")
+       (function ty -> pr (Type_cocci.type2c ty)) types;
+      pr "}"
+
+let pp_meta_decl pr decl =
+  let no_arity = function Ast.NONE -> () | _ -> failwith "no arity allowed" in
+  let pp_name (_,n) = pr n in
+  match decl with
+    Ast.MetaIdDecl(ar, name) ->
+      no_arity ar; pr "identifier "; pp_name name; pr ";\n"
+  | Ast.MetaFreshIdDecl(ar, name) ->
+      no_arity ar; pr "fresh identifier "; pp_name name; pr ";\n"
+  | Ast.MetaTypeDecl(ar, name) ->
+      no_arity ar; pr "type "; pp_name name; pr ";\n"
+  | Ast.MetaListlenDecl(name) -> ()
+  | Ast.MetaParamDecl(ar, name) ->
+      no_arity ar; pr "parameter "; pp_name name; pr ";\n"
+  | Ast.MetaParamListDecl(ar, name, None) ->
+      no_arity ar; pr "parameter list "; pp_name name; pr ";\n"
+  | Ast.MetaParamListDecl(ar, name, Some len) ->
+      no_arity ar; pr "parameter list "; pp_name name;
+      pr "["; pp_name len; pr "]"; pr ";\n"
+  | Ast.MetaConstDecl(ar, name, types) ->
+      no_arity ar; pr "constant "; print_types pr types;
+      pp_name name; pr ";\n"
+  | Ast.MetaErrDecl(ar, name) ->
+      no_arity ar; pr "error "; pp_name name; pr ";\n"
+  | Ast.MetaExpDecl(ar, name, None) ->
+      no_arity ar; pr "expression "; pp_name name; pr ";\n"
+  | Ast.MetaExpDecl(ar, name, types) ->
+      no_arity ar; print_types pr types; pp_name name; pr ";\n"
+  | Ast.MetaIdExpDecl(ar, name, types) ->
+      no_arity ar; pr "idexpression ";
+      print_types pr types; pp_name name; pr ";\n"
+  | Ast.MetaLocalIdExpDecl(ar, name, types) ->
+      no_arity ar; pr "local idexpression ";
+      print_types pr types; pp_name name; pr ";\n"
+  | Ast.MetaExpListDecl(ar, name, None) ->
+      no_arity ar; pr "parameter list "; pp_name name; pr ";\n"
+  | Ast.MetaExpListDecl(ar, name, Some len) ->
+      no_arity ar; pr "parameter list ";
+      pp_name name; pr "["; pp_name len; pr "]"; pr ";\n"
+  | Ast.MetaStmDecl(ar, name) ->
+      no_arity ar; pr "statement "; pp_name name; pr ";\n"
+  | Ast.MetaStmListDecl(ar, name) ->
+      no_arity ar; pr "statement list "; pp_name name; pr ";\n"
+  | Ast.MetaFuncDecl(ar, name) ->
+      no_arity ar; pr "function "; pp_name name; pr ";\n"
+  | Ast.MetaLocalFuncDecl(ar, name) ->
+      no_arity ar; pr "local function "; pp_name name; pr ";\n"
+  | Ast.MetaPosDecl(ar, name) ->
+      no_arity ar; pr "position "; pp_name name; pr ";\n"
+  | Ast.MetaDeclarerDecl(ar, name) ->
+      no_arity ar; pr "declarer "; pp_name name; pr ";\n"
+  | Ast.MetaIteratorDecl(ar, name) ->
+      no_arity ar; pr "iterator "; pp_name name; pr ";\n"
+
+let print_metavariables pr local_metas paramst env header_req =
   (if header_req
   then pr "@depends on header@\n"
   else pr "@@\n");
-  (if b then failwith "not handling variable argument functions");
+  pr "position _p!=same.p;\n";
+  pr "identifier _f;\n";
   let typedefs = ref ([] : string list) in
-  (match paramst with
-    [] | [(((_,_,(_,(Ast_c.BaseType(Ast_c.Void),_))),_),_)] -> ()
-  | (first,_)::rest ->
-      print_metavar pr typedefs first; pr ";\n";
-      List.iter (function (x,_) -> print_metavar pr typedefs x; pr ";\n")
-       rest);
-  pr "@@\n\n"
+  let rec loop = function
+      [] | [(((_,_,(_,(Ast_c.BaseType(Ast_c.Void),_))),_),_)] -> []
+    | ((first,_) as f)::rest ->
+       print_metavar pr typedefs first; pr ";\n";
+       (make_exp f) :: loop rest in
+  let args = loop paramst in
+  print_extra_typedefs pr typedefs env;
+  List.iter (pp_meta_decl pr) local_metas;
+  pr "@@\n\n";
+  args
 
 (* ----------------------------------------------------------------------- *)
-(* copy a file, adding - at the beginning of every line *)
+(* print_start/end *)
+
+let print_start pr =
+  pr "_f@_p(...) { <+...\n"
 
-let minus_file pr file =
-  Common.with_open_infile file (function chan ->
-    let rec loop _ =
-      let l = input_line chan in
-      pr "- "; pr l; pr "\n";
-      loop() in
-    try loop() with End_of_file -> ())
+let print_end pr =
+  pr "\n...+> }\n"
 
 (* ----------------------------------------------------------------------- *)
 (* Print call to the defined function *)
@@ -129,30 +335,53 @@ let pp_def_gen pr defn isexp =
 (* ----------------------------------------------------------------------- *)
 (* Entry point *)
 
-let pp_program (e,(str, toks_e)) outdir srcfile isexp =
-  match e with
-    Ast_c.Definition(({Ast_c.f_name = name;} as defn),_) ->
-      (* generate the - code *)
-      drop_header_toks toks_e;
-      let toks_e = strip_comments toks_e in
-      let tmp_file = Common.new_temp_file "cocci_small_output" ".c" in
-      Unparse_c.pp_program [((e,(str, toks_e)), Unparse_c.PPnormal)]
-       tmp_file;
-      let outfile = outdir ^ "/" ^ name in
-      let outfile =
-       try
-         let cell = List.assoc outfile !names in
-         let ct = !cell in
-         cell := ct + 1;
-         outfile ^ (string_of_int ct)
-       with Not_found ->
-         let cell = ref 1 in names := (outfile,cell) :: !names; outfile in
-      let outfile = outfile ^ ".cocci" in
-      Common.with_open_outfile outfile (fun (pr,chan) ->
-       let header_req = print_header_rule pr srcfile in
-       print_metavariables pr defn header_req;
-       minus_file pr tmp_file;
-       pr "+ ";
-       pp_def_gen pr defn isexp;
-       pr "\n")
-  | _ -> Common.pr2_once "warning: function expected"; ()
+let pp_rule local_metas ast env srcfile =
+  let (paramst,args_name) = get_paramst env in
+  (* get rule information *)
+  let (rule,printable) =
+    match ast with
+      Ast.CocciRule(_,_,[body],_,_) -> (* could extend to use attributes *)
+       (body,
+        match Ast.unwrap body with
+          Ast.DECL(s) -> [[Ast.StatementTag s]]
+        | Ast.CODE(ss) -> [[Ast.StmtDotsTag ss]]
+        | _ -> error body "bad rule body")
+    | _ -> failwith "bad rule" in
+  (* create the output file *)
+  let outdir =
+    match !Flag.make_hrule with
+      Some outdir -> outdir
+    | None -> error rule "not possible" in
+  let function_name = get_function_name rule env in
+  let outfile = outdir ^ "/" ^ function_name in
+  let outfile =
+    try
+      let cell = List.assoc outfile !names in
+      let ct = !cell in
+      cell := ct + 1;
+      outfile ^ (string_of_int ct)
+    with Not_found ->
+      let cell = ref 1 in names := (outfile,cell) :: !names; outfile in
+  let outfile = outfile ^ ".cocci" in
+  Common.with_open_outfile outfile (fun (pr,chan) ->
+    let header_req = print_header_rule pr srcfile in
+    print_check_rule pr function_name header_req;
+    let args = print_metavariables pr local_metas paramst env header_req in
+    let (argids,args) = List.split args in
+    let env = rename argids env in
+    let env = (args_name,Ast_c.MetaExprListVal args)::env in
+    print_start pr;
+    (* for printing C tokens *)
+    let pr_c info =
+      match Ast_c.pinfo_of_info info with
+       Ast_c.AbstractLineTok _ -> pr (Ast_c.str_of_info info)
+      | Ast_c.FakeTok (s,_) -> pr s
+      |        _ ->
+         Printf.printf "line: %s\n" (Common.dump info);
+         error rule "not an abstract line" in
+    Unparse_cocci.pp_list_list_any
+      (env, pr, pr_c, (function _ -> pr " "),
+       (function _ -> ()), (function _ -> ()))
+      true printable Unparse_cocci.InPlace;
+    print_end pr;
+    pr "\n")
index 8c49cfd..6bebde2 100644 (file)
@@ -1,7 +1,7 @@
 open Common
 
 (* program -> output filename (often "/tmp/output.c") -> unit *) 
-val pp_program : 
-  Parse_c.toplevel2 -> filename -> filename ->
-    bool (* true if res is an exp *) -> unit
+val pp_rule : 
+    Ast_cocci.metavar list (* local metavars only *) ->
+      Ast_cocci.rule -> Ast_c.metavars_binding -> filename -> unit
 
index 2811ebe..152985e 100644 (file)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006, 2007, 2008 Yoann Padioleau
+(* Copyright (C) 2006, 2007, 2008 Ecole des Mines de Nantes
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License (GPL)
@@ -854,7 +854,7 @@ let rec vk_expr_s = fun bigf expr ->
                     vk_argument_s bigf e, iif ii
                   ))
             
-      | CondExpr (e1, e2, e3)    -> CondExpr (exprf e1, fmap exprf e2, exprf e3)
+      | CondExpr (e1, e2, e3)   -> CondExpr (exprf e1, fmap exprf e2, exprf e3)
       | Sequence (e1, e2)        -> Sequence (exprf e1, exprf e2)
       | Assignment (e1, op, e2)  -> Assignment (exprf e1, op, exprf e2)
           
@@ -1019,6 +1019,8 @@ and vk_type_s = fun bigf t ->
   and k t = 
     let (q, t) = t in
     let (unwrap_q, iiq) = q in
+    (* strip_info_visitor needs iiq to be processed before iit *)
+    let iif_iiq = iif iiq in
     let q' = unwrap_q in     (* todo? a visitor for qualifier *)
     let (unwrap_t, iit) = t in
     let t' = 
@@ -1055,8 +1057,8 @@ and vk_type_s = fun bigf t ->
       | TypeOfExpr e -> TypeOfExpr (vk_expr_s bigf e)
       | TypeOfType t -> TypeOfType (typef t)
     in
-    (q', iif iiq), 
-  (t', iif iit)
+    (q', iif_iiq), 
+    (t', iif iit)
 
 
   in typef t
@@ -1430,7 +1432,7 @@ and vk_node_s = fun bigf node ->
 and vk_param_s = fun bigf ((b, s, t), ii_b_s) -> 
   let iif ii = vk_ii_s bigf ii in
   ((b, s, vk_type_s bigf t), iif ii_b_s)
-        
+
 let vk_args_splitted_s = fun bigf args_splitted -> 
   let iif ii = vk_ii_s bigf ii in
   args_splitted +> List.map (function  
index 361a096..1a31f84 100644 (file)
@@ -31,9 +31,10 @@ val vk_toplevel : visitor_c -> toplevel -> unit
 val vk_program  : visitor_c -> program -> unit
 
 val vk_argument : visitor_c -> argument -> unit
-
+val vk_argument_list : visitor_c -> argument wrap2 list -> unit
 val vk_args_splitted : visitor_c -> (argument, il) Common.either list -> unit
 val vk_param : visitor_c -> parameterType -> unit
+val vk_param_list : visitor_c -> parameterType wrap2 list -> unit
 val vk_params_splitted : 
   visitor_c -> (parameterType, il) Common.either list -> unit
 
diff --git a/parsing_cocci/.#arity.ml.1.81 b/parsing_cocci/.#arity.ml.1.81
deleted file mode 100644 (file)
index 2248a97..0000000
+++ /dev/null
@@ -1,1054 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Arities matter for the minus slice, but not for the plus slice. *)
-
-(* ? only allowed on rule_elems, and on subterms if the context is ? also. *)
-
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-
-(* --------------------------------------------------------------------- *)
-
-let warning s = Printf.printf "warning: %s\n" s
-
-let fail w str =
-  failwith
-    (Printf.sprintf "cocci line %d: %s" ((Ast0.get_info w).Ast0.line_start)
-       str)
-
-let make_opt_unique optfn uniquefn info tgt arity term =
-  let term = Ast0.rewrap info term in
-  if tgt = arity
-  then term
-  else (* tgt must be NONE *)
-    match arity with
-      Ast0.OPT -> Ast0.copywrap info (optfn term)
-    | Ast0.UNIQUE -> Ast0.copywrap info (uniquefn term)
-    | Ast0.NONE -> failwith "tgt must be NONE"
-
-let all_same opt_allowed tgt line arities =
-  let tgt =
-    match tgt with
-      Ast0.NONE ->
-       (match List.hd arities with
-         Ast0.OPT when not opt_allowed ->
-           failwith "opt only allowed for the elements of a statement list"
-       | x -> x)
-    | _ -> tgt in
-  if not(List.for_all (function x -> x = tgt) arities)
-  then warning (Printf.sprintf "incompatible arity found on line %d" line);
-  tgt
-
-let get_option fn = function
-    None -> None
-  | Some x -> Some (fn x)
-
-let anyopt l fn = List.exists (function w -> fn(Ast0.unwrap w)) l
-
-let allopt l fn =
-  let rec loop = function
-      [] -> []
-    | x::xs ->
-       match fn (Ast0.unwrap x) with
-         Some x -> x :: (loop xs)
-       | None -> [] in
-  let res = loop l in
-  if List.length res = List.length l then Some res else None
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Mcode *)
-
-let mcode2line (_,_,info,_,_) = info.Ast0.line_start
-let mcode2arity (_,arity,_,_,_) = arity
-
-let mcode x = x (* nothing to do ... *)
-
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-let dots fn d =
-  Ast0.rewrap d
-    (match Ast0.unwrap d with
-      Ast0.DOTS(x) -> Ast0.DOTS(List.map fn x)
-    | Ast0.CIRCLES(x) -> Ast0.CIRCLES(List.map fn x)
-    | Ast0.STARS(x) -> Ast0.STARS(List.map fn x))
-
-let only_dots l =
-  not
-    (List.exists
-       (function x ->
-         match Ast0.unwrap x with
-          Ast0.Circles(_,_) | Ast0.Stars(_,_) -> true
-        | _ -> false)
-       l)
-
-let only_circles l =
-  not (List.exists
-       (function x ->
-         match Ast0.unwrap x with
-           Ast0.Dots(_,_) | Ast0.Stars(_,_) -> true
-         | _ -> false)
-        l)
-
-let only_stars l =
-  not (List.exists
-       (function x ->
-         match Ast0.unwrap x with
-           Ast0.Dots(_,_) | Ast0.Circles(_,_) -> true
-         | _ -> false)
-        l)
-
-let concat_dots fn d =
-  Ast0.rewrap d
-    (match Ast0.unwrap d with
-      Ast0.DOTS(x) ->
-       let l = List.map fn x in
-       if only_dots l
-       then Ast0.DOTS(l)
-       else fail d "inconsistent dots usage"
-    | Ast0.CIRCLES(x) ->
-       let l = List.map fn x in
-       if only_circles l
-       then Ast0.CIRCLES(l)
-       else fail d "inconsistent dots usage"
-    | Ast0.STARS(x) ->
-       let l = List.map fn x in
-       if only_stars l
-       then Ast0.STARS(l)
-       else fail d "inconsistent dots usage")
-
-let flat_concat_dots fn d =
-  match Ast0.unwrap d with
-    Ast0.DOTS(x) -> List.map fn x
-  | Ast0.CIRCLES(x) -> List.map fn x
-  | Ast0.STARS(x) -> List.map fn x
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-let make_id =
-  make_opt_unique
-    (function x -> Ast0.OptIdent x)
-    (function x -> Ast0.UniqueIdent x)
-
-let ident opt_allowed tgt i =
-  match Ast0.unwrap i with
-    Ast0.Id(name) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name)
-         [mcode2arity name] in
-      let name = mcode name in
-      make_id i tgt arity (Ast0.Id(name))
-  | Ast0.MetaId(name,constraints,pure) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name)
-         [mcode2arity name] in
-      let name = mcode name in
-      make_id i tgt arity (Ast0.MetaId(name,constraints,pure))
-  | Ast0.MetaFunc(name,constraints,pure) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name)
-         [mcode2arity name] in
-      let name = mcode name in
-      make_id i tgt arity (Ast0.MetaFunc(name,constraints,pure))
-  | Ast0.MetaLocalFunc(name,constraints,pure) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name)
-         [mcode2arity name] in
-      let name = mcode name in
-      make_id i tgt arity (Ast0.MetaLocalFunc(name,constraints,pure))
-  | Ast0.OptIdent(_) | Ast0.UniqueIdent(_) ->
-      failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let make_exp =
-  make_opt_unique
-    (function x -> Ast0.OptExp x)
-    (function x -> Ast0.UniqueExp x)
-
-let rec top_expression opt_allowed tgt expr =
-  let exp_same = all_same opt_allowed tgt in
-  match Ast0.unwrap expr with
-    Ast0.Ident(id) ->
-      let new_id = ident opt_allowed tgt id in
-      Ast0.rewrap expr
-       (match Ast0.unwrap new_id with
-         Ast0.OptIdent(id) ->
-           Ast0.OptExp(Ast0.rewrap expr (Ast0.Ident(id)))
-       | Ast0.UniqueIdent(id) ->
-           Ast0.UniqueExp(Ast0.rewrap expr (Ast0.Ident(id)))
-       | _ -> Ast0.Ident(new_id))
-  | Ast0.Constant(const) ->
-      let arity = exp_same (mcode2line const) [mcode2arity const] in
-      let const = mcode const in
-      make_exp expr tgt arity (Ast0.Constant(const))
-  | Ast0.FunCall(fn,lp,args,rp) ->
-      let arity = exp_same (mcode2line lp) [mcode2arity lp;mcode2arity rp] in
-      let fn = expression arity fn in
-      let lp = mcode lp in
-      let args = dots (expression arity) args in
-      let rp = mcode rp in
-      make_exp expr tgt arity (Ast0.FunCall(fn,lp,args,rp))
-  | Ast0.Assignment(left,op,right,simple) ->
-      let arity = exp_same (mcode2line op) [mcode2arity op] in
-      let left = expression arity left in
-      let op = mcode op in
-      let right = expression arity right in
-      make_exp expr tgt arity (Ast0.Assignment(left,op,right,simple))
-  | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-      let arity =
-       exp_same (mcode2line why) [mcode2arity why; mcode2arity colon] in
-      let exp1 = expression arity exp1 in
-      let why = mcode why in
-      let exp2 = get_option (expression arity) exp2 in
-      let colon = mcode colon in
-      let exp3 = expression arity exp3 in
-      make_exp expr tgt arity (Ast0.CondExpr(exp1,why,exp2,colon,exp3))
-  | Ast0.Postfix(exp,op) ->
-      let arity = exp_same (mcode2line op) [mcode2arity op] in
-      let exp = expression arity exp in
-      let op = mcode op in
-      make_exp expr tgt arity (Ast0.Postfix(exp,op))
-  | Ast0.Infix(exp,op) ->
-      let arity = exp_same (mcode2line op) [mcode2arity op] in
-      let exp = expression arity exp in
-      let op = mcode op in
-      make_exp expr tgt arity (Ast0.Infix(exp,op))
-  | Ast0.Unary(exp,op) ->
-      let arity = exp_same (mcode2line op) [mcode2arity op] in
-      let exp = expression arity exp in
-      let op = mcode op in
-      make_exp expr tgt arity (Ast0.Unary(exp,op))
-  | Ast0.Binary(left,op,right) ->
-      let arity = exp_same (mcode2line op) [mcode2arity op] in
-      let left = expression arity left in
-      let op = mcode op in
-      let right = expression arity right in
-      make_exp expr tgt arity (Ast0.Binary(left,op,right))
-  | Ast0.Nested(left,op,right) -> failwith "nested in arity not possible"
-  | Ast0.Paren(lp,exp,rp) ->
-      let arity = exp_same (mcode2line lp) [mcode2arity lp;mcode2arity rp] in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      make_exp expr tgt arity (Ast0.Paren(lp,exp,rp))
-  | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-      let arity = exp_same (mcode2line lb) [mcode2arity lb; mcode2arity rb] in
-      let exp1 = expression arity exp1 in
-      let lb = mcode lb in
-      let exp2 = expression arity exp2 in
-      let rb = mcode rb in
-      make_exp expr tgt arity (Ast0.ArrayAccess(exp1,lb,exp2,rb))
-  | Ast0.RecordAccess(exp,pt,field) ->
-      let arity = exp_same (mcode2line pt) [mcode2arity pt] in
-      let exp = expression arity exp in
-      let pt = mcode pt in
-      let field = ident false arity field in
-      make_exp expr tgt arity (Ast0.RecordAccess(exp,pt,field))
-  | Ast0.RecordPtAccess(exp,ar,field) ->
-      let arity = exp_same (mcode2line ar) [mcode2arity ar] in
-      let exp = expression arity exp in
-      let ar = mcode ar in
-      let field = ident false arity field in
-      make_exp expr tgt arity (Ast0.RecordPtAccess(exp,ar,field))
-  | Ast0.Cast(lp,ty,rp,exp) ->
-      let arity = exp_same (mcode2line lp) [mcode2arity lp;mcode2arity rp] in
-      let lp = mcode lp in
-      let ty = typeC arity ty in
-      let rp = mcode rp in
-      let exp = expression arity exp in
-      make_exp expr tgt arity (Ast0.Cast(lp,ty,rp,exp))
-  | Ast0.SizeOfExpr(szf,exp) ->
-      let arity = exp_same (mcode2line szf) [mcode2arity szf] in
-      let szf = mcode szf in
-      let exp = expression arity exp in
-      make_exp expr tgt arity (Ast0.SizeOfExpr(szf,exp))
-  | Ast0.SizeOfType(szf,lp,ty,rp) ->
-      let arity =
-       exp_same (mcode2line szf) (List.map mcode2arity [szf;lp;rp]) in
-      let szf = mcode szf in
-      let lp = mcode lp in
-      let ty = typeC arity ty in
-      let rp = mcode rp in
-      make_exp expr tgt arity (Ast0.SizeOfType(szf,lp,ty,rp))
-  | Ast0.TypeExp(ty) -> Ast0.rewrap expr (Ast0.TypeExp(typeC tgt ty))
-  | Ast0.MetaErr(name,constraints,pure)  ->
-      let arity = exp_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_exp expr tgt arity (Ast0.MetaErr(name,constraints,pure))
-  | Ast0.MetaExpr(name,constraints,ty,form,pure)  ->
-      let arity = exp_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_exp expr tgt arity (Ast0.MetaExpr(name,constraints,ty,form,pure))
-  | Ast0.MetaExprList(name,lenname,pure) ->
-      let arity = exp_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_exp expr tgt arity (Ast0.MetaExprList(name,lenname,pure))
-  | Ast0.EComma(cm)         ->
-      let arity = exp_same (mcode2line cm) [mcode2arity cm] in
-      let cm = mcode cm in
-      make_exp expr tgt arity (Ast0.EComma(cm))
-  | Ast0.DisjExpr(starter,exps,mids,ender) ->
-      let exps = List.map (top_expression opt_allowed tgt) exps in
-      (match List.rev exps with
-       _::xs ->
-         if anyopt xs (function Ast0.OptExp(_) -> true | _ -> false)
-         then fail expr "opt only allowed in the last disjunct"
-      |        _ -> ());
-      Ast0.rewrap expr (Ast0.DisjExpr(starter,exps,mids,ender))
-  | Ast0.NestExpr(starter,exp_dots,ender,whencode,multi) ->
-      let res =
-       Ast0.NestExpr(starter,
-                     dots (top_expression true Ast0.NONE) exp_dots,
-                     ender,whencode,multi) in
-      Ast0.rewrap expr res
-  | Ast0.Edots(dots,whencode) ->
-      let arity = exp_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whencode = get_option (expression Ast0.NONE) whencode in
-      make_exp expr tgt arity (Ast0.Edots(dots,whencode))
-  | Ast0.Ecircles(dots,whencode) ->
-      let arity = exp_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whencode = get_option (expression Ast0.NONE) whencode in
-      make_exp expr tgt arity (Ast0.Ecircles(dots,whencode))
-  | Ast0.Estars(dots,whencode) ->
-      let arity = exp_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whencode = get_option (expression Ast0.NONE) whencode in
-      make_exp expr tgt arity (Ast0.Estars(dots,whencode))
-  | Ast0.OptExp(_) | Ast0.UniqueExp(_) ->
-      failwith "unexpected code"
-
-and expression tgt exp = top_expression false tgt exp
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and make_typeC =
-  make_opt_unique
-    (function x -> Ast0.OptType x)
-    (function x -> Ast0.UniqueType x)
-
-and top_typeC tgt opt_allowed typ =
-  match Ast0.unwrap typ with
-    Ast0.ConstVol(cv,ty) ->
-      let arity = all_same opt_allowed tgt (mcode2line cv)
-         [mcode2arity cv] in
-      let cv = mcode cv in
-      let ty = typeC arity ty in
-      make_typeC typ tgt arity (Ast0.ConstVol(cv,ty))
-  | Ast0.BaseType(ty,Some sign) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line ty)
-         [mcode2arity ty; mcode2arity sign] in
-      let ty = mcode ty in
-      let sign = mcode sign in
-      make_typeC typ tgt arity (Ast0.BaseType(ty,Some sign))
-  | Ast0.BaseType(ty,None) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line ty) [mcode2arity ty] in
-      let ty = mcode ty in
-      make_typeC typ tgt arity (Ast0.BaseType(ty,None))
-  | Ast0.ImplicitInt(sign) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line sign) [mcode2arity sign] in
-      let sign = mcode sign in
-      make_typeC typ tgt arity (Ast0.ImplicitInt(sign))
-  | Ast0.Pointer(ty,star) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line star) [mcode2arity star] in
-      let ty = typeC arity ty in
-      let star = mcode star in
-      make_typeC typ tgt arity (Ast0.Pointer(ty,star))
-  | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line lp1)
-         (List.map mcode2arity [lp1;star;rp1;lp2;rp2]) in
-      let ty = typeC arity ty in
-      let params = parameter_list tgt params in
-      make_typeC typ tgt arity
-       (Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2))
-  | Ast0.FunctionType(ty,lp1,params,rp1) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line lp1)
-         (List.map mcode2arity [lp1;rp1]) in
-      let ty = get_option (typeC arity) ty in
-      let params = parameter_list tgt params in
-      make_typeC typ tgt arity (Ast0.FunctionType(ty,lp1,params,rp1))
-  | Ast0.Array(ty,lb,size,rb) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line lb)
-         [mcode2arity lb;mcode2arity rb] in
-      let ty = typeC arity ty in
-      let lb = mcode lb in
-      let size = get_option (expression arity) size in
-      let rb = mcode rb in
-      make_typeC typ tgt arity (Ast0.Array(ty,lb,size,rb))
-  | Ast0.StructUnionName(kind,name) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line kind)
-         [mcode2arity kind] in
-      let kind = mcode kind in
-      let name = get_option (ident false arity) name in
-      make_typeC typ tgt arity (Ast0.StructUnionName(kind,name))
-  | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line lb)
-         (List.map mcode2arity [lb;rb]) in
-      let ty = typeC arity ty in
-      let lb = mcode lb in
-      let decls = dots (declaration tgt) decls in
-      let rb = mcode rb in
-      make_typeC typ tgt arity (Ast0.StructUnionDef(ty,lb,decls,rb))
-  | Ast0.TypeName(name) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_typeC typ tgt arity (Ast0.TypeName(name))
-  | Ast0.MetaType(name,pure) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_typeC typ tgt arity (Ast0.MetaType(name,pure))
-  | Ast0.DisjType(starter,types,mids,ender) ->
-      let types = List.map (typeC tgt) types in
-      (match List.rev types with
-       _::xs ->
-         if anyopt xs (function Ast0.OptType(_) -> true | _ -> false)
-         then fail typ "opt only allowed in the last disjunct"
-      |        _ -> ());
-      let res = Ast0.DisjType(starter,types,mids,ender) in
-      Ast0.rewrap typ res
-  | Ast0.OptType(_) | Ast0.UniqueType(_) ->
-      failwith "unexpected code"
-
-and typeC tgt ty = top_typeC tgt false ty
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and make_decl =
-  make_opt_unique
-    (function x -> Ast0.OptDecl x)
-    (function x -> Ast0.UniqueDecl x)
-
-and declaration tgt decl =
-  match Ast0.unwrap decl with
-    Ast0.Init(stg,ty,id,eq,exp,sem) ->
-      let arity =
-       all_same true tgt (mcode2line eq)
-         ((match stg with None -> [] | Some x -> [mcode2arity x]) @
-          (List.map mcode2arity [eq;sem])) in
-      let stg = get_option mcode stg in
-      let ty = typeC arity ty in
-      let id = ident false arity id in
-      let eq = mcode eq in
-      let exp = initialiser arity exp in
-      let sem = mcode sem in
-      make_decl decl tgt arity (Ast0.Init(stg,ty,id,eq,exp,sem))
-  | Ast0.UnInit(stg,ty,id,sem) ->
-      let arity =
-       all_same true tgt (mcode2line sem)
-         ((match stg with None -> [] | Some x -> [mcode2arity x]) @
-          [mcode2arity sem]) in
-      let stg = get_option mcode stg in
-      let ty = typeC arity ty in
-      let id = ident false arity id in
-      let sem = mcode sem in
-      make_decl decl tgt arity (Ast0.UnInit(stg,ty,id,sem))
-  | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-      let arity =
-       all_same true tgt (mcode2line lp) (List.map mcode2arity [lp;rp;sem]) in
-      let name = ident false arity name in
-      let lp = mcode lp in
-      let args = dots (expression arity) args in
-      let rp = mcode rp in
-      let sem = mcode sem in
-      make_decl decl tgt arity (Ast0.MacroDecl(name,lp,args,rp,sem))
-  | Ast0.TyDecl(ty,sem) ->
-      let arity =
-       all_same true tgt (mcode2line sem) [mcode2arity sem] in
-      let ty = typeC arity ty in
-      let sem = mcode sem in
-      make_decl decl tgt arity (Ast0.TyDecl(ty,sem))
-  | Ast0.Typedef(stg,ty,id,sem) ->
-      let arity =
-       all_same true tgt (mcode2line sem)
-         [mcode2arity stg;mcode2arity sem] in
-      let stg = mcode stg in
-      let ty = typeC arity ty in
-      let id = typeC arity id in
-      let sem = mcode sem in
-      make_decl decl tgt arity (Ast0.Typedef(stg,ty,id,sem))
-  | Ast0.DisjDecl(starter,decls,mids,ender) ->
-      let decls = List.map (declaration tgt) decls in
-      (match List.rev decls with
-       _::xs ->
-         if anyopt xs (function Ast0.OptDecl(_) -> true | _ -> false)
-         then fail decl "opt only allowed in the last disjunct"
-      |        _ -> ());
-      let res = Ast0.DisjDecl(starter,decls,mids,ender) in
-      Ast0.rewrap decl res
-  | Ast0.Ddots(dots,whencode) ->
-      let arity = all_same true tgt (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whencode = get_option (declaration Ast0.NONE) whencode in
-      make_decl decl tgt arity (Ast0.Ddots(dots,whencode))
-  | Ast0.OptDecl(_) | Ast0.UniqueDecl(_) ->
-      failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Initializer *)
-
-and make_init =
-  make_opt_unique
-    (function x -> Ast0.OptIni x)
-    (function x -> Ast0.UniqueIni x)
-
-and initialiser tgt i =
-  let init_same = all_same true tgt in
-  match Ast0.unwrap i with
-    Ast0.InitExpr(exp) ->
-      Ast0.rewrap i (Ast0.InitExpr(expression tgt exp))
-  | Ast0.InitList(lb,initlist,rb) ->
-      let arity = init_same (mcode2line lb) [mcode2arity lb; mcode2arity rb] in
-      let lb = mcode lb in
-      let initlist = dots (initialiser arity) initlist in
-      let rb = mcode rb in
-      make_init i tgt arity (Ast0.InitList(lb,initlist,rb))
-  | Ast0.InitGccDotName(dot,name,eq,ini) ->
-      let arity =
-       init_same (mcode2line dot) [mcode2arity dot; mcode2arity eq] in
-      let dot = mcode dot in
-      let name = ident true arity name in
-      let eq = mcode eq in
-      let ini = initialiser arity ini in
-      make_init i tgt arity (Ast0.InitGccDotName(dot,name,eq,ini))
-  | Ast0.InitGccName(name,eq,ini) ->
-      let arity = init_same (mcode2line eq) [mcode2arity eq] in
-      let name = ident true arity name in
-      let eq = mcode eq in
-      let ini = initialiser arity ini in
-      make_init i tgt arity (Ast0.InitGccName(name,eq,ini))
-  | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-      let arity =
-       init_same (mcode2line lb)
-         [mcode2arity lb; mcode2arity rb; mcode2arity eq] in
-      let lb = mcode lb in
-      let exp = expression arity exp in
-      let rb = mcode rb in
-      let eq = mcode eq in
-      let ini = initialiser arity ini in
-      make_init i tgt arity (Ast0.InitGccIndex(lb,exp,rb,eq,ini))
-  | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-      let arity =
-       init_same (mcode2line lb)
-         [mcode2arity lb; mcode2arity dots; mcode2arity rb; mcode2arity eq] in
-      let lb = mcode lb in
-      let exp1 = expression arity exp1 in
-      let dots = mcode dots in
-      let exp2 = expression arity exp2 in
-      let rb = mcode rb in
-      let eq = mcode eq in
-      let ini = initialiser arity ini in
-      make_init i tgt arity
-       (Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini))
-  | Ast0.IComma(cm) ->
-      let arity = init_same (mcode2line cm) [mcode2arity cm] in
-      let cm = mcode cm in
-      make_init i tgt arity (Ast0.IComma(cm))
-  | Ast0.Idots(dots,whencode) ->
-      let arity = init_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whencode = get_option (initialiser Ast0.NONE) whencode in
-      make_init i tgt arity (Ast0.Idots(dots,whencode))
-  | Ast0.OptIni(_) | Ast0.UniqueIni(_) ->
-      failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and make_param =
-  make_opt_unique
-    (function x -> Ast0.OptParam x)
-    (function x -> Ast0.UniqueParam x)
-
-and parameterTypeDef tgt param =
-  let param_same = all_same true tgt in
-  match Ast0.unwrap param with
-    Ast0.VoidParam(ty) -> Ast0.rewrap param (Ast0.VoidParam(typeC tgt ty))
-  | Ast0.Param(ty,Some id) ->
-      let ty = top_typeC tgt true ty in
-      let id = ident true tgt id in
-      Ast0.rewrap param 
-       (match (Ast0.unwrap ty,Ast0.unwrap id) with
-         (Ast0.OptType(ty),Ast0.OptIdent(id)) ->
-           Ast0.OptParam(Ast0.rewrap param (Ast0.Param(ty,Some id)))
-       | (Ast0.UniqueType(ty),Ast0.UniqueIdent(id)) ->
-           Ast0.UniqueParam(Ast0.rewrap param (Ast0.Param(ty,Some id)))
-       | (Ast0.OptType(ty),_) ->
-           fail param "arity mismatch in param declaration"
-       | (_,Ast0.OptIdent(id)) ->
-           fail param "arity mismatch in param declaration"
-       | _ -> Ast0.Param(ty,Some id))
-  | Ast0.Param(ty,None) ->
-      let ty = top_typeC tgt true ty in
-      Ast0.rewrap param 
-       (match Ast0.unwrap ty with
-         Ast0.OptType(ty) ->
-           Ast0.OptParam(Ast0.rewrap param (Ast0.Param(ty,None)))
-       | Ast0.UniqueType(ty) ->
-           Ast0.UniqueParam(Ast0.rewrap param (Ast0.Param(ty,None)))
-       | _ -> Ast0.Param(ty,None))
-  | Ast0.MetaParam(name,pure) ->
-      let arity = param_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_param param tgt arity (Ast0.MetaParam(name,pure))
-  | Ast0.MetaParamList(name,lenname,pure) ->
-      let arity = param_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_param param tgt arity (Ast0.MetaParamList(name,lenname,pure))
-  | Ast0.PComma(cm) ->
-      let arity = param_same (mcode2line cm) [mcode2arity cm] in
-      let cm = mcode cm in
-      make_param param tgt arity (Ast0.PComma(cm))
-  | Ast0.Pdots(dots) ->
-      let arity = param_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      make_param param tgt arity (Ast0.Pdots(dots))
-  | Ast0.Pcircles(dots) ->
-      let arity = param_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      make_param param tgt arity (Ast0.Pcircles(dots))
-  | Ast0.OptParam(_) | Ast0.UniqueParam(_) ->
-      failwith "unexpected code"
-
-and parameter_list tgt = dots (parameterTypeDef tgt)
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and make_rule_elem x =
-  make_opt_unique
-    (function x -> Ast0.OptStm x)
-    (function x -> Ast0.UniqueStm x)
-    x
-
-and statement tgt stm =
-  let stm_same = all_same true tgt in
-  match Ast0.unwrap stm with
-    Ast0.Decl(bef,decl) ->
-      let new_decl = declaration tgt decl in
-      Ast0.rewrap stm 
-       (match Ast0.unwrap new_decl with
-         Ast0.OptDecl(decl) ->
-           Ast0.OptStm(Ast0.rewrap stm (Ast0.Decl(bef,decl)))
-       | Ast0.UniqueDecl(decl) ->
-           Ast0.UniqueStm(Ast0.rewrap stm (Ast0.Decl(bef,decl)))
-       | _ -> Ast0.Decl(bef,new_decl))
-  | Ast0.Seq(lbrace,body,rbrace) -> 
-      let arity =
-       stm_same (mcode2line lbrace)
-         [mcode2arity lbrace; mcode2arity rbrace] in
-      let lbrace = mcode lbrace in
-      let body = dots (statement arity) body in
-      let rbrace = mcode rbrace in
-      make_rule_elem stm tgt arity (Ast0.Seq(lbrace,body,rbrace))
-  | Ast0.ExprStatement(exp,sem) ->
-      let arity = stm_same (mcode2line sem) [mcode2arity sem] in
-      let exp = expression arity exp in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.ExprStatement(exp,sem))
-  | Ast0.IfThen(iff,lp,exp,rp,branch,aft) ->
-      let arity =
-       stm_same (mcode2line iff) (List.map mcode2arity [iff;lp;rp]) in
-      let iff = mcode iff in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      let branch = statement arity branch in
-      make_rule_elem stm tgt arity (Ast0.IfThen(iff,lp,exp,rp,branch,aft))
-  | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,aft) ->
-      let arity =
-       stm_same (mcode2line iff) (List.map mcode2arity [iff;lp;rp;els]) in
-      let iff = mcode iff in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      let branch1 = statement arity branch1 in
-      let els = mcode els in
-      let branch2 = statement arity branch2 in
-      make_rule_elem stm tgt arity
-       (Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,aft))
-  | Ast0.While(wh,lp,exp,rp,body,aft) ->
-      let arity =
-       stm_same (mcode2line wh)
-         (List.map mcode2arity [wh;lp;rp]) in
-      let wh = mcode wh in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      let body = statement arity body in
-      make_rule_elem stm tgt arity (Ast0.While(wh,lp,exp,rp,body,aft))
-  | Ast0.Do(d,body,wh,lp,exp,rp,sem) ->
-      let arity =
-       stm_same (mcode2line wh) (List.map mcode2arity [d;wh;lp;rp;sem]) in
-      let d = mcode d in
-      let body = statement arity body in
-      let wh = mcode wh in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.Do(d,body,wh,lp,exp,rp,sem))
-  | Ast0.For(fr,lp,exp1,sem1,exp2,sem2,exp3,rp,body,aft) ->
-      let arity =
-       stm_same (mcode2line fr) (List.map mcode2arity [fr;lp;sem1;sem2;rp]) in
-      let fr = mcode fr in
-      let lp = mcode lp in
-      let exp1 = get_option (expression arity) exp1 in
-      let sem1 = mcode sem1 in
-      let exp2 = get_option (expression arity) exp2 in
-      let sem2= mcode sem2 in
-      let exp3 = get_option (expression arity) exp3 in
-      let rp = mcode rp in
-      let body = statement arity body in
-      make_rule_elem stm tgt arity
-       (Ast0.For(fr,lp,exp1,sem1,exp2,sem2,exp3,rp,body,aft))
-  | Ast0.Iterator(nm,lp,args,rp,body,aft) ->
-      let arity = stm_same (mcode2line lp) (List.map mcode2arity [lp;rp]) in
-      let nm = ident false arity nm in
-      let lp = mcode lp in
-      let args = dots (expression arity) args in
-      let rp = mcode rp in
-      let body = statement arity body in
-      make_rule_elem stm tgt arity (Ast0.Iterator(nm,lp,args,rp,body,aft))
-  | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-      let arity =
-       stm_same (mcode2line switch)
-         (List.map mcode2arity [switch;lp;rp;lb;rb]) in
-      let switch = mcode switch in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      let lb = mcode lb in
-      let cases = dots (case_line arity) cases in
-      let rb = mcode rb in
-      make_rule_elem stm tgt arity
-       (Ast0.Switch(switch,lp,exp,rp,lb,cases,rb))
-  | Ast0.Break(br,sem) ->
-      let arity = stm_same (mcode2line br) (List.map mcode2arity [br;sem]) in
-      let br = mcode br in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.Break(br,sem))
-  | Ast0.Continue(cont,sem) ->
-      let arity =
-       stm_same (mcode2line cont) (List.map mcode2arity [cont;sem]) in
-      let cont = mcode cont in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.Continue(cont,sem))
-  | Ast0.Label(l,dd) ->
-      let arity = mcode2arity dd in
-      let l = ident false tgt l in
-      let dd = mcode dd in
-      make_rule_elem stm tgt arity (Ast0.Label(l,dd))
-  | Ast0.Goto(goto,l,sem) ->
-      let arity =
-       stm_same (mcode2line goto) (List.map mcode2arity [goto;sem]) in
-      let goto = mcode goto in
-      let l = ident false tgt l in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.Goto(goto,l,sem))
-  | Ast0.Return(ret,sem) ->
-      let arity = stm_same (mcode2line ret) (List.map mcode2arity [ret;sem]) in
-      let ret = mcode ret in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.Return(ret,sem))
-  | Ast0.ReturnExpr(ret,exp,sem) ->
-      let arity = stm_same (mcode2line ret) (List.map mcode2arity [ret;sem]) in
-      let ret = mcode ret in
-      let exp = expression arity exp in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.ReturnExpr(ret,exp,sem))
-  | Ast0.MetaStmt(name,pure) ->
-      let arity = stm_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_rule_elem stm tgt arity (Ast0.MetaStmt(name,pure))
-  | Ast0.MetaStmtList(name,pure) ->
-      let arity = stm_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_rule_elem stm tgt arity (Ast0.MetaStmtList(name,pure))
-  | Ast0.Exp(exp) ->
-      let new_exp = top_expression true tgt exp in
-      Ast0.rewrap stm 
-       (match Ast0.unwrap new_exp with
-         Ast0.OptExp(exp) ->
-           Ast0.OptStm(Ast0.rewrap stm (Ast0.Exp(exp)))
-       | Ast0.UniqueExp(exp) ->
-           Ast0.UniqueStm(Ast0.rewrap stm (Ast0.Exp(exp)))
-       | _ -> Ast0.Exp(new_exp))
-  | Ast0.TopExp(exp) ->
-      let new_exp = top_expression true tgt exp in
-      Ast0.rewrap stm 
-       (match Ast0.unwrap new_exp with
-         Ast0.OptExp(exp) ->
-           Ast0.OptStm(Ast0.rewrap stm (Ast0.TopExp(exp)))
-       | Ast0.UniqueExp(exp) ->
-           Ast0.UniqueStm(Ast0.rewrap stm (Ast0.TopExp(exp)))
-       | _ -> Ast0.TopExp(new_exp))
-  | Ast0.Ty(ty) ->
-      let new_ty = typeC tgt ty in (* opt makes no sense alone at top level *)
-      Ast0.rewrap stm 
-       (match Ast0.unwrap new_ty with
-         Ast0.OptType(ty) ->
-           Ast0.OptStm(Ast0.rewrap stm (Ast0.Ty(ty)))
-       | Ast0.UniqueType(ty) ->
-           Ast0.UniqueStm(Ast0.rewrap stm (Ast0.Ty(ty)))
-       | _ -> Ast0.Ty(new_ty))
-  | Ast0.Disj(starter,rule_elem_dots_list,mids,ender) ->
-      let stms =
-       List.map (function x -> concat_dots (statement tgt) x)
-         rule_elem_dots_list in
-      let (found_opt,unopt) =
-       List.fold_left
-         (function (found_opt,lines) ->
-           function x ->
-             let rebuild l =
-               (* previously just checked the last thing in the list,
-                  but everything should be optional for the whole thing to
-                  be optional *)
-               let is_opt x =
-                 match Ast0.unwrap x with
-                   Ast0.OptStm(x) -> true
-                 | _ -> false in
-               let unopt x =
-                 match Ast0.unwrap x with
-                   Ast0.OptStm(x) -> x
-                 | _ -> x in
-               if List.for_all is_opt l
-               then (true,List.map unopt l)
-               else (false, l) in
-             let (l,k) =
-               match Ast0.unwrap x with
-                 Ast0.DOTS(l) ->
-                   (l,function l -> Ast0.rewrap x (Ast0.DOTS l))
-               | Ast0.CIRCLES(l) ->
-                   (l,function l -> Ast0.rewrap x (Ast0.CIRCLES l))
-               | Ast0.STARS(l) ->
-                   (l,function l -> Ast0.rewrap x (Ast0.STARS l)) in
-             let (found_opt,l) = rebuild l in
-             (found_opt,(k l)::lines))
-         (false,[]) stms in
-      let unopt = List.rev unopt in
-      if found_opt
-      then
-       make_rule_elem stm tgt Ast0.OPT (Ast0.Disj(starter,unopt,mids,ender))
-      else Ast0.rewrap stm (Ast0.Disj(starter,stms,mids,ender))
-  | Ast0.Nest(starter,rule_elem_dots,ender,whn,multi) ->
-      let new_rule_elem_dots =
-       concat_dots (statement Ast0.NONE) rule_elem_dots in
-      let whn =
-       List.map
-         (whencode (concat_dots (statement Ast0.NONE)) (statement Ast0.NONE))
-         whn in
-      Ast0.rewrap stm
-       (Ast0.Nest(starter,new_rule_elem_dots,ender,whn,multi))
-  | Ast0.Dots(dots,whn)    ->
-      let arity = stm_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whn =
-       List.map
-         (whencode (concat_dots (statement Ast0.NONE)) (statement Ast0.NONE))
-         whn in
-      make_rule_elem stm tgt arity (Ast0.Dots(dots,whn))
-  | Ast0.Circles(dots,whn) ->
-      let arity = stm_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whn =
-       List.map
-         (whencode (concat_dots (statement Ast0.NONE)) (statement Ast0.NONE))
-         whn in
-      make_rule_elem stm tgt arity (Ast0.Circles(dots,whn))
-  | Ast0.Stars(dots,whn)   ->
-      let arity = stm_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whn =
-       List.map
-         (whencode (concat_dots (statement Ast0.NONE)) (statement Ast0.NONE))
-         whn in
-      make_rule_elem stm tgt arity (Ast0.Stars(dots,whn))
-  | Ast0.FunDecl(bef,fi,name,lp,params,rp,lbrace,body,rbrace) ->
-      let arity =
-       all_same true tgt (mcode2line lp)
-         ((List.map mcode2arity [lp;rp;lbrace;rbrace]) @ (fninfo2arity fi)) in
-      let fi = List.map (fninfo arity) fi in
-      let name = ident false arity name in
-      let lp = mcode lp in
-      let params = parameter_list arity params in
-      let rp = mcode rp in
-      let lbrace = mcode lbrace in
-      let body = dots (statement arity) body in
-      let rbrace = mcode rbrace in
-      make_rule_elem stm tgt arity
-       (Ast0.FunDecl(bef,fi,name,lp,params,rp,lbrace,body,rbrace))
-  | Ast0.Include(inc,s) -> 
-      let arity =
-       all_same true tgt (mcode2line inc) [mcode2arity inc; mcode2arity s] in
-      let inc = mcode inc in
-      let s = mcode s in
-      make_rule_elem stm tgt arity (Ast0.Include(inc,s))
-  | Ast0.Define(def,id,params,body) ->
-      let arity = all_same true tgt (mcode2line def) [mcode2arity def] in
-      let def = mcode def in
-      let id = ident false arity id in
-      let params = define_parameters arity params in
-      let body = dots (statement arity) body in
-      make_rule_elem stm tgt arity (Ast0.Define(def,id,params,body))
-  | Ast0.OptStm(_) | Ast0.UniqueStm(_) ->
-      failwith "unexpected code"
-
-and define_parameters tgt params =
-  match Ast0.unwrap params with
-    Ast0.NoParams -> params
-  | Ast0.DParams(lp,params,rp) ->
-      let arity =
-       all_same true tgt (mcode2line lp) [mcode2arity lp;mcode2arity rp] in
-      let lp = mcode lp in
-      let params = dots (define_param arity) params in
-      let rp = mcode rp in
-      Ast0.rewrap params (Ast0.DParams(lp,params,rp))
-
-and make_define_param x =
-  make_opt_unique
-    (function x -> Ast0.OptDParam x)
-    (function x -> Ast0.UniqueDParam x)
-    x
-
-and define_param tgt param =
-  match Ast0.unwrap param with
-    Ast0.DParam(id) ->
-      let new_id = ident true tgt id in
-      Ast0.rewrap param
-       (match Ast0.unwrap new_id with
-         Ast0.OptIdent(id) ->
-           Ast0.OptDParam(Ast0.rewrap param (Ast0.DParam(id)))
-       | Ast0.UniqueIdent(decl) ->
-           Ast0.UniqueDParam(Ast0.rewrap param (Ast0.DParam(id)))
-       | _ -> Ast0.DParam(new_id))
-  | Ast0.DPComma(cm) ->
-      let arity =
-       all_same true tgt (mcode2line cm) [mcode2arity cm] in
-      let cm = mcode cm in
-      make_define_param param tgt arity (Ast0.DPComma(cm))
-  | Ast0.DPdots(dots) ->
-      let arity =
-       all_same true tgt (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      make_define_param param tgt arity (Ast0.DPdots(dots))
-  | Ast0.DPcircles(circles) ->
-      let arity =
-       all_same true tgt (mcode2line circles) [mcode2arity circles] in
-      let circles = mcode circles in
-      make_define_param param tgt arity (Ast0.DPcircles(circles))
-  | Ast0.OptDParam(dp) | Ast0.UniqueDParam(dp) ->
-      failwith "unexpected code"
-
-and fninfo arity = function
-    Ast0.FStorage(stg) -> Ast0.FStorage(mcode stg)
-  | Ast0.FType(ty) -> Ast0.FType(typeC arity ty)
-  | Ast0.FInline(inline) -> Ast0.FInline(mcode inline)
-  | Ast0.FAttr(attr) -> Ast0.FAttr(mcode attr)
-
-and fninfo2arity fninfo =
-  List.concat
-    (List.map
-       (function
-          Ast0.FStorage(stg) -> [mcode2arity stg]
-        | Ast0.FType(ty) -> []
-        | Ast0.FInline(inline) -> [mcode2arity inline]
-        | Ast0.FAttr(attr) -> [mcode2arity attr])
-       fninfo)
-
-and whencode notfn alwaysfn = function
-    Ast0.WhenNot a -> Ast0.WhenNot (notfn a)
-  | Ast0.WhenAlways a -> Ast0.WhenAlways (alwaysfn a)
-  | Ast0.WhenModifier(x) -> Ast0.WhenModifier(x)
-
-and make_case_line =
-  make_opt_unique
-    (function x -> Ast0.OptCase x)
-    (function x -> failwith "unique not allowed for case_line")
-
-and case_line tgt c =
-  match Ast0.unwrap c with
-    Ast0.Default(def,colon,code) ->
-      let arity =
-       all_same true tgt (mcode2line def)
-         [mcode2arity def; mcode2arity colon] in
-      let def = mcode def in
-      let colon = mcode colon in
-      let code = dots (statement arity) code in
-      make_case_line c tgt arity (Ast0.Default(def,colon,code))
-  | Ast0.Case(case,exp,colon,code) ->
-      let arity =
-       all_same true tgt (mcode2line case)
-         [mcode2arity case; mcode2arity colon] in
-      let case = mcode case in
-      let exp = expression arity exp in
-      let colon = mcode colon in
-      let code = dots (statement arity) code in
-      make_case_line c tgt arity (Ast0.Case(case,exp,colon,code))
-  | Ast0.OptCase(_) -> failwith "unexpected OptCase"
-
-(* --------------------------------------------------------------------- *)
-(* Function declaration *)
-(* Haven't thought much about arity here... *)
-
-let top_level tgt t =
-  Ast0.rewrap t
-    (match Ast0.unwrap t with
-      Ast0.FILEINFO(old_file,new_file) -> 
-       if mcode2arity old_file = Ast0.NONE && mcode2arity new_file = Ast0.NONE
-       then Ast0.FILEINFO(mcode old_file,mcode new_file)
-       else fail t "unexpected arity for file info"
-    | Ast0.DECL(stmt) ->
-       Ast0.DECL(statement tgt stmt)
-    | Ast0.CODE(rule_elem_dots) ->
-       Ast0.CODE(concat_dots (statement tgt) rule_elem_dots)
-    | Ast0.ERRORWORDS(exps) ->
-       Ast0.ERRORWORDS(List.map (top_expression false Ast0.NONE) exps)
-    | Ast0.OTHER(_) -> fail t "eliminated by top_level")
-
-let rule tgt = List.map (top_level tgt)
-
-(* --------------------------------------------------------------------- *)
-(* Entry points *)
-
-let minus_arity code =
-  rule Ast0.NONE code
diff --git a/parsing_cocci/.#arity.ml.1.82 b/parsing_cocci/.#arity.ml.1.82
deleted file mode 100644 (file)
index cb31690..0000000
+++ /dev/null
@@ -1,1060 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Arities matter for the minus slice, but not for the plus slice. *)
-
-(* ? only allowed on rule_elems, and on subterms if the context is ? also. *)
-
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-
-(* --------------------------------------------------------------------- *)
-
-let warning s = Printf.printf "warning: %s\n" s
-
-let fail w str =
-  failwith
-    (Printf.sprintf "cocci line %d: %s" ((Ast0.get_info w).Ast0.line_start)
-       str)
-
-let make_opt_unique optfn uniquefn info tgt arity term =
-  let term = Ast0.rewrap info term in
-  if tgt = arity
-  then term
-  else (* tgt must be NONE *)
-    match arity with
-      Ast0.OPT -> Ast0.copywrap info (optfn term)
-    | Ast0.UNIQUE -> Ast0.copywrap info (uniquefn term)
-    | Ast0.NONE -> failwith "tgt must be NONE"
-
-let all_same opt_allowed tgt line arities =
-  let tgt =
-    match tgt with
-      Ast0.NONE ->
-       (match List.hd arities with
-         Ast0.OPT when not opt_allowed ->
-           failwith "opt only allowed for the elements of a statement list"
-       | x -> x)
-    | _ -> tgt in
-  if not(List.for_all (function x -> x = tgt) arities)
-  then warning (Printf.sprintf "incompatible arity found on line %d" line);
-  tgt
-
-let get_option fn = function
-    None -> None
-  | Some x -> Some (fn x)
-
-let anyopt l fn = List.exists (function w -> fn(Ast0.unwrap w)) l
-
-let allopt l fn =
-  let rec loop = function
-      [] -> []
-    | x::xs ->
-       match fn (Ast0.unwrap x) with
-         Some x -> x :: (loop xs)
-       | None -> [] in
-  let res = loop l in
-  if List.length res = List.length l then Some res else None
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Mcode *)
-
-let mcode2line (_,_,info,_,_) = info.Ast0.line_start
-let mcode2arity (_,arity,_,_,_) = arity
-
-let mcode x = x (* nothing to do ... *)
-
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-let dots fn d =
-  Ast0.rewrap d
-    (match Ast0.unwrap d with
-      Ast0.DOTS(x) -> Ast0.DOTS(List.map fn x)
-    | Ast0.CIRCLES(x) -> Ast0.CIRCLES(List.map fn x)
-    | Ast0.STARS(x) -> Ast0.STARS(List.map fn x))
-
-let only_dots l =
-  not
-    (List.exists
-       (function x ->
-         match Ast0.unwrap x with
-          Ast0.Circles(_,_) | Ast0.Stars(_,_) -> true
-        | _ -> false)
-       l)
-
-let only_circles l =
-  not (List.exists
-       (function x ->
-         match Ast0.unwrap x with
-           Ast0.Dots(_,_) | Ast0.Stars(_,_) -> true
-         | _ -> false)
-        l)
-
-let only_stars l =
-  not (List.exists
-       (function x ->
-         match Ast0.unwrap x with
-           Ast0.Dots(_,_) | Ast0.Circles(_,_) -> true
-         | _ -> false)
-        l)
-
-let concat_dots fn d =
-  Ast0.rewrap d
-    (match Ast0.unwrap d with
-      Ast0.DOTS(x) ->
-       let l = List.map fn x in
-       if only_dots l
-       then Ast0.DOTS(l)
-       else fail d "inconsistent dots usage"
-    | Ast0.CIRCLES(x) ->
-       let l = List.map fn x in
-       if only_circles l
-       then Ast0.CIRCLES(l)
-       else fail d "inconsistent dots usage"
-    | Ast0.STARS(x) ->
-       let l = List.map fn x in
-       if only_stars l
-       then Ast0.STARS(l)
-       else fail d "inconsistent dots usage")
-
-let flat_concat_dots fn d =
-  match Ast0.unwrap d with
-    Ast0.DOTS(x) -> List.map fn x
-  | Ast0.CIRCLES(x) -> List.map fn x
-  | Ast0.STARS(x) -> List.map fn x
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-let make_id =
-  make_opt_unique
-    (function x -> Ast0.OptIdent x)
-    (function x -> Ast0.UniqueIdent x)
-
-let ident opt_allowed tgt i =
-  match Ast0.unwrap i with
-    Ast0.Id(name) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name)
-         [mcode2arity name] in
-      let name = mcode name in
-      make_id i tgt arity (Ast0.Id(name))
-  | Ast0.MetaId(name,constraints,pure) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name)
-         [mcode2arity name] in
-      let name = mcode name in
-      make_id i tgt arity (Ast0.MetaId(name,constraints,pure))
-  | Ast0.MetaFunc(name,constraints,pure) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name)
-         [mcode2arity name] in
-      let name = mcode name in
-      make_id i tgt arity (Ast0.MetaFunc(name,constraints,pure))
-  | Ast0.MetaLocalFunc(name,constraints,pure) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name)
-         [mcode2arity name] in
-      let name = mcode name in
-      make_id i tgt arity (Ast0.MetaLocalFunc(name,constraints,pure))
-  | Ast0.OptIdent(_) | Ast0.UniqueIdent(_) ->
-      failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let make_exp =
-  make_opt_unique
-    (function x -> Ast0.OptExp x)
-    (function x -> Ast0.UniqueExp x)
-
-let rec top_expression opt_allowed tgt expr =
-  let exp_same = all_same opt_allowed tgt in
-  match Ast0.unwrap expr with
-    Ast0.Ident(id) ->
-      let new_id = ident opt_allowed tgt id in
-      Ast0.rewrap expr
-       (match Ast0.unwrap new_id with
-         Ast0.OptIdent(id) ->
-           Ast0.OptExp(Ast0.rewrap expr (Ast0.Ident(id)))
-       | Ast0.UniqueIdent(id) ->
-           Ast0.UniqueExp(Ast0.rewrap expr (Ast0.Ident(id)))
-       | _ -> Ast0.Ident(new_id))
-  | Ast0.Constant(const) ->
-      let arity = exp_same (mcode2line const) [mcode2arity const] in
-      let const = mcode const in
-      make_exp expr tgt arity (Ast0.Constant(const))
-  | Ast0.FunCall(fn,lp,args,rp) ->
-      let arity = exp_same (mcode2line lp) [mcode2arity lp;mcode2arity rp] in
-      let fn = expression arity fn in
-      let lp = mcode lp in
-      let args = dots (expression arity) args in
-      let rp = mcode rp in
-      make_exp expr tgt arity (Ast0.FunCall(fn,lp,args,rp))
-  | Ast0.Assignment(left,op,right,simple) ->
-      let arity = exp_same (mcode2line op) [mcode2arity op] in
-      let left = expression arity left in
-      let op = mcode op in
-      let right = expression arity right in
-      make_exp expr tgt arity (Ast0.Assignment(left,op,right,simple))
-  | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-      let arity =
-       exp_same (mcode2line why) [mcode2arity why; mcode2arity colon] in
-      let exp1 = expression arity exp1 in
-      let why = mcode why in
-      let exp2 = get_option (expression arity) exp2 in
-      let colon = mcode colon in
-      let exp3 = expression arity exp3 in
-      make_exp expr tgt arity (Ast0.CondExpr(exp1,why,exp2,colon,exp3))
-  | Ast0.Postfix(exp,op) ->
-      let arity = exp_same (mcode2line op) [mcode2arity op] in
-      let exp = expression arity exp in
-      let op = mcode op in
-      make_exp expr tgt arity (Ast0.Postfix(exp,op))
-  | Ast0.Infix(exp,op) ->
-      let arity = exp_same (mcode2line op) [mcode2arity op] in
-      let exp = expression arity exp in
-      let op = mcode op in
-      make_exp expr tgt arity (Ast0.Infix(exp,op))
-  | Ast0.Unary(exp,op) ->
-      let arity = exp_same (mcode2line op) [mcode2arity op] in
-      let exp = expression arity exp in
-      let op = mcode op in
-      make_exp expr tgt arity (Ast0.Unary(exp,op))
-  | Ast0.Binary(left,op,right) ->
-      let arity = exp_same (mcode2line op) [mcode2arity op] in
-      let left = expression arity left in
-      let op = mcode op in
-      let right = expression arity right in
-      make_exp expr tgt arity (Ast0.Binary(left,op,right))
-  | Ast0.Nested(left,op,right) -> failwith "nested in arity not possible"
-  | Ast0.Paren(lp,exp,rp) ->
-      let arity = exp_same (mcode2line lp) [mcode2arity lp;mcode2arity rp] in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      make_exp expr tgt arity (Ast0.Paren(lp,exp,rp))
-  | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-      let arity = exp_same (mcode2line lb) [mcode2arity lb; mcode2arity rb] in
-      let exp1 = expression arity exp1 in
-      let lb = mcode lb in
-      let exp2 = expression arity exp2 in
-      let rb = mcode rb in
-      make_exp expr tgt arity (Ast0.ArrayAccess(exp1,lb,exp2,rb))
-  | Ast0.RecordAccess(exp,pt,field) ->
-      let arity = exp_same (mcode2line pt) [mcode2arity pt] in
-      let exp = expression arity exp in
-      let pt = mcode pt in
-      let field = ident false arity field in
-      make_exp expr tgt arity (Ast0.RecordAccess(exp,pt,field))
-  | Ast0.RecordPtAccess(exp,ar,field) ->
-      let arity = exp_same (mcode2line ar) [mcode2arity ar] in
-      let exp = expression arity exp in
-      let ar = mcode ar in
-      let field = ident false arity field in
-      make_exp expr tgt arity (Ast0.RecordPtAccess(exp,ar,field))
-  | Ast0.Cast(lp,ty,rp,exp) ->
-      let arity = exp_same (mcode2line lp) [mcode2arity lp;mcode2arity rp] in
-      let lp = mcode lp in
-      let ty = typeC arity ty in
-      let rp = mcode rp in
-      let exp = expression arity exp in
-      make_exp expr tgt arity (Ast0.Cast(lp,ty,rp,exp))
-  | Ast0.SizeOfExpr(szf,exp) ->
-      let arity = exp_same (mcode2line szf) [mcode2arity szf] in
-      let szf = mcode szf in
-      let exp = expression arity exp in
-      make_exp expr tgt arity (Ast0.SizeOfExpr(szf,exp))
-  | Ast0.SizeOfType(szf,lp,ty,rp) ->
-      let arity =
-       exp_same (mcode2line szf) (List.map mcode2arity [szf;lp;rp]) in
-      let szf = mcode szf in
-      let lp = mcode lp in
-      let ty = typeC arity ty in
-      let rp = mcode rp in
-      make_exp expr tgt arity (Ast0.SizeOfType(szf,lp,ty,rp))
-  | Ast0.TypeExp(ty) -> Ast0.rewrap expr (Ast0.TypeExp(typeC tgt ty))
-  | Ast0.MetaErr(name,constraints,pure)  ->
-      let arity = exp_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_exp expr tgt arity (Ast0.MetaErr(name,constraints,pure))
-  | Ast0.MetaExpr(name,constraints,ty,form,pure)  ->
-      let arity = exp_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_exp expr tgt arity (Ast0.MetaExpr(name,constraints,ty,form,pure))
-  | Ast0.MetaExprList(name,lenname,pure) ->
-      let arity = exp_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_exp expr tgt arity (Ast0.MetaExprList(name,lenname,pure))
-  | Ast0.EComma(cm)         ->
-      let arity = exp_same (mcode2line cm) [mcode2arity cm] in
-      let cm = mcode cm in
-      make_exp expr tgt arity (Ast0.EComma(cm))
-  | Ast0.DisjExpr(starter,exps,mids,ender) ->
-      let exps = List.map (top_expression opt_allowed tgt) exps in
-      (match List.rev exps with
-       _::xs ->
-         if anyopt xs (function Ast0.OptExp(_) -> true | _ -> false)
-         then fail expr "opt only allowed in the last disjunct"
-      |        _ -> ());
-      Ast0.rewrap expr (Ast0.DisjExpr(starter,exps,mids,ender))
-  | Ast0.NestExpr(starter,exp_dots,ender,whencode,multi) ->
-      let res =
-       Ast0.NestExpr(starter,
-                     dots (top_expression true Ast0.NONE) exp_dots,
-                     ender,whencode,multi) in
-      Ast0.rewrap expr res
-  | Ast0.Edots(dots,whencode) ->
-      let arity = exp_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whencode = get_option (expression Ast0.NONE) whencode in
-      make_exp expr tgt arity (Ast0.Edots(dots,whencode))
-  | Ast0.Ecircles(dots,whencode) ->
-      let arity = exp_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whencode = get_option (expression Ast0.NONE) whencode in
-      make_exp expr tgt arity (Ast0.Ecircles(dots,whencode))
-  | Ast0.Estars(dots,whencode) ->
-      let arity = exp_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whencode = get_option (expression Ast0.NONE) whencode in
-      make_exp expr tgt arity (Ast0.Estars(dots,whencode))
-  | Ast0.OptExp(_) | Ast0.UniqueExp(_) ->
-      failwith "unexpected code"
-
-and expression tgt exp = top_expression false tgt exp
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and make_typeC =
-  make_opt_unique
-    (function x -> Ast0.OptType x)
-    (function x -> Ast0.UniqueType x)
-
-and top_typeC tgt opt_allowed typ =
-  match Ast0.unwrap typ with
-    Ast0.ConstVol(cv,ty) ->
-      let arity = all_same opt_allowed tgt (mcode2line cv)
-         [mcode2arity cv] in
-      let cv = mcode cv in
-      let ty = typeC arity ty in
-      make_typeC typ tgt arity (Ast0.ConstVol(cv,ty))
-  | Ast0.BaseType(ty,Some sign) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line ty)
-         [mcode2arity ty; mcode2arity sign] in
-      let ty = mcode ty in
-      let sign = mcode sign in
-      make_typeC typ tgt arity (Ast0.BaseType(ty,Some sign))
-  | Ast0.BaseType(ty,None) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line ty) [mcode2arity ty] in
-      let ty = mcode ty in
-      make_typeC typ tgt arity (Ast0.BaseType(ty,None))
-  | Ast0.ImplicitInt(sign) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line sign) [mcode2arity sign] in
-      let sign = mcode sign in
-      make_typeC typ tgt arity (Ast0.ImplicitInt(sign))
-  | Ast0.Pointer(ty,star) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line star) [mcode2arity star] in
-      let ty = typeC arity ty in
-      let star = mcode star in
-      make_typeC typ tgt arity (Ast0.Pointer(ty,star))
-  | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line lp1)
-         (List.map mcode2arity [lp1;star;rp1;lp2;rp2]) in
-      let ty = typeC arity ty in
-      let params = parameter_list tgt params in
-      make_typeC typ tgt arity
-       (Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2))
-  | Ast0.FunctionType(ty,lp1,params,rp1) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line lp1)
-         (List.map mcode2arity [lp1;rp1]) in
-      let ty = get_option (typeC arity) ty in
-      let params = parameter_list tgt params in
-      make_typeC typ tgt arity (Ast0.FunctionType(ty,lp1,params,rp1))
-  | Ast0.Array(ty,lb,size,rb) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line lb)
-         [mcode2arity lb;mcode2arity rb] in
-      let ty = typeC arity ty in
-      let lb = mcode lb in
-      let size = get_option (expression arity) size in
-      let rb = mcode rb in
-      make_typeC typ tgt arity (Ast0.Array(ty,lb,size,rb))
-  | Ast0.StructUnionName(kind,name) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line kind)
-         [mcode2arity kind] in
-      let kind = mcode kind in
-      let name = get_option (ident false arity) name in
-      make_typeC typ tgt arity (Ast0.StructUnionName(kind,name))
-  | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line lb)
-         (List.map mcode2arity [lb;rb]) in
-      let ty = typeC arity ty in
-      let lb = mcode lb in
-      let decls = dots (declaration tgt) decls in
-      let rb = mcode rb in
-      make_typeC typ tgt arity (Ast0.StructUnionDef(ty,lb,decls,rb))
-  | Ast0.TypeName(name) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_typeC typ tgt arity (Ast0.TypeName(name))
-  | Ast0.MetaType(name,pure) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_typeC typ tgt arity (Ast0.MetaType(name,pure))
-  | Ast0.DisjType(starter,types,mids,ender) ->
-      let types = List.map (typeC tgt) types in
-      (match List.rev types with
-       _::xs ->
-         if anyopt xs (function Ast0.OptType(_) -> true | _ -> false)
-         then fail typ "opt only allowed in the last disjunct"
-      |        _ -> ());
-      let res = Ast0.DisjType(starter,types,mids,ender) in
-      Ast0.rewrap typ res
-  | Ast0.OptType(_) | Ast0.UniqueType(_) ->
-      failwith "unexpected code"
-
-and typeC tgt ty = top_typeC tgt false ty
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and make_decl =
-  make_opt_unique
-    (function x -> Ast0.OptDecl x)
-    (function x -> Ast0.UniqueDecl x)
-
-and declaration tgt decl =
-  match Ast0.unwrap decl with
-    Ast0.Init(stg,ty,id,eq,exp,sem) ->
-      let arity =
-       all_same true tgt (mcode2line eq)
-         ((match stg with None -> [] | Some x -> [mcode2arity x]) @
-          (List.map mcode2arity [eq;sem])) in
-      let stg = get_option mcode stg in
-      let ty = typeC arity ty in
-      let id = ident false arity id in
-      let eq = mcode eq in
-      let exp = initialiser arity exp in
-      let sem = mcode sem in
-      make_decl decl tgt arity (Ast0.Init(stg,ty,id,eq,exp,sem))
-  | Ast0.UnInit(stg,ty,id,sem) ->
-      let arity =
-       all_same true tgt (mcode2line sem)
-         ((match stg with None -> [] | Some x -> [mcode2arity x]) @
-          [mcode2arity sem]) in
-      let stg = get_option mcode stg in
-      let ty = typeC arity ty in
-      let id = ident false arity id in
-      let sem = mcode sem in
-      make_decl decl tgt arity (Ast0.UnInit(stg,ty,id,sem))
-  | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-      let arity =
-       all_same true tgt (mcode2line lp) (List.map mcode2arity [lp;rp;sem]) in
-      let name = ident false arity name in
-      let lp = mcode lp in
-      let args = dots (expression arity) args in
-      let rp = mcode rp in
-      let sem = mcode sem in
-      make_decl decl tgt arity (Ast0.MacroDecl(name,lp,args,rp,sem))
-  | Ast0.TyDecl(ty,sem) ->
-      let arity =
-       all_same true tgt (mcode2line sem) [mcode2arity sem] in
-      let ty = typeC arity ty in
-      let sem = mcode sem in
-      make_decl decl tgt arity (Ast0.TyDecl(ty,sem))
-  | Ast0.Typedef(stg,ty,id,sem) ->
-      let arity =
-       all_same true tgt (mcode2line sem)
-         [mcode2arity stg;mcode2arity sem] in
-      let stg = mcode stg in
-      let ty = typeC arity ty in
-      let id = typeC arity id in
-      let sem = mcode sem in
-      make_decl decl tgt arity (Ast0.Typedef(stg,ty,id,sem))
-  | Ast0.DisjDecl(starter,decls,mids,ender) ->
-      let decls = List.map (declaration tgt) decls in
-      (match List.rev decls with
-       _::xs ->
-         if anyopt xs (function Ast0.OptDecl(_) -> true | _ -> false)
-         then fail decl "opt only allowed in the last disjunct"
-      |        _ -> ());
-      let res = Ast0.DisjDecl(starter,decls,mids,ender) in
-      Ast0.rewrap decl res
-  | Ast0.Ddots(dots,whencode) ->
-      let arity = all_same true tgt (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whencode = get_option (declaration Ast0.NONE) whencode in
-      make_decl decl tgt arity (Ast0.Ddots(dots,whencode))
-  | Ast0.OptDecl(_) | Ast0.UniqueDecl(_) ->
-      failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Initializer *)
-
-and make_init =
-  make_opt_unique
-    (function x -> Ast0.OptIni x)
-    (function x -> Ast0.UniqueIni x)
-
-and initialiser tgt i =
-  let init_same = all_same true tgt in
-  match Ast0.unwrap i with
-    Ast0.InitExpr(exp) ->
-      Ast0.rewrap i (Ast0.InitExpr(expression tgt exp))
-  | Ast0.InitList(lb,initlist,rb) ->
-      let arity = init_same (mcode2line lb) [mcode2arity lb; mcode2arity rb] in
-      let lb = mcode lb in
-      let initlist = dots (initialiser arity) initlist in
-      let rb = mcode rb in
-      make_init i tgt arity (Ast0.InitList(lb,initlist,rb))
-  | Ast0.InitGccDotName(dot,name,eq,ini) ->
-      let arity =
-       init_same (mcode2line dot) [mcode2arity dot; mcode2arity eq] in
-      let dot = mcode dot in
-      let name = ident true arity name in
-      let eq = mcode eq in
-      let ini = initialiser arity ini in
-      make_init i tgt arity (Ast0.InitGccDotName(dot,name,eq,ini))
-  | Ast0.InitGccName(name,eq,ini) ->
-      let arity = init_same (mcode2line eq) [mcode2arity eq] in
-      let name = ident true arity name in
-      let eq = mcode eq in
-      let ini = initialiser arity ini in
-      make_init i tgt arity (Ast0.InitGccName(name,eq,ini))
-  | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-      let arity =
-       init_same (mcode2line lb)
-         [mcode2arity lb; mcode2arity rb; mcode2arity eq] in
-      let lb = mcode lb in
-      let exp = expression arity exp in
-      let rb = mcode rb in
-      let eq = mcode eq in
-      let ini = initialiser arity ini in
-      make_init i tgt arity (Ast0.InitGccIndex(lb,exp,rb,eq,ini))
-  | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-      let arity =
-       init_same (mcode2line lb)
-         [mcode2arity lb; mcode2arity dots; mcode2arity rb; mcode2arity eq] in
-      let lb = mcode lb in
-      let exp1 = expression arity exp1 in
-      let dots = mcode dots in
-      let exp2 = expression arity exp2 in
-      let rb = mcode rb in
-      let eq = mcode eq in
-      let ini = initialiser arity ini in
-      make_init i tgt arity
-       (Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini))
-  | Ast0.IComma(cm) ->
-      let arity = init_same (mcode2line cm) [mcode2arity cm] in
-      let cm = mcode cm in
-      make_init i tgt arity (Ast0.IComma(cm))
-  | Ast0.Idots(dots,whencode) ->
-      let arity = init_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whencode = get_option (initialiser Ast0.NONE) whencode in
-      make_init i tgt arity (Ast0.Idots(dots,whencode))
-  | Ast0.OptIni(_) | Ast0.UniqueIni(_) ->
-      failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and make_param =
-  make_opt_unique
-    (function x -> Ast0.OptParam x)
-    (function x -> Ast0.UniqueParam x)
-
-and parameterTypeDef tgt param =
-  let param_same = all_same true tgt in
-  match Ast0.unwrap param with
-    Ast0.VoidParam(ty) -> Ast0.rewrap param (Ast0.VoidParam(typeC tgt ty))
-  | Ast0.Param(ty,Some id) ->
-      let ty = top_typeC tgt true ty in
-      let id = ident true tgt id in
-      Ast0.rewrap param 
-       (match (Ast0.unwrap ty,Ast0.unwrap id) with
-         (Ast0.OptType(ty),Ast0.OptIdent(id)) ->
-           Ast0.OptParam(Ast0.rewrap param (Ast0.Param(ty,Some id)))
-       | (Ast0.UniqueType(ty),Ast0.UniqueIdent(id)) ->
-           Ast0.UniqueParam(Ast0.rewrap param (Ast0.Param(ty,Some id)))
-       | (Ast0.OptType(ty),_) ->
-           fail param "arity mismatch in param declaration"
-       | (_,Ast0.OptIdent(id)) ->
-           fail param "arity mismatch in param declaration"
-       | _ -> Ast0.Param(ty,Some id))
-  | Ast0.Param(ty,None) ->
-      let ty = top_typeC tgt true ty in
-      Ast0.rewrap param 
-       (match Ast0.unwrap ty with
-         Ast0.OptType(ty) ->
-           Ast0.OptParam(Ast0.rewrap param (Ast0.Param(ty,None)))
-       | Ast0.UniqueType(ty) ->
-           Ast0.UniqueParam(Ast0.rewrap param (Ast0.Param(ty,None)))
-       | _ -> Ast0.Param(ty,None))
-  | Ast0.MetaParam(name,pure) ->
-      let arity = param_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_param param tgt arity (Ast0.MetaParam(name,pure))
-  | Ast0.MetaParamList(name,lenname,pure) ->
-      let arity = param_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_param param tgt arity (Ast0.MetaParamList(name,lenname,pure))
-  | Ast0.PComma(cm) ->
-      let arity = param_same (mcode2line cm) [mcode2arity cm] in
-      let cm = mcode cm in
-      make_param param tgt arity (Ast0.PComma(cm))
-  | Ast0.Pdots(dots) ->
-      let arity = param_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      make_param param tgt arity (Ast0.Pdots(dots))
-  | Ast0.Pcircles(dots) ->
-      let arity = param_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      make_param param tgt arity (Ast0.Pcircles(dots))
-  | Ast0.OptParam(_) | Ast0.UniqueParam(_) ->
-      failwith "unexpected code"
-
-and parameter_list tgt = dots (parameterTypeDef tgt)
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and make_rule_elem x =
-  make_opt_unique
-    (function x -> Ast0.OptStm x)
-    (function x -> Ast0.UniqueStm x)
-    x
-
-and statement tgt stm =
-  let stm_same = all_same true tgt in
-  match Ast0.unwrap stm with
-    Ast0.Decl(bef,decl) ->
-      let new_decl = declaration tgt decl in
-      Ast0.rewrap stm 
-       (match Ast0.unwrap new_decl with
-         Ast0.OptDecl(decl) ->
-           Ast0.OptStm(Ast0.rewrap stm (Ast0.Decl(bef,decl)))
-       | Ast0.UniqueDecl(decl) ->
-           Ast0.UniqueStm(Ast0.rewrap stm (Ast0.Decl(bef,decl)))
-       | _ -> Ast0.Decl(bef,new_decl))
-  | Ast0.Seq(lbrace,body,rbrace) -> 
-      let arity =
-       stm_same (mcode2line lbrace)
-         [mcode2arity lbrace; mcode2arity rbrace] in
-      let lbrace = mcode lbrace in
-      let body = dots (statement arity) body in
-      let rbrace = mcode rbrace in
-      make_rule_elem stm tgt arity (Ast0.Seq(lbrace,body,rbrace))
-  | Ast0.ExprStatement(exp,sem) ->
-      let arity = stm_same (mcode2line sem) [mcode2arity sem] in
-      let exp = expression arity exp in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.ExprStatement(exp,sem))
-  | Ast0.IfThen(iff,lp,exp,rp,branch,aft) ->
-      let arity =
-       stm_same (mcode2line iff) (List.map mcode2arity [iff;lp;rp]) in
-      let iff = mcode iff in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      let branch = statement arity branch in
-      make_rule_elem stm tgt arity (Ast0.IfThen(iff,lp,exp,rp,branch,aft))
-  | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,aft) ->
-      let arity =
-       stm_same (mcode2line iff) (List.map mcode2arity [iff;lp;rp;els]) in
-      let iff = mcode iff in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      let branch1 = statement arity branch1 in
-      let els = mcode els in
-      let branch2 = statement arity branch2 in
-      make_rule_elem stm tgt arity
-       (Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,aft))
-  | Ast0.While(wh,lp,exp,rp,body,aft) ->
-      let arity =
-       stm_same (mcode2line wh)
-         (List.map mcode2arity [wh;lp;rp]) in
-      let wh = mcode wh in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      let body = statement arity body in
-      make_rule_elem stm tgt arity (Ast0.While(wh,lp,exp,rp,body,aft))
-  | Ast0.Do(d,body,wh,lp,exp,rp,sem) ->
-      let arity =
-       stm_same (mcode2line wh) (List.map mcode2arity [d;wh;lp;rp;sem]) in
-      let d = mcode d in
-      let body = statement arity body in
-      let wh = mcode wh in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.Do(d,body,wh,lp,exp,rp,sem))
-  | Ast0.For(fr,lp,exp1,sem1,exp2,sem2,exp3,rp,body,aft) ->
-      let arity =
-       stm_same (mcode2line fr) (List.map mcode2arity [fr;lp;sem1;sem2;rp]) in
-      let fr = mcode fr in
-      let lp = mcode lp in
-      let exp1 = get_option (expression arity) exp1 in
-      let sem1 = mcode sem1 in
-      let exp2 = get_option (expression arity) exp2 in
-      let sem2= mcode sem2 in
-      let exp3 = get_option (expression arity) exp3 in
-      let rp = mcode rp in
-      let body = statement arity body in
-      make_rule_elem stm tgt arity
-       (Ast0.For(fr,lp,exp1,sem1,exp2,sem2,exp3,rp,body,aft))
-  | Ast0.Iterator(nm,lp,args,rp,body,aft) ->
-      let arity = stm_same (mcode2line lp) (List.map mcode2arity [lp;rp]) in
-      let nm = ident false arity nm in
-      let lp = mcode lp in
-      let args = dots (expression arity) args in
-      let rp = mcode rp in
-      let body = statement arity body in
-      make_rule_elem stm tgt arity (Ast0.Iterator(nm,lp,args,rp,body,aft))
-  | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-      let arity =
-       stm_same (mcode2line switch)
-         (List.map mcode2arity [switch;lp;rp;lb;rb]) in
-      let switch = mcode switch in
-      let lp = mcode lp in
-      let exp = expression arity exp in
-      let rp = mcode rp in
-      let lb = mcode lb in
-      let cases = dots (case_line arity) cases in
-      let rb = mcode rb in
-      make_rule_elem stm tgt arity
-       (Ast0.Switch(switch,lp,exp,rp,lb,cases,rb))
-  | Ast0.Break(br,sem) ->
-      let arity = stm_same (mcode2line br) (List.map mcode2arity [br;sem]) in
-      let br = mcode br in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.Break(br,sem))
-  | Ast0.Continue(cont,sem) ->
-      let arity =
-       stm_same (mcode2line cont) (List.map mcode2arity [cont;sem]) in
-      let cont = mcode cont in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.Continue(cont,sem))
-  | Ast0.Label(l,dd) ->
-      let arity = mcode2arity dd in
-      let l = ident false tgt l in
-      let dd = mcode dd in
-      make_rule_elem stm tgt arity (Ast0.Label(l,dd))
-  | Ast0.Goto(goto,l,sem) ->
-      let arity =
-       stm_same (mcode2line goto) (List.map mcode2arity [goto;sem]) in
-      let goto = mcode goto in
-      let l = ident false tgt l in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.Goto(goto,l,sem))
-  | Ast0.Return(ret,sem) ->
-      let arity = stm_same (mcode2line ret) (List.map mcode2arity [ret;sem]) in
-      let ret = mcode ret in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.Return(ret,sem))
-  | Ast0.ReturnExpr(ret,exp,sem) ->
-      let arity = stm_same (mcode2line ret) (List.map mcode2arity [ret;sem]) in
-      let ret = mcode ret in
-      let exp = expression arity exp in
-      let sem = mcode sem in
-      make_rule_elem stm tgt arity (Ast0.ReturnExpr(ret,exp,sem))
-  | Ast0.MetaStmt(name,pure) ->
-      let arity = stm_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_rule_elem stm tgt arity (Ast0.MetaStmt(name,pure))
-  | Ast0.MetaStmtList(name,pure) ->
-      let arity = stm_same (mcode2line name) [mcode2arity name] in
-      let name = mcode name in
-      make_rule_elem stm tgt arity (Ast0.MetaStmtList(name,pure))
-  | Ast0.Exp(exp) ->
-      let new_exp = top_expression true tgt exp in
-      Ast0.rewrap stm 
-       (match Ast0.unwrap new_exp with
-         Ast0.OptExp(exp) ->
-           Ast0.OptStm(Ast0.rewrap stm (Ast0.Exp(exp)))
-       | Ast0.UniqueExp(exp) ->
-           Ast0.UniqueStm(Ast0.rewrap stm (Ast0.Exp(exp)))
-       | _ -> Ast0.Exp(new_exp))
-  | Ast0.TopExp(exp) ->
-      let new_exp = top_expression true tgt exp in
-      Ast0.rewrap stm 
-       (match Ast0.unwrap new_exp with
-         Ast0.OptExp(exp) ->
-           Ast0.OptStm(Ast0.rewrap stm (Ast0.TopExp(exp)))
-       | Ast0.UniqueExp(exp) ->
-           Ast0.UniqueStm(Ast0.rewrap stm (Ast0.TopExp(exp)))
-       | _ -> Ast0.TopExp(new_exp))
-  | Ast0.Ty(ty) ->
-      let new_ty = typeC tgt ty in (* opt makes no sense alone at top level *)
-      Ast0.rewrap stm 
-       (match Ast0.unwrap new_ty with
-         Ast0.OptType(ty) ->
-           Ast0.OptStm(Ast0.rewrap stm (Ast0.Ty(ty)))
-       | Ast0.UniqueType(ty) ->
-           Ast0.UniqueStm(Ast0.rewrap stm (Ast0.Ty(ty)))
-       | _ -> Ast0.Ty(new_ty))
-  | Ast0.Disj(starter,rule_elem_dots_list,mids,ender) ->
-      let stms =
-       List.map (function x -> concat_dots (statement tgt) x)
-         rule_elem_dots_list in
-      let (found_opt,unopt) =
-       List.fold_left
-         (function (found_opt,lines) ->
-           function x ->
-             let rebuild l =
-               (* previously just checked the last thing in the list,
-                  but everything should be optional for the whole thing to
-                  be optional *)
-               let is_opt x =
-                 match Ast0.unwrap x with
-                   Ast0.OptStm(x) -> true
-                 | _ -> false in
-               let unopt x =
-                 match Ast0.unwrap x with
-                   Ast0.OptStm(x) -> x
-                 | _ -> x in
-               if List.for_all is_opt l
-               then (true,List.map unopt l)
-               else (false, l) in
-             let (l,k) =
-               match Ast0.unwrap x with
-                 Ast0.DOTS(l) ->
-                   (l,function l -> Ast0.rewrap x (Ast0.DOTS l))
-               | Ast0.CIRCLES(l) ->
-                   (l,function l -> Ast0.rewrap x (Ast0.CIRCLES l))
-               | Ast0.STARS(l) ->
-                   (l,function l -> Ast0.rewrap x (Ast0.STARS l)) in
-             let (found_opt,l) = rebuild l in
-             (found_opt,(k l)::lines))
-         (false,[]) stms in
-      let unopt = List.rev unopt in
-      if found_opt
-      then
-       make_rule_elem stm tgt Ast0.OPT (Ast0.Disj(starter,unopt,mids,ender))
-      else Ast0.rewrap stm (Ast0.Disj(starter,stms,mids,ender))
-  | Ast0.Nest(starter,rule_elem_dots,ender,whn,multi) ->
-      let new_rule_elem_dots =
-       concat_dots (statement Ast0.NONE) rule_elem_dots in
-      let whn =
-       List.map
-         (whencode (concat_dots (statement Ast0.NONE)) (statement Ast0.NONE)
-            (expression Ast0.NONE))
-         whn in
-      Ast0.rewrap stm
-       (Ast0.Nest(starter,new_rule_elem_dots,ender,whn,multi))
-  | Ast0.Dots(dots,whn)    ->
-      let arity = stm_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whn =
-       List.map
-         (whencode (concat_dots (statement Ast0.NONE)) (statement Ast0.NONE)
-            (expression Ast0.NONE))
-         whn in
-      make_rule_elem stm tgt arity (Ast0.Dots(dots,whn))
-  | Ast0.Circles(dots,whn) ->
-      let arity = stm_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whn =
-       List.map
-         (whencode (concat_dots (statement Ast0.NONE)) (statement Ast0.NONE)
-            (expression Ast0.NONE))
-         whn in
-      make_rule_elem stm tgt arity (Ast0.Circles(dots,whn))
-  | Ast0.Stars(dots,whn)   ->
-      let arity = stm_same (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      let whn =
-       List.map
-         (whencode (concat_dots (statement Ast0.NONE)) (statement Ast0.NONE)
-            (expression Ast0.NONE))
-         whn in
-      make_rule_elem stm tgt arity (Ast0.Stars(dots,whn))
-  | Ast0.FunDecl(bef,fi,name,lp,params,rp,lbrace,body,rbrace) ->
-      let arity =
-       all_same true tgt (mcode2line lp)
-         ((List.map mcode2arity [lp;rp;lbrace;rbrace]) @ (fninfo2arity fi)) in
-      let fi = List.map (fninfo arity) fi in
-      let name = ident false arity name in
-      let lp = mcode lp in
-      let params = parameter_list arity params in
-      let rp = mcode rp in
-      let lbrace = mcode lbrace in
-      let body = dots (statement arity) body in
-      let rbrace = mcode rbrace in
-      make_rule_elem stm tgt arity
-       (Ast0.FunDecl(bef,fi,name,lp,params,rp,lbrace,body,rbrace))
-  | Ast0.Include(inc,s) -> 
-      let arity =
-       all_same true tgt (mcode2line inc) [mcode2arity inc; mcode2arity s] in
-      let inc = mcode inc in
-      let s = mcode s in
-      make_rule_elem stm tgt arity (Ast0.Include(inc,s))
-  | Ast0.Define(def,id,params,body) ->
-      let arity = all_same true tgt (mcode2line def) [mcode2arity def] in
-      let def = mcode def in
-      let id = ident false arity id in
-      let params = define_parameters arity params in
-      let body = dots (statement arity) body in
-      make_rule_elem stm tgt arity (Ast0.Define(def,id,params,body))
-  | Ast0.OptStm(_) | Ast0.UniqueStm(_) ->
-      failwith "unexpected code"
-
-and define_parameters tgt params =
-  match Ast0.unwrap params with
-    Ast0.NoParams -> params
-  | Ast0.DParams(lp,params,rp) ->
-      let arity =
-       all_same true tgt (mcode2line lp) [mcode2arity lp;mcode2arity rp] in
-      let lp = mcode lp in
-      let params = dots (define_param arity) params in
-      let rp = mcode rp in
-      Ast0.rewrap params (Ast0.DParams(lp,params,rp))
-
-and make_define_param x =
-  make_opt_unique
-    (function x -> Ast0.OptDParam x)
-    (function x -> Ast0.UniqueDParam x)
-    x
-
-and define_param tgt param =
-  match Ast0.unwrap param with
-    Ast0.DParam(id) ->
-      let new_id = ident true tgt id in
-      Ast0.rewrap param
-       (match Ast0.unwrap new_id with
-         Ast0.OptIdent(id) ->
-           Ast0.OptDParam(Ast0.rewrap param (Ast0.DParam(id)))
-       | Ast0.UniqueIdent(decl) ->
-           Ast0.UniqueDParam(Ast0.rewrap param (Ast0.DParam(id)))
-       | _ -> Ast0.DParam(new_id))
-  | Ast0.DPComma(cm) ->
-      let arity =
-       all_same true tgt (mcode2line cm) [mcode2arity cm] in
-      let cm = mcode cm in
-      make_define_param param tgt arity (Ast0.DPComma(cm))
-  | Ast0.DPdots(dots) ->
-      let arity =
-       all_same true tgt (mcode2line dots) [mcode2arity dots] in
-      let dots = mcode dots in
-      make_define_param param tgt arity (Ast0.DPdots(dots))
-  | Ast0.DPcircles(circles) ->
-      let arity =
-       all_same true tgt (mcode2line circles) [mcode2arity circles] in
-      let circles = mcode circles in
-      make_define_param param tgt arity (Ast0.DPcircles(circles))
-  | Ast0.OptDParam(dp) | Ast0.UniqueDParam(dp) ->
-      failwith "unexpected code"
-
-and fninfo arity = function
-    Ast0.FStorage(stg) -> Ast0.FStorage(mcode stg)
-  | Ast0.FType(ty) -> Ast0.FType(typeC arity ty)
-  | Ast0.FInline(inline) -> Ast0.FInline(mcode inline)
-  | Ast0.FAttr(attr) -> Ast0.FAttr(mcode attr)
-
-and fninfo2arity fninfo =
-  List.concat
-    (List.map
-       (function
-          Ast0.FStorage(stg) -> [mcode2arity stg]
-        | Ast0.FType(ty) -> []
-        | Ast0.FInline(inline) -> [mcode2arity inline]
-        | Ast0.FAttr(attr) -> [mcode2arity attr])
-       fninfo)
-
-and whencode notfn alwaysfn expression = function
-    Ast0.WhenNot a -> Ast0.WhenNot (notfn a)
-  | Ast0.WhenAlways a -> Ast0.WhenAlways (alwaysfn a)
-  | Ast0.WhenModifier(x) -> Ast0.WhenModifier(x)
-  | Ast0.WhenNotTrue a -> Ast0.WhenNotTrue (expression a)
-  | Ast0.WhenNotFalse a -> Ast0.WhenNotFalse (expression a)
-
-and make_case_line =
-  make_opt_unique
-    (function x -> Ast0.OptCase x)
-    (function x -> failwith "unique not allowed for case_line")
-
-and case_line tgt c =
-  match Ast0.unwrap c with
-    Ast0.Default(def,colon,code) ->
-      let arity =
-       all_same true tgt (mcode2line def)
-         [mcode2arity def; mcode2arity colon] in
-      let def = mcode def in
-      let colon = mcode colon in
-      let code = dots (statement arity) code in
-      make_case_line c tgt arity (Ast0.Default(def,colon,code))
-  | Ast0.Case(case,exp,colon,code) ->
-      let arity =
-       all_same true tgt (mcode2line case)
-         [mcode2arity case; mcode2arity colon] in
-      let case = mcode case in
-      let exp = expression arity exp in
-      let colon = mcode colon in
-      let code = dots (statement arity) code in
-      make_case_line c tgt arity (Ast0.Case(case,exp,colon,code))
-  | Ast0.OptCase(_) -> failwith "unexpected OptCase"
-
-(* --------------------------------------------------------------------- *)
-(* Function declaration *)
-(* Haven't thought much about arity here... *)
-
-let top_level tgt t =
-  Ast0.rewrap t
-    (match Ast0.unwrap t with
-      Ast0.FILEINFO(old_file,new_file) -> 
-       if mcode2arity old_file = Ast0.NONE && mcode2arity new_file = Ast0.NONE
-       then Ast0.FILEINFO(mcode old_file,mcode new_file)
-       else fail t "unexpected arity for file info"
-    | Ast0.DECL(stmt) ->
-       Ast0.DECL(statement tgt stmt)
-    | Ast0.CODE(rule_elem_dots) ->
-       Ast0.CODE(concat_dots (statement tgt) rule_elem_dots)
-    | Ast0.ERRORWORDS(exps) ->
-       Ast0.ERRORWORDS(List.map (top_expression false Ast0.NONE) exps)
-    | Ast0.OTHER(_) -> fail t "eliminated by top_level")
-
-let rule tgt = List.map (top_level tgt)
-
-(* --------------------------------------------------------------------- *)
-(* Entry points *)
-
-let minus_arity code =
-  rule Ast0.NONE code
diff --git a/parsing_cocci/.#ast0_cocci.ml.1.105 b/parsing_cocci/.#ast0_cocci.ml.1.105
deleted file mode 100644 (file)
index 5175cf7..0000000
+++ /dev/null
@@ -1,641 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module Ast = Ast_cocci
-
-(* --------------------------------------------------------------------- *)
-(* Modified code *)
-
-type arity = OPT | UNIQUE | NONE
-
-type token_info =
-    { tline_start : int; tline_end : int;
-      left_offset : int; right_offset : int }
-let default_token_info =
-  { tline_start = -1; tline_end = -1; left_offset = -1; right_offset = -1 }
-
-(* MIXED is like CONTEXT, since sometimes MIXED things have to revert to
-CONTEXT - see insert_plus.ml *)
-type mcodekind =
-    MINUS       of (Ast.anything list list * token_info) ref
-  | PLUS
-  | CONTEXT     of (Ast.anything Ast.befaft * token_info * token_info) ref
-  | MIXED       of (Ast.anything Ast.befaft * token_info * token_info) ref
-
-type info = { line_start : int; line_end : int;
-             logical_start : int; logical_end : int;
-             attachable_start : bool; attachable_end : bool;
-             mcode_start : mcodekind list; mcode_end : mcodekind list;
-             column : int; offset : int;
-             (* the following are only for + code *)
-             strings_before : string list; strings_after : string list }
-
-type 'a mcode = 'a * arity * info * mcodekind * meta_pos ref (* pos, - only *)
-(* int ref is an index *)
-and 'a wrap =
-    { node : 'a;
-      info : info;
-      index : int ref;
-      mcodekind : mcodekind ref;
-      exp_ty : Type_cocci.typeC option ref; (* only for expressions *)
-      bef_aft : dots_bef_aft; (* only for statements *)
-      true_if_arg : bool; (* true if "arg_exp", only for exprs *)
-      true_if_test : bool; (* true if "test position", only for exprs *)
-      true_if_test_exp : bool;(* true if "test_exp from iso", only for exprs *)
-      (*nonempty if this represents the use of an iso*)
-      iso_info : (string*anything) list }
-
-and dots_bef_aft =
-    NoDots | AddingBetweenDots of statement | DroppingBetweenDots of statement
-
-(* for iso metavariables, true if they can only match nonmodified terms with
-   all metavariables unitary
-   for SP metavariables, true if the metavariable is unitary (valid up to
-   isomorphism phase only)
-   In SP, the only options are impure and context
-*)
-and pure = Impure | Pure | Context | PureContext (* pure and only context *)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-and 'a base_dots =
-    DOTS of 'a list
-  | CIRCLES of 'a list
-  | STARS of 'a list
-
-and 'a dots = 'a base_dots wrap
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-and base_ident =
-    Id of string mcode
-  | MetaId        of Ast.meta_name mcode * ident list * pure
-  | MetaFunc      of Ast.meta_name mcode * ident list * pure
-  | MetaLocalFunc of Ast.meta_name mcode * ident list * pure
-  | OptIdent      of ident
-  | UniqueIdent   of ident
-
-and ident = base_ident wrap
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-and base_expression = 
-    Ident          of ident
-  | Constant       of Ast.constant mcode
-  | FunCall        of expression * string mcode (* ( *) *
-                      expression dots * string mcode (* ) *)
-  | Assignment     of expression * Ast.assignOp mcode * expression *
-                     bool (* true if it can match an initialization *)
-  | CondExpr       of expression * string mcode (* ? *) * expression option *
-                     string mcode (* : *) * expression
-  | Postfix        of expression * Ast.fixOp mcode
-  | Infix          of expression * Ast.fixOp mcode
-  | Unary          of expression * Ast.unaryOp mcode
-  | Binary         of expression * Ast.binaryOp mcode * expression
-  | Nested         of expression * Ast.binaryOp mcode * expression
-  | Paren          of string mcode (* ( *) * expression *
-                      string mcode (* ) *)
-  | ArrayAccess    of expression * string mcode (* [ *) * expression *
-                     string mcode (* ] *)
-  | RecordAccess   of expression * string mcode (* . *) * ident
-  | RecordPtAccess of expression * string mcode (* -> *) * ident
-  | Cast           of string mcode (* ( *) * typeC * string mcode (* ) *) *
-                      expression
-  | SizeOfExpr     of string mcode (* sizeof *) * expression
-  | SizeOfType     of string mcode (* sizeof *) * string mcode (* ( *) *
-                      typeC * string mcode (* ) *)
-  | TypeExp        of typeC (* type name used as an expression, only in args *)
-  | MetaErr        of Ast.meta_name mcode * expression list * pure
-  | MetaExpr       of Ast.meta_name mcode * expression list *
-                     Type_cocci.typeC list option * Ast.form * pure
-  | MetaExprList   of Ast.meta_name mcode (* only in arg lists *) *
-                     listlen * pure
-  | EComma         of string mcode (* only in arg lists *)
-  | DisjExpr       of string mcode * expression list *
-                     string mcode list (* the |s *) * string mcode
-  | NestExpr       of string mcode * expression dots * string mcode *
-                     expression option * Ast.multi
-  | Edots          of string mcode (* ... *) * expression option
-  | Ecircles       of string mcode (* ooo *) * expression option
-  | Estars         of string mcode (* *** *) * expression option
-  | OptExp         of expression
-  | UniqueExp      of expression
-
-and expression = base_expression wrap
-
-and listlen = Ast.meta_name mcode option
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and base_typeC = 
-    ConstVol        of Ast.const_vol mcode * typeC
-  | BaseType        of Ast.baseType mcode * Ast.sign mcode option
-  | ImplicitInt     of Ast.sign mcode
-  | Pointer         of typeC * string mcode (* * *)
-  | FunctionPointer of typeC *
-                 string mcode(* ( *)*string mcode(* * *)*string mcode(* ) *)*
-                  string mcode (* ( *)*parameter_list*string mcode(* ) *)
-  | FunctionType    of typeC option *
-                      string mcode (* ( *) * parameter_list *
-                       string mcode (* ) *)
-  | Array           of typeC * string mcode (* [ *) *
-                      expression option * string mcode (* ] *)
-  | StructUnionName of Ast.structUnion mcode * ident option (* name *)
-  | StructUnionDef  of typeC (* either StructUnionName or metavar *) *
-       string mcode (* { *) * declaration dots * string mcode (* } *)
-  | TypeName        of string mcode
-  | MetaType        of Ast.meta_name mcode * pure
-  | DisjType        of string mcode * typeC list * (* only after iso *)
-                       string mcode list (* the |s *)  * string mcode
-  | OptType         of typeC
-  | UniqueType      of typeC
-
-and typeC = base_typeC wrap
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and base_declaration =
-    Init of Ast.storage mcode option * typeC * ident * string mcode (*=*) *
-       initialiser * string mcode (*;*)
-  | UnInit of Ast.storage mcode option * typeC * ident * string mcode (* ; *)
-  | TyDecl of typeC * string mcode (* ; *)
-  | MacroDecl of ident (* name *) * string mcode (* ( *) *
-        expression dots * string mcode (* ) *) * string mcode (* ; *)
-  | Typedef of string mcode (* typedef *) * typeC * typeC * string mcode (*;*)
-  | DisjDecl   of string mcode * declaration list *
-                  string mcode list (* the |s *)  * string mcode
-  (* Ddots is for a structure declaration *)
-  | Ddots      of string mcode (* ... *) * declaration option (* whencode *)
-  | OptDecl    of declaration
-  | UniqueDecl of declaration
-
-and declaration = base_declaration wrap
-
-(* --------------------------------------------------------------------- *)
-(* Initializers *)
-
-and base_initialiser =
-    InitExpr of expression 
-  | InitList of string mcode (*{*) * initialiser_list * string mcode (*}*)
-  | InitGccDotName of
-      string mcode (*.*) * ident (* name *) * string mcode (*=*) *
-       initialiser (* gccext: *)
-  | InitGccName of ident (* name *) * string mcode (*:*) *
-       initialiser
-  | InitGccIndex of
-      string mcode (*[*) * expression * string mcode (*]*) *
-       string mcode (*=*) * initialiser
-  | InitGccRange of
-      string mcode (*[*) * expression * string mcode (*...*) *
-        expression * string mcode (*]*) * string mcode (*=*) * initialiser
-  | IComma of string mcode (* , *)
-  | Idots  of string mcode (* ... *) * initialiser option (* whencode *)
-  | OptIni    of initialiser
-  | UniqueIni of initialiser
-
-and initialiser = base_initialiser wrap
-
-and initialiser_list = initialiser dots
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and base_parameterTypeDef =
-    VoidParam     of typeC
-  | Param         of typeC * ident option
-  | MetaParam     of Ast.meta_name mcode * pure
-  | MetaParamList of Ast.meta_name mcode * listlen * pure
-  | PComma        of string mcode
-  | Pdots         of string mcode (* ... *)
-  | Pcircles      of string mcode (* ooo *)
-  | OptParam      of parameterTypeDef
-  | UniqueParam   of parameterTypeDef
-
-and parameterTypeDef = base_parameterTypeDef wrap
-
-and parameter_list = parameterTypeDef dots
-
-(* --------------------------------------------------------------------- *)
-(* #define Parameters *)
-
-and base_define_param =
-    DParam        of ident
-  | DPComma       of string mcode
-  | DPdots        of string mcode (* ... *)
-  | DPcircles     of string mcode (* ooo *)
-  | OptDParam     of define_param
-  | UniqueDParam  of define_param
-
-and define_param = base_define_param wrap
-
-and base_define_parameters =
-    NoParams
-  | DParams      of string mcode(*( *) * define_param dots * string mcode(* )*)
-
-and define_parameters = base_define_parameters wrap
-
-(* --------------------------------------------------------------------- *)
-(* Statement*)
-
-and base_statement =
-    Decl          of (info * mcodekind) (* before the decl *) * declaration
-  | Seq           of string mcode (* { *) * statement dots *
-                    string mcode (* } *)
-  | ExprStatement of expression * string mcode (*;*)
-  | IfThen        of string mcode (* if *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                    statement * (info * mcodekind) (* after info *)
-  | IfThenElse    of string mcode (* if *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                    statement * string mcode (* else *) * statement *
-                    (info * mcodekind)
-  | While         of string mcode (* while *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                    statement * (info * mcodekind) (* after info *)
-  | Do            of string mcode (* do *) * statement *
-                     string mcode (* while *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                     string mcode (* ; *)
-  | For           of string mcode (* for *) * string mcode (* ( *) *
-                     expression option * string mcode (*;*) *
-                    expression option * string mcode (*;*) *
-                     expression option * string mcode (* ) *) * statement *
-                    (info * mcodekind) (* after info *)
-  | Iterator      of ident (* name *) * string mcode (* ( *) *
-                    expression dots * string mcode (* ) *) *
-                    statement * (info * mcodekind) (* after info *)
-  | Switch        of string mcode (* switch *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) * string mcode (* { *) *
-                    case_line dots * string mcode (* } *)
-  | Break         of string mcode (* break *) * string mcode (* ; *)
-  | Continue      of string mcode (* continue *) * string mcode (* ; *)
-  | Label         of ident * string mcode (* : *)
-  | Goto          of string mcode (* goto *) * ident * string mcode (* ; *)
-  | Return        of string mcode (* return *) * string mcode (* ; *)
-  | ReturnExpr    of string mcode (* return *) * expression *
-                    string mcode (* ; *)
-  | MetaStmt      of Ast.meta_name mcode * pure
-  | MetaStmtList  of Ast.meta_name mcode(*only in statement lists*) * pure
-  | Exp           of expression  (* only in dotted statement lists *)
-  | TopExp        of expression (* for macros body *)
-  | Ty            of typeC (* only at top level *)
-  | Disj          of string mcode * statement dots list *
-                    string mcode list (* the |s *)  * string mcode
-  | Nest          of string mcode * statement dots * string mcode *
-                    (statement dots,statement) whencode list * Ast.multi
-  | Dots          of string mcode (* ... *) *
-                     (statement dots,statement) whencode list
-  | Circles       of string mcode (* ooo *) *
-                    (statement dots,statement) whencode list
-  | Stars         of string mcode (* *** *) *
-                    (statement dots,statement) whencode list
-  | FunDecl of (info * mcodekind) (* before the function decl *) *
-       fninfo list * ident (* name *) *
-       string mcode (* ( *) * parameter_list * string mcode (* ) *) *
-       string mcode (* { *) * statement dots *
-       string mcode (* } *)
-  | Include of string mcode (* #include *) * Ast.inc_file mcode (* file *)
-  | Define of string mcode (* #define *) * ident (* name *) *
-       define_parameters (*params*) * statement dots
-  | OptStm   of statement
-  | UniqueStm of statement
-
-and fninfo =
-    FStorage of Ast.storage mcode
-  | FType of typeC
-  | FInline of string mcode
-  | FAttr of string mcode
-
-and ('a,'b) whencode =
-    WhenNot of 'a
-  | WhenAlways of 'b
-  | WhenModifier of Ast.when_modifier
-
-and statement = base_statement wrap
-
-and base_case_line =
-    Default of string mcode (* default *) * string mcode (*:*) * statement dots
-  | Case of string mcode (* case *) * expression * string mcode (*:*) *
-       statement dots
-  | OptCase of case_line
-
-and case_line = base_case_line wrap
-
-(* --------------------------------------------------------------------- *)
-(* Positions *)
-
-and meta_pos =
-    MetaPos of Ast.meta_name mcode * Ast.meta_name list * Ast.meta_collect
-  | NoMetaPos
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and base_top_level =
-    DECL of statement
-  | CODE of statement dots
-  | FILEINFO of string mcode (* old file *) * string mcode (* new file *)
-  | ERRORWORDS of expression list
-  | OTHER of statement (* temporary, disappears after top_level.ml *)
-
-and top_level = base_top_level wrap
-and rule = top_level list
-
-and parsed_rule =
-    CocciRule of
-      (rule * Ast.metavar list *
-        (string list * string list * Ast.dependency * string * Ast.exists)) *
-       (rule * Ast.metavar list)
-  | ScriptRule of
-      string * Ast.dependency * (string * Ast.meta_name) list * string
-
-(* --------------------------------------------------------------------- *)
-
-and anything =
-    DotsExprTag of expression dots
-  | DotsInitTag of initialiser dots
-  | DotsParamTag of parameterTypeDef dots
-  | DotsStmtTag of statement dots
-  | DotsDeclTag of declaration dots
-  | DotsCaseTag of case_line dots
-  | IdentTag of ident
-  | ExprTag of expression
-  | ArgExprTag of expression  (* for isos *)
-  | TestExprTag of expression (* for isos *)
-  | TypeCTag of typeC
-  | ParamTag of parameterTypeDef
-  | InitTag of initialiser
-  | DeclTag of declaration
-  | StmtTag of statement
-  | CaseLineTag of case_line
-  | TopTag of top_level
-  | IsoWhenTag of Ast.when_modifier
-  | MetaPosTag of meta_pos
-
-let dotsExpr x = DotsExprTag x
-let dotsParam x = DotsParamTag x
-let dotsInit x = DotsInitTag x
-let dotsStmt x = DotsStmtTag x
-let dotsDecl x = DotsDeclTag x
-let dotsCase x = DotsCaseTag x
-let ident x = IdentTag x
-let expr x = ExprTag x
-let typeC x = TypeCTag x
-let param x = ParamTag x
-let ini x = InitTag x
-let decl x = DeclTag x
-let stmt x = StmtTag x
-let case_line x = CaseLineTag x
-let top x = TopTag x
-
-(* --------------------------------------------------------------------- *)
-(* Avoid cluttering the parser.  Calculated in compute_lines.ml. *)
-
-let default_info _ = (* why is this a function? *)
-  { line_start = -1; line_end = -1;
-    logical_start = -1; logical_end = -1;
-    attachable_start = true; attachable_end = true;
-    mcode_start = []; mcode_end = [];
-    column = -1; offset = -1; strings_before = []; strings_after = [] }
-
-let default_befaft _ =
-  MIXED(ref (Ast.NOTHING,default_token_info,default_token_info))
-let context_befaft _ =
-  CONTEXT(ref (Ast.NOTHING,default_token_info,default_token_info))
-
-let wrap x =
-  { node = x;
-    info = default_info();
-    index = ref (-1);
-    mcodekind = ref (default_befaft());
-    exp_ty = ref None;
-    bef_aft = NoDots;
-    true_if_arg = false;
-    true_if_test = false;
-    true_if_test_exp = false;
-    iso_info = [] }
-let context_wrap x =
-  { node = x;
-    info = default_info();
-    index = ref (-1);
-    mcodekind = ref (context_befaft());
-    exp_ty = ref None;
-    bef_aft = NoDots;
-    true_if_arg = false;
-    true_if_test = false;
-    true_if_test_exp = false;
-    iso_info = [] }
-let unwrap x = x.node
-let unwrap_mcode (x,_,_,_,_) = x
-let rewrap model x = { model with node = x }
-let rewrap_mcode (_,arity,info,mcodekind,pos) x = (x,arity,info,mcodekind,pos)
-let copywrap model x =
-  { model with node = x; index = ref !(model.index);
-    mcodekind = ref !(model.mcodekind); exp_ty = ref !(model.exp_ty)}
-let get_pos (_,_,_,_,x) = !x
-let get_pos_ref (_,_,_,_,x) = x
-let set_pos pos (m,arity,info,mcodekind,_) = (m,arity,info,mcodekind,ref pos)
-let get_info x      = x.info
-let set_info x info = {x with info = info}
-let get_line x      = x.info.line_start
-let get_line_end x  = x.info.line_end
-let get_index x     = !(x.index)
-let set_index x i   = x.index := i
-let get_mcodekind x = !(x.mcodekind)
-let get_mcode_mcodekind (_,_,_,mcodekind,_) = mcodekind
-let get_mcodekind_ref x = x.mcodekind
-let set_mcodekind x mk  = x.mcodekind := mk
-let set_type x t        = x.exp_ty := t
-let get_type x          = !(x.exp_ty)
-let get_dots_bef_aft x  = x.bef_aft
-let set_dots_bef_aft x dots_bef_aft = {x with bef_aft = dots_bef_aft}
-let get_arg_exp x       = x.true_if_arg
-let set_arg_exp x       = {x with true_if_arg = true}
-let get_test_pos x      = x.true_if_test
-let set_test_pos x      = {x with true_if_test = true}
-let get_test_exp x      = x.true_if_test_exp
-let set_test_exp x      = {x with true_if_test_exp = true}
-let get_iso x           = x.iso_info
-let set_iso x i = if !Flag.track_iso_usage then {x with iso_info = i} else x
-let set_mcode_data data (_,ar,info,mc,pos) = (data,ar,info,mc,pos)
-
-(* --------------------------------------------------------------------- *)
-
-(* unique indices, for mcode and tree nodes *)
-let index_counter = ref 0
-let fresh_index _ = let cur = !index_counter in index_counter := cur + 1; cur
-
-(* --------------------------------------------------------------------- *)
-
-let undots d =
-  match unwrap d with
-  | DOTS    e -> e
-  | CIRCLES e -> e
-  | STARS   e -> e
-
-(* --------------------------------------------------------------------- *)
-
-let rec ast0_type_to_type ty =
-  match unwrap ty with
-    ConstVol(cv,ty) -> Type_cocci.ConstVol(const_vol cv,ast0_type_to_type ty)
-  | BaseType(bty,None) ->
-      Type_cocci.BaseType(baseType bty,None)
-  | BaseType(bty,Some sgn) ->
-      Type_cocci.BaseType(baseType bty,Some (sign sgn))
-  | ImplicitInt(sgn) ->
-      let bty = Type_cocci.IntType in
-      Type_cocci.BaseType(bty,Some (sign sgn))
-  | Pointer(ty,_) -> Type_cocci.Pointer(ast0_type_to_type ty)
-  | FunctionPointer(ty,_,_,_,_,params,_) ->
-      Type_cocci.FunctionPointer(ast0_type_to_type ty)
-  | FunctionType _ -> failwith "not supported"
-  | Array(ety,_,_,_) -> Type_cocci.Array(ast0_type_to_type ety)
-  | StructUnionName(su,Some tag) ->
-      (match unwrap tag with
-       Id(tag) ->
-         Type_cocci.StructUnionName(structUnion su,false,unwrap_mcode tag)
-      | MetaId(tag,_,_) ->
-         (Printf.printf
-            "warning: struct/union with a metavariable name detected.\n";
-          Printf.printf
-            "For type checking assuming the name of the metavariable is the name of the type\n";
-          let (rule,tag) = unwrap_mcode tag in
-          Type_cocci.StructUnionName(structUnion su,true,rule^tag))
-      | _ -> failwith "unexpected struct/union type name")
-  | StructUnionName(su,None) -> failwith "nameless structure - what to do???"
-  | StructUnionDef(ty,_,_,_) -> ast0_type_to_type ty
-  | TypeName(name) -> Type_cocci.TypeName(unwrap_mcode name)
-  | MetaType(name,_) ->
-      Type_cocci.MetaType(unwrap_mcode name,Type_cocci.Unitary,false)
-  | DisjType(_,types,_,_) -> failwith "unexpected DisjType"
-  | OptType(ty) | UniqueType(ty) ->
-      ast0_type_to_type ty
-
-and baseType t =
-  match unwrap_mcode t with
-    Ast.VoidType -> Type_cocci.VoidType
-  | Ast.CharType -> Type_cocci.CharType
-  | Ast.ShortType -> Type_cocci.ShortType
-  | Ast.IntType -> Type_cocci.IntType
-  | Ast.DoubleType -> Type_cocci.DoubleType
-  | Ast.FloatType -> Type_cocci.FloatType
-  | Ast.LongType -> Type_cocci.LongType
-
-and structUnion t =
-  match unwrap_mcode t with
-    Ast.Struct -> Type_cocci.Struct
-  | Ast.Union -> Type_cocci.Union
-
-and sign t =
-  match unwrap_mcode t with
-    Ast.Signed -> Type_cocci.Signed
-  | Ast.Unsigned -> Type_cocci.Unsigned
-
-and const_vol t =
-  match unwrap_mcode t with
-    Ast.Const -> Type_cocci.Const
-  | Ast.Volatile -> Type_cocci.Volatile
-
-(* --------------------------------------------------------------------- *)
-(* this function is a rather minimal attempt.  the problem is that information
-has been lost.  but since it is only used for metavariable types in the isos,
-perhaps it doesn't matter *)
-let make_mcode x = (x,NONE,default_info(),context_befaft(),ref NoMetaPos)
-let make_mcode_info x info = (x,NONE,info,context_befaft(),ref NoMetaPos)
-
-exception TyConv
-
-let rec reverse_type ty =
-  match ty with
-    Type_cocci.ConstVol(cv,ty) ->
-      ConstVol(reverse_const_vol cv,wrap(reverse_type ty))
-  | Type_cocci.BaseType(bty,None) ->
-      BaseType(reverse_baseType bty,None)
-  | Type_cocci.BaseType(bty,Some sgn) ->
-      BaseType(reverse_baseType bty,Some (reverse_sign sgn))
-  | Type_cocci.Pointer(ty) ->
-      Pointer(wrap(reverse_type ty),make_mcode "*")
-  | Type_cocci.StructUnionName(su,mv,tag) ->
-      if mv
-      then
-       (* not right... *)
-       StructUnionName(reverse_structUnion su,
-                       Some(wrap(MetaId(make_mcode ("",tag),[],Impure))))
-      else
-       StructUnionName(reverse_structUnion su,
-                       Some (wrap(Id(make_mcode tag))))
-  | Type_cocci.TypeName(name) -> TypeName(make_mcode name)
-  | Type_cocci.MetaType(name,_,_) ->
-      MetaType(make_mcode name,Impure(*not really right*))
-  | _ -> raise TyConv
-
-and reverse_baseType t =
-  make_mcode
-    (match t with
-      Type_cocci.VoidType -> Ast.VoidType
-    | Type_cocci.CharType -> Ast.CharType
-    | Type_cocci.BoolType -> Ast.IntType
-    | Type_cocci.ShortType -> Ast.ShortType
-    | Type_cocci.IntType -> Ast.IntType
-    | Type_cocci.DoubleType -> Ast.DoubleType
-    | Type_cocci.FloatType -> Ast.FloatType
-    | Type_cocci.LongType -> Ast.LongType)
-
-and reverse_structUnion t =
-  make_mcode
-    (match t with
-      Type_cocci.Struct -> Ast.Struct
-    | Type_cocci.Union -> Ast.Union)
-
-and reverse_sign t =
-  make_mcode
-    (match t with
-      Type_cocci.Signed -> Ast.Signed
-    | Type_cocci.Unsigned -> Ast.Unsigned)
-
-and reverse_const_vol t =
-  make_mcode
-    (match t with
-      Type_cocci.Const -> Ast.Const
-    | Type_cocci.Volatile -> Ast.Volatile)
-
-(* --------------------------------------------------------------------- *)
-
-let lub_pure x y =
-  match (x,y) with
-    (Impure,_) | (_,Impure) -> Impure
-  | (Pure,Context) | (Context,Pure) -> Impure
-  | (Pure,_) | (_,Pure) -> Pure
-  | (_,Context) | (Context,_) -> Context
-  | _ -> PureContext
-
-(* --------------------------------------------------------------------- *)
-
-let rule_name = ref "" (* for the convenience of the parser *)
diff --git a/parsing_cocci/.#ast0_cocci.ml.1.106 b/parsing_cocci/.#ast0_cocci.ml.1.106
deleted file mode 100644 (file)
index 306fb6a..0000000
+++ /dev/null
@@ -1,645 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module Ast = Ast_cocci
-
-(* --------------------------------------------------------------------- *)
-(* Modified code *)
-
-type arity = OPT | UNIQUE | NONE
-
-type token_info =
-    { tline_start : int; tline_end : int;
-      left_offset : int; right_offset : int }
-let default_token_info =
-  { tline_start = -1; tline_end = -1; left_offset = -1; right_offset = -1 }
-
-(* MIXED is like CONTEXT, since sometimes MIXED things have to revert to
-CONTEXT - see insert_plus.ml *)
-type mcodekind =
-    MINUS       of (Ast.anything list list * token_info) ref
-  | PLUS
-  | CONTEXT     of (Ast.anything Ast.befaft * token_info * token_info) ref
-  | MIXED       of (Ast.anything Ast.befaft * token_info * token_info) ref
-
-type info = { line_start : int; line_end : int;
-             logical_start : int; logical_end : int;
-             attachable_start : bool; attachable_end : bool;
-             mcode_start : mcodekind list; mcode_end : mcodekind list;
-             column : int; offset : int;
-             (* the following are only for + code *)
-             strings_before : string list; strings_after : string list }
-
-type 'a mcode = 'a * arity * info * mcodekind * meta_pos ref (* pos, - only *)
-(* int ref is an index *)
-and 'a wrap =
-    { node : 'a;
-      info : info;
-      index : int ref;
-      mcodekind : mcodekind ref;
-      exp_ty : Type_cocci.typeC option ref; (* only for expressions *)
-      bef_aft : dots_bef_aft; (* only for statements *)
-      true_if_arg : bool; (* true if "arg_exp", only for exprs *)
-      true_if_test : bool; (* true if "test position", only for exprs *)
-      true_if_test_exp : bool;(* true if "test_exp from iso", only for exprs *)
-      (*nonempty if this represents the use of an iso*)
-      iso_info : (string*anything) list }
-
-and dots_bef_aft =
-    NoDots | AddingBetweenDots of statement | DroppingBetweenDots of statement
-
-(* for iso metavariables, true if they can only match nonmodified terms with
-   all metavariables unitary
-   for SP metavariables, true if the metavariable is unitary (valid up to
-   isomorphism phase only)
-   In SP, the only options are impure and context
-*)
-and pure = Impure | Pure | Context | PureContext (* pure and only context *)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-and 'a base_dots =
-    DOTS of 'a list
-  | CIRCLES of 'a list
-  | STARS of 'a list
-
-and 'a dots = 'a base_dots wrap
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-and base_ident =
-    Id of string mcode
-  | MetaId        of Ast.meta_name mcode * ident list * pure
-  | MetaFunc      of Ast.meta_name mcode * ident list * pure
-  | MetaLocalFunc of Ast.meta_name mcode * ident list * pure
-  | OptIdent      of ident
-  | UniqueIdent   of ident
-
-and ident = base_ident wrap
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-and base_expression = 
-    Ident          of ident
-  | Constant       of Ast.constant mcode
-  | FunCall        of expression * string mcode (* ( *) *
-                      expression dots * string mcode (* ) *)
-  | Assignment     of expression * Ast.assignOp mcode * expression *
-                     bool (* true if it can match an initialization *)
-  | CondExpr       of expression * string mcode (* ? *) * expression option *
-                     string mcode (* : *) * expression
-  | Postfix        of expression * Ast.fixOp mcode
-  | Infix          of expression * Ast.fixOp mcode
-  | Unary          of expression * Ast.unaryOp mcode
-  | Binary         of expression * Ast.binaryOp mcode * expression
-  | Nested         of expression * Ast.binaryOp mcode * expression
-  | Paren          of string mcode (* ( *) * expression *
-                      string mcode (* ) *)
-  | ArrayAccess    of expression * string mcode (* [ *) * expression *
-                     string mcode (* ] *)
-  | RecordAccess   of expression * string mcode (* . *) * ident
-  | RecordPtAccess of expression * string mcode (* -> *) * ident
-  | Cast           of string mcode (* ( *) * typeC * string mcode (* ) *) *
-                      expression
-  | SizeOfExpr     of string mcode (* sizeof *) * expression
-  | SizeOfType     of string mcode (* sizeof *) * string mcode (* ( *) *
-                      typeC * string mcode (* ) *)
-  | TypeExp        of typeC (* type name used as an expression, only in args *)
-  | MetaErr        of Ast.meta_name mcode * expression list * pure
-  | MetaExpr       of Ast.meta_name mcode * expression list *
-                     Type_cocci.typeC list option * Ast.form * pure
-  | MetaExprList   of Ast.meta_name mcode (* only in arg lists *) *
-                     listlen * pure
-  | EComma         of string mcode (* only in arg lists *)
-  | DisjExpr       of string mcode * expression list *
-                     string mcode list (* the |s *) * string mcode
-  | NestExpr       of string mcode * expression dots * string mcode *
-                     expression option * Ast.multi
-  | Edots          of string mcode (* ... *) * expression option
-  | Ecircles       of string mcode (* ooo *) * expression option
-  | Estars         of string mcode (* *** *) * expression option
-  | OptExp         of expression
-  | UniqueExp      of expression
-
-and expression = base_expression wrap
-
-and listlen = Ast.meta_name mcode option
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and base_typeC = 
-    ConstVol        of Ast.const_vol mcode * typeC
-  | BaseType        of Ast.baseType mcode * Ast.sign mcode option
-  | ImplicitInt     of Ast.sign mcode
-  | Pointer         of typeC * string mcode (* * *)
-  | FunctionPointer of typeC *
-                 string mcode(* ( *)*string mcode(* * *)*string mcode(* ) *)*
-                  string mcode (* ( *)*parameter_list*string mcode(* ) *)
-  | FunctionType    of typeC option *
-                      string mcode (* ( *) * parameter_list *
-                       string mcode (* ) *)
-  | Array           of typeC * string mcode (* [ *) *
-                      expression option * string mcode (* ] *)
-  | StructUnionName of Ast.structUnion mcode * ident option (* name *)
-  | StructUnionDef  of typeC (* either StructUnionName or metavar *) *
-       string mcode (* { *) * declaration dots * string mcode (* } *)
-  | TypeName        of string mcode
-  | MetaType        of Ast.meta_name mcode * pure
-  | DisjType        of string mcode * typeC list * (* only after iso *)
-                       string mcode list (* the |s *)  * string mcode
-  | OptType         of typeC
-  | UniqueType      of typeC
-
-and typeC = base_typeC wrap
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and base_declaration =
-    Init of Ast.storage mcode option * typeC * ident * string mcode (*=*) *
-       initialiser * string mcode (*;*)
-  | UnInit of Ast.storage mcode option * typeC * ident * string mcode (* ; *)
-  | TyDecl of typeC * string mcode (* ; *)
-  | MacroDecl of ident (* name *) * string mcode (* ( *) *
-        expression dots * string mcode (* ) *) * string mcode (* ; *)
-  | Typedef of string mcode (* typedef *) * typeC * typeC * string mcode (*;*)
-  | DisjDecl   of string mcode * declaration list *
-                  string mcode list (* the |s *)  * string mcode
-  (* Ddots is for a structure declaration *)
-  | Ddots      of string mcode (* ... *) * declaration option (* whencode *)
-  | OptDecl    of declaration
-  | UniqueDecl of declaration
-
-and declaration = base_declaration wrap
-
-(* --------------------------------------------------------------------- *)
-(* Initializers *)
-
-and base_initialiser =
-    InitExpr of expression 
-  | InitList of string mcode (*{*) * initialiser_list * string mcode (*}*)
-  | InitGccDotName of
-      string mcode (*.*) * ident (* name *) * string mcode (*=*) *
-       initialiser (* gccext: *)
-  | InitGccName of ident (* name *) * string mcode (*:*) *
-       initialiser
-  | InitGccIndex of
-      string mcode (*[*) * expression * string mcode (*]*) *
-       string mcode (*=*) * initialiser
-  | InitGccRange of
-      string mcode (*[*) * expression * string mcode (*...*) *
-        expression * string mcode (*]*) * string mcode (*=*) * initialiser
-  | IComma of string mcode (* , *)
-  | Idots  of string mcode (* ... *) * initialiser option (* whencode *)
-  | OptIni    of initialiser
-  | UniqueIni of initialiser
-
-and initialiser = base_initialiser wrap
-
-and initialiser_list = initialiser dots
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and base_parameterTypeDef =
-    VoidParam     of typeC
-  | Param         of typeC * ident option
-  | MetaParam     of Ast.meta_name mcode * pure
-  | MetaParamList of Ast.meta_name mcode * listlen * pure
-  | PComma        of string mcode
-  | Pdots         of string mcode (* ... *)
-  | Pcircles      of string mcode (* ooo *)
-  | OptParam      of parameterTypeDef
-  | UniqueParam   of parameterTypeDef
-
-and parameterTypeDef = base_parameterTypeDef wrap
-
-and parameter_list = parameterTypeDef dots
-
-(* --------------------------------------------------------------------- *)
-(* #define Parameters *)
-
-and base_define_param =
-    DParam        of ident
-  | DPComma       of string mcode
-  | DPdots        of string mcode (* ... *)
-  | DPcircles     of string mcode (* ooo *)
-  | OptDParam     of define_param
-  | UniqueDParam  of define_param
-
-and define_param = base_define_param wrap
-
-and base_define_parameters =
-    NoParams
-  | DParams      of string mcode(*( *) * define_param dots * string mcode(* )*)
-
-and define_parameters = base_define_parameters wrap
-
-(* --------------------------------------------------------------------- *)
-(* Statement*)
-
-and base_statement =
-    Decl          of (info * mcodekind) (* before the decl *) * declaration
-  | Seq           of string mcode (* { *) * statement dots *
-                    string mcode (* } *)
-  | ExprStatement of expression * string mcode (*;*)
-  | IfThen        of string mcode (* if *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                    statement * (info * mcodekind) (* after info *)
-  | IfThenElse    of string mcode (* if *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                    statement * string mcode (* else *) * statement *
-                    (info * mcodekind)
-  | While         of string mcode (* while *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                    statement * (info * mcodekind) (* after info *)
-  | Do            of string mcode (* do *) * statement *
-                     string mcode (* while *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                     string mcode (* ; *)
-  | For           of string mcode (* for *) * string mcode (* ( *) *
-                     expression option * string mcode (*;*) *
-                    expression option * string mcode (*;*) *
-                     expression option * string mcode (* ) *) * statement *
-                    (info * mcodekind) (* after info *)
-  | Iterator      of ident (* name *) * string mcode (* ( *) *
-                    expression dots * string mcode (* ) *) *
-                    statement * (info * mcodekind) (* after info *)
-  | Switch        of string mcode (* switch *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) * string mcode (* { *) *
-                    case_line dots * string mcode (* } *)
-  | Break         of string mcode (* break *) * string mcode (* ; *)
-  | Continue      of string mcode (* continue *) * string mcode (* ; *)
-  | Label         of ident * string mcode (* : *)
-  | Goto          of string mcode (* goto *) * ident * string mcode (* ; *)
-  | Return        of string mcode (* return *) * string mcode (* ; *)
-  | ReturnExpr    of string mcode (* return *) * expression *
-                    string mcode (* ; *)
-  | MetaStmt      of Ast.meta_name mcode * pure
-  | MetaStmtList  of Ast.meta_name mcode(*only in statement lists*) * pure
-  | Exp           of expression  (* only in dotted statement lists *)
-  | TopExp        of expression (* for macros body *)
-  | Ty            of typeC (* only at top level *)
-  | Disj          of string mcode * statement dots list *
-                    string mcode list (* the |s *)  * string mcode
-  | Nest          of string mcode * statement dots * string mcode *
-                    (statement dots,statement) whencode list * Ast.multi
-  | Dots          of string mcode (* ... *) *
-                     (statement dots,statement) whencode list
-  | Circles       of string mcode (* ooo *) *
-                    (statement dots,statement) whencode list
-  | Stars         of string mcode (* *** *) *
-                    (statement dots,statement) whencode list
-  | FunDecl of (info * mcodekind) (* before the function decl *) *
-       fninfo list * ident (* name *) *
-       string mcode (* ( *) * parameter_list * string mcode (* ) *) *
-       string mcode (* { *) * statement dots *
-       string mcode (* } *)
-  | Include of string mcode (* #include *) * Ast.inc_file mcode (* file *)
-  | Define of string mcode (* #define *) * ident (* name *) *
-       define_parameters (*params*) * statement dots
-  | OptStm   of statement
-  | UniqueStm of statement
-
-and fninfo =
-    FStorage of Ast.storage mcode
-  | FType of typeC
-  | FInline of string mcode
-  | FAttr of string mcode
-
-and ('a,'b) whencode =
-    WhenNot of 'a
-  | WhenAlways of 'b
-  | WhenModifier of Ast.when_modifier
-  | WhenNotTrue of expression
-  | WhenNotFalse of expression
-
-and statement = base_statement wrap
-
-and base_case_line =
-    Default of string mcode (* default *) * string mcode (*:*) * statement dots
-  | Case of string mcode (* case *) * expression * string mcode (*:*) *
-       statement dots
-  | OptCase of case_line
-
-and case_line = base_case_line wrap
-
-(* --------------------------------------------------------------------- *)
-(* Positions *)
-
-and meta_pos =
-    MetaPos of Ast.meta_name mcode * Ast.meta_name list * Ast.meta_collect
-  | NoMetaPos
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and base_top_level =
-    DECL of statement
-  | CODE of statement dots
-  | FILEINFO of string mcode (* old file *) * string mcode (* new file *)
-  | ERRORWORDS of expression list
-  | OTHER of statement (* temporary, disappears after top_level.ml *)
-
-and top_level = base_top_level wrap
-and rule = top_level list
-
-and parsed_rule =
-    CocciRule of
-      (rule * Ast.metavar list *
-        (string list * string list * Ast.dependency * string * Ast.exists)) *
-       (rule * Ast.metavar list)
-  | ScriptRule of
-      string * Ast.dependency * (string * Ast.meta_name) list * string
-
-(* --------------------------------------------------------------------- *)
-
-and anything =
-    DotsExprTag of expression dots
-  | DotsInitTag of initialiser dots
-  | DotsParamTag of parameterTypeDef dots
-  | DotsStmtTag of statement dots
-  | DotsDeclTag of declaration dots
-  | DotsCaseTag of case_line dots
-  | IdentTag of ident
-  | ExprTag of expression
-  | ArgExprTag of expression  (* for isos *)
-  | TestExprTag of expression (* for isos *)
-  | TypeCTag of typeC
-  | ParamTag of parameterTypeDef
-  | InitTag of initialiser
-  | DeclTag of declaration
-  | StmtTag of statement
-  | CaseLineTag of case_line
-  | TopTag of top_level
-  | IsoWhenTag of Ast.when_modifier
-  | IsoWhenTTag of expression
-  | IsoWhenFTag of expression
-  | MetaPosTag of meta_pos
-
-let dotsExpr x = DotsExprTag x
-let dotsParam x = DotsParamTag x
-let dotsInit x = DotsInitTag x
-let dotsStmt x = DotsStmtTag x
-let dotsDecl x = DotsDeclTag x
-let dotsCase x = DotsCaseTag x
-let ident x = IdentTag x
-let expr x = ExprTag x
-let typeC x = TypeCTag x
-let param x = ParamTag x
-let ini x = InitTag x
-let decl x = DeclTag x
-let stmt x = StmtTag x
-let case_line x = CaseLineTag x
-let top x = TopTag x
-
-(* --------------------------------------------------------------------- *)
-(* Avoid cluttering the parser.  Calculated in compute_lines.ml. *)
-
-let default_info _ = (* why is this a function? *)
-  { line_start = -1; line_end = -1;
-    logical_start = -1; logical_end = -1;
-    attachable_start = true; attachable_end = true;
-    mcode_start = []; mcode_end = [];
-    column = -1; offset = -1; strings_before = []; strings_after = [] }
-
-let default_befaft _ =
-  MIXED(ref (Ast.NOTHING,default_token_info,default_token_info))
-let context_befaft _ =
-  CONTEXT(ref (Ast.NOTHING,default_token_info,default_token_info))
-
-let wrap x =
-  { node = x;
-    info = default_info();
-    index = ref (-1);
-    mcodekind = ref (default_befaft());
-    exp_ty = ref None;
-    bef_aft = NoDots;
-    true_if_arg = false;
-    true_if_test = false;
-    true_if_test_exp = false;
-    iso_info = [] }
-let context_wrap x =
-  { node = x;
-    info = default_info();
-    index = ref (-1);
-    mcodekind = ref (context_befaft());
-    exp_ty = ref None;
-    bef_aft = NoDots;
-    true_if_arg = false;
-    true_if_test = false;
-    true_if_test_exp = false;
-    iso_info = [] }
-let unwrap x = x.node
-let unwrap_mcode (x,_,_,_,_) = x
-let rewrap model x = { model with node = x }
-let rewrap_mcode (_,arity,info,mcodekind,pos) x = (x,arity,info,mcodekind,pos)
-let copywrap model x =
-  { model with node = x; index = ref !(model.index);
-    mcodekind = ref !(model.mcodekind); exp_ty = ref !(model.exp_ty)}
-let get_pos (_,_,_,_,x) = !x
-let get_pos_ref (_,_,_,_,x) = x
-let set_pos pos (m,arity,info,mcodekind,_) = (m,arity,info,mcodekind,ref pos)
-let get_info x      = x.info
-let set_info x info = {x with info = info}
-let get_line x      = x.info.line_start
-let get_line_end x  = x.info.line_end
-let get_index x     = !(x.index)
-let set_index x i   = x.index := i
-let get_mcodekind x = !(x.mcodekind)
-let get_mcode_mcodekind (_,_,_,mcodekind,_) = mcodekind
-let get_mcodekind_ref x = x.mcodekind
-let set_mcodekind x mk  = x.mcodekind := mk
-let set_type x t        = x.exp_ty := t
-let get_type x          = !(x.exp_ty)
-let get_dots_bef_aft x  = x.bef_aft
-let set_dots_bef_aft x dots_bef_aft = {x with bef_aft = dots_bef_aft}
-let get_arg_exp x       = x.true_if_arg
-let set_arg_exp x       = {x with true_if_arg = true}
-let get_test_pos x      = x.true_if_test
-let set_test_pos x      = {x with true_if_test = true}
-let get_test_exp x      = x.true_if_test_exp
-let set_test_exp x      = {x with true_if_test_exp = true}
-let get_iso x           = x.iso_info
-let set_iso x i = if !Flag.track_iso_usage then {x with iso_info = i} else x
-let set_mcode_data data (_,ar,info,mc,pos) = (data,ar,info,mc,pos)
-
-(* --------------------------------------------------------------------- *)
-
-(* unique indices, for mcode and tree nodes *)
-let index_counter = ref 0
-let fresh_index _ = let cur = !index_counter in index_counter := cur + 1; cur
-
-(* --------------------------------------------------------------------- *)
-
-let undots d =
-  match unwrap d with
-  | DOTS    e -> e
-  | CIRCLES e -> e
-  | STARS   e -> e
-
-(* --------------------------------------------------------------------- *)
-
-let rec ast0_type_to_type ty =
-  match unwrap ty with
-    ConstVol(cv,ty) -> Type_cocci.ConstVol(const_vol cv,ast0_type_to_type ty)
-  | BaseType(bty,None) ->
-      Type_cocci.BaseType(baseType bty,None)
-  | BaseType(bty,Some sgn) ->
-      Type_cocci.BaseType(baseType bty,Some (sign sgn))
-  | ImplicitInt(sgn) ->
-      let bty = Type_cocci.IntType in
-      Type_cocci.BaseType(bty,Some (sign sgn))
-  | Pointer(ty,_) -> Type_cocci.Pointer(ast0_type_to_type ty)
-  | FunctionPointer(ty,_,_,_,_,params,_) ->
-      Type_cocci.FunctionPointer(ast0_type_to_type ty)
-  | FunctionType _ -> failwith "not supported"
-  | Array(ety,_,_,_) -> Type_cocci.Array(ast0_type_to_type ety)
-  | StructUnionName(su,Some tag) ->
-      (match unwrap tag with
-       Id(tag) ->
-         Type_cocci.StructUnionName(structUnion su,false,unwrap_mcode tag)
-      | MetaId(tag,_,_) ->
-         (Printf.printf
-            "warning: struct/union with a metavariable name detected.\n";
-          Printf.printf
-            "For type checking assuming the name of the metavariable is the name of the type\n";
-          let (rule,tag) = unwrap_mcode tag in
-          Type_cocci.StructUnionName(structUnion su,true,rule^tag))
-      | _ -> failwith "unexpected struct/union type name")
-  | StructUnionName(su,None) -> failwith "nameless structure - what to do???"
-  | StructUnionDef(ty,_,_,_) -> ast0_type_to_type ty
-  | TypeName(name) -> Type_cocci.TypeName(unwrap_mcode name)
-  | MetaType(name,_) ->
-      Type_cocci.MetaType(unwrap_mcode name,Type_cocci.Unitary,false)
-  | DisjType(_,types,_,_) -> failwith "unexpected DisjType"
-  | OptType(ty) | UniqueType(ty) ->
-      ast0_type_to_type ty
-
-and baseType t =
-  match unwrap_mcode t with
-    Ast.VoidType -> Type_cocci.VoidType
-  | Ast.CharType -> Type_cocci.CharType
-  | Ast.ShortType -> Type_cocci.ShortType
-  | Ast.IntType -> Type_cocci.IntType
-  | Ast.DoubleType -> Type_cocci.DoubleType
-  | Ast.FloatType -> Type_cocci.FloatType
-  | Ast.LongType -> Type_cocci.LongType
-
-and structUnion t =
-  match unwrap_mcode t with
-    Ast.Struct -> Type_cocci.Struct
-  | Ast.Union -> Type_cocci.Union
-
-and sign t =
-  match unwrap_mcode t with
-    Ast.Signed -> Type_cocci.Signed
-  | Ast.Unsigned -> Type_cocci.Unsigned
-
-and const_vol t =
-  match unwrap_mcode t with
-    Ast.Const -> Type_cocci.Const
-  | Ast.Volatile -> Type_cocci.Volatile
-
-(* --------------------------------------------------------------------- *)
-(* this function is a rather minimal attempt.  the problem is that information
-has been lost.  but since it is only used for metavariable types in the isos,
-perhaps it doesn't matter *)
-let make_mcode x = (x,NONE,default_info(),context_befaft(),ref NoMetaPos)
-let make_mcode_info x info = (x,NONE,info,context_befaft(),ref NoMetaPos)
-
-exception TyConv
-
-let rec reverse_type ty =
-  match ty with
-    Type_cocci.ConstVol(cv,ty) ->
-      ConstVol(reverse_const_vol cv,wrap(reverse_type ty))
-  | Type_cocci.BaseType(bty,None) ->
-      BaseType(reverse_baseType bty,None)
-  | Type_cocci.BaseType(bty,Some sgn) ->
-      BaseType(reverse_baseType bty,Some (reverse_sign sgn))
-  | Type_cocci.Pointer(ty) ->
-      Pointer(wrap(reverse_type ty),make_mcode "*")
-  | Type_cocci.StructUnionName(su,mv,tag) ->
-      if mv
-      then
-       (* not right... *)
-       StructUnionName(reverse_structUnion su,
-                       Some(wrap(MetaId(make_mcode ("",tag),[],Impure))))
-      else
-       StructUnionName(reverse_structUnion su,
-                       Some (wrap(Id(make_mcode tag))))
-  | Type_cocci.TypeName(name) -> TypeName(make_mcode name)
-  | Type_cocci.MetaType(name,_,_) ->
-      MetaType(make_mcode name,Impure(*not really right*))
-  | _ -> raise TyConv
-
-and reverse_baseType t =
-  make_mcode
-    (match t with
-      Type_cocci.VoidType -> Ast.VoidType
-    | Type_cocci.CharType -> Ast.CharType
-    | Type_cocci.BoolType -> Ast.IntType
-    | Type_cocci.ShortType -> Ast.ShortType
-    | Type_cocci.IntType -> Ast.IntType
-    | Type_cocci.DoubleType -> Ast.DoubleType
-    | Type_cocci.FloatType -> Ast.FloatType
-    | Type_cocci.LongType -> Ast.LongType)
-
-and reverse_structUnion t =
-  make_mcode
-    (match t with
-      Type_cocci.Struct -> Ast.Struct
-    | Type_cocci.Union -> Ast.Union)
-
-and reverse_sign t =
-  make_mcode
-    (match t with
-      Type_cocci.Signed -> Ast.Signed
-    | Type_cocci.Unsigned -> Ast.Unsigned)
-
-and reverse_const_vol t =
-  make_mcode
-    (match t with
-      Type_cocci.Const -> Ast.Const
-    | Type_cocci.Volatile -> Ast.Volatile)
-
-(* --------------------------------------------------------------------- *)
-
-let lub_pure x y =
-  match (x,y) with
-    (Impure,_) | (_,Impure) -> Impure
-  | (Pure,Context) | (Context,Pure) -> Impure
-  | (Pure,_) | (_,Pure) -> Pure
-  | (_,Context) | (Context,_) -> Context
-  | _ -> PureContext
-
-(* --------------------------------------------------------------------- *)
-
-let rule_name = ref "" (* for the convenience of the parser *)
diff --git a/parsing_cocci/.#ast0_cocci.ml.1.107 b/parsing_cocci/.#ast0_cocci.ml.1.107
deleted file mode 100644 (file)
index 5d9f214..0000000
+++ /dev/null
@@ -1,646 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module Ast = Ast_cocci
-
-(* --------------------------------------------------------------------- *)
-(* Modified code *)
-
-type arity = OPT | UNIQUE | NONE
-
-type token_info =
-    { tline_start : int; tline_end : int;
-      left_offset : int; right_offset : int }
-let default_token_info =
-  { tline_start = -1; tline_end = -1; left_offset = -1; right_offset = -1 }
-
-(* MIXED is like CONTEXT, since sometimes MIXED things have to revert to
-CONTEXT - see insert_plus.ml *)
-type mcodekind =
-    MINUS       of (Ast.anything list list * token_info) ref
-  | PLUS
-  | CONTEXT     of (Ast.anything Ast.befaft * token_info * token_info) ref
-  | MIXED       of (Ast.anything Ast.befaft * token_info * token_info) ref
-
-type info = { line_start : int; line_end : int;
-             logical_start : int; logical_end : int;
-             attachable_start : bool; attachable_end : bool;
-             mcode_start : mcodekind list; mcode_end : mcodekind list;
-             column : int; offset : int;
-             (* the following are only for + code *)
-             strings_before : string list; strings_after : string list }
-
-type 'a mcode = 'a * arity * info * mcodekind * meta_pos ref (* pos, - only *)
-(* int ref is an index *)
-and 'a wrap =
-    { node : 'a;
-      info : info;
-      index : int ref;
-      mcodekind : mcodekind ref;
-      exp_ty : Type_cocci.typeC option ref; (* only for expressions *)
-      bef_aft : dots_bef_aft; (* only for statements *)
-      true_if_arg : bool; (* true if "arg_exp", only for exprs *)
-      true_if_test : bool; (* true if "test position", only for exprs *)
-      true_if_test_exp : bool;(* true if "test_exp from iso", only for exprs *)
-      (*nonempty if this represents the use of an iso*)
-      iso_info : (string*anything) list }
-
-and dots_bef_aft =
-    NoDots | AddingBetweenDots of statement | DroppingBetweenDots of statement
-
-(* for iso metavariables, true if they can only match nonmodified terms with
-   all metavariables unitary
-   for SP metavariables, true if the metavariable is unitary (valid up to
-   isomorphism phase only)
-   In SP, the only options are impure and context
-*)
-and pure = Impure | Pure | Context | PureContext (* pure and only context *)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-and 'a base_dots =
-    DOTS of 'a list
-  | CIRCLES of 'a list
-  | STARS of 'a list
-
-and 'a dots = 'a base_dots wrap
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-and base_ident =
-    Id of string mcode
-  | MetaId        of Ast.meta_name mcode * ident list * pure
-  | MetaFunc      of Ast.meta_name mcode * ident list * pure
-  | MetaLocalFunc of Ast.meta_name mcode * ident list * pure
-  | OptIdent      of ident
-  | UniqueIdent   of ident
-
-and ident = base_ident wrap
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-and base_expression = 
-    Ident          of ident
-  | Constant       of Ast.constant mcode
-  | FunCall        of expression * string mcode (* ( *) *
-                      expression dots * string mcode (* ) *)
-  | Assignment     of expression * Ast.assignOp mcode * expression *
-                     bool (* true if it can match an initialization *)
-  | CondExpr       of expression * string mcode (* ? *) * expression option *
-                     string mcode (* : *) * expression
-  | Postfix        of expression * Ast.fixOp mcode
-  | Infix          of expression * Ast.fixOp mcode
-  | Unary          of expression * Ast.unaryOp mcode
-  | Binary         of expression * Ast.binaryOp mcode * expression
-  | Nested         of expression * Ast.binaryOp mcode * expression
-  | Paren          of string mcode (* ( *) * expression *
-                      string mcode (* ) *)
-  | ArrayAccess    of expression * string mcode (* [ *) * expression *
-                     string mcode (* ] *)
-  | RecordAccess   of expression * string mcode (* . *) * ident
-  | RecordPtAccess of expression * string mcode (* -> *) * ident
-  | Cast           of string mcode (* ( *) * typeC * string mcode (* ) *) *
-                      expression
-  | SizeOfExpr     of string mcode (* sizeof *) * expression
-  | SizeOfType     of string mcode (* sizeof *) * string mcode (* ( *) *
-                      typeC * string mcode (* ) *)
-  | TypeExp        of typeC (* type name used as an expression, only in args *)
-  | MetaErr        of Ast.meta_name mcode * expression list * pure
-  | MetaExpr       of Ast.meta_name mcode * expression list *
-                     Type_cocci.typeC list option * Ast.form * pure
-  | MetaExprList   of Ast.meta_name mcode (* only in arg lists *) *
-                     listlen * pure
-  | EComma         of string mcode (* only in arg lists *)
-  | DisjExpr       of string mcode * expression list *
-                     string mcode list (* the |s *) * string mcode
-  | NestExpr       of string mcode * expression dots * string mcode *
-                     expression option * Ast.multi
-  | Edots          of string mcode (* ... *) * expression option
-  | Ecircles       of string mcode (* ooo *) * expression option
-  | Estars         of string mcode (* *** *) * expression option
-  | OptExp         of expression
-  | UniqueExp      of expression
-
-and expression = base_expression wrap
-
-and listlen = Ast.meta_name mcode option
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and base_typeC = 
-    ConstVol        of Ast.const_vol mcode * typeC
-  | BaseType        of Ast.baseType mcode * Ast.sign mcode option
-  | ImplicitInt     of Ast.sign mcode
-  | Pointer         of typeC * string mcode (* * *)
-  | FunctionPointer of typeC *
-                 string mcode(* ( *)*string mcode(* * *)*string mcode(* ) *)*
-                  string mcode (* ( *)*parameter_list*string mcode(* ) *)
-  | FunctionType    of typeC option *
-                      string mcode (* ( *) * parameter_list *
-                       string mcode (* ) *)
-  | Array           of typeC * string mcode (* [ *) *
-                      expression option * string mcode (* ] *)
-  | StructUnionName of Ast.structUnion mcode * ident option (* name *)
-  | StructUnionDef  of typeC (* either StructUnionName or metavar *) *
-       string mcode (* { *) * declaration dots * string mcode (* } *)
-  | TypeName        of string mcode
-  | MetaType        of Ast.meta_name mcode * pure
-  | DisjType        of string mcode * typeC list * (* only after iso *)
-                       string mcode list (* the |s *)  * string mcode
-  | OptType         of typeC
-  | UniqueType      of typeC
-
-and typeC = base_typeC wrap
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and base_declaration =
-    Init of Ast.storage mcode option * typeC * ident * string mcode (*=*) *
-       initialiser * string mcode (*;*)
-  | UnInit of Ast.storage mcode option * typeC * ident * string mcode (* ; *)
-  | TyDecl of typeC * string mcode (* ; *)
-  | MacroDecl of ident (* name *) * string mcode (* ( *) *
-        expression dots * string mcode (* ) *) * string mcode (* ; *)
-  | Typedef of string mcode (* typedef *) * typeC * typeC * string mcode (*;*)
-  | DisjDecl   of string mcode * declaration list *
-                  string mcode list (* the |s *)  * string mcode
-  (* Ddots is for a structure declaration *)
-  | Ddots      of string mcode (* ... *) * declaration option (* whencode *)
-  | OptDecl    of declaration
-  | UniqueDecl of declaration
-
-and declaration = base_declaration wrap
-
-(* --------------------------------------------------------------------- *)
-(* Initializers *)
-
-and base_initialiser =
-    InitExpr of expression 
-  | InitList of string mcode (*{*) * initialiser_list * string mcode (*}*)
-  | InitGccDotName of
-      string mcode (*.*) * ident (* name *) * string mcode (*=*) *
-       initialiser (* gccext: *)
-  | InitGccName of ident (* name *) * string mcode (*:*) *
-       initialiser
-  | InitGccIndex of
-      string mcode (*[*) * expression * string mcode (*]*) *
-       string mcode (*=*) * initialiser
-  | InitGccRange of
-      string mcode (*[*) * expression * string mcode (*...*) *
-        expression * string mcode (*]*) * string mcode (*=*) * initialiser
-  | IComma of string mcode (* , *)
-  | Idots  of string mcode (* ... *) * initialiser option (* whencode *)
-  | OptIni    of initialiser
-  | UniqueIni of initialiser
-
-and initialiser = base_initialiser wrap
-
-and initialiser_list = initialiser dots
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and base_parameterTypeDef =
-    VoidParam     of typeC
-  | Param         of typeC * ident option
-  | MetaParam     of Ast.meta_name mcode * pure
-  | MetaParamList of Ast.meta_name mcode * listlen * pure
-  | PComma        of string mcode
-  | Pdots         of string mcode (* ... *)
-  | Pcircles      of string mcode (* ooo *)
-  | OptParam      of parameterTypeDef
-  | UniqueParam   of parameterTypeDef
-
-and parameterTypeDef = base_parameterTypeDef wrap
-
-and parameter_list = parameterTypeDef dots
-
-(* --------------------------------------------------------------------- *)
-(* #define Parameters *)
-
-and base_define_param =
-    DParam        of ident
-  | DPComma       of string mcode
-  | DPdots        of string mcode (* ... *)
-  | DPcircles     of string mcode (* ooo *)
-  | OptDParam     of define_param
-  | UniqueDParam  of define_param
-
-and define_param = base_define_param wrap
-
-and base_define_parameters =
-    NoParams
-  | DParams      of string mcode(*( *) * define_param dots * string mcode(* )*)
-
-and define_parameters = base_define_parameters wrap
-
-(* --------------------------------------------------------------------- *)
-(* Statement*)
-
-and base_statement =
-    Decl          of (info * mcodekind) (* before the decl *) * declaration
-  | Seq           of string mcode (* { *) * statement dots *
-                    string mcode (* } *)
-  | ExprStatement of expression * string mcode (*;*)
-  | IfThen        of string mcode (* if *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                    statement * (info * mcodekind) (* after info *)
-  | IfThenElse    of string mcode (* if *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                    statement * string mcode (* else *) * statement *
-                    (info * mcodekind)
-  | While         of string mcode (* while *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                    statement * (info * mcodekind) (* after info *)
-  | Do            of string mcode (* do *) * statement *
-                     string mcode (* while *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                     string mcode (* ; *)
-  | For           of string mcode (* for *) * string mcode (* ( *) *
-                     expression option * string mcode (*;*) *
-                    expression option * string mcode (*;*) *
-                     expression option * string mcode (* ) *) * statement *
-                    (info * mcodekind) (* after info *)
-  | Iterator      of ident (* name *) * string mcode (* ( *) *
-                    expression dots * string mcode (* ) *) *
-                    statement * (info * mcodekind) (* after info *)
-  | Switch        of string mcode (* switch *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) * string mcode (* { *) *
-                    case_line dots * string mcode (* } *)
-  | Break         of string mcode (* break *) * string mcode (* ; *)
-  | Continue      of string mcode (* continue *) * string mcode (* ; *)
-  | Label         of ident * string mcode (* : *)
-  | Goto          of string mcode (* goto *) * ident * string mcode (* ; *)
-  | Return        of string mcode (* return *) * string mcode (* ; *)
-  | ReturnExpr    of string mcode (* return *) * expression *
-                    string mcode (* ; *)
-  | MetaStmt      of Ast.meta_name mcode * pure
-  | MetaStmtList  of Ast.meta_name mcode(*only in statement lists*) * pure
-  | Exp           of expression  (* only in dotted statement lists *)
-  | TopExp        of expression (* for macros body *)
-  | Ty            of typeC (* only at top level *)
-  | TopInit       of initialiser (* only at top level *)
-  | Disj          of string mcode * statement dots list *
-                    string mcode list (* the |s *)  * string mcode
-  | Nest          of string mcode * statement dots * string mcode *
-                    (statement dots,statement) whencode list * Ast.multi
-  | Dots          of string mcode (* ... *) *
-                     (statement dots,statement) whencode list
-  | Circles       of string mcode (* ooo *) *
-                    (statement dots,statement) whencode list
-  | Stars         of string mcode (* *** *) *
-                    (statement dots,statement) whencode list
-  | FunDecl of (info * mcodekind) (* before the function decl *) *
-       fninfo list * ident (* name *) *
-       string mcode (* ( *) * parameter_list * string mcode (* ) *) *
-       string mcode (* { *) * statement dots *
-       string mcode (* } *)
-  | Include of string mcode (* #include *) * Ast.inc_file mcode (* file *)
-  | Define of string mcode (* #define *) * ident (* name *) *
-       define_parameters (*params*) * statement dots
-  | OptStm   of statement
-  | UniqueStm of statement
-
-and fninfo =
-    FStorage of Ast.storage mcode
-  | FType of typeC
-  | FInline of string mcode
-  | FAttr of string mcode
-
-and ('a,'b) whencode =
-    WhenNot of 'a
-  | WhenAlways of 'b
-  | WhenModifier of Ast.when_modifier
-  | WhenNotTrue of expression
-  | WhenNotFalse of expression
-
-and statement = base_statement wrap
-
-and base_case_line =
-    Default of string mcode (* default *) * string mcode (*:*) * statement dots
-  | Case of string mcode (* case *) * expression * string mcode (*:*) *
-       statement dots
-  | OptCase of case_line
-
-and case_line = base_case_line wrap
-
-(* --------------------------------------------------------------------- *)
-(* Positions *)
-
-and meta_pos =
-    MetaPos of Ast.meta_name mcode * Ast.meta_name list * Ast.meta_collect
-  | NoMetaPos
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and base_top_level =
-    DECL of statement
-  | CODE of statement dots
-  | FILEINFO of string mcode (* old file *) * string mcode (* new file *)
-  | ERRORWORDS of expression list
-  | OTHER of statement (* temporary, disappears after top_level.ml *)
-
-and top_level = base_top_level wrap
-and rule = top_level list
-
-and parsed_rule =
-    CocciRule of
-      (rule * Ast.metavar list *
-        (string list * string list * Ast.dependency * string * Ast.exists)) *
-       (rule * Ast.metavar list)
-  | ScriptRule of
-      string * Ast.dependency * (string * Ast.meta_name) list * string
-
-(* --------------------------------------------------------------------- *)
-
-and anything =
-    DotsExprTag of expression dots
-  | DotsInitTag of initialiser dots
-  | DotsParamTag of parameterTypeDef dots
-  | DotsStmtTag of statement dots
-  | DotsDeclTag of declaration dots
-  | DotsCaseTag of case_line dots
-  | IdentTag of ident
-  | ExprTag of expression
-  | ArgExprTag of expression  (* for isos *)
-  | TestExprTag of expression (* for isos *)
-  | TypeCTag of typeC
-  | ParamTag of parameterTypeDef
-  | InitTag of initialiser
-  | DeclTag of declaration
-  | StmtTag of statement
-  | CaseLineTag of case_line
-  | TopTag of top_level
-  | IsoWhenTag of Ast.when_modifier
-  | IsoWhenTTag of expression
-  | IsoWhenFTag of expression
-  | MetaPosTag of meta_pos
-
-let dotsExpr x = DotsExprTag x
-let dotsParam x = DotsParamTag x
-let dotsInit x = DotsInitTag x
-let dotsStmt x = DotsStmtTag x
-let dotsDecl x = DotsDeclTag x
-let dotsCase x = DotsCaseTag x
-let ident x = IdentTag x
-let expr x = ExprTag x
-let typeC x = TypeCTag x
-let param x = ParamTag x
-let ini x = InitTag x
-let decl x = DeclTag x
-let stmt x = StmtTag x
-let case_line x = CaseLineTag x
-let top x = TopTag x
-
-(* --------------------------------------------------------------------- *)
-(* Avoid cluttering the parser.  Calculated in compute_lines.ml. *)
-
-let default_info _ = (* why is this a function? *)
-  { line_start = -1; line_end = -1;
-    logical_start = -1; logical_end = -1;
-    attachable_start = true; attachable_end = true;
-    mcode_start = []; mcode_end = [];
-    column = -1; offset = -1; strings_before = []; strings_after = [] }
-
-let default_befaft _ =
-  MIXED(ref (Ast.NOTHING,default_token_info,default_token_info))
-let context_befaft _ =
-  CONTEXT(ref (Ast.NOTHING,default_token_info,default_token_info))
-
-let wrap x =
-  { node = x;
-    info = default_info();
-    index = ref (-1);
-    mcodekind = ref (default_befaft());
-    exp_ty = ref None;
-    bef_aft = NoDots;
-    true_if_arg = false;
-    true_if_test = false;
-    true_if_test_exp = false;
-    iso_info = [] }
-let context_wrap x =
-  { node = x;
-    info = default_info();
-    index = ref (-1);
-    mcodekind = ref (context_befaft());
-    exp_ty = ref None;
-    bef_aft = NoDots;
-    true_if_arg = false;
-    true_if_test = false;
-    true_if_test_exp = false;
-    iso_info = [] }
-let unwrap x = x.node
-let unwrap_mcode (x,_,_,_,_) = x
-let rewrap model x = { model with node = x }
-let rewrap_mcode (_,arity,info,mcodekind,pos) x = (x,arity,info,mcodekind,pos)
-let copywrap model x =
-  { model with node = x; index = ref !(model.index);
-    mcodekind = ref !(model.mcodekind); exp_ty = ref !(model.exp_ty)}
-let get_pos (_,_,_,_,x) = !x
-let get_pos_ref (_,_,_,_,x) = x
-let set_pos pos (m,arity,info,mcodekind,_) = (m,arity,info,mcodekind,ref pos)
-let get_info x      = x.info
-let set_info x info = {x with info = info}
-let get_line x      = x.info.line_start
-let get_line_end x  = x.info.line_end
-let get_index x     = !(x.index)
-let set_index x i   = x.index := i
-let get_mcodekind x = !(x.mcodekind)
-let get_mcode_mcodekind (_,_,_,mcodekind,_) = mcodekind
-let get_mcodekind_ref x = x.mcodekind
-let set_mcodekind x mk  = x.mcodekind := mk
-let set_type x t        = x.exp_ty := t
-let get_type x          = !(x.exp_ty)
-let get_dots_bef_aft x  = x.bef_aft
-let set_dots_bef_aft x dots_bef_aft = {x with bef_aft = dots_bef_aft}
-let get_arg_exp x       = x.true_if_arg
-let set_arg_exp x       = {x with true_if_arg = true}
-let get_test_pos x      = x.true_if_test
-let set_test_pos x      = {x with true_if_test = true}
-let get_test_exp x      = x.true_if_test_exp
-let set_test_exp x      = {x with true_if_test_exp = true}
-let get_iso x           = x.iso_info
-let set_iso x i = if !Flag.track_iso_usage then {x with iso_info = i} else x
-let set_mcode_data data (_,ar,info,mc,pos) = (data,ar,info,mc,pos)
-
-(* --------------------------------------------------------------------- *)
-
-(* unique indices, for mcode and tree nodes *)
-let index_counter = ref 0
-let fresh_index _ = let cur = !index_counter in index_counter := cur + 1; cur
-
-(* --------------------------------------------------------------------- *)
-
-let undots d =
-  match unwrap d with
-  | DOTS    e -> e
-  | CIRCLES e -> e
-  | STARS   e -> e
-
-(* --------------------------------------------------------------------- *)
-
-let rec ast0_type_to_type ty =
-  match unwrap ty with
-    ConstVol(cv,ty) -> Type_cocci.ConstVol(const_vol cv,ast0_type_to_type ty)
-  | BaseType(bty,None) ->
-      Type_cocci.BaseType(baseType bty,None)
-  | BaseType(bty,Some sgn) ->
-      Type_cocci.BaseType(baseType bty,Some (sign sgn))
-  | ImplicitInt(sgn) ->
-      let bty = Type_cocci.IntType in
-      Type_cocci.BaseType(bty,Some (sign sgn))
-  | Pointer(ty,_) -> Type_cocci.Pointer(ast0_type_to_type ty)
-  | FunctionPointer(ty,_,_,_,_,params,_) ->
-      Type_cocci.FunctionPointer(ast0_type_to_type ty)
-  | FunctionType _ -> failwith "not supported"
-  | Array(ety,_,_,_) -> Type_cocci.Array(ast0_type_to_type ety)
-  | StructUnionName(su,Some tag) ->
-      (match unwrap tag with
-       Id(tag) ->
-         Type_cocci.StructUnionName(structUnion su,false,unwrap_mcode tag)
-      | MetaId(tag,_,_) ->
-         (Printf.printf
-            "warning: struct/union with a metavariable name detected.\n";
-          Printf.printf
-            "For type checking assuming the name of the metavariable is the name of the type\n";
-          let (rule,tag) = unwrap_mcode tag in
-          Type_cocci.StructUnionName(structUnion su,true,rule^tag))
-      | _ -> failwith "unexpected struct/union type name")
-  | StructUnionName(su,None) -> failwith "nameless structure - what to do???"
-  | StructUnionDef(ty,_,_,_) -> ast0_type_to_type ty
-  | TypeName(name) -> Type_cocci.TypeName(unwrap_mcode name)
-  | MetaType(name,_) ->
-      Type_cocci.MetaType(unwrap_mcode name,Type_cocci.Unitary,false)
-  | DisjType(_,types,_,_) -> failwith "unexpected DisjType"
-  | OptType(ty) | UniqueType(ty) ->
-      ast0_type_to_type ty
-
-and baseType t =
-  match unwrap_mcode t with
-    Ast.VoidType -> Type_cocci.VoidType
-  | Ast.CharType -> Type_cocci.CharType
-  | Ast.ShortType -> Type_cocci.ShortType
-  | Ast.IntType -> Type_cocci.IntType
-  | Ast.DoubleType -> Type_cocci.DoubleType
-  | Ast.FloatType -> Type_cocci.FloatType
-  | Ast.LongType -> Type_cocci.LongType
-
-and structUnion t =
-  match unwrap_mcode t with
-    Ast.Struct -> Type_cocci.Struct
-  | Ast.Union -> Type_cocci.Union
-
-and sign t =
-  match unwrap_mcode t with
-    Ast.Signed -> Type_cocci.Signed
-  | Ast.Unsigned -> Type_cocci.Unsigned
-
-and const_vol t =
-  match unwrap_mcode t with
-    Ast.Const -> Type_cocci.Const
-  | Ast.Volatile -> Type_cocci.Volatile
-
-(* --------------------------------------------------------------------- *)
-(* this function is a rather minimal attempt.  the problem is that information
-has been lost.  but since it is only used for metavariable types in the isos,
-perhaps it doesn't matter *)
-let make_mcode x = (x,NONE,default_info(),context_befaft(),ref NoMetaPos)
-let make_mcode_info x info = (x,NONE,info,context_befaft(),ref NoMetaPos)
-
-exception TyConv
-
-let rec reverse_type ty =
-  match ty with
-    Type_cocci.ConstVol(cv,ty) ->
-      ConstVol(reverse_const_vol cv,wrap(reverse_type ty))
-  | Type_cocci.BaseType(bty,None) ->
-      BaseType(reverse_baseType bty,None)
-  | Type_cocci.BaseType(bty,Some sgn) ->
-      BaseType(reverse_baseType bty,Some (reverse_sign sgn))
-  | Type_cocci.Pointer(ty) ->
-      Pointer(wrap(reverse_type ty),make_mcode "*")
-  | Type_cocci.StructUnionName(su,mv,tag) ->
-      if mv
-      then
-       (* not right... *)
-       StructUnionName(reverse_structUnion su,
-                       Some(wrap(MetaId(make_mcode ("",tag),[],Impure))))
-      else
-       StructUnionName(reverse_structUnion su,
-                       Some (wrap(Id(make_mcode tag))))
-  | Type_cocci.TypeName(name) -> TypeName(make_mcode name)
-  | Type_cocci.MetaType(name,_,_) ->
-      MetaType(make_mcode name,Impure(*not really right*))
-  | _ -> raise TyConv
-
-and reverse_baseType t =
-  make_mcode
-    (match t with
-      Type_cocci.VoidType -> Ast.VoidType
-    | Type_cocci.CharType -> Ast.CharType
-    | Type_cocci.BoolType -> Ast.IntType
-    | Type_cocci.ShortType -> Ast.ShortType
-    | Type_cocci.IntType -> Ast.IntType
-    | Type_cocci.DoubleType -> Ast.DoubleType
-    | Type_cocci.FloatType -> Ast.FloatType
-    | Type_cocci.LongType -> Ast.LongType)
-
-and reverse_structUnion t =
-  make_mcode
-    (match t with
-      Type_cocci.Struct -> Ast.Struct
-    | Type_cocci.Union -> Ast.Union)
-
-and reverse_sign t =
-  make_mcode
-    (match t with
-      Type_cocci.Signed -> Ast.Signed
-    | Type_cocci.Unsigned -> Ast.Unsigned)
-
-and reverse_const_vol t =
-  make_mcode
-    (match t with
-      Type_cocci.Const -> Ast.Const
-    | Type_cocci.Volatile -> Ast.Volatile)
-
-(* --------------------------------------------------------------------- *)
-
-let lub_pure x y =
-  match (x,y) with
-    (Impure,_) | (_,Impure) -> Impure
-  | (Pure,Context) | (Context,Pure) -> Impure
-  | (Pure,_) | (_,Pure) -> Pure
-  | (_,Context) | (Context,_) -> Context
-  | _ -> PureContext
-
-(* --------------------------------------------------------------------- *)
-
-let rule_name = ref "" (* for the convenience of the parser *)
diff --git a/parsing_cocci/.#ast0toast.ml.1.132 b/parsing_cocci/.#ast0toast.ml.1.132
deleted file mode 100644 (file)
index ccc23cc..0000000
+++ /dev/null
@@ -1,916 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Arities matter for the minus slice, but not for the plus slice. *)
-
-(* + only allowed on code in a nest (in_nest = true).  ? only allowed on
-rule_elems, and on subterms if the context is ? also. *)
-
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-module V0 = Visitor_ast0
-module V = Visitor_ast
-
-let unitary = Type_cocci.Unitary
-
-let ctr = ref 0
-let get_ctr _ =
-  let c = !ctr in
-  ctr := !ctr + 1;
-  c
-
-(* --------------------------------------------------------------------- *)
-(* Move plus tokens from the MINUS and CONTEXT structured nodes to the
-corresponding leftmost and rightmost mcodes *)
-
-let inline_mcodes =
-  let bind x y = () in
-  let option_default = () in
-  let mcode _ = () in
-  let do_nothing r k e =
-    k e;
-    let einfo = Ast0.get_info e in
-    match (Ast0.get_mcodekind e) with
-      Ast0.MINUS(replacements) ->
-       (match !replacements with
-         ([],_) -> ()
-       | replacements ->
-           let minus_try = function
-               (true,mc) ->
-                 if List.for_all
-                     (function
-                         Ast0.MINUS(mreplacements) -> true | _ -> false)
-                     mc
-                 then
-                   (List.iter
-                      (function
-                          Ast0.MINUS(mreplacements) ->
-                            mreplacements := replacements
-                        | _ -> ())
-                      mc;
-                    true)
-                 else false
-             | _ -> false in
-           if not (minus_try(einfo.Ast0.attachable_start,
-                             einfo.Ast0.mcode_start)
-                     or
-                   minus_try(einfo.Ast0.attachable_end,
-                             einfo.Ast0.mcode_end))
-           then
-             failwith "minus tree should not have bad code on both sides")
-    | Ast0.CONTEXT(befaft)
-    | Ast0.MIXED(befaft) ->
-       let concat starter startinfo ender endinfo =
-         let lst =
-           match (starter,ender) with
-             ([],_) -> ender
-           | (_,[]) -> starter
-           | _ ->
-               if startinfo.Ast0.tline_end = endinfo.Ast0.tline_start
-               then (* put them in the same inner list *)
-                 let last = List.hd (List.rev starter) in
-                 let butlast = List.rev(List.tl(List.rev starter)) in
-                 butlast @ (last@(List.hd ender)) :: (List.tl ender)
-               else starter @ ender in
-         (lst,
-          {endinfo with Ast0.tline_start = startinfo.Ast0.tline_start}) in
-       let attach_bef bef beforeinfo = function
-           (true,mcl) ->
-             List.iter
-               (function
-                   Ast0.MINUS(mreplacements) ->
-                     let (mrepl,tokeninfo) = !mreplacements in
-                     mreplacements := concat bef beforeinfo mrepl tokeninfo
-                 | Ast0.CONTEXT(mbefaft) ->
-                     (match !mbefaft with
-                       (Ast.BEFORE(mbef),mbeforeinfo,a) ->
-                         let (newbef,newinfo) =
-                           concat bef beforeinfo mbef mbeforeinfo in
-                         mbefaft := (Ast.BEFORE(newbef),newinfo,a)
-                     | (Ast.AFTER(maft),_,a) ->
-                         mbefaft :=
-                           (Ast.BEFOREAFTER(bef,maft),beforeinfo,a)
-                     | (Ast.BEFOREAFTER(mbef,maft),mbeforeinfo,a) ->
-                         let (newbef,newinfo) =
-                           concat bef beforeinfo mbef mbeforeinfo in
-                         mbefaft :=
-                           (Ast.BEFOREAFTER(newbef,maft),newinfo,a)
-                     | (Ast.NOTHING,_,a) ->
-                         mbefaft := (Ast.BEFORE(bef),beforeinfo,a))
-                 |     _ -> failwith "unexpected annotation")
-               mcl
-         | _ ->
-             failwith
-               "context tree should not have bad code on both sides" in
-       let attach_aft aft afterinfo = function
-           (true,mcl) ->
-             List.iter
-               (function
-                   Ast0.MINUS(mreplacements) ->
-                     let (mrepl,tokeninfo) = !mreplacements in
-                     mreplacements := concat mrepl tokeninfo aft afterinfo
-                 | Ast0.CONTEXT(mbefaft) ->
-                     (match !mbefaft with
-                       (Ast.BEFORE(mbef),b,_) ->
-                         mbefaft :=
-                           (Ast.BEFOREAFTER(mbef,aft),b,afterinfo)
-                     | (Ast.AFTER(maft),b,mafterinfo) ->
-                         let (newaft,newinfo) =
-                           concat maft mafterinfo aft afterinfo in
-                         mbefaft := (Ast.AFTER(newaft),b,newinfo)
-                     | (Ast.BEFOREAFTER(mbef,maft),b,mafterinfo) ->
-                         let (newaft,newinfo) =
-                           concat maft mafterinfo aft afterinfo in
-                         mbefaft :=
-                           (Ast.BEFOREAFTER(mbef,newaft),b,newinfo)
-                     | (Ast.NOTHING,b,_) ->
-                         mbefaft := (Ast.AFTER(aft),b,afterinfo))
-                 |     _ -> failwith "unexpected annotation")
-               mcl
-         | _ ->
-             failwith
-               "context tree should not have bad code on both sides" in
-       (match !befaft with
-         (Ast.BEFORE(bef),beforeinfo,_) ->
-           attach_bef bef beforeinfo
-             (einfo.Ast0.attachable_start,einfo.Ast0.mcode_start)
-       | (Ast.AFTER(aft),_,afterinfo) ->
-           attach_aft aft afterinfo
-             (einfo.Ast0.attachable_end,einfo.Ast0.mcode_end)
-       | (Ast.BEFOREAFTER(bef,aft),beforeinfo,afterinfo) ->
-           attach_bef bef beforeinfo
-             (einfo.Ast0.attachable_start,einfo.Ast0.mcode_start);
-           attach_aft aft afterinfo
-             (einfo.Ast0.attachable_end,einfo.Ast0.mcode_end)
-       | (Ast.NOTHING,_,_) -> ())
-    | Ast0.PLUS -> () in
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode mcode mcode
-    do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-    do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-    do_nothing do_nothing do_nothing
-
-(* --------------------------------------------------------------------- *)
-(* For function declarations.  Can't use the mcode at the root, because that
-might be mixed when the function contains ()s, where agglomeration of -s is
-not possible. *)
-
-let check_allminus =
-  let donothing r k e = k e in
-  let bind x y = x && y in
-  let option_default = true in
-  let mcode (_,_,_,mc,_) =
-    match mc with
-      Ast0.MINUS(r) -> let (plusses,_) = !r in plusses = []
-    | _ -> false in
-
-  (* special case for disj *)
-  let expression r k e =
-    match Ast0.unwrap e with
-      Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-       List.for_all r.V0.combiner_expression expr_list
-    | _ -> k e in
-
-  let declaration r k e =
-    match Ast0.unwrap e with
-      Ast0.DisjDecl(starter,decls,mids,ender) ->
-       List.for_all r.V0.combiner_declaration decls
-    | _ -> k e in
-
-  let typeC r k e =
-    match Ast0.unwrap e with
-      Ast0.DisjType(starter,decls,mids,ender) ->
-       List.for_all r.V0.combiner_typeC decls
-    | _ -> k e in
-
-  let statement r k e =
-    match Ast0.unwrap e with
-      Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-       List.for_all r.V0.combiner_statement_dots statement_dots_list
-    | _ -> k e in
-
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode mcode mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing expression typeC donothing donothing declaration
-    statement donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-    
-let get_option fn = function
-    None -> None
-  | Some x -> Some (fn x)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Mcode *)
-       
-let convert_info info =
-  { Ast.line = info.Ast0.line_start; Ast.column = info.Ast0.column;
-    Ast.strbef = info.Ast0.strings_before;
-    Ast.straft = info.Ast0.strings_after; }
-
-let convert_mcodekind = function
-    Ast0.MINUS(replacements) ->
-      let (replacements,_) = !replacements in 
-      Ast.MINUS(Ast.NoPos,replacements)
-  | Ast0.PLUS -> Ast.PLUS
-  | Ast0.CONTEXT(befaft) ->
-      let (befaft,_,_) = !befaft in Ast.CONTEXT(Ast.NoPos,befaft)
-  | Ast0.MIXED(_) -> failwith "not possible for mcode"
-
-let pos_mcode(term,_,info,mcodekind,pos) =
-  (* avoids a recursion problem *)
-  (term,convert_info info,convert_mcodekind mcodekind,Ast.NoMetaPos)
-
-let mcode(term,_,info,mcodekind,pos) =
-  let pos =
-    match !pos with
-      Ast0.MetaPos(pos,constraints,per) ->
-       Ast.MetaPos(pos_mcode pos,constraints,per,unitary,false)
-    | _ -> Ast.NoMetaPos in
-  (term,convert_info info,convert_mcodekind mcodekind,pos)
-
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-let wrap ast line isos =
-  {(Ast.make_term ast) with Ast.node_line = line;
-    Ast.iso_info = isos}
-
-let rewrap ast0 isos ast =
-  wrap ast ((Ast0.get_info ast0).Ast0.line_start) isos
-
-let no_isos = []
-
-(* no isos on tokens *)
-let tokenwrap (_,info,_,_) s ast = wrap ast info.Ast.line no_isos
-let iso_tokenwrap (_,info,_,_) s ast iso = wrap ast info.Ast.line iso
-
-let dots fn d =
-  rewrap d no_isos
-    (match Ast0.unwrap d with
-      Ast0.DOTS(x) -> Ast.DOTS(List.map fn x)
-    | Ast0.CIRCLES(x) -> Ast.CIRCLES(List.map fn x)
-    | Ast0.STARS(x) -> Ast.STARS(List.map fn x))
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-let rec do_isos l = List.map (function (nm,x) -> (nm,anything x)) l
-
-and ident i =
-  rewrap i (do_isos (Ast0.get_iso i))
-    (match Ast0.unwrap i with
-      Ast0.Id(name) -> Ast.Id(mcode name)
-    | Ast0.MetaId(name,constraints,_) ->
-       let constraints = List.map ident constraints in
-       Ast.MetaId(mcode name,constraints,unitary,false)
-    | Ast0.MetaFunc(name,constraints,_) ->
-       let constraints = List.map ident constraints in
-       Ast.MetaFunc(mcode name,constraints,unitary,false)
-    | Ast0.MetaLocalFunc(name,constraints,_) ->
-       let constraints = List.map ident constraints in
-       Ast.MetaLocalFunc(mcode name,constraints,unitary,false)
-    | Ast0.OptIdent(id) -> Ast.OptIdent(ident id)
-    | Ast0.UniqueIdent(id) -> Ast.UniqueIdent(ident id))
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-and expression e =
-  let e1 =
-  rewrap e (do_isos (Ast0.get_iso e))
-    (match Ast0.unwrap e with
-      Ast0.Ident(id) -> Ast.Ident(ident id)
-    | Ast0.Constant(const) ->
-       Ast.Constant(mcode const)
-    | Ast0.FunCall(fn,lp,args,rp) ->
-       let fn = expression fn in
-       let lp = mcode lp in
-       let args = dots expression args in
-       let rp = mcode rp in
-       Ast.FunCall(fn,lp,args,rp)
-    | Ast0.Assignment(left,op,right,simple) ->
-       Ast.Assignment(expression left,mcode op,expression right,simple)
-    | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-       let exp1 = expression exp1 in
-       let why = mcode why in
-       let exp2 = get_option expression exp2 in
-       let colon = mcode colon in
-       let exp3 = expression exp3 in
-       Ast.CondExpr(exp1,why,exp2,colon,exp3)
-    | Ast0.Postfix(exp,op) ->
-       Ast.Postfix(expression exp,mcode op)
-    | Ast0.Infix(exp,op) ->
-       Ast.Infix(expression exp,mcode op)
-    | Ast0.Unary(exp,op) ->
-       Ast.Unary(expression exp,mcode op)
-    | Ast0.Binary(left,op,right) ->
-       Ast.Binary(expression left,mcode op,expression right)
-    | Ast0.Nested(left,op,right) ->
-       Ast.Nested(expression left,mcode op,expression right)
-    | Ast0.Paren(lp,exp,rp) ->
-       Ast.Paren(mcode lp,expression exp,mcode rp)
-    | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-       Ast.ArrayAccess(expression exp1,mcode lb,expression exp2,mcode rb)
-    | Ast0.RecordAccess(exp,pt,field) ->
-       Ast.RecordAccess(expression exp,mcode pt,ident field)
-    | Ast0.RecordPtAccess(exp,ar,field) ->
-       Ast.RecordPtAccess(expression exp,mcode ar,ident field)
-    | Ast0.Cast(lp,ty,rp,exp) ->
-       Ast.Cast(mcode lp,typeC ty,mcode rp,expression exp)
-    | Ast0.SizeOfExpr(szf,exp) ->
-       Ast.SizeOfExpr(mcode szf,expression exp)
-    | Ast0.SizeOfType(szf,lp,ty,rp) ->
-       Ast.SizeOfType(mcode szf, mcode lp,typeC ty,mcode rp)
-    | Ast0.TypeExp(ty) -> Ast.TypeExp(typeC ty)
-    | Ast0.MetaErr(name,constraints,_)  ->
-       let constraints = List.map expression constraints in
-       Ast.MetaErr(mcode name,constraints,unitary,false)
-    | Ast0.MetaExpr(name,constraints,ty,form,_)  ->
-       let constraints = List.map expression constraints in
-       Ast.MetaExpr(mcode name,constraints,unitary,ty,form,false)
-    | Ast0.MetaExprList(name,Some lenname,_) ->
-       Ast.MetaExprList(mcode name,Some (mcode lenname,unitary,false),
-                        unitary,false)
-    | Ast0.MetaExprList(name,None,_) ->
-       Ast.MetaExprList(mcode name,None,unitary,false)
-    | Ast0.EComma(cm)         -> Ast.EComma(mcode cm)
-    | Ast0.DisjExpr(_,exps,_,_)     -> Ast.DisjExpr(List.map expression exps)
-    | Ast0.NestExpr(_,exp_dots,_,whencode,multi) ->
-       let whencode = get_option expression whencode in
-       Ast.NestExpr(dots expression exp_dots,whencode,multi)
-    | Ast0.Edots(dots,whencode) ->
-       let dots = mcode dots in
-       let whencode = get_option expression whencode in
-       Ast.Edots(dots,whencode)
-    | Ast0.Ecircles(dots,whencode) ->
-       let dots = mcode dots in
-       let whencode = get_option expression whencode in
-       Ast.Ecircles(dots,whencode)
-    | Ast0.Estars(dots,whencode) ->
-       let dots = mcode dots in
-       let whencode = get_option expression whencode in
-       Ast.Estars(dots,whencode)
-    | Ast0.OptExp(exp) -> Ast.OptExp(expression exp)
-    | Ast0.UniqueExp(exp) -> Ast.UniqueExp(expression exp)) in
-  if Ast0.get_test_exp e then Ast.set_test_exp e1 else e1
-
-and expression_dots ed = dots expression ed
-  
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and typeC t =
-  rewrap t (do_isos (Ast0.get_iso t))
-    (match Ast0.unwrap t with
-      Ast0.ConstVol(cv,ty) ->
-       let rec collect_disjs t =
-         match Ast0.unwrap t with
-           Ast0.DisjType(_,types,_,_) ->
-             if Ast0.get_iso t = []
-             then List.concat (List.map collect_disjs types)
-             else failwith "unexpected iso on a disjtype"
-         | _ -> [t] in
-       let res =
-         List.map
-           (function ty ->
-             Ast.Type
-               (Some (mcode cv),
-                rewrap ty (do_isos (Ast0.get_iso ty)) (base_typeC ty)))
-           (collect_disjs ty) in
-       (* one could worry that isos are lost because we flatten the
-          disjunctions.  but there should not be isos on the disjunctions
-          themselves. *)
-       (match res with
-         [ty] -> ty
-       | types -> Ast.DisjType(List.map (rewrap t no_isos) types))
-    | Ast0.BaseType(_,_) | Ast0.ImplicitInt(_) | Ast0.Pointer(_,_)
-    | Ast0.FunctionPointer(_,_,_,_,_,_,_) | Ast0.FunctionType(_,_,_,_)
-    | Ast0.Array(_,_,_,_) | Ast0.StructUnionName(_,_)
-    | Ast0.StructUnionDef(_,_,_,_) | Ast0.TypeName(_) | Ast0.MetaType(_,_) ->
-       Ast.Type(None,rewrap t no_isos (base_typeC t))
-    | Ast0.DisjType(_,types,_,_) -> Ast.DisjType(List.map typeC types)
-    | Ast0.OptType(ty) -> Ast.OptType(typeC ty)
-    | Ast0.UniqueType(ty) -> Ast.UniqueType(typeC ty))
-    
-and base_typeC t =
-  match Ast0.unwrap t with
-    Ast0.BaseType(ty,sign) ->
-      Ast.BaseType(mcode ty,get_option mcode sign)
-  | Ast0.ImplicitInt(sgn) -> Ast.ImplicitInt(mcode sgn)
-  | Ast0.Pointer(ty,star) -> Ast.Pointer(typeC ty,mcode star)
-  | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      Ast.FunctionPointer
-       (typeC ty,mcode lp1,mcode star,mcode rp1,
-        mcode lp2,parameter_list params,mcode rp2)
-  | Ast0.FunctionType(ret,lp,params,rp) ->
-      let allminus = check_allminus.V0.combiner_typeC t in
-      Ast.FunctionType
-       (allminus,get_option typeC ret,mcode lp,
-        parameter_list params,mcode rp)
-  | Ast0.Array(ty,lb,size,rb) ->
-      Ast.Array(typeC ty,mcode lb,get_option expression size,mcode rb)
-  | Ast0.StructUnionName(kind,name) ->
-      Ast.StructUnionName(mcode kind,get_option ident name)
-  | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-      Ast.StructUnionDef(typeC ty,mcode lb,
-                        dots declaration decls,
-                        mcode rb)
-  | Ast0.TypeName(name) -> Ast.TypeName(mcode name)
-  | Ast0.MetaType(name,_) ->
-      Ast.MetaType(mcode name,unitary,false)
-  | _ -> failwith "ast0toast: unexpected type"
-       
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-    
-and declaration d =
-  rewrap d (do_isos (Ast0.get_iso d))
-    (match Ast0.unwrap d with
-      Ast0.Init(stg,ty,id,eq,ini,sem) ->
-       let stg = get_option mcode stg in
-       let ty = typeC ty in
-       let id = ident id in
-       let eq = mcode eq in
-       let ini = initialiser ini in
-       let sem = mcode sem in
-       Ast.Init(stg,ty,id,eq,ini,sem)
-    | Ast0.UnInit(stg,ty,id,sem) ->
-       (match Ast0.unwrap ty with
-         Ast0.FunctionType(tyx,lp1,params,rp1) ->
-           let allminus = check_allminus.V0.combiner_declaration d in
-           Ast.UnInit(get_option mcode stg,
-                      rewrap ty (do_isos (Ast0.get_iso ty))
-                        (Ast.Type
-                           (None,
-                            rewrap ty no_isos
-                              (Ast.FunctionType
-                                 (allminus,get_option typeC tyx,mcode lp1,
-                                  parameter_list params,mcode rp1)))),
-                      ident id,mcode sem)
-       | _ -> Ast.UnInit(get_option mcode stg,typeC ty,ident id,mcode sem))
-    | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-       let name = ident name in
-       let lp = mcode lp in
-       let args = dots expression args in
-       let rp = mcode rp in
-       let sem = mcode sem in
-       Ast.MacroDecl(name,lp,args,rp,sem)
-    | Ast0.TyDecl(ty,sem) -> Ast.TyDecl(typeC ty,mcode sem)
-    | Ast0.Typedef(stg,ty,id,sem) ->
-       let id = typeC id in
-       (match Ast.unwrap id with
-         Ast.Type(None,id) -> (* only MetaType or Id *)
-           Ast.Typedef(mcode stg,typeC ty,id,mcode sem)
-       | _ -> failwith "bad typedef")
-    | Ast0.DisjDecl(_,decls,_,_) -> Ast.DisjDecl(List.map declaration decls)
-    | Ast0.Ddots(dots,whencode) ->
-       let dots = mcode dots in
-       let whencode = get_option declaration whencode in
-       Ast.Ddots(dots,whencode)
-    | Ast0.OptDecl(decl) -> Ast.OptDecl(declaration decl)
-    | Ast0.UniqueDecl(decl) -> Ast.UniqueDecl(declaration decl))
-
-and declaration_dots l = dots declaration l
-
-(* --------------------------------------------------------------------- *)
-(* Initialiser *)
-
-and strip_idots initlist =
-  match Ast0.unwrap initlist with
-    Ast0.DOTS(x) ->
-      let (whencode,init) = 
-       List.fold_left
-         (function (prevwhen,previnit) ->
-           function cur ->
-             match Ast0.unwrap cur with
-               Ast0.Idots(dots,Some whencode) ->
-                 (whencode :: prevwhen, previnit)
-             | Ast0.Idots(dots,None) -> (prevwhen,previnit)
-             | _ -> (prevwhen, cur :: previnit))
-         ([],[]) x in
-      (List.rev whencode, List.rev init)
-  | Ast0.CIRCLES(x) | Ast0.STARS(x) -> failwith "not possible for an initlist"
-
-and initialiser i =
-  rewrap i no_isos
-    (match Ast0.unwrap i with
-      Ast0.InitExpr(exp) -> Ast.InitExpr(expression exp)
-    | Ast0.InitList(lb,initlist,rb) ->
-       let (whencode,initlist) =  strip_idots initlist in
-       Ast.InitList(mcode lb,List.map initialiser initlist,mcode rb,
-                    List.map initialiser whencode)
-    | Ast0.InitGccDotName(dot,name,eq,ini) ->
-       Ast.InitGccDotName(mcode dot,ident name,mcode eq,initialiser ini)
-    | Ast0.InitGccName(name,eq,ini) ->
-       Ast.InitGccName(ident name,mcode eq,initialiser ini)
-    | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-       Ast.InitGccIndex(mcode lb,expression exp,mcode rb,mcode eq,
-                         initialiser ini)
-    | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-       Ast.InitGccRange(mcode lb,expression exp1,mcode dots,
-                         expression exp2,mcode rb,mcode eq,initialiser ini)
-    | Ast0.IComma(comma) -> Ast.IComma(mcode comma)
-    | Ast0.Idots(_,_) -> failwith "Idots should have been removed"
-    | Ast0.OptIni(ini) -> Ast.OptIni(initialiser ini)
-    | Ast0.UniqueIni(ini) -> Ast.UniqueIni(initialiser ini))
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-    
-and parameterTypeDef p =
-  rewrap p no_isos
-    (match Ast0.unwrap p with
-      Ast0.VoidParam(ty) -> Ast.VoidParam(typeC ty)
-    | Ast0.Param(ty,id) -> Ast.Param(typeC ty,get_option ident id)
-    | Ast0.MetaParam(name,_) ->
-       Ast.MetaParam(mcode name,unitary,false)
-    | Ast0.MetaParamList(name,Some lenname,_) ->
-       Ast.MetaParamList(mcode name,Some(mcode lenname,unitary,false),
-                         unitary,false)
-    | Ast0.MetaParamList(name,None,_) ->
-       Ast.MetaParamList(mcode name,None,unitary,false)
-    | Ast0.PComma(cm) -> Ast.PComma(mcode cm)
-    | Ast0.Pdots(dots) -> Ast.Pdots(mcode dots)
-    | Ast0.Pcircles(dots) -> Ast.Pcircles(mcode dots)
-    | Ast0.OptParam(param) -> Ast.OptParam(parameterTypeDef param)
-    | Ast0.UniqueParam(param) -> Ast.UniqueParam(parameterTypeDef param))
-
-and parameter_list l = dots parameterTypeDef l
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and statement s =
-  let rec statement seqible s =
-    let rewrap_stmt ast0 ast =
-      let befaft =
-       match Ast0.get_dots_bef_aft s with
-         Ast0.NoDots -> Ast.NoDots
-       | Ast0.DroppingBetweenDots s ->
-           Ast.DroppingBetweenDots (statement seqible s,get_ctr())
-       | Ast0.AddingBetweenDots s ->
-           Ast.AddingBetweenDots (statement seqible s,get_ctr()) in
-      Ast.set_dots_bef_aft befaft (rewrap ast0 no_isos ast) in
-    let rewrap_rule_elem ast0 ast =
-      rewrap ast0 (do_isos (Ast0.get_iso ast0)) ast in
-    rewrap_stmt s
-      (match Ast0.unwrap s with
-       Ast0.Decl((_,bef),decl) ->
-         Ast.Atomic(rewrap_rule_elem s
-                      (Ast.Decl(convert_mcodekind bef,
-                                check_allminus.V0.combiner_statement s,
-                                declaration decl)))
-      | Ast0.Seq(lbrace,body,rbrace) -> 
-         let lbrace = mcode lbrace in
-         let (decls,body) = separate_decls seqible body in
-         let rbrace = mcode rbrace in
-         Ast.Seq(iso_tokenwrap lbrace s (Ast.SeqStart(lbrace))
-                   (do_isos (Ast0.get_iso s)),
-                 decls,body,
-                 tokenwrap rbrace s (Ast.SeqEnd(rbrace)))
-      | Ast0.ExprStatement(exp,sem) ->
-         Ast.Atomic(rewrap_rule_elem s
-                      (Ast.ExprStatement(expression exp,mcode sem)))
-      | Ast0.IfThen(iff,lp,exp,rp,branch,(_,aft)) ->
-         Ast.IfThen
-           (rewrap_rule_elem s
-              (Ast.IfHeader(mcode iff,mcode lp,expression exp,mcode rp)),
-            statement Ast.NotSequencible branch,
-            ([],[],[],convert_mcodekind aft))
-      | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,(_,aft)) ->
-         let els = mcode els in
-         Ast.IfThenElse
-           (rewrap_rule_elem s
-              (Ast.IfHeader(mcode iff,mcode lp,expression exp,mcode rp)),
-            statement Ast.NotSequencible branch1,
-            tokenwrap els s (Ast.Else(els)),
-            statement Ast.NotSequencible branch2,
-            ([],[],[],convert_mcodekind aft))
-      | Ast0.While(wh,lp,exp,rp,body,(_,aft)) ->
-         Ast.While(rewrap_rule_elem s
-                     (Ast.WhileHeader
-                        (mcode wh,mcode lp,expression exp,mcode rp)),
-                   statement Ast.NotSequencible body,
-                   ([],[],[],convert_mcodekind aft))
-      | Ast0.Do(d,body,wh,lp,exp,rp,sem) ->
-         let wh = mcode wh in
-         Ast.Do(rewrap_rule_elem s (Ast.DoHeader(mcode d)),
-                statement Ast.NotSequencible body,
-                tokenwrap wh s
-                  (Ast.WhileTail(wh,mcode lp,expression exp,mcode rp,
-                                 mcode sem)))
-      | Ast0.For(fr,lp,exp1,sem1,exp2,sem2,exp3,rp,body,(_,aft)) ->
-         let fr = mcode fr in
-         let lp = mcode lp in
-         let exp1 = get_option expression exp1 in
-         let sem1 = mcode sem1 in
-         let exp2 = get_option expression exp2 in
-         let sem2= mcode sem2 in
-         let exp3 = get_option expression exp3 in
-         let rp = mcode rp in
-         let body = statement Ast.NotSequencible body in
-         Ast.For(rewrap_rule_elem s
-                   (Ast.ForHeader(fr,lp,exp1,sem1,exp2,sem2,exp3,rp)),
-                 body,([],[],[],convert_mcodekind aft))
-      | Ast0.Iterator(nm,lp,args,rp,body,(_,aft)) ->
-         Ast.Iterator(rewrap_rule_elem s
-                     (Ast.IteratorHeader
-                        (ident nm,mcode lp,
-                         dots expression args,
-                         mcode rp)),
-                   statement Ast.NotSequencible body,
-                   ([],[],[],convert_mcodekind aft))
-      |        Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-         let switch = mcode switch in
-         let lp = mcode lp in
-         let exp = expression exp in
-         let rp = mcode rp in
-         let lb = mcode lb in
-         let cases = List.map case_line (Ast0.undots cases) in
-         let rb = mcode rb in
-         Ast.Switch(rewrap_rule_elem s (Ast.SwitchHeader(switch,lp,exp,rp)),
-                    tokenwrap lb s (Ast.SeqStart(lb)),
-                    cases,
-                    tokenwrap rb s (Ast.SeqEnd(rb)))
-      | Ast0.Break(br,sem) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Break(mcode br,mcode sem)))
-      | Ast0.Continue(cont,sem) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Continue(mcode cont,mcode sem)))
-      |        Ast0.Label(l,dd) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Label(ident l,mcode dd)))
-      |        Ast0.Goto(goto,l,sem) ->
-         Ast.Atomic
-           (rewrap_rule_elem s (Ast.Goto(mcode goto,ident l,mcode sem)))
-      | Ast0.Return(ret,sem) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Return(mcode ret,mcode sem)))
-      | Ast0.ReturnExpr(ret,exp,sem) ->
-         Ast.Atomic
-           (rewrap_rule_elem s
-              (Ast.ReturnExpr(mcode ret,expression exp,mcode sem)))
-      | Ast0.MetaStmt(name,_) ->
-         Ast.Atomic(rewrap_rule_elem s
-                      (Ast.MetaStmt(mcode name,unitary,seqible,false)))
-      | Ast0.MetaStmtList(name,_) ->
-         Ast.Atomic(rewrap_rule_elem s
-                      (Ast.MetaStmtList(mcode name,unitary,false)))
-      | Ast0.TopExp(exp) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.TopExp(expression exp)))
-      | Ast0.Exp(exp) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Exp(expression exp)))
-      | Ast0.Ty(ty) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Ty(typeC ty)))
-      | Ast0.Disj(_,rule_elem_dots_list,_,_) ->
-         Ast.Disj(List.map (function x -> statement_dots seqible x)
-                    rule_elem_dots_list)
-      | Ast0.Nest(_,rule_elem_dots,_,whn,multi) ->
-         Ast.Nest
-           (statement_dots Ast.Sequencible rule_elem_dots,
-            List.map
-              (whencode (statement_dots Ast.Sequencible)
-                (statement Ast.NotSequencible))
-              whn,
-            multi,[],[])
-      | Ast0.Dots(d,whn) ->
-         let d = mcode d in
-         let whn =
-           List.map
-             (whencode (statement_dots Ast.Sequencible)
-                (statement Ast.NotSequencible))
-             whn in
-         Ast.Dots(d,whn,[],[])
-      | Ast0.Circles(d,whn) ->
-         let d = mcode d in
-         let whn =
-           List.map
-             (whencode (statement_dots Ast.Sequencible)
-                (statement Ast.NotSequencible))
-             whn in
-         Ast.Circles(d,whn,[],[])
-      | Ast0.Stars(d,whn) ->
-         let d = mcode d in
-         let whn =
-           List.map
-             (whencode (statement_dots Ast.Sequencible)
-                (statement Ast.NotSequencible))
-             whn in
-         Ast.Stars(d,whn,[],[])
-      | Ast0.FunDecl((_,bef),fi,name,lp,params,rp,lbrace,body,rbrace) ->
-         let fi = List.map fninfo fi in
-         let name = ident name in
-         let lp = mcode lp in
-         let params = parameter_list params in
-         let rp = mcode rp in
-         let lbrace = mcode lbrace in
-         let (decls,body) = separate_decls seqible body in
-         let rbrace = mcode rbrace in
-         let allminus = check_allminus.V0.combiner_statement s in
-         Ast.FunDecl(rewrap_rule_elem s
-                       (Ast.FunHeader(convert_mcodekind bef,
-                                      allminus,fi,name,lp,params,rp)),
-                     tokenwrap lbrace s (Ast.SeqStart(lbrace)),
-                     decls,body,
-                     tokenwrap rbrace s (Ast.SeqEnd(rbrace)))
-      |        Ast0.Include(inc,str) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Include(mcode inc,mcode str)))
-      | Ast0.Define(def,id,params,body) ->
-         Ast.Define
-           (rewrap_rule_elem s
-              (Ast.DefineHeader
-                 (mcode def,ident id, define_parameters params)),
-            statement_dots Ast.NotSequencible (*not sure*) body)
-      | Ast0.OptStm(stm) -> Ast.OptStm(statement seqible stm)
-      | Ast0.UniqueStm(stm) -> Ast.UniqueStm(statement seqible stm))
-
-  and define_parameters p =
-    rewrap p no_isos
-      (match Ast0.unwrap p with
-       Ast0.NoParams -> Ast.NoParams
-      | Ast0.DParams(lp,params,rp) ->
-         Ast.DParams(mcode lp,
-                     dots define_param params,
-                     mcode rp))
-
-  and define_param p =
-    rewrap p no_isos
-      (match Ast0.unwrap p with
-       Ast0.DParam(id) -> Ast.DParam(ident id)
-      | Ast0.DPComma(comma) -> Ast.DPComma(mcode comma)
-      | Ast0.DPdots(d) -> Ast.DPdots(mcode d)
-      | Ast0.DPcircles(c) -> Ast.DPcircles(mcode c)
-      | Ast0.OptDParam(dp) -> Ast.OptDParam(define_param dp)
-      | Ast0.UniqueDParam(dp) -> Ast.UniqueDParam(define_param dp))
-
-  and whencode notfn alwaysfn = function
-      Ast0.WhenNot a -> Ast.WhenNot (notfn a)
-    | Ast0.WhenAlways a -> Ast.WhenAlways (alwaysfn a)
-    | Ast0.WhenModifier(x) -> Ast.WhenModifier(x)
-
-  and process_list seqible isos = function
-      [] -> []
-    | x::rest ->
-       let first = statement seqible x in
-       let first =
-         if !Flag.track_iso_usage
-         then Ast.set_isos first (isos@(Ast.get_isos first))
-         else first in
-       (match Ast0.unwrap x with
-         Ast0.Dots(_,_) | Ast0.Nest(_) ->
-           first::(process_list (Ast.SequencibleAfterDots []) no_isos rest)
-       | _ ->
-           first::(process_list Ast.Sequencible no_isos rest))
-
-  and statement_dots seqible d =
-    let isos = do_isos (Ast0.get_iso d) in
-    rewrap d no_isos
-      (match Ast0.unwrap d with
-       Ast0.DOTS(x) -> Ast.DOTS(process_list seqible isos x)
-      | Ast0.CIRCLES(x) -> Ast.CIRCLES(process_list seqible isos x)
-      | Ast0.STARS(x) -> Ast.STARS(process_list seqible isos x))
-
-  and separate_decls seqible d =
-    let rec collect_decls = function
-       [] -> ([],[])
-      | (x::xs) as l ->
-         (match Ast0.unwrap x with
-           Ast0.Decl(_) ->
-             let (decls,other) = collect_decls xs in
-             (x :: decls,other)
-         | Ast0.Dots(_,_) | Ast0.Nest(_,_,_,_,_) ->
-             let (decls,other) = collect_decls xs in
-             (match decls with
-               [] -> ([],x::other)
-             | _ -> (x :: decls,other))
-         | Ast0.Disj(starter,stmt_dots_list,mids,ender) ->
-             let disjs = List.map collect_dot_decls stmt_dots_list in
-             let all_decls = List.for_all (function (_,s) -> s=[]) disjs in
-             if all_decls
-             then
-               let (decls,other) = collect_decls xs in
-               (x :: decls,other)
-             else ([],l)
-         | _ -> ([],l))
-
-    and collect_dot_decls d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(x) -> collect_decls x
-      | Ast0.CIRCLES(x) -> collect_decls x
-      | Ast0.STARS(x) -> collect_decls x in
-
-    let process l d fn =
-      let (decls,other) = collect_decls l in
-      (rewrap d no_isos (fn (List.map (statement seqible) decls)),
-       rewrap d no_isos
-        (fn (process_list seqible (do_isos (Ast0.get_iso d)) other))) in
-    match Ast0.unwrap d with
-      Ast0.DOTS(x) -> process x d (function x -> Ast.DOTS x)
-    | Ast0.CIRCLES(x) -> process x d (function x -> Ast.CIRCLES x)
-    | Ast0.STARS(x) -> process x d (function x -> Ast.STARS x) in
-
-  statement Ast.Sequencible s
-
-and fninfo = function
-    Ast0.FStorage(stg) -> Ast.FStorage(mcode stg)
-  | Ast0.FType(ty) -> Ast.FType(typeC ty)
-  | Ast0.FInline(inline) -> Ast.FInline(mcode inline)
-  | Ast0.FAttr(attr) -> Ast.FAttr(mcode attr)
-
-and option_to_list = function
-    Some x -> [x]
-  | None -> []
-
-and case_line c =
-  rewrap c no_isos
-    (match Ast0.unwrap c with
-      Ast0.Default(def,colon,code) ->
-       let def = mcode def in
-       let colon = mcode colon in
-       let code = dots statement code in
-       Ast.CaseLine(rewrap c no_isos (Ast.Default(def,colon)),code)
-    | Ast0.Case(case,exp,colon,code) ->
-       let case = mcode case in
-       let exp = expression exp in
-       let colon = mcode colon in
-       let code = dots statement code in
-       Ast.CaseLine(rewrap c no_isos (Ast.Case(case,exp,colon)),code)
-    | Ast0.OptCase(case) -> Ast.OptCase(case_line case))
-
-and statement_dots l = dots statement l
-    
-(* --------------------------------------------------------------------- *)
-
-(* what is possible is only what is at the top level in an iso *)
-and anything = function
-    Ast0.DotsExprTag(d) -> Ast.ExprDotsTag(expression_dots d)
-  | Ast0.DotsParamTag(d) -> Ast.ParamDotsTag(parameter_list d)
-  | Ast0.DotsInitTag(d) -> failwith "not possible"
-  | Ast0.DotsStmtTag(d) -> Ast.StmtDotsTag(statement_dots d)
-  | Ast0.DotsDeclTag(d) -> Ast.DeclDotsTag(declaration_dots d)
-  | Ast0.DotsCaseTag(d) -> failwith "not possible"
-  | Ast0.IdentTag(d) -> Ast.IdentTag(ident d)
-  | Ast0.ExprTag(d) -> Ast.ExpressionTag(expression d)
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-     failwith "only in isos, not converted to ast"
-  | Ast0.TypeCTag(d) -> Ast.FullTypeTag(typeC d)
-  | Ast0.ParamTag(d) -> Ast.ParamTag(parameterTypeDef d)
-  | Ast0.InitTag(d) -> Ast.InitTag(initialiser d)
-  | Ast0.DeclTag(d) -> Ast.DeclarationTag(declaration d)
-  | Ast0.StmtTag(d) -> Ast.StatementTag(statement d)
-  | Ast0.CaseLineTag(d) -> Ast.CaseLineTag(case_line d)
-  | Ast0.TopTag(d) -> Ast.Code(top_level d)
-  | Ast0.IsoWhenTag(_) -> failwith "not possible"
-  | Ast0.MetaPosTag _ -> failwith "not possible"
-
-(* --------------------------------------------------------------------- *)
-(* Function declaration *)
-(* top level isos are probably lost to tracking *)
-    
-and top_level t =
-  rewrap t no_isos
-    (match Ast0.unwrap t with
-      Ast0.FILEINFO(old_file,new_file) ->
-       Ast.FILEINFO(mcode old_file,mcode new_file)
-    | Ast0.DECL(stmt) -> Ast.DECL(statement stmt)
-    | Ast0.CODE(rule_elem_dots) ->
-       Ast.CODE(statement_dots rule_elem_dots)
-    | Ast0.ERRORWORDS(exps) -> Ast.ERRORWORDS(List.map expression exps)
-    | Ast0.OTHER(_) -> failwith "eliminated by top_level")
-
-(* --------------------------------------------------------------------- *)
-(* Entry point for minus code *)
-
-(* Inline_mcodes is very important - sends + code attached to the - code
-down to the mcodes.  The functions above can only be used when there is no
-attached + code, eg in + code itself. *)
-let ast0toast_toplevel x =
-  inline_mcodes.V0.combiner_top_level x;
-  top_level x
-
-let ast0toast name deps dropped exists x is_exp =
-  List.iter inline_mcodes.V0.combiner_top_level x;
-  Ast.CocciRule (name,(deps,dropped,exists),List.map top_level x,is_exp)
diff --git a/parsing_cocci/.#ast0toast.ml.1.133 b/parsing_cocci/.#ast0toast.ml.1.133
deleted file mode 100644 (file)
index 1948804..0000000
+++ /dev/null
@@ -1,927 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Arities matter for the minus slice, but not for the plus slice. *)
-
-(* + only allowed on code in a nest (in_nest = true).  ? only allowed on
-rule_elems, and on subterms if the context is ? also. *)
-
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-module V0 = Visitor_ast0
-module V = Visitor_ast
-
-let unitary = Type_cocci.Unitary
-
-let ctr = ref 0
-let get_ctr _ =
-  let c = !ctr in
-  ctr := !ctr + 1;
-  c
-
-(* --------------------------------------------------------------------- *)
-(* Move plus tokens from the MINUS and CONTEXT structured nodes to the
-corresponding leftmost and rightmost mcodes *)
-
-let inline_mcodes =
-  let bind x y = () in
-  let option_default = () in
-  let mcode _ = () in
-  let do_nothing r k e =
-    k e;
-    let einfo = Ast0.get_info e in
-    match (Ast0.get_mcodekind e) with
-      Ast0.MINUS(replacements) ->
-       (match !replacements with
-         ([],_) -> ()
-       | replacements ->
-           let minus_try = function
-               (true,mc) ->
-                 if List.for_all
-                     (function
-                         Ast0.MINUS(mreplacements) -> true | _ -> false)
-                     mc
-                 then
-                   (List.iter
-                      (function
-                          Ast0.MINUS(mreplacements) ->
-                            mreplacements := replacements
-                        | _ -> ())
-                      mc;
-                    true)
-                 else false
-             | _ -> false in
-           if not (minus_try(einfo.Ast0.attachable_start,
-                             einfo.Ast0.mcode_start)
-                     or
-                   minus_try(einfo.Ast0.attachable_end,
-                             einfo.Ast0.mcode_end))
-           then
-             failwith "minus tree should not have bad code on both sides")
-    | Ast0.CONTEXT(befaft)
-    | Ast0.MIXED(befaft) ->
-       let concat starter startinfo ender endinfo =
-         let lst =
-           match (starter,ender) with
-             ([],_) -> ender
-           | (_,[]) -> starter
-           | _ ->
-               if startinfo.Ast0.tline_end = endinfo.Ast0.tline_start
-               then (* put them in the same inner list *)
-                 let last = List.hd (List.rev starter) in
-                 let butlast = List.rev(List.tl(List.rev starter)) in
-                 butlast @ (last@(List.hd ender)) :: (List.tl ender)
-               else starter @ ender in
-         (lst,
-          {endinfo with Ast0.tline_start = startinfo.Ast0.tline_start}) in
-       let attach_bef bef beforeinfo = function
-           (true,mcl) ->
-             List.iter
-               (function
-                   Ast0.MINUS(mreplacements) ->
-                     let (mrepl,tokeninfo) = !mreplacements in
-                     mreplacements := concat bef beforeinfo mrepl tokeninfo
-                 | Ast0.CONTEXT(mbefaft) ->
-                     (match !mbefaft with
-                       (Ast.BEFORE(mbef),mbeforeinfo,a) ->
-                         let (newbef,newinfo) =
-                           concat bef beforeinfo mbef mbeforeinfo in
-                         mbefaft := (Ast.BEFORE(newbef),newinfo,a)
-                     | (Ast.AFTER(maft),_,a) ->
-                         mbefaft :=
-                           (Ast.BEFOREAFTER(bef,maft),beforeinfo,a)
-                     | (Ast.BEFOREAFTER(mbef,maft),mbeforeinfo,a) ->
-                         let (newbef,newinfo) =
-                           concat bef beforeinfo mbef mbeforeinfo in
-                         mbefaft :=
-                           (Ast.BEFOREAFTER(newbef,maft),newinfo,a)
-                     | (Ast.NOTHING,_,a) ->
-                         mbefaft := (Ast.BEFORE(bef),beforeinfo,a))
-                 |     _ -> failwith "unexpected annotation")
-               mcl
-         | _ ->
-             failwith
-               "context tree should not have bad code on both sides" in
-       let attach_aft aft afterinfo = function
-           (true,mcl) ->
-             List.iter
-               (function
-                   Ast0.MINUS(mreplacements) ->
-                     let (mrepl,tokeninfo) = !mreplacements in
-                     mreplacements := concat mrepl tokeninfo aft afterinfo
-                 | Ast0.CONTEXT(mbefaft) ->
-                     (match !mbefaft with
-                       (Ast.BEFORE(mbef),b,_) ->
-                         mbefaft :=
-                           (Ast.BEFOREAFTER(mbef,aft),b,afterinfo)
-                     | (Ast.AFTER(maft),b,mafterinfo) ->
-                         let (newaft,newinfo) =
-                           concat maft mafterinfo aft afterinfo in
-                         mbefaft := (Ast.AFTER(newaft),b,newinfo)
-                     | (Ast.BEFOREAFTER(mbef,maft),b,mafterinfo) ->
-                         let (newaft,newinfo) =
-                           concat maft mafterinfo aft afterinfo in
-                         mbefaft :=
-                           (Ast.BEFOREAFTER(mbef,newaft),b,newinfo)
-                     | (Ast.NOTHING,b,_) ->
-                         mbefaft := (Ast.AFTER(aft),b,afterinfo))
-                 |     _ -> failwith "unexpected annotation")
-               mcl
-         | _ ->
-             failwith
-               "context tree should not have bad code on both sides" in
-       (match !befaft with
-         (Ast.BEFORE(bef),beforeinfo,_) ->
-           attach_bef bef beforeinfo
-             (einfo.Ast0.attachable_start,einfo.Ast0.mcode_start)
-       | (Ast.AFTER(aft),_,afterinfo) ->
-           attach_aft aft afterinfo
-             (einfo.Ast0.attachable_end,einfo.Ast0.mcode_end)
-       | (Ast.BEFOREAFTER(bef,aft),beforeinfo,afterinfo) ->
-           attach_bef bef beforeinfo
-             (einfo.Ast0.attachable_start,einfo.Ast0.mcode_start);
-           attach_aft aft afterinfo
-             (einfo.Ast0.attachable_end,einfo.Ast0.mcode_end)
-       | (Ast.NOTHING,_,_) -> ())
-    | Ast0.PLUS -> () in
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode mcode mcode
-    do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-    do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-    do_nothing do_nothing do_nothing
-
-(* --------------------------------------------------------------------- *)
-(* For function declarations.  Can't use the mcode at the root, because that
-might be mixed when the function contains ()s, where agglomeration of -s is
-not possible. *)
-
-let check_allminus =
-  let donothing r k e = k e in
-  let bind x y = x && y in
-  let option_default = true in
-  let mcode (_,_,_,mc,_) =
-    match mc with
-      Ast0.MINUS(r) -> let (plusses,_) = !r in plusses = []
-    | _ -> false in
-
-  (* special case for disj *)
-  let expression r k e =
-    match Ast0.unwrap e with
-      Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-       List.for_all r.V0.combiner_expression expr_list
-    | _ -> k e in
-
-  let declaration r k e =
-    match Ast0.unwrap e with
-      Ast0.DisjDecl(starter,decls,mids,ender) ->
-       List.for_all r.V0.combiner_declaration decls
-    | _ -> k e in
-
-  let typeC r k e =
-    match Ast0.unwrap e with
-      Ast0.DisjType(starter,decls,mids,ender) ->
-       List.for_all r.V0.combiner_typeC decls
-    | _ -> k e in
-
-  let statement r k e =
-    match Ast0.unwrap e with
-      Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-       List.for_all r.V0.combiner_statement_dots statement_dots_list
-    | _ -> k e in
-
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode mcode mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing expression typeC donothing donothing declaration
-    statement donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-    
-let get_option fn = function
-    None -> None
-  | Some x -> Some (fn x)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Mcode *)
-       
-let convert_info info =
-  { Ast.line = info.Ast0.line_start; Ast.column = info.Ast0.column;
-    Ast.strbef = info.Ast0.strings_before;
-    Ast.straft = info.Ast0.strings_after; }
-
-let convert_mcodekind = function
-    Ast0.MINUS(replacements) ->
-      let (replacements,_) = !replacements in 
-      Ast.MINUS(Ast.NoPos,replacements)
-  | Ast0.PLUS -> Ast.PLUS
-  | Ast0.CONTEXT(befaft) ->
-      let (befaft,_,_) = !befaft in Ast.CONTEXT(Ast.NoPos,befaft)
-  | Ast0.MIXED(_) -> failwith "not possible for mcode"
-
-let pos_mcode(term,_,info,mcodekind,pos) =
-  (* avoids a recursion problem *)
-  (term,convert_info info,convert_mcodekind mcodekind,Ast.NoMetaPos)
-
-let mcode(term,_,info,mcodekind,pos) =
-  let pos =
-    match !pos with
-      Ast0.MetaPos(pos,constraints,per) ->
-       Ast.MetaPos(pos_mcode pos,constraints,per,unitary,false)
-    | _ -> Ast.NoMetaPos in
-  (term,convert_info info,convert_mcodekind mcodekind,pos)
-
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-let wrap ast line isos =
-  {(Ast.make_term ast) with Ast.node_line = line;
-    Ast.iso_info = isos}
-
-let rewrap ast0 isos ast =
-  wrap ast ((Ast0.get_info ast0).Ast0.line_start) isos
-
-let no_isos = []
-
-(* no isos on tokens *)
-let tokenwrap (_,info,_,_) s ast = wrap ast info.Ast.line no_isos
-let iso_tokenwrap (_,info,_,_) s ast iso = wrap ast info.Ast.line iso
-
-let dots fn d =
-  rewrap d no_isos
-    (match Ast0.unwrap d with
-      Ast0.DOTS(x) -> Ast.DOTS(List.map fn x)
-    | Ast0.CIRCLES(x) -> Ast.CIRCLES(List.map fn x)
-    | Ast0.STARS(x) -> Ast.STARS(List.map fn x))
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-let rec do_isos l = List.map (function (nm,x) -> (nm,anything x)) l
-
-and ident i =
-  rewrap i (do_isos (Ast0.get_iso i))
-    (match Ast0.unwrap i with
-      Ast0.Id(name) -> Ast.Id(mcode name)
-    | Ast0.MetaId(name,constraints,_) ->
-       let constraints = List.map ident constraints in
-       Ast.MetaId(mcode name,constraints,unitary,false)
-    | Ast0.MetaFunc(name,constraints,_) ->
-       let constraints = List.map ident constraints in
-       Ast.MetaFunc(mcode name,constraints,unitary,false)
-    | Ast0.MetaLocalFunc(name,constraints,_) ->
-       let constraints = List.map ident constraints in
-       Ast.MetaLocalFunc(mcode name,constraints,unitary,false)
-    | Ast0.OptIdent(id) -> Ast.OptIdent(ident id)
-    | Ast0.UniqueIdent(id) -> Ast.UniqueIdent(ident id))
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-and expression e =
-  let e1 =
-  rewrap e (do_isos (Ast0.get_iso e))
-    (match Ast0.unwrap e with
-      Ast0.Ident(id) -> Ast.Ident(ident id)
-    | Ast0.Constant(const) ->
-       Ast.Constant(mcode const)
-    | Ast0.FunCall(fn,lp,args,rp) ->
-       let fn = expression fn in
-       let lp = mcode lp in
-       let args = dots expression args in
-       let rp = mcode rp in
-       Ast.FunCall(fn,lp,args,rp)
-    | Ast0.Assignment(left,op,right,simple) ->
-       Ast.Assignment(expression left,mcode op,expression right,simple)
-    | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-       let exp1 = expression exp1 in
-       let why = mcode why in
-       let exp2 = get_option expression exp2 in
-       let colon = mcode colon in
-       let exp3 = expression exp3 in
-       Ast.CondExpr(exp1,why,exp2,colon,exp3)
-    | Ast0.Postfix(exp,op) ->
-       Ast.Postfix(expression exp,mcode op)
-    | Ast0.Infix(exp,op) ->
-       Ast.Infix(expression exp,mcode op)
-    | Ast0.Unary(exp,op) ->
-       Ast.Unary(expression exp,mcode op)
-    | Ast0.Binary(left,op,right) ->
-       Ast.Binary(expression left,mcode op,expression right)
-    | Ast0.Nested(left,op,right) ->
-       Ast.Nested(expression left,mcode op,expression right)
-    | Ast0.Paren(lp,exp,rp) ->
-       Ast.Paren(mcode lp,expression exp,mcode rp)
-    | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-       Ast.ArrayAccess(expression exp1,mcode lb,expression exp2,mcode rb)
-    | Ast0.RecordAccess(exp,pt,field) ->
-       Ast.RecordAccess(expression exp,mcode pt,ident field)
-    | Ast0.RecordPtAccess(exp,ar,field) ->
-       Ast.RecordPtAccess(expression exp,mcode ar,ident field)
-    | Ast0.Cast(lp,ty,rp,exp) ->
-       Ast.Cast(mcode lp,typeC ty,mcode rp,expression exp)
-    | Ast0.SizeOfExpr(szf,exp) ->
-       Ast.SizeOfExpr(mcode szf,expression exp)
-    | Ast0.SizeOfType(szf,lp,ty,rp) ->
-       Ast.SizeOfType(mcode szf, mcode lp,typeC ty,mcode rp)
-    | Ast0.TypeExp(ty) -> Ast.TypeExp(typeC ty)
-    | Ast0.MetaErr(name,constraints,_)  ->
-       let constraints = List.map expression constraints in
-       Ast.MetaErr(mcode name,constraints,unitary,false)
-    | Ast0.MetaExpr(name,constraints,ty,form,_)  ->
-       let constraints = List.map expression constraints in
-       Ast.MetaExpr(mcode name,constraints,unitary,ty,form,false)
-    | Ast0.MetaExprList(name,Some lenname,_) ->
-       Ast.MetaExprList(mcode name,Some (mcode lenname,unitary,false),
-                        unitary,false)
-    | Ast0.MetaExprList(name,None,_) ->
-       Ast.MetaExprList(mcode name,None,unitary,false)
-    | Ast0.EComma(cm)         -> Ast.EComma(mcode cm)
-    | Ast0.DisjExpr(_,exps,_,_)     -> Ast.DisjExpr(List.map expression exps)
-    | Ast0.NestExpr(_,exp_dots,_,whencode,multi) ->
-       let whencode = get_option expression whencode in
-       Ast.NestExpr(dots expression exp_dots,whencode,multi)
-    | Ast0.Edots(dots,whencode) ->
-       let dots = mcode dots in
-       let whencode = get_option expression whencode in
-       Ast.Edots(dots,whencode)
-    | Ast0.Ecircles(dots,whencode) ->
-       let dots = mcode dots in
-       let whencode = get_option expression whencode in
-       Ast.Ecircles(dots,whencode)
-    | Ast0.Estars(dots,whencode) ->
-       let dots = mcode dots in
-       let whencode = get_option expression whencode in
-       Ast.Estars(dots,whencode)
-    | Ast0.OptExp(exp) -> Ast.OptExp(expression exp)
-    | Ast0.UniqueExp(exp) -> Ast.UniqueExp(expression exp)) in
-  if Ast0.get_test_exp e then Ast.set_test_exp e1 else e1
-
-and expression_dots ed = dots expression ed
-  
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and typeC t =
-  rewrap t (do_isos (Ast0.get_iso t))
-    (match Ast0.unwrap t with
-      Ast0.ConstVol(cv,ty) ->
-       let rec collect_disjs t =
-         match Ast0.unwrap t with
-           Ast0.DisjType(_,types,_,_) ->
-             if Ast0.get_iso t = []
-             then List.concat (List.map collect_disjs types)
-             else failwith "unexpected iso on a disjtype"
-         | _ -> [t] in
-       let res =
-         List.map
-           (function ty ->
-             Ast.Type
-               (Some (mcode cv),
-                rewrap ty (do_isos (Ast0.get_iso ty)) (base_typeC ty)))
-           (collect_disjs ty) in
-       (* one could worry that isos are lost because we flatten the
-          disjunctions.  but there should not be isos on the disjunctions
-          themselves. *)
-       (match res with
-         [ty] -> ty
-       | types -> Ast.DisjType(List.map (rewrap t no_isos) types))
-    | Ast0.BaseType(_,_) | Ast0.ImplicitInt(_) | Ast0.Pointer(_,_)
-    | Ast0.FunctionPointer(_,_,_,_,_,_,_) | Ast0.FunctionType(_,_,_,_)
-    | Ast0.Array(_,_,_,_) | Ast0.StructUnionName(_,_)
-    | Ast0.StructUnionDef(_,_,_,_) | Ast0.TypeName(_) | Ast0.MetaType(_,_) ->
-       Ast.Type(None,rewrap t no_isos (base_typeC t))
-    | Ast0.DisjType(_,types,_,_) -> Ast.DisjType(List.map typeC types)
-    | Ast0.OptType(ty) -> Ast.OptType(typeC ty)
-    | Ast0.UniqueType(ty) -> Ast.UniqueType(typeC ty))
-    
-and base_typeC t =
-  match Ast0.unwrap t with
-    Ast0.BaseType(ty,sign) ->
-      Ast.BaseType(mcode ty,get_option mcode sign)
-  | Ast0.ImplicitInt(sgn) -> Ast.ImplicitInt(mcode sgn)
-  | Ast0.Pointer(ty,star) -> Ast.Pointer(typeC ty,mcode star)
-  | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      Ast.FunctionPointer
-       (typeC ty,mcode lp1,mcode star,mcode rp1,
-        mcode lp2,parameter_list params,mcode rp2)
-  | Ast0.FunctionType(ret,lp,params,rp) ->
-      let allminus = check_allminus.V0.combiner_typeC t in
-      Ast.FunctionType
-       (allminus,get_option typeC ret,mcode lp,
-        parameter_list params,mcode rp)
-  | Ast0.Array(ty,lb,size,rb) ->
-      Ast.Array(typeC ty,mcode lb,get_option expression size,mcode rb)
-  | Ast0.StructUnionName(kind,name) ->
-      Ast.StructUnionName(mcode kind,get_option ident name)
-  | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-      Ast.StructUnionDef(typeC ty,mcode lb,
-                        dots declaration decls,
-                        mcode rb)
-  | Ast0.TypeName(name) -> Ast.TypeName(mcode name)
-  | Ast0.MetaType(name,_) ->
-      Ast.MetaType(mcode name,unitary,false)
-  | _ -> failwith "ast0toast: unexpected type"
-       
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-    
-and declaration d =
-  rewrap d (do_isos (Ast0.get_iso d))
-    (match Ast0.unwrap d with
-      Ast0.Init(stg,ty,id,eq,ini,sem) ->
-       let stg = get_option mcode stg in
-       let ty = typeC ty in
-       let id = ident id in
-       let eq = mcode eq in
-       let ini = initialiser ini in
-       let sem = mcode sem in
-       Ast.Init(stg,ty,id,eq,ini,sem)
-    | Ast0.UnInit(stg,ty,id,sem) ->
-       (match Ast0.unwrap ty with
-         Ast0.FunctionType(tyx,lp1,params,rp1) ->
-           let allminus = check_allminus.V0.combiner_declaration d in
-           Ast.UnInit(get_option mcode stg,
-                      rewrap ty (do_isos (Ast0.get_iso ty))
-                        (Ast.Type
-                           (None,
-                            rewrap ty no_isos
-                              (Ast.FunctionType
-                                 (allminus,get_option typeC tyx,mcode lp1,
-                                  parameter_list params,mcode rp1)))),
-                      ident id,mcode sem)
-       | _ -> Ast.UnInit(get_option mcode stg,typeC ty,ident id,mcode sem))
-    | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-       let name = ident name in
-       let lp = mcode lp in
-       let args = dots expression args in
-       let rp = mcode rp in
-       let sem = mcode sem in
-       Ast.MacroDecl(name,lp,args,rp,sem)
-    | Ast0.TyDecl(ty,sem) -> Ast.TyDecl(typeC ty,mcode sem)
-    | Ast0.Typedef(stg,ty,id,sem) ->
-       let id = typeC id in
-       (match Ast.unwrap id with
-         Ast.Type(None,id) -> (* only MetaType or Id *)
-           Ast.Typedef(mcode stg,typeC ty,id,mcode sem)
-       | _ -> failwith "bad typedef")
-    | Ast0.DisjDecl(_,decls,_,_) -> Ast.DisjDecl(List.map declaration decls)
-    | Ast0.Ddots(dots,whencode) ->
-       let dots = mcode dots in
-       let whencode = get_option declaration whencode in
-       Ast.Ddots(dots,whencode)
-    | Ast0.OptDecl(decl) -> Ast.OptDecl(declaration decl)
-    | Ast0.UniqueDecl(decl) -> Ast.UniqueDecl(declaration decl))
-
-and declaration_dots l = dots declaration l
-
-(* --------------------------------------------------------------------- *)
-(* Initialiser *)
-
-and strip_idots initlist =
-  match Ast0.unwrap initlist with
-    Ast0.DOTS(x) ->
-      let (whencode,init) = 
-       List.fold_left
-         (function (prevwhen,previnit) ->
-           function cur ->
-             match Ast0.unwrap cur with
-               Ast0.Idots(dots,Some whencode) ->
-                 (whencode :: prevwhen, previnit)
-             | Ast0.Idots(dots,None) -> (prevwhen,previnit)
-             | _ -> (prevwhen, cur :: previnit))
-         ([],[]) x in
-      (List.rev whencode, List.rev init)
-  | Ast0.CIRCLES(x) | Ast0.STARS(x) -> failwith "not possible for an initlist"
-
-and initialiser i =
-  rewrap i no_isos
-    (match Ast0.unwrap i with
-      Ast0.InitExpr(exp) -> Ast.InitExpr(expression exp)
-    | Ast0.InitList(lb,initlist,rb) ->
-       let (whencode,initlist) =  strip_idots initlist in
-       Ast.InitList(mcode lb,List.map initialiser initlist,mcode rb,
-                    List.map initialiser whencode)
-    | Ast0.InitGccDotName(dot,name,eq,ini) ->
-       Ast.InitGccDotName(mcode dot,ident name,mcode eq,initialiser ini)
-    | Ast0.InitGccName(name,eq,ini) ->
-       Ast.InitGccName(ident name,mcode eq,initialiser ini)
-    | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-       Ast.InitGccIndex(mcode lb,expression exp,mcode rb,mcode eq,
-                         initialiser ini)
-    | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-       Ast.InitGccRange(mcode lb,expression exp1,mcode dots,
-                         expression exp2,mcode rb,mcode eq,initialiser ini)
-    | Ast0.IComma(comma) -> Ast.IComma(mcode comma)
-    | Ast0.Idots(_,_) -> failwith "Idots should have been removed"
-    | Ast0.OptIni(ini) -> Ast.OptIni(initialiser ini)
-    | Ast0.UniqueIni(ini) -> Ast.UniqueIni(initialiser ini))
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-    
-and parameterTypeDef p =
-  rewrap p no_isos
-    (match Ast0.unwrap p with
-      Ast0.VoidParam(ty) -> Ast.VoidParam(typeC ty)
-    | Ast0.Param(ty,id) -> Ast.Param(typeC ty,get_option ident id)
-    | Ast0.MetaParam(name,_) ->
-       Ast.MetaParam(mcode name,unitary,false)
-    | Ast0.MetaParamList(name,Some lenname,_) ->
-       Ast.MetaParamList(mcode name,Some(mcode lenname,unitary,false),
-                         unitary,false)
-    | Ast0.MetaParamList(name,None,_) ->
-       Ast.MetaParamList(mcode name,None,unitary,false)
-    | Ast0.PComma(cm) -> Ast.PComma(mcode cm)
-    | Ast0.Pdots(dots) -> Ast.Pdots(mcode dots)
-    | Ast0.Pcircles(dots) -> Ast.Pcircles(mcode dots)
-    | Ast0.OptParam(param) -> Ast.OptParam(parameterTypeDef param)
-    | Ast0.UniqueParam(param) -> Ast.UniqueParam(parameterTypeDef param))
-
-and parameter_list l = dots parameterTypeDef l
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and statement s =
-  let rec statement seqible s =
-    let rewrap_stmt ast0 ast =
-      let befaft =
-       match Ast0.get_dots_bef_aft s with
-         Ast0.NoDots -> Ast.NoDots
-       | Ast0.DroppingBetweenDots s ->
-           Ast.DroppingBetweenDots (statement seqible s,get_ctr())
-       | Ast0.AddingBetweenDots s ->
-           Ast.AddingBetweenDots (statement seqible s,get_ctr()) in
-      Ast.set_dots_bef_aft befaft (rewrap ast0 no_isos ast) in
-    let rewrap_rule_elem ast0 ast =
-      rewrap ast0 (do_isos (Ast0.get_iso ast0)) ast in
-    rewrap_stmt s
-      (match Ast0.unwrap s with
-       Ast0.Decl((_,bef),decl) ->
-         Ast.Atomic(rewrap_rule_elem s
-                      (Ast.Decl(convert_mcodekind bef,
-                                check_allminus.V0.combiner_statement s,
-                                declaration decl)))
-      | Ast0.Seq(lbrace,body,rbrace) -> 
-         let lbrace = mcode lbrace in
-         let (decls,body) = separate_decls seqible body in
-         let rbrace = mcode rbrace in
-         Ast.Seq(iso_tokenwrap lbrace s (Ast.SeqStart(lbrace))
-                   (do_isos (Ast0.get_iso s)),
-                 decls,body,
-                 tokenwrap rbrace s (Ast.SeqEnd(rbrace)))
-      | Ast0.ExprStatement(exp,sem) ->
-         Ast.Atomic(rewrap_rule_elem s
-                      (Ast.ExprStatement(expression exp,mcode sem)))
-      | Ast0.IfThen(iff,lp,exp,rp,branch,(_,aft)) ->
-         Ast.IfThen
-           (rewrap_rule_elem s
-              (Ast.IfHeader(mcode iff,mcode lp,expression exp,mcode rp)),
-            statement Ast.NotSequencible branch,
-            ([],[],[],convert_mcodekind aft))
-      | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,(_,aft)) ->
-         let els = mcode els in
-         Ast.IfThenElse
-           (rewrap_rule_elem s
-              (Ast.IfHeader(mcode iff,mcode lp,expression exp,mcode rp)),
-            statement Ast.NotSequencible branch1,
-            tokenwrap els s (Ast.Else(els)),
-            statement Ast.NotSequencible branch2,
-            ([],[],[],convert_mcodekind aft))
-      | Ast0.While(wh,lp,exp,rp,body,(_,aft)) ->
-         Ast.While(rewrap_rule_elem s
-                     (Ast.WhileHeader
-                        (mcode wh,mcode lp,expression exp,mcode rp)),
-                   statement Ast.NotSequencible body,
-                   ([],[],[],convert_mcodekind aft))
-      | Ast0.Do(d,body,wh,lp,exp,rp,sem) ->
-         let wh = mcode wh in
-         Ast.Do(rewrap_rule_elem s (Ast.DoHeader(mcode d)),
-                statement Ast.NotSequencible body,
-                tokenwrap wh s
-                  (Ast.WhileTail(wh,mcode lp,expression exp,mcode rp,
-                                 mcode sem)))
-      | Ast0.For(fr,lp,exp1,sem1,exp2,sem2,exp3,rp,body,(_,aft)) ->
-         let fr = mcode fr in
-         let lp = mcode lp in
-         let exp1 = get_option expression exp1 in
-         let sem1 = mcode sem1 in
-         let exp2 = get_option expression exp2 in
-         let sem2= mcode sem2 in
-         let exp3 = get_option expression exp3 in
-         let rp = mcode rp in
-         let body = statement Ast.NotSequencible body in
-         Ast.For(rewrap_rule_elem s
-                   (Ast.ForHeader(fr,lp,exp1,sem1,exp2,sem2,exp3,rp)),
-                 body,([],[],[],convert_mcodekind aft))
-      | Ast0.Iterator(nm,lp,args,rp,body,(_,aft)) ->
-         Ast.Iterator(rewrap_rule_elem s
-                     (Ast.IteratorHeader
-                        (ident nm,mcode lp,
-                         dots expression args,
-                         mcode rp)),
-                   statement Ast.NotSequencible body,
-                   ([],[],[],convert_mcodekind aft))
-      |        Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-         let switch = mcode switch in
-         let lp = mcode lp in
-         let exp = expression exp in
-         let rp = mcode rp in
-         let lb = mcode lb in
-         let cases = List.map case_line (Ast0.undots cases) in
-         let rb = mcode rb in
-         Ast.Switch(rewrap_rule_elem s (Ast.SwitchHeader(switch,lp,exp,rp)),
-                    tokenwrap lb s (Ast.SeqStart(lb)),
-                    cases,
-                    tokenwrap rb s (Ast.SeqEnd(rb)))
-      | Ast0.Break(br,sem) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Break(mcode br,mcode sem)))
-      | Ast0.Continue(cont,sem) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Continue(mcode cont,mcode sem)))
-      |        Ast0.Label(l,dd) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Label(ident l,mcode dd)))
-      |        Ast0.Goto(goto,l,sem) ->
-         Ast.Atomic
-           (rewrap_rule_elem s (Ast.Goto(mcode goto,ident l,mcode sem)))
-      | Ast0.Return(ret,sem) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Return(mcode ret,mcode sem)))
-      | Ast0.ReturnExpr(ret,exp,sem) ->
-         Ast.Atomic
-           (rewrap_rule_elem s
-              (Ast.ReturnExpr(mcode ret,expression exp,mcode sem)))
-      | Ast0.MetaStmt(name,_) ->
-         Ast.Atomic(rewrap_rule_elem s
-                      (Ast.MetaStmt(mcode name,unitary,seqible,false)))
-      | Ast0.MetaStmtList(name,_) ->
-         Ast.Atomic(rewrap_rule_elem s
-                      (Ast.MetaStmtList(mcode name,unitary,false)))
-      | Ast0.TopExp(exp) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.TopExp(expression exp)))
-      | Ast0.Exp(exp) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Exp(expression exp)))
-      | Ast0.Ty(ty) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Ty(typeC ty)))
-      | Ast0.Disj(_,rule_elem_dots_list,_,_) ->
-         Ast.Disj(List.map (function x -> statement_dots seqible x)
-                    rule_elem_dots_list)
-      | Ast0.Nest(_,rule_elem_dots,_,whn,multi) ->
-         Ast.Nest
-           (statement_dots Ast.Sequencible rule_elem_dots,
-            List.map
-              (whencode (statement_dots Ast.Sequencible)
-                (statement Ast.NotSequencible))
-              whn,
-            multi,[],[])
-      | Ast0.Dots(d,whn) ->
-         let d = mcode d in
-         let whn =
-           List.map
-             (whencode (statement_dots Ast.Sequencible)
-                (statement Ast.NotSequencible))
-             whn in
-         Ast.Dots(d,whn,[],[])
-      | Ast0.Circles(d,whn) ->
-         let d = mcode d in
-         let whn =
-           List.map
-             (whencode (statement_dots Ast.Sequencible)
-                (statement Ast.NotSequencible))
-             whn in
-         Ast.Circles(d,whn,[],[])
-      | Ast0.Stars(d,whn) ->
-         let d = mcode d in
-         let whn =
-           List.map
-             (whencode (statement_dots Ast.Sequencible)
-                (statement Ast.NotSequencible))
-             whn in
-         Ast.Stars(d,whn,[],[])
-      | Ast0.FunDecl((_,bef),fi,name,lp,params,rp,lbrace,body,rbrace) ->
-         let fi = List.map fninfo fi in
-         let name = ident name in
-         let lp = mcode lp in
-         let params = parameter_list params in
-         let rp = mcode rp in
-         let lbrace = mcode lbrace in
-         let (decls,body) = separate_decls seqible body in
-         let rbrace = mcode rbrace in
-         let allminus = check_allminus.V0.combiner_statement s in
-         Ast.FunDecl(rewrap_rule_elem s
-                       (Ast.FunHeader(convert_mcodekind bef,
-                                      allminus,fi,name,lp,params,rp)),
-                     tokenwrap lbrace s (Ast.SeqStart(lbrace)),
-                     decls,body,
-                     tokenwrap rbrace s (Ast.SeqEnd(rbrace)))
-      |        Ast0.Include(inc,str) ->
-         Ast.Atomic(rewrap_rule_elem s (Ast.Include(mcode inc,mcode str)))
-      | Ast0.Define(def,id,params,body) ->
-         Ast.Define
-           (rewrap_rule_elem s
-              (Ast.DefineHeader
-                 (mcode def,ident id, define_parameters params)),
-            statement_dots Ast.NotSequencible (*not sure*) body)
-      | Ast0.OptStm(stm) -> Ast.OptStm(statement seqible stm)
-      | Ast0.UniqueStm(stm) -> Ast.UniqueStm(statement seqible stm))
-
-  and define_parameters p =
-    rewrap p no_isos
-      (match Ast0.unwrap p with
-       Ast0.NoParams -> Ast.NoParams
-      | Ast0.DParams(lp,params,rp) ->
-         Ast.DParams(mcode lp,
-                     dots define_param params,
-                     mcode rp))
-
-  and define_param p =
-    rewrap p no_isos
-      (match Ast0.unwrap p with
-       Ast0.DParam(id) -> Ast.DParam(ident id)
-      | Ast0.DPComma(comma) -> Ast.DPComma(mcode comma)
-      | Ast0.DPdots(d) -> Ast.DPdots(mcode d)
-      | Ast0.DPcircles(c) -> Ast.DPcircles(mcode c)
-      | Ast0.OptDParam(dp) -> Ast.OptDParam(define_param dp)
-      | Ast0.UniqueDParam(dp) -> Ast.UniqueDParam(define_param dp))
-
-  and whencode notfn alwaysfn = function
-      Ast0.WhenNot a -> Ast.WhenNot (notfn a)
-    | Ast0.WhenAlways a -> Ast.WhenAlways (alwaysfn a)
-    | Ast0.WhenModifier(x) -> Ast.WhenModifier(x)
-    | x ->
-       let rewrap_rule_elem ast0 ast =
-         rewrap ast0 (do_isos (Ast0.get_iso ast0)) ast in
-       match x with
-         Ast0.WhenNotTrue(e) ->
-           Ast.WhenNotTrue(rewrap_rule_elem e (Ast.Exp(expression e)))
-       | Ast0.WhenNotFalse(e) ->
-           Ast.WhenNotFalse(rewrap_rule_elem e (Ast.Exp(expression e)))
-       | _ -> failwith "not possible"
-
-  and process_list seqible isos = function
-      [] -> []
-    | x::rest ->
-       let first = statement seqible x in
-       let first =
-         if !Flag.track_iso_usage
-         then Ast.set_isos first (isos@(Ast.get_isos first))
-         else first in
-       (match Ast0.unwrap x with
-         Ast0.Dots(_,_) | Ast0.Nest(_) ->
-           first::(process_list (Ast.SequencibleAfterDots []) no_isos rest)
-       | _ ->
-           first::(process_list Ast.Sequencible no_isos rest))
-
-  and statement_dots seqible d =
-    let isos = do_isos (Ast0.get_iso d) in
-    rewrap d no_isos
-      (match Ast0.unwrap d with
-       Ast0.DOTS(x) -> Ast.DOTS(process_list seqible isos x)
-      | Ast0.CIRCLES(x) -> Ast.CIRCLES(process_list seqible isos x)
-      | Ast0.STARS(x) -> Ast.STARS(process_list seqible isos x))
-
-  and separate_decls seqible d =
-    let rec collect_decls = function
-       [] -> ([],[])
-      | (x::xs) as l ->
-         (match Ast0.unwrap x with
-           Ast0.Decl(_) ->
-             let (decls,other) = collect_decls xs in
-             (x :: decls,other)
-         | Ast0.Dots(_,_) | Ast0.Nest(_,_,_,_,_) ->
-             let (decls,other) = collect_decls xs in
-             (match decls with
-               [] -> ([],x::other)
-             | _ -> (x :: decls,other))
-         | Ast0.Disj(starter,stmt_dots_list,mids,ender) ->
-             let disjs = List.map collect_dot_decls stmt_dots_list in
-             let all_decls = List.for_all (function (_,s) -> s=[]) disjs in
-             if all_decls
-             then
-               let (decls,other) = collect_decls xs in
-               (x :: decls,other)
-             else ([],l)
-         | _ -> ([],l))
-
-    and collect_dot_decls d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(x) -> collect_decls x
-      | Ast0.CIRCLES(x) -> collect_decls x
-      | Ast0.STARS(x) -> collect_decls x in
-
-    let process l d fn =
-      let (decls,other) = collect_decls l in
-      (rewrap d no_isos (fn (List.map (statement seqible) decls)),
-       rewrap d no_isos
-        (fn (process_list seqible (do_isos (Ast0.get_iso d)) other))) in
-    match Ast0.unwrap d with
-      Ast0.DOTS(x) -> process x d (function x -> Ast.DOTS x)
-    | Ast0.CIRCLES(x) -> process x d (function x -> Ast.CIRCLES x)
-    | Ast0.STARS(x) -> process x d (function x -> Ast.STARS x) in
-
-  statement Ast.Sequencible s
-
-and fninfo = function
-    Ast0.FStorage(stg) -> Ast.FStorage(mcode stg)
-  | Ast0.FType(ty) -> Ast.FType(typeC ty)
-  | Ast0.FInline(inline) -> Ast.FInline(mcode inline)
-  | Ast0.FAttr(attr) -> Ast.FAttr(mcode attr)
-
-and option_to_list = function
-    Some x -> [x]
-  | None -> []
-
-and case_line c =
-  rewrap c no_isos
-    (match Ast0.unwrap c with
-      Ast0.Default(def,colon,code) ->
-       let def = mcode def in
-       let colon = mcode colon in
-       let code = dots statement code in
-       Ast.CaseLine(rewrap c no_isos (Ast.Default(def,colon)),code)
-    | Ast0.Case(case,exp,colon,code) ->
-       let case = mcode case in
-       let exp = expression exp in
-       let colon = mcode colon in
-       let code = dots statement code in
-       Ast.CaseLine(rewrap c no_isos (Ast.Case(case,exp,colon)),code)
-    | Ast0.OptCase(case) -> Ast.OptCase(case_line case))
-
-and statement_dots l = dots statement l
-    
-(* --------------------------------------------------------------------- *)
-
-(* what is possible is only what is at the top level in an iso *)
-and anything = function
-    Ast0.DotsExprTag(d) -> Ast.ExprDotsTag(expression_dots d)
-  | Ast0.DotsParamTag(d) -> Ast.ParamDotsTag(parameter_list d)
-  | Ast0.DotsInitTag(d) -> failwith "not possible"
-  | Ast0.DotsStmtTag(d) -> Ast.StmtDotsTag(statement_dots d)
-  | Ast0.DotsDeclTag(d) -> Ast.DeclDotsTag(declaration_dots d)
-  | Ast0.DotsCaseTag(d) -> failwith "not possible"
-  | Ast0.IdentTag(d) -> Ast.IdentTag(ident d)
-  | Ast0.ExprTag(d) -> Ast.ExpressionTag(expression d)
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-     failwith "only in isos, not converted to ast"
-  | Ast0.TypeCTag(d) -> Ast.FullTypeTag(typeC d)
-  | Ast0.ParamTag(d) -> Ast.ParamTag(parameterTypeDef d)
-  | Ast0.InitTag(d) -> Ast.InitTag(initialiser d)
-  | Ast0.DeclTag(d) -> Ast.DeclarationTag(declaration d)
-  | Ast0.StmtTag(d) -> Ast.StatementTag(statement d)
-  | Ast0.CaseLineTag(d) -> Ast.CaseLineTag(case_line d)
-  | Ast0.TopTag(d) -> Ast.Code(top_level d)
-  | Ast0.IsoWhenTag(_) -> failwith "not possible"
-  | Ast0.IsoWhenTTag(_) -> failwith "not possible"
-  | Ast0.IsoWhenFTag(_) -> failwith "not possible"
-  | Ast0.MetaPosTag _ -> failwith "not possible"
-
-(* --------------------------------------------------------------------- *)
-(* Function declaration *)
-(* top level isos are probably lost to tracking *)
-    
-and top_level t =
-  rewrap t no_isos
-    (match Ast0.unwrap t with
-      Ast0.FILEINFO(old_file,new_file) ->
-       Ast.FILEINFO(mcode old_file,mcode new_file)
-    | Ast0.DECL(stmt) -> Ast.DECL(statement stmt)
-    | Ast0.CODE(rule_elem_dots) ->
-       Ast.CODE(statement_dots rule_elem_dots)
-    | Ast0.ERRORWORDS(exps) -> Ast.ERRORWORDS(List.map expression exps)
-    | Ast0.OTHER(_) -> failwith "eliminated by top_level")
-
-(* --------------------------------------------------------------------- *)
-(* Entry point for minus code *)
-
-(* Inline_mcodes is very important - sends + code attached to the - code
-down to the mcodes.  The functions above can only be used when there is no
-attached + code, eg in + code itself. *)
-let ast0toast_toplevel x =
-  inline_mcodes.V0.combiner_top_level x;
-  top_level x
-
-let ast0toast name deps dropped exists x is_exp =
-  List.iter inline_mcodes.V0.combiner_top_level x;
-  Ast.CocciRule (name,(deps,dropped,exists),List.map top_level x,is_exp)
diff --git a/parsing_cocci/.#ast_cocci.ml.1.142 b/parsing_cocci/.#ast_cocci.ml.1.142
deleted file mode 100644 (file)
index a98a8dc..0000000
+++ /dev/null
@@ -1,668 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* --------------------------------------------------------------------- *)
-(* Modified code *)
-
-type info = { line : int; column : int;
-             strbef : string list; straft : string list }
-type line = int
-type meta_name = string * string
-(* need to be careful about rewrapping, to avoid duplicating pos info
-currently, the pos info is always None until asttoctl2. *)
-type 'a wrap =
-    {node : 'a;
-      node_line : line;
-      free_vars : meta_name list; (*free vars*)
-      minus_free_vars : meta_name list; (*minus free vars*)
-      fresh_vars : meta_name list; (*fresh vars*)
-      inherited : meta_name list; (*inherited vars*)
-      saved_witness : meta_name list; (*witness vars*)
-      bef_aft : dots_bef_aft;
-      (* the following is for or expressions *)
-      pos_info : meta_name mcode option; (* pos info, try not to duplicate *)
-      true_if_test_exp : bool;(* true if "test_exp from iso", only for exprs *)
-      (* isos relevant to the term; ultimately only used for rule_elems *)
-      iso_info : (string*anything) list }
-
-and 'a befaft =
-    BEFORE      of 'a list list
-  | AFTER       of 'a list list
-  | BEFOREAFTER of 'a list list * 'a list list
-  | NOTHING
-
-and 'a mcode = 'a * info * mcodekind * meta_pos (* pos variable *)
- (* pos is an offset indicating where in the C code the mcodekind has an
- effect *)
- and mcodekind =
-    MINUS       of pos * anything list list
-  | CONTEXT     of pos * anything befaft
-  | PLUS
- and fixpos =
-    Real of int (* charpos *) | Virt of int * int (* charpos + offset *)
- and pos = NoPos | DontCarePos | FixPos of (fixpos * fixpos)
-
-and dots_bef_aft =
-    NoDots
-  | AddingBetweenDots of statement * int (*index of let var*)
-  | DroppingBetweenDots of statement * int (*index of let var*)
-
-and inherited = Type_cocci.inherited
-and keep_binding = Type_cocci.keep_binding
-and multi = bool (*true if a nest is one or more, false if it is zero or more*)
-
-and end_info =
-    meta_name list (*free vars*) * meta_name list (*inherited vars*) *
-      meta_name list (*witness vars*) * mcodekind
-
-(* --------------------------------------------------------------------- *)
-(* Metavariables *)
-
-and arity = UNIQUE | OPT | MULTI | NONE
-
-and metavar =
-    MetaIdDecl of arity * meta_name (* name *)
-  | MetaFreshIdDecl of arity * meta_name (* name *)
-  | MetaTypeDecl of arity * meta_name (* name *)
-  | MetaListlenDecl of meta_name (* name *)
-  | MetaParamDecl of arity * meta_name (* name *)
-  | MetaParamListDecl of arity * meta_name (*name*) * meta_name option (*len*)
-  | MetaConstDecl of
-      arity * meta_name (* name *) * Type_cocci.typeC list option
-  | MetaErrDecl of arity * meta_name (* name *)
-  | MetaExpDecl of
-      arity * meta_name (* name *) * Type_cocci.typeC list option
-  | MetaIdExpDecl of
-      arity * meta_name (* name *) * Type_cocci.typeC list option
-  | MetaLocalIdExpDecl of
-      arity * meta_name (* name *) * Type_cocci.typeC list option
-  | MetaExpListDecl of arity * meta_name (*name*) * meta_name option (*len*)
-  | MetaStmDecl of arity * meta_name (* name *)
-  | MetaStmListDecl of arity * meta_name (* name *)
-  | MetaFuncDecl of arity * meta_name (* name *)
-  | MetaLocalFuncDecl of arity * meta_name (* name *)
-  | MetaPosDecl of arity * meta_name (* name *)
-  | MetaDeclarerDecl of arity * meta_name (* name *)
-  | MetaIteratorDecl of arity * meta_name (* name *)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-and 'a base_dots =
-    DOTS of 'a list
-  | CIRCLES of 'a list
-  | STARS of 'a list
-
-and 'a dots = 'a base_dots wrap
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-and base_ident =
-    Id of string mcode
-
-  | MetaId        of meta_name mcode * ident list * keep_binding * inherited
-  | MetaFunc      of meta_name mcode * ident list * keep_binding * inherited
-  | MetaLocalFunc of meta_name mcode * ident list * keep_binding * inherited
-
-  | OptIdent      of ident
-  | UniqueIdent   of ident
-
-and ident = base_ident wrap
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-and base_expression = 
-    Ident          of ident
-  | Constant       of constant mcode
-  | FunCall        of expression * string mcode (* ( *) *
-                      expression dots * string mcode (* ) *)
-  | Assignment     of expression * assignOp mcode * expression *
-                     bool (* true if it can match an initialization *)
-  | CondExpr       of expression * string mcode (* ? *) * expression option *
-                     string mcode (* : *) * expression
-  | Postfix        of expression * fixOp mcode
-  | Infix          of expression * fixOp mcode
-  | Unary          of expression * unaryOp mcode
-  | Binary         of expression * binaryOp mcode * expression
-  | Nested         of expression * binaryOp mcode * expression
-  | ArrayAccess    of expression * string mcode (* [ *) * expression *
-                     string mcode (* ] *)
-  | RecordAccess   of expression * string mcode (* . *) * ident
-  | RecordPtAccess of expression * string mcode (* -> *) * ident
-  | Cast           of string mcode (* ( *) * fullType * string mcode (* ) *) *
-                      expression
-  | SizeOfExpr     of string mcode (* sizeof *) * expression
-  | SizeOfType     of string mcode (* sizeof *) * string mcode (* ( *) *
-                      fullType * string mcode (* ) *)
-  | TypeExp        of fullType (*type name used as an expression, only in
-                                 arg or #define*)
-
-  | Paren          of string mcode (* ( *) * expression *
-                      string mcode (* ) *)
-
-  | MetaErr        of meta_name mcode * expression list * keep_binding *
-                     inherited
-  | MetaExpr       of meta_name mcode * expression list * keep_binding *
-                     Type_cocci.typeC list option * form * inherited
-  | MetaExprList   of meta_name mcode * listlen option * keep_binding *
-                      inherited (* only in arg lists *)
-
-  | EComma         of string mcode (* only in arg lists *)
-
-  | DisjExpr       of expression list
-  | NestExpr       of expression dots * expression option * multi
-
-  (* can appear in arg lists, and also inside Nest, as in:
-   if(< ... X ... Y ...>)
-   In the following, the expression option is the WHEN  *)
-  | Edots          of string mcode (* ... *) * expression option
-  | Ecircles       of string mcode (* ooo *) * expression option
-  | Estars         of string mcode (* *** *) * expression option
-
-  | OptExp         of expression
-  | UniqueExp      of expression
-
-(* ANY = int E; ID = idexpression int X; CONST = constant int X; *)
-and form = ANY | ID | LocalID | CONST (* form for MetaExp *)
-
-and expression = base_expression wrap
-
-and listlen = meta_name mcode * keep_binding * inherited
-
-and  unaryOp = GetRef | DeRef | UnPlus |  UnMinus | Tilde | Not
-and  assignOp = SimpleAssign | OpAssign of arithOp
-and  fixOp = Dec | Inc
-
-and  binaryOp = Arith of arithOp | Logical of logicalOp
-and  arithOp =
-    Plus | Minus | Mul | Div | Mod | DecLeft | DecRight | And | Or | Xor
-and  logicalOp = Inf | Sup | InfEq | SupEq | Eq | NotEq | AndLog | OrLog
-
-and constant =
-    String of string
-  | Char   of string
-  | Int    of string
-  | Float  of string
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and base_fullType =
-    Type            of const_vol mcode option * typeC
-  | DisjType        of fullType list (* only after iso *)
-  | OptType         of fullType
-  | UniqueType      of fullType
-
-and base_typeC = 
-    BaseType        of baseType mcode * sign mcode option
-  | ImplicitInt     of sign mcode
-  | Pointer         of fullType * string mcode (* * *)
-  | FunctionPointer of fullType *
-                 string mcode(* ( *)*string mcode(* * *)*string mcode(* ) *)*
-                  string mcode (* ( *)*parameter_list*string mcode(* ) *)
-
-  (* used for the automatic managment of prototypes *)
-  | FunctionType     of bool (* true if all minus for dropping return type *) *
-                   fullType option *
-                  string mcode (* ( *) * parameter_list *
-                   string mcode (* ) *)
-
-  | Array           of fullType * string mcode (* [ *) *
-                      expression option * string mcode (* ] *)
-  | StructUnionName of structUnion mcode * ident option (* name *)
-  | StructUnionDef  of fullType (* either StructUnionName or metavar *) *
-       string mcode (* { *) * declaration dots * string mcode (* } *)
-  | TypeName        of string mcode
-
-  | MetaType        of meta_name mcode * keep_binding * inherited
-
-and fullType = base_fullType wrap
-and typeC = base_typeC wrap
-     
-and baseType = VoidType | CharType | ShortType | IntType | DoubleType
-| FloatType | LongType
-
-and structUnion = Struct | Union
-
-and sign = Signed | Unsigned
-
-and const_vol = Const | Volatile
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and base_declaration =
-    Init of storage mcode option * fullType * ident * string mcode (*=*) *
-       initialiser * string mcode (*;*)
-  | UnInit of storage mcode option * fullType * ident * string mcode (* ; *)
-  | TyDecl of fullType * string mcode (* ; *)
-  | MacroDecl of ident (* name *) * string mcode (* ( *) *
-        expression dots * string mcode (* ) *) * string mcode (* ; *)
-  | Typedef of string mcode (*typedef*) * fullType * 
-               typeC (* either TypeName or metavar *) * string mcode (*;*)
-  | DisjDecl of declaration list
-  (* Ddots is for a structure declaration *)
-  | Ddots    of string mcode (* ... *) * declaration option (* whencode *)
-
-  | MetaDecl of meta_name mcode * keep_binding * inherited
-
-  | OptDecl    of declaration
-  | UniqueDecl of declaration
-
-and declaration = base_declaration wrap
-
-(* --------------------------------------------------------------------- *)
-(* Initializers *)
-
-and base_initialiser =
-    InitExpr of expression 
-  | InitList of string mcode (*{*) * initialiser list * string mcode (*}*) *
-       initialiser list (* whencode: elements that shouldn't appear in init *)
-  | InitGccDotName of
-      string mcode (*.*) * ident (* name *) * string mcode (*=*) *
-       initialiser (* gccext: *)
-  | InitGccName of ident (* name *) * string mcode (*:*) *
-       initialiser
-  | InitGccIndex of
-      string mcode (*[*) * expression * string mcode (*]*) *
-       string mcode (*=*) * initialiser
-  | InitGccRange of
-      string mcode (*[*) * expression * string mcode (*...*) *
-        expression * string mcode (*]*) * string mcode (*=*) * initialiser
-  | IComma of string mcode (* , *)
-
-  | OptIni    of initialiser
-  | UniqueIni of initialiser
-
-and initialiser = base_initialiser wrap
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and base_parameterTypeDef =
-    VoidParam     of fullType
-  | Param         of fullType * ident option
-
-  | MetaParam     of meta_name mcode * keep_binding * inherited
-  | MetaParamList of meta_name mcode * listlen option * keep_binding *
-                    inherited
-
-  | PComma        of string mcode
-
-  | Pdots         of string mcode (* ... *)
-  | Pcircles      of string mcode (* ooo *)
-
-  | OptParam      of parameterTypeDef
-  | UniqueParam   of parameterTypeDef
-
-and parameterTypeDef = base_parameterTypeDef wrap
-
-and parameter_list = parameterTypeDef dots
-
-(* --------------------------------------------------------------------- *)
-(* #define Parameters *)
-
-and base_define_param =
-    DParam        of ident
-  | DPComma       of string mcode
-  | DPdots        of string mcode (* ... *)
-  | DPcircles     of string mcode (* ooo *)
-  | OptDParam     of define_param
-  | UniqueDParam  of define_param
-
-and define_param = base_define_param wrap
-
-and base_define_parameters =
-    NoParams     (* not parameter list, not an empty one *)
-  | DParams      of string mcode(*( *) * define_param dots * string mcode(* )*)
-
-and define_parameters = base_define_parameters wrap
-
-(* --------------------------------------------------------------------- *)
-(* positions *)
-
-(* PER = keep bindings separate, ALL = collect them *)
-and meta_collect = PER | ALL
-
-and meta_pos =
-    MetaPos of meta_name mcode * meta_name list *
-       meta_collect * keep_binding * inherited
-  | NoMetaPos
-
-(* --------------------------------------------------------------------- *)
-(* Function declaration *)
-
-and storage = Static | Auto | Register | Extern
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and base_rule_elem =
-    FunHeader     of mcodekind (* before the function header *) *
-                    bool (* true if all minus, for dropping static, etc *) *
-                    fninfo list * ident (* name *) *
-                    string mcode (* ( *) * parameter_list *
-                     string mcode (* ) *)
-  | Decl          of mcodekind (* before the decl *) *
-                     bool (* true if all minus *) * declaration
-
-  | SeqStart      of string mcode (* { *)
-  | SeqEnd        of string mcode (* } *)
-
-  | ExprStatement of expression * string mcode (*;*)
-  | IfHeader      of string mcode (* if *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *)
-  | Else          of string mcode (* else *)
-  | WhileHeader   of string mcode (* while *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *)
-  | DoHeader      of string mcode (* do *)
-  | WhileTail     of string mcode (* while *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                     string mcode (* ; *)
-  | ForHeader     of string mcode (* for *) * string mcode (* ( *) *
-                     expression option * string mcode (*;*) *
-                    expression option * string mcode (*;*) *
-                     expression option * string mcode (* ) *)
-  | IteratorHeader of ident (* name *) * string mcode (* ( *) *
-                    expression dots * string mcode (* ) *)
-  | SwitchHeader  of string mcode (* switch *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *)
-  | Break         of string mcode (* break *) * string mcode (* ; *)
-  | Continue      of string mcode (* continue *) * string mcode (* ; *)
-  | Label         of ident * string mcode (* : *)
-  | Goto          of string mcode (* goto *) * ident * string mcode (* ; *)
-  | Return        of string mcode (* return *) * string mcode (* ; *)
-  | ReturnExpr    of string mcode (* return *) * expression *
-                    string mcode (* ; *)
-
-  | MetaRuleElem  of meta_name mcode * keep_binding * inherited
-  | MetaStmt      of meta_name mcode * keep_binding * metaStmtInfo *
-                    inherited
-  | MetaStmtList  of meta_name mcode * keep_binding * inherited
-
-  | Exp           of expression (* matches a subterm *)
-  | TopExp        of expression (* for macros body, exp at top level,
-                                  not subexp *)
-  | Ty            of fullType (* only at SP top level, matches a subterm *)
-  | Include       of string mcode (*#include*) * inc_file mcode (*file *)
-  | DefineHeader  of string mcode (* #define *) * ident (* name *) *
-                    define_parameters (*params*)
-  | Case          of string mcode (* case *) * expression * string mcode (*:*)
-  | Default       of string mcode (* default *) * string mcode (*:*)
-  | DisjRuleElem  of rule_elem list
-
-and fninfo =
-    FStorage of storage mcode
-  | FType of fullType
-  | FInline of string mcode
-  | FAttr of string mcode
-
-and metaStmtInfo =
-    NotSequencible | SequencibleAfterDots of dots_whencode list | Sequencible
-
-and rule_elem = base_rule_elem wrap
-
-and base_statement =
-    Seq           of rule_elem (* { *) * statement dots *
-                    statement dots * rule_elem (* } *)
-  | IfThen        of rule_elem (* header *) * statement * end_info (* endif *)
-  | IfThenElse    of rule_elem (* header *) * statement *
-                    rule_elem (* else *) * statement * end_info (* endif *)
-  | While         of rule_elem (* header *) * statement * end_info (*endwhile*)
-  | Do            of rule_elem (* do *) * statement * rule_elem (* tail *)
-  | For           of rule_elem (* header *) * statement * end_info (*endfor*)
-  | Iterator      of rule_elem (* header *) * statement * end_info (*enditer*)
-  | Switch        of rule_elem (* header *) * rule_elem (* { *) *
-                    case_line list * rule_elem (* } *)
-  | Atomic        of rule_elem
-  | Disj          of statement dots list
-  | Nest          of statement dots *
-                    (statement dots,statement) whencode list * multi *
-                    dots_whencode list * dots_whencode list
-  | FunDecl       of rule_elem (* header *) * rule_elem (* { *) *
-                    statement dots * statement dots * rule_elem (* } *)
-  | Define        of rule_elem (* header *) * statement dots
-  | Dots          of string mcode (* ... *) *
-                    (statement dots,statement) whencode list *
-                    dots_whencode list * dots_whencode list
-  | Circles       of string mcode (* ooo *) *
-                    (statement dots,statement) whencode list *
-                    dots_whencode list * dots_whencode list
-  | Stars         of string mcode (* *** *) *
-                    (statement dots,statement) whencode list *
-                    dots_whencode list * dots_whencode list
-  | OptStm        of statement
-  | UniqueStm     of statement
-
-and ('a,'b) whencode =
-    WhenNot of 'a
-  | WhenAlways of 'b
-  | WhenModifier of when_modifier
-
-and when_modifier =
-  (* The following removes the shortest path constraint.  It can be used
-     with other when modifiers *)
-    WhenAny
-  (* The following removes the special consideration of error paths.  It
-     can be used with other when modifiers *)
-  | WhenStrict
-  | WhenForall
-  | WhenExists
-
-(* only used with asttoctl *)
-and dots_whencode =
-    WParen of rule_elem * meta_name (*pren_var*)
-  | Other of statement
-  | Other_dots of statement dots
-
-and statement = base_statement wrap
-
-and base_case_line =
-    CaseLine of rule_elem (* case/default header *) * statement dots
-  | OptCase of case_line
-
-and case_line = base_case_line wrap
-
-and inc_file =
-    Local of inc_elem list
-  | NonLocal of inc_elem list
-
-and inc_elem =
-    IncPath of string
-  | IncDots
-
-and base_top_level =
-    DECL of statement
-  | CODE of statement dots
-  | FILEINFO of string mcode (* old file *) * string mcode (* new file *)
-  | ERRORWORDS of expression list
-
-and top_level = base_top_level wrap
-
-and rulename =
-    CocciRulename of string option * dependency *
-       string list * string list * exists * bool
-  | ScriptRulename of string * dependency
-
-and rule =
-    CocciRule of string (* name *) * 
-       (dependency * string list (* dropped isos *) * exists) * top_level list
-       * bool list
-  | ScriptRule of string * dependency * (string * meta_name) list * string
-
-and dependency =
-    Dep of string (* rule applies for the current binding *)
-  | AntiDep of string (* rule doesn't apply for the current binding *)
-  | EverDep of string (* rule applies for some binding *)
-  | NeverDep of string (* rule never applies for any binding *)
-  | AndDep of dependency * dependency
-  | OrDep of dependency * dependency
-  | NoDep
-
-and rule_with_metavars = metavar list * rule
-
-and anything =
-    FullTypeTag         of fullType
-  | BaseTypeTag         of baseType
-  | StructUnionTag      of structUnion
-  | SignTag             of sign
-  | IdentTag            of ident
-  | ExpressionTag       of expression
-  | ConstantTag         of constant
-  | UnaryOpTag          of unaryOp
-  | AssignOpTag         of assignOp
-  | FixOpTag            of fixOp
-  | BinaryOpTag         of binaryOp
-  | ArithOpTag          of arithOp
-  | LogicalOpTag        of logicalOp
-  | DeclarationTag      of declaration
-  | InitTag             of initialiser
-  | StorageTag          of storage
-  | IncFileTag          of inc_file
-  | Rule_elemTag        of rule_elem
-  | StatementTag        of statement
-  | CaseLineTag         of case_line
-  | ConstVolTag         of const_vol
-  | Token               of string * info option
-  | Code                of top_level
-  | ExprDotsTag         of expression dots
-  | ParamDotsTag        of parameterTypeDef dots
-  | StmtDotsTag         of statement dots
-  | DeclDotsTag         of declaration dots
-  | TypeCTag            of typeC
-  | ParamTag            of parameterTypeDef
-  | SgrepStartTag       of string
-  | SgrepEndTag         of string
-
-(* --------------------------------------------------------------------- *)
-
-and exists = Exists | Forall | ReverseForall | Undetermined
-
-(* --------------------------------------------------------------------- *)
-
-let mkToken x = Token (x,None)
-
-(* --------------------------------------------------------------------- *)
-
-let rewrap model x         = {model with node = x}
-let rewrap_mcode (_,a,b,c) x = (x,a,b,c)
-let unwrap x               = x.node
-let unwrap_mcode (x,_,_,_)  = x
-let get_mcodekind (_,_,x,_) = x
-let get_line x             = x.node_line
-let get_mcode_line (_,l,_,_) = l.line
-let get_fvs x              = x.free_vars
-let set_fvs fvs x          = {x with free_vars = fvs}
-let get_mfvs x             = x.minus_free_vars
-let set_mfvs mfvs x        = {x with minus_free_vars = mfvs}
-let get_fresh x            = x.fresh_vars
-let get_inherited x        = x.inherited
-let get_saved x            = x.saved_witness
-let get_dots_bef_aft x     = x.bef_aft
-let set_dots_bef_aft d x   = {x with bef_aft = d}
-let get_pos x              = x.pos_info
-let set_pos x pos          = {x with pos_info = pos}
-let get_test_exp x      = x.true_if_test_exp
-let set_test_exp x      = {x with true_if_test_exp = true}
-let get_isos x             = x.iso_info
-let set_isos x isos        = {x with iso_info = isos}
-let get_pos_var (_,_,_,p)  = p
-let set_pos_var vr (a,b,c,_) = (a,b,c,vr)
-let drop_pos (a,b,c,_)     = (a,b,c,NoMetaPos)
-
-let get_wcfvs (whencode : ('a wrap, 'b wrap) whencode list) =
-  Common.union_all
-    (List.map
-       (function
-          WhenNot(a) -> get_fvs a
-        | WhenAlways(a) -> get_fvs a
-        | WhenModifier(_) -> [])
-       whencode)
-
-(* --------------------------------------------------------------------- *)
-
-let get_meta_name = function
-    MetaIdDecl(ar,nm) -> nm
-  | MetaFreshIdDecl(ar,nm) -> nm
-  | MetaTypeDecl(ar,nm) -> nm
-  | MetaListlenDecl(nm) -> nm
-  | MetaParamDecl(ar,nm) -> nm
-  | MetaParamListDecl(ar,nm,nm1) -> nm
-  | MetaConstDecl(ar,nm,ty) -> nm
-  | MetaErrDecl(ar,nm) -> nm
-  | MetaExpDecl(ar,nm,ty) -> nm
-  | MetaIdExpDecl(ar,nm,ty) -> nm
-  | MetaLocalIdExpDecl(ar,nm,ty) -> nm
-  | MetaExpListDecl(ar,nm,nm1) -> nm
-  | MetaStmDecl(ar,nm) -> nm
-  | MetaStmListDecl(ar,nm) -> nm
-  | MetaFuncDecl(ar,nm) -> nm
-  | MetaLocalFuncDecl(ar,nm) -> nm
-  | MetaPosDecl(ar,nm) -> nm
-  | MetaDeclarerDecl(ar,nm) -> nm
-  | MetaIteratorDecl(ar,nm) -> nm
-
-(* --------------------------------------------------------------------- *)
-
-let no_info = { line = 0; column = 0; strbef = []; straft = [] }
-
-let make_term x =
-  {node = x;
-    node_line = 0;
-    free_vars = [];
-    minus_free_vars = [];
-    fresh_vars = [];
-    inherited = [];
-    saved_witness = [];
-    bef_aft = NoDots;
-    pos_info = None;
-    true_if_test_exp = false;
-    iso_info = [] }
-
-let make_meta_rule_elem s d (fvs,fresh,inh) =
-  {(make_term
-      (MetaRuleElem((("",s),no_info,d,NoMetaPos),Type_cocci.Unitary,false)))
-  with free_vars = fvs; fresh_vars = fresh; inherited = inh}
-
-let make_meta_decl s d (fvs,fresh,inh) =
-  {(make_term
-      (MetaDecl((("",s),no_info,d,NoMetaPos),Type_cocci.Unitary,false))) with
-    free_vars = fvs; fresh_vars = fresh; inherited = inh}
-
-let make_mcode x = (x,no_info,CONTEXT(NoPos,NOTHING),NoMetaPos)
-
-(* --------------------------------------------------------------------- *)
-
-let equal_pos x y = x = y
-
-(* --------------------------------------------------------------------- *)
-
-let undots x =
-  match unwrap x with
-    DOTS    e -> e
-  | CIRCLES e -> e
-  | STARS   e -> e
diff --git a/parsing_cocci/.#ast_cocci.ml.1.143 b/parsing_cocci/.#ast_cocci.ml.1.143
deleted file mode 100644 (file)
index bbbdd58..0000000
+++ /dev/null
@@ -1,672 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* --------------------------------------------------------------------- *)
-(* Modified code *)
-
-type info = { line : int; column : int;
-             strbef : string list; straft : string list }
-type line = int
-type meta_name = string * string
-(* need to be careful about rewrapping, to avoid duplicating pos info
-currently, the pos info is always None until asttoctl2. *)
-type 'a wrap =
-    {node : 'a;
-      node_line : line;
-      free_vars : meta_name list; (*free vars*)
-      minus_free_vars : meta_name list; (*minus free vars*)
-      fresh_vars : meta_name list; (*fresh vars*)
-      inherited : meta_name list; (*inherited vars*)
-      saved_witness : meta_name list; (*witness vars*)
-      bef_aft : dots_bef_aft;
-      (* the following is for or expressions *)
-      pos_info : meta_name mcode option; (* pos info, try not to duplicate *)
-      true_if_test_exp : bool;(* true if "test_exp from iso", only for exprs *)
-      (* isos relevant to the term; ultimately only used for rule_elems *)
-      iso_info : (string*anything) list }
-
-and 'a befaft =
-    BEFORE      of 'a list list
-  | AFTER       of 'a list list
-  | BEFOREAFTER of 'a list list * 'a list list
-  | NOTHING
-
-and 'a mcode = 'a * info * mcodekind * meta_pos (* pos variable *)
- (* pos is an offset indicating where in the C code the mcodekind has an
- effect *)
- and mcodekind =
-    MINUS       of pos * anything list list
-  | CONTEXT     of pos * anything befaft
-  | PLUS
- and fixpos =
-    Real of int (* charpos *) | Virt of int * int (* charpos + offset *)
- and pos = NoPos | DontCarePos | FixPos of (fixpos * fixpos)
-
-and dots_bef_aft =
-    NoDots
-  | AddingBetweenDots of statement * int (*index of let var*)
-  | DroppingBetweenDots of statement * int (*index of let var*)
-
-and inherited = Type_cocci.inherited
-and keep_binding = Type_cocci.keep_binding
-and multi = bool (*true if a nest is one or more, false if it is zero or more*)
-
-and end_info =
-    meta_name list (*free vars*) * meta_name list (*inherited vars*) *
-      meta_name list (*witness vars*) * mcodekind
-
-(* --------------------------------------------------------------------- *)
-(* Metavariables *)
-
-and arity = UNIQUE | OPT | MULTI | NONE
-
-and metavar =
-    MetaIdDecl of arity * meta_name (* name *)
-  | MetaFreshIdDecl of arity * meta_name (* name *)
-  | MetaTypeDecl of arity * meta_name (* name *)
-  | MetaListlenDecl of meta_name (* name *)
-  | MetaParamDecl of arity * meta_name (* name *)
-  | MetaParamListDecl of arity * meta_name (*name*) * meta_name option (*len*)
-  | MetaConstDecl of
-      arity * meta_name (* name *) * Type_cocci.typeC list option
-  | MetaErrDecl of arity * meta_name (* name *)
-  | MetaExpDecl of
-      arity * meta_name (* name *) * Type_cocci.typeC list option
-  | MetaIdExpDecl of
-      arity * meta_name (* name *) * Type_cocci.typeC list option
-  | MetaLocalIdExpDecl of
-      arity * meta_name (* name *) * Type_cocci.typeC list option
-  | MetaExpListDecl of arity * meta_name (*name*) * meta_name option (*len*)
-  | MetaStmDecl of arity * meta_name (* name *)
-  | MetaStmListDecl of arity * meta_name (* name *)
-  | MetaFuncDecl of arity * meta_name (* name *)
-  | MetaLocalFuncDecl of arity * meta_name (* name *)
-  | MetaPosDecl of arity * meta_name (* name *)
-  | MetaDeclarerDecl of arity * meta_name (* name *)
-  | MetaIteratorDecl of arity * meta_name (* name *)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-and 'a base_dots =
-    DOTS of 'a list
-  | CIRCLES of 'a list
-  | STARS of 'a list
-
-and 'a dots = 'a base_dots wrap
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-and base_ident =
-    Id of string mcode
-
-  | MetaId        of meta_name mcode * ident list * keep_binding * inherited
-  | MetaFunc      of meta_name mcode * ident list * keep_binding * inherited
-  | MetaLocalFunc of meta_name mcode * ident list * keep_binding * inherited
-
-  | OptIdent      of ident
-  | UniqueIdent   of ident
-
-and ident = base_ident wrap
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-and base_expression = 
-    Ident          of ident
-  | Constant       of constant mcode
-  | FunCall        of expression * string mcode (* ( *) *
-                      expression dots * string mcode (* ) *)
-  | Assignment     of expression * assignOp mcode * expression *
-                     bool (* true if it can match an initialization *)
-  | CondExpr       of expression * string mcode (* ? *) * expression option *
-                     string mcode (* : *) * expression
-  | Postfix        of expression * fixOp mcode
-  | Infix          of expression * fixOp mcode
-  | Unary          of expression * unaryOp mcode
-  | Binary         of expression * binaryOp mcode * expression
-  | Nested         of expression * binaryOp mcode * expression
-  | ArrayAccess    of expression * string mcode (* [ *) * expression *
-                     string mcode (* ] *)
-  | RecordAccess   of expression * string mcode (* . *) * ident
-  | RecordPtAccess of expression * string mcode (* -> *) * ident
-  | Cast           of string mcode (* ( *) * fullType * string mcode (* ) *) *
-                      expression
-  | SizeOfExpr     of string mcode (* sizeof *) * expression
-  | SizeOfType     of string mcode (* sizeof *) * string mcode (* ( *) *
-                      fullType * string mcode (* ) *)
-  | TypeExp        of fullType (*type name used as an expression, only in
-                                 arg or #define*)
-
-  | Paren          of string mcode (* ( *) * expression *
-                      string mcode (* ) *)
-
-  | MetaErr        of meta_name mcode * expression list * keep_binding *
-                     inherited
-  | MetaExpr       of meta_name mcode * expression list * keep_binding *
-                     Type_cocci.typeC list option * form * inherited
-  | MetaExprList   of meta_name mcode * listlen option * keep_binding *
-                      inherited (* only in arg lists *)
-
-  | EComma         of string mcode (* only in arg lists *)
-
-  | DisjExpr       of expression list
-  | NestExpr       of expression dots * expression option * multi
-
-  (* can appear in arg lists, and also inside Nest, as in:
-   if(< ... X ... Y ...>)
-   In the following, the expression option is the WHEN  *)
-  | Edots          of string mcode (* ... *) * expression option
-  | Ecircles       of string mcode (* ooo *) * expression option
-  | Estars         of string mcode (* *** *) * expression option
-
-  | OptExp         of expression
-  | UniqueExp      of expression
-
-(* ANY = int E; ID = idexpression int X; CONST = constant int X; *)
-and form = ANY | ID | LocalID | CONST (* form for MetaExp *)
-
-and expression = base_expression wrap
-
-and listlen = meta_name mcode * keep_binding * inherited
-
-and  unaryOp = GetRef | DeRef | UnPlus |  UnMinus | Tilde | Not
-and  assignOp = SimpleAssign | OpAssign of arithOp
-and  fixOp = Dec | Inc
-
-and  binaryOp = Arith of arithOp | Logical of logicalOp
-and  arithOp =
-    Plus | Minus | Mul | Div | Mod | DecLeft | DecRight | And | Or | Xor
-and  logicalOp = Inf | Sup | InfEq | SupEq | Eq | NotEq | AndLog | OrLog
-
-and constant =
-    String of string
-  | Char   of string
-  | Int    of string
-  | Float  of string
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and base_fullType =
-    Type            of const_vol mcode option * typeC
-  | DisjType        of fullType list (* only after iso *)
-  | OptType         of fullType
-  | UniqueType      of fullType
-
-and base_typeC = 
-    BaseType        of baseType mcode * sign mcode option
-  | ImplicitInt     of sign mcode
-  | Pointer         of fullType * string mcode (* * *)
-  | FunctionPointer of fullType *
-                 string mcode(* ( *)*string mcode(* * *)*string mcode(* ) *)*
-                  string mcode (* ( *)*parameter_list*string mcode(* ) *)
-
-  (* used for the automatic managment of prototypes *)
-  | FunctionType     of bool (* true if all minus for dropping return type *) *
-                   fullType option *
-                  string mcode (* ( *) * parameter_list *
-                   string mcode (* ) *)
-
-  | Array           of fullType * string mcode (* [ *) *
-                      expression option * string mcode (* ] *)
-  | StructUnionName of structUnion mcode * ident option (* name *)
-  | StructUnionDef  of fullType (* either StructUnionName or metavar *) *
-       string mcode (* { *) * declaration dots * string mcode (* } *)
-  | TypeName        of string mcode
-
-  | MetaType        of meta_name mcode * keep_binding * inherited
-
-and fullType = base_fullType wrap
-and typeC = base_typeC wrap
-     
-and baseType = VoidType | CharType | ShortType | IntType | DoubleType
-| FloatType | LongType
-
-and structUnion = Struct | Union
-
-and sign = Signed | Unsigned
-
-and const_vol = Const | Volatile
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and base_declaration =
-    Init of storage mcode option * fullType * ident * string mcode (*=*) *
-       initialiser * string mcode (*;*)
-  | UnInit of storage mcode option * fullType * ident * string mcode (* ; *)
-  | TyDecl of fullType * string mcode (* ; *)
-  | MacroDecl of ident (* name *) * string mcode (* ( *) *
-        expression dots * string mcode (* ) *) * string mcode (* ; *)
-  | Typedef of string mcode (*typedef*) * fullType * 
-               typeC (* either TypeName or metavar *) * string mcode (*;*)
-  | DisjDecl of declaration list
-  (* Ddots is for a structure declaration *)
-  | Ddots    of string mcode (* ... *) * declaration option (* whencode *)
-
-  | MetaDecl of meta_name mcode * keep_binding * inherited
-
-  | OptDecl    of declaration
-  | UniqueDecl of declaration
-
-and declaration = base_declaration wrap
-
-(* --------------------------------------------------------------------- *)
-(* Initializers *)
-
-and base_initialiser =
-    InitExpr of expression 
-  | InitList of string mcode (*{*) * initialiser list * string mcode (*}*) *
-       initialiser list (* whencode: elements that shouldn't appear in init *)
-  | InitGccDotName of
-      string mcode (*.*) * ident (* name *) * string mcode (*=*) *
-       initialiser (* gccext: *)
-  | InitGccName of ident (* name *) * string mcode (*:*) *
-       initialiser
-  | InitGccIndex of
-      string mcode (*[*) * expression * string mcode (*]*) *
-       string mcode (*=*) * initialiser
-  | InitGccRange of
-      string mcode (*[*) * expression * string mcode (*...*) *
-        expression * string mcode (*]*) * string mcode (*=*) * initialiser
-  | IComma of string mcode (* , *)
-
-  | OptIni    of initialiser
-  | UniqueIni of initialiser
-
-and initialiser = base_initialiser wrap
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and base_parameterTypeDef =
-    VoidParam     of fullType
-  | Param         of fullType * ident option
-
-  | MetaParam     of meta_name mcode * keep_binding * inherited
-  | MetaParamList of meta_name mcode * listlen option * keep_binding *
-                    inherited
-
-  | PComma        of string mcode
-
-  | Pdots         of string mcode (* ... *)
-  | Pcircles      of string mcode (* ooo *)
-
-  | OptParam      of parameterTypeDef
-  | UniqueParam   of parameterTypeDef
-
-and parameterTypeDef = base_parameterTypeDef wrap
-
-and parameter_list = parameterTypeDef dots
-
-(* --------------------------------------------------------------------- *)
-(* #define Parameters *)
-
-and base_define_param =
-    DParam        of ident
-  | DPComma       of string mcode
-  | DPdots        of string mcode (* ... *)
-  | DPcircles     of string mcode (* ooo *)
-  | OptDParam     of define_param
-  | UniqueDParam  of define_param
-
-and define_param = base_define_param wrap
-
-and base_define_parameters =
-    NoParams     (* not parameter list, not an empty one *)
-  | DParams      of string mcode(*( *) * define_param dots * string mcode(* )*)
-
-and define_parameters = base_define_parameters wrap
-
-(* --------------------------------------------------------------------- *)
-(* positions *)
-
-(* PER = keep bindings separate, ALL = collect them *)
-and meta_collect = PER | ALL
-
-and meta_pos =
-    MetaPos of meta_name mcode * meta_name list *
-       meta_collect * keep_binding * inherited
-  | NoMetaPos
-
-(* --------------------------------------------------------------------- *)
-(* Function declaration *)
-
-and storage = Static | Auto | Register | Extern
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and base_rule_elem =
-    FunHeader     of mcodekind (* before the function header *) *
-                    bool (* true if all minus, for dropping static, etc *) *
-                    fninfo list * ident (* name *) *
-                    string mcode (* ( *) * parameter_list *
-                     string mcode (* ) *)
-  | Decl          of mcodekind (* before the decl *) *
-                     bool (* true if all minus *) * declaration
-
-  | SeqStart      of string mcode (* { *)
-  | SeqEnd        of string mcode (* } *)
-
-  | ExprStatement of expression * string mcode (*;*)
-  | IfHeader      of string mcode (* if *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *)
-  | Else          of string mcode (* else *)
-  | WhileHeader   of string mcode (* while *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *)
-  | DoHeader      of string mcode (* do *)
-  | WhileTail     of string mcode (* while *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *) *
-                     string mcode (* ; *)
-  | ForHeader     of string mcode (* for *) * string mcode (* ( *) *
-                     expression option * string mcode (*;*) *
-                    expression option * string mcode (*;*) *
-                     expression option * string mcode (* ) *)
-  | IteratorHeader of ident (* name *) * string mcode (* ( *) *
-                    expression dots * string mcode (* ) *)
-  | SwitchHeader  of string mcode (* switch *) * string mcode (* ( *) *
-                    expression * string mcode (* ) *)
-  | Break         of string mcode (* break *) * string mcode (* ; *)
-  | Continue      of string mcode (* continue *) * string mcode (* ; *)
-  | Label         of ident * string mcode (* : *)
-  | Goto          of string mcode (* goto *) * ident * string mcode (* ; *)
-  | Return        of string mcode (* return *) * string mcode (* ; *)
-  | ReturnExpr    of string mcode (* return *) * expression *
-                    string mcode (* ; *)
-
-  | MetaRuleElem  of meta_name mcode * keep_binding * inherited
-  | MetaStmt      of meta_name mcode * keep_binding * metaStmtInfo *
-                    inherited
-  | MetaStmtList  of meta_name mcode * keep_binding * inherited
-
-  | Exp           of expression (* matches a subterm *)
-  | TopExp        of expression (* for macros body, exp at top level,
-                                  not subexp *)
-  | Ty            of fullType (* only at SP top level, matches a subterm *)
-  | Include       of string mcode (*#include*) * inc_file mcode (*file *)
-  | DefineHeader  of string mcode (* #define *) * ident (* name *) *
-                    define_parameters (*params*)
-  | Case          of string mcode (* case *) * expression * string mcode (*:*)
-  | Default       of string mcode (* default *) * string mcode (*:*)
-  | DisjRuleElem  of rule_elem list
-
-and fninfo =
-    FStorage of storage mcode
-  | FType of fullType
-  | FInline of string mcode
-  | FAttr of string mcode
-
-and metaStmtInfo =
-    NotSequencible | SequencibleAfterDots of dots_whencode list | Sequencible
-
-and rule_elem = base_rule_elem wrap
-
-and base_statement =
-    Seq           of rule_elem (* { *) * statement dots *
-                    statement dots * rule_elem (* } *)
-  | IfThen        of rule_elem (* header *) * statement * end_info (* endif *)
-  | IfThenElse    of rule_elem (* header *) * statement *
-                    rule_elem (* else *) * statement * end_info (* endif *)
-  | While         of rule_elem (* header *) * statement * end_info (*endwhile*)
-  | Do            of rule_elem (* do *) * statement * rule_elem (* tail *)
-  | For           of rule_elem (* header *) * statement * end_info (*endfor*)
-  | Iterator      of rule_elem (* header *) * statement * end_info (*enditer*)
-  | Switch        of rule_elem (* header *) * rule_elem (* { *) *
-                    case_line list * rule_elem (* } *)
-  | Atomic        of rule_elem
-  | Disj          of statement dots list
-  | Nest          of statement dots *
-                    (statement dots,statement) whencode list * multi *
-                    dots_whencode list * dots_whencode list
-  | FunDecl       of rule_elem (* header *) * rule_elem (* { *) *
-                    statement dots * statement dots * rule_elem (* } *)
-  | Define        of rule_elem (* header *) * statement dots
-  | Dots          of string mcode (* ... *) *
-                    (statement dots,statement) whencode list *
-                    dots_whencode list * dots_whencode list
-  | Circles       of string mcode (* ooo *) *
-                    (statement dots,statement) whencode list *
-                    dots_whencode list * dots_whencode list
-  | Stars         of string mcode (* *** *) *
-                    (statement dots,statement) whencode list *
-                    dots_whencode list * dots_whencode list
-  | OptStm        of statement
-  | UniqueStm     of statement
-
-and ('a,'b) whencode =
-    WhenNot of 'a
-  | WhenAlways of 'b
-  | WhenModifier of when_modifier
-  | WhenNotTrue of rule_elem (* useful for fvs *)
-  | WhenNotFalse of rule_elem
-
-and when_modifier =
-  (* The following removes the shortest path constraint.  It can be used
-     with other when modifiers *)
-    WhenAny
-  (* The following removes the special consideration of error paths.  It
-     can be used with other when modifiers *)
-  | WhenStrict
-  | WhenForall
-  | WhenExists
-
-(* only used with asttoctl *)
-and dots_whencode =
-    WParen of rule_elem * meta_name (*pren_var*)
-  | Other of statement
-  | Other_dots of statement dots
-
-and statement = base_statement wrap
-
-and base_case_line =
-    CaseLine of rule_elem (* case/default header *) * statement dots
-  | OptCase of case_line
-
-and case_line = base_case_line wrap
-
-and inc_file =
-    Local of inc_elem list
-  | NonLocal of inc_elem list
-
-and inc_elem =
-    IncPath of string
-  | IncDots
-
-and base_top_level =
-    DECL of statement
-  | CODE of statement dots
-  | FILEINFO of string mcode (* old file *) * string mcode (* new file *)
-  | ERRORWORDS of expression list
-
-and top_level = base_top_level wrap
-
-and rulename =
-    CocciRulename of string option * dependency *
-       string list * string list * exists * bool
-  | ScriptRulename of string * dependency
-
-and rule =
-    CocciRule of string (* name *) * 
-       (dependency * string list (* dropped isos *) * exists) * top_level list
-       * bool list
-  | ScriptRule of string * dependency * (string * meta_name) list * string
-
-and dependency =
-    Dep of string (* rule applies for the current binding *)
-  | AntiDep of string (* rule doesn't apply for the current binding *)
-  | EverDep of string (* rule applies for some binding *)
-  | NeverDep of string (* rule never applies for any binding *)
-  | AndDep of dependency * dependency
-  | OrDep of dependency * dependency
-  | NoDep
-
-and rule_with_metavars = metavar list * rule
-
-and anything =
-    FullTypeTag         of fullType
-  | BaseTypeTag         of baseType
-  | StructUnionTag      of structUnion
-  | SignTag             of sign
-  | IdentTag            of ident
-  | ExpressionTag       of expression
-  | ConstantTag         of constant
-  | UnaryOpTag          of unaryOp
-  | AssignOpTag         of assignOp
-  | FixOpTag            of fixOp
-  | BinaryOpTag         of binaryOp
-  | ArithOpTag          of arithOp
-  | LogicalOpTag        of logicalOp
-  | DeclarationTag      of declaration
-  | InitTag             of initialiser
-  | StorageTag          of storage
-  | IncFileTag          of inc_file
-  | Rule_elemTag        of rule_elem
-  | StatementTag        of statement
-  | CaseLineTag         of case_line
-  | ConstVolTag         of const_vol
-  | Token               of string * info option
-  | Code                of top_level
-  | ExprDotsTag         of expression dots
-  | ParamDotsTag        of parameterTypeDef dots
-  | StmtDotsTag         of statement dots
-  | DeclDotsTag         of declaration dots
-  | TypeCTag            of typeC
-  | ParamTag            of parameterTypeDef
-  | SgrepStartTag       of string
-  | SgrepEndTag         of string
-
-(* --------------------------------------------------------------------- *)
-
-and exists = Exists | Forall | ReverseForall | Undetermined
-
-(* --------------------------------------------------------------------- *)
-
-let mkToken x = Token (x,None)
-
-(* --------------------------------------------------------------------- *)
-
-let rewrap model x         = {model with node = x}
-let rewrap_mcode (_,a,b,c) x = (x,a,b,c)
-let unwrap x               = x.node
-let unwrap_mcode (x,_,_,_)  = x
-let get_mcodekind (_,_,x,_) = x
-let get_line x             = x.node_line
-let get_mcode_line (_,l,_,_) = l.line
-let get_fvs x              = x.free_vars
-let set_fvs fvs x          = {x with free_vars = fvs}
-let get_mfvs x             = x.minus_free_vars
-let set_mfvs mfvs x        = {x with minus_free_vars = mfvs}
-let get_fresh x            = x.fresh_vars
-let get_inherited x        = x.inherited
-let get_saved x            = x.saved_witness
-let get_dots_bef_aft x     = x.bef_aft
-let set_dots_bef_aft d x   = {x with bef_aft = d}
-let get_pos x              = x.pos_info
-let set_pos x pos          = {x with pos_info = pos}
-let get_test_exp x      = x.true_if_test_exp
-let set_test_exp x      = {x with true_if_test_exp = true}
-let get_isos x             = x.iso_info
-let set_isos x isos        = {x with iso_info = isos}
-let get_pos_var (_,_,_,p)  = p
-let set_pos_var vr (a,b,c,_) = (a,b,c,vr)
-let drop_pos (a,b,c,_)     = (a,b,c,NoMetaPos)
-
-let get_wcfvs (whencode : ('a wrap, 'b wrap) whencode list) =
-  Common.union_all
-    (List.map
-       (function
-          WhenNot(a) -> get_fvs a
-        | WhenAlways(a) -> get_fvs a
-        | WhenModifier(_) -> []
-        | WhenNotTrue(e) -> get_fvs e
-        | WhenNotFalse(e) -> get_fvs e)
-       whencode)
-
-(* --------------------------------------------------------------------- *)
-
-let get_meta_name = function
-    MetaIdDecl(ar,nm) -> nm
-  | MetaFreshIdDecl(ar,nm) -> nm
-  | MetaTypeDecl(ar,nm) -> nm
-  | MetaListlenDecl(nm) -> nm
-  | MetaParamDecl(ar,nm) -> nm
-  | MetaParamListDecl(ar,nm,nm1) -> nm
-  | MetaConstDecl(ar,nm,ty) -> nm
-  | MetaErrDecl(ar,nm) -> nm
-  | MetaExpDecl(ar,nm,ty) -> nm
-  | MetaIdExpDecl(ar,nm,ty) -> nm
-  | MetaLocalIdExpDecl(ar,nm,ty) -> nm
-  | MetaExpListDecl(ar,nm,nm1) -> nm
-  | MetaStmDecl(ar,nm) -> nm
-  | MetaStmListDecl(ar,nm) -> nm
-  | MetaFuncDecl(ar,nm) -> nm
-  | MetaLocalFuncDecl(ar,nm) -> nm
-  | MetaPosDecl(ar,nm) -> nm
-  | MetaDeclarerDecl(ar,nm) -> nm
-  | MetaIteratorDecl(ar,nm) -> nm
-
-(* --------------------------------------------------------------------- *)
-
-let no_info = { line = 0; column = 0; strbef = []; straft = [] }
-
-let make_term x =
-  {node = x;
-    node_line = 0;
-    free_vars = [];
-    minus_free_vars = [];
-    fresh_vars = [];
-    inherited = [];
-    saved_witness = [];
-    bef_aft = NoDots;
-    pos_info = None;
-    true_if_test_exp = false;
-    iso_info = [] }
-
-let make_meta_rule_elem s d (fvs,fresh,inh) =
-  {(make_term
-      (MetaRuleElem((("",s),no_info,d,NoMetaPos),Type_cocci.Unitary,false)))
-  with free_vars = fvs; fresh_vars = fresh; inherited = inh}
-
-let make_meta_decl s d (fvs,fresh,inh) =
-  {(make_term
-      (MetaDecl((("",s),no_info,d,NoMetaPos),Type_cocci.Unitary,false))) with
-    free_vars = fvs; fresh_vars = fresh; inherited = inh}
-
-let make_mcode x = (x,no_info,CONTEXT(NoPos,NOTHING),NoMetaPos)
-
-(* --------------------------------------------------------------------- *)
-
-let equal_pos x y = x = y
-
-(* --------------------------------------------------------------------- *)
-
-let undots x =
-  match unwrap x with
-    DOTS    e -> e
-  | CIRCLES e -> e
-  | STARS   e -> e
diff --git a/parsing_cocci/.#check_meta.ml.1.79 b/parsing_cocci/.#check_meta.ml.1.79
deleted file mode 100644 (file)
index 28da910..0000000
+++ /dev/null
@@ -1,528 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* For minus fragment, checks that all of the identifier metavariables that
-are used are not declared as fresh, and check that all declared variables
-are used.  For plus fragment, just check that the variables declared as
-fresh are used.  What is the issue about error variables? (don't remember) *)
-
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-module V0 = Visitor_ast0
-
-(* all fresh identifiers *)
-let fresh_table = (Hashtbl.create(50) : ((string * string), unit) Hashtbl.t)
-
-let warning s = Printf.fprintf stderr "warning: %s\n" s
-
-let promote name = (name,(),Ast0.default_info(),(),None)
-
-(* --------------------------------------------------------------------- *)
-
-let find_loop table name =
-  let rec loop = function
-      [] -> raise Not_found
-    | x::xs -> (try Hashtbl.find x name with Not_found -> loop xs) in
-  loop table
-
-let check_table table minus (name,_,info,_,_) =
-  let rl = info.Ast0.line_start in
-  if minus
-  then
-    (try (find_loop table name) := true
-    with
-      Not_found ->
-       (try
-         Hashtbl.find fresh_table name;
-         let (_,name) = name in
-         failwith
-           (Printf.sprintf
-              "%d: unexpected use of a fresh identifier %s" rl name)
-       with Not_found -> ()))
-  else (try (find_loop table name) := true with Not_found -> ())
-
-let get_opt fn = Common.do_option fn
-
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-let dots fn d =
-  match Ast0.unwrap d with
-    Ast0.DOTS(x) -> List.iter fn x
-  | Ast0.CIRCLES(x) -> List.iter fn x
-  | Ast0.STARS(x) -> List.iter fn x
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-type context = ID | FIELD | FN | GLOBAL
-
-(* heuristic for distinguishing ifdef variables from undeclared metavariables*)
-let is_ifdef name =
-  String.length name > 2 && String.uppercase name = name
-
-let ident context old_metas table minus i =
-  match Ast0.unwrap i with
-    Ast0.Id((name,_,info,_,_) : string Ast0.mcode) ->
-      let rl = info.Ast0.line_start in
-      let err =
-       if List.exists (function x -> x = name) old_metas
-           && (minus || Ast0.get_mcodekind i = Ast0.PLUS)
-       then
-         begin
-           warning
-             (Printf.sprintf
-                "line %d: %s, previously declared as a metavariable, is used as an identifier" rl name);
-             true
-         end
-       else false in
-      (match context with
-       ID ->
-         if not (is_ifdef name) && minus && not err(* warn only once per id *)
-         then
-           warning
-             (Printf.sprintf "line %d: should %s be a metavariable?" rl name)
-      | _ -> ())
-  | Ast0.MetaId(name,_,_) -> check_table table minus name
-  | Ast0.MetaFunc(name,_,_) -> check_table table minus name
-  | Ast0.MetaLocalFunc(name,_,_) -> check_table table minus name
-  | Ast0.OptIdent(_) | Ast0.UniqueIdent(_) ->
-      failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let rec expression context old_metas table minus e =
-  match Ast0.unwrap e with
-    Ast0.Ident(id) ->
-      ident context old_metas table minus id
-  | Ast0.FunCall(fn,lp,args,rp) ->
-      expression FN old_metas table minus fn;
-      dots (expression ID old_metas table minus) args
-  | Ast0.Assignment(left,op,right,_) ->
-      expression context old_metas table minus left;
-      expression ID old_metas table minus right
-  | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-      expression ID old_metas table minus exp1;
-      get_opt (expression ID old_metas table minus) exp2;
-      expression ID old_metas table minus exp3
-  | Ast0.Postfix(exp,op) ->
-      expression ID old_metas table minus exp
-  | Ast0.Infix(exp,op) ->
-      expression ID old_metas table minus exp
-  | Ast0.Unary(exp,op) ->
-      expression ID old_metas table minus exp
-  | Ast0.Binary(left,op,right) ->
-      expression ID old_metas table minus left;
-      expression ID old_metas table minus right
-  | Ast0.Paren(lp,exp,rp) ->
-      expression ID old_metas table minus exp
-  | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-      expression ID old_metas table minus exp1;
-      expression ID old_metas table minus exp2
-  | Ast0.RecordAccess(exp,pt,field) ->
-      expression ID old_metas table minus exp;
-      ident FIELD old_metas table minus field
-  | Ast0.RecordPtAccess(exp,ar,field) ->
-      expression ID old_metas table minus exp;
-      ident FIELD old_metas table minus field
-  | Ast0.Cast(lp,ty,rp,exp) ->
-      typeC old_metas table minus ty; expression ID old_metas table minus exp
-  | Ast0.SizeOfExpr(szf,exp) -> expression ID old_metas table minus exp
-  | Ast0.SizeOfType(szf,lp,ty,rp) -> typeC old_metas table minus ty
-  | Ast0.TypeExp(ty) -> typeC old_metas table minus ty
-  | Ast0.MetaExpr(name,_,Some tys,_,_) ->
-      List.iter
-       (function x ->
-         match get_type_name x with
-           Some(ty) -> check_table table minus (promote ty)
-         | None -> ())
-       tys;
-      check_table table minus name
-  | Ast0.MetaExpr(name,_,_,_,_) | Ast0.MetaErr(name,_,_) ->
-      check_table table minus name
-  | Ast0.MetaExprList(name,None,_) ->
-      check_table table minus name
-  | Ast0.MetaExprList(name,Some lenname,_) ->
-      check_table table minus name;
-      check_table table minus lenname
-  | Ast0.DisjExpr(_,exps,_,_) ->
-      List.iter (expression ID old_metas table minus) exps
-  | Ast0.NestExpr(_,exp_dots,_,w,_) ->
-      dots (expression ID old_metas table minus) exp_dots;
-      get_opt (expression ID old_metas table minus) w
-  | Ast0.Edots(_,Some x) | Ast0.Ecircles(_,Some x) | Ast0.Estars(_,Some x) ->
-      expression ID old_metas table minus x
-  | _ -> () (* no metavariable subterms *)
-
-and get_type_name = function
-    Type_cocci.ConstVol(_,ty) | Type_cocci.Pointer(ty)
-  | Type_cocci.FunctionPointer(ty) | Type_cocci.Array(ty) -> get_type_name ty
-  | Type_cocci.MetaType(nm,_,_) -> Some nm
-  | _ -> None
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and typeC old_metas table minus t =
-  match Ast0.unwrap t with
-    Ast0.ConstVol(cv,ty) -> typeC old_metas table minus ty
-  | Ast0.Pointer(ty,star) -> typeC old_metas table minus ty
-  | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      typeC old_metas table minus ty;
-      parameter_list old_metas table minus params
-  | Ast0.FunctionType(ty,lp1,params,rp1) ->
-      get_opt (typeC old_metas table minus) ty;
-      parameter_list old_metas table minus params
-  | Ast0.Array(ty,lb,size,rb) ->
-      typeC old_metas table minus ty;
-      get_opt (expression ID old_metas table minus) size
-  | Ast0.MetaType(name,_) ->
-      check_table table minus name
-  | Ast0.DisjType(_,types,_,_) ->
-      List.iter (typeC old_metas table minus) types
-  | Ast0.StructUnionName(su,Some id) -> ident GLOBAL old_metas table minus id
-  | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-      typeC old_metas table minus ty;
-      dots (declaration GLOBAL old_metas table minus) decls
-  | Ast0.OptType(ty) | Ast0.UniqueType(ty) ->
-      failwith "unexpected code"
-  | _ -> () (* no metavariable subterms *)
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and declaration context old_metas table minus d =
-  match Ast0.unwrap d with
-    Ast0.Init(stg,ty,id,eq,ini,sem) ->
-      (match Ast0.unwrap ini with
-       Ast0.InitExpr exp ->
-         typeC old_metas table minus ty;
-         ident context old_metas table minus id;
-         expression ID old_metas table minus exp
-      |        _ ->
-         (*
-         if minus
-         then
-           failwith "complex initializer specification not allowed in - code"
-         else*)
-           (typeC old_metas table minus ty;
-            ident context old_metas table minus id;
-            initialiser old_metas table minus ini))
-  | Ast0.UnInit(stg,ty,id,sem) ->
-      typeC old_metas table minus ty; ident context old_metas table minus id
-  | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-      ident ID old_metas table minus name;
-      dots (expression ID old_metas table minus) args
-  | Ast0.TyDecl(ty,sem) -> typeC old_metas table minus ty
-  | Ast0.Typedef(stg,ty,id,sem) ->
-      typeC old_metas table minus ty;
-      typeC old_metas table minus id
-  | Ast0.DisjDecl(_,decls,_,_) ->
-      List.iter (declaration ID old_metas table minus) decls
-  | Ast0.Ddots(_,Some x) -> declaration ID old_metas table minus x
-  | Ast0.Ddots(_,None) -> ()
-  | Ast0.OptDecl(_) | Ast0.UniqueDecl(_) ->
-      failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Initialiser *)
-
-and initialiser old_metas table minus ini =
-  match Ast0.unwrap ini with
-    Ast0.InitExpr(exp) -> expression ID old_metas table minus exp
-  | Ast0.InitList(lb,initlist,rb) ->
-      dots (initialiser old_metas table minus) initlist
-  | Ast0.InitGccDotName(dot,name,eq,ini) ->
-      ident FIELD old_metas table minus name;
-      initialiser old_metas table minus ini
-  | Ast0.InitGccName(name,eq,ini) ->
-      ident FIELD old_metas table minus name;
-      initialiser old_metas table minus ini
-  | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-      expression ID old_metas table minus exp;
-      initialiser old_metas table minus ini
-  | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-      expression ID old_metas table minus exp1;
-      expression ID old_metas table minus exp2;
-      initialiser old_metas table minus ini
-  | Ast0.Idots(_,Some x) -> initialiser old_metas table minus x
-  | Ast0.OptIni(_) | Ast0.UniqueIni(_) ->
-      failwith "unexpected code"
-  | _ -> () (* no metavariable subterms *)
-
-and initialiser_list old_metas table minus =
-  dots (initialiser old_metas table minus)
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and parameterTypeDef old_metas table minus param =
-  match Ast0.unwrap param with
-    Ast0.Param(ty,id) ->
-      get_opt (ident ID old_metas table minus) id;
-      typeC old_metas table minus ty
-  | Ast0.MetaParam(name,_) ->
-      check_table table minus name
-  | Ast0.MetaParamList(name,None,_) ->
-      check_table table minus name
-  | Ast0.MetaParamList(name,Some lenname,_) ->
-      check_table table minus name;
-      check_table table minus lenname
-  | _ -> () (* no metavariable subterms *)
-
-and parameter_list old_metas table minus =
-  dots (parameterTypeDef old_metas table minus)
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and statement old_metas table minus s =
-  match Ast0.unwrap s with
-    Ast0.Decl(_,decl) -> declaration ID old_metas table minus decl
-  | Ast0.Seq(lbrace,body,rbrace) -> dots (statement old_metas table minus) body
-  | Ast0.ExprStatement(exp,sem) -> expression ID old_metas table minus exp
-  | Ast0.IfThen(iff,lp,exp,rp,branch,_) ->
-      expression ID old_metas table minus exp;
-      statement old_metas table minus branch
-  | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,_) ->
-      expression ID old_metas table minus exp;
-      statement old_metas table minus branch1;
-      statement old_metas table minus branch2
-  | Ast0.While(wh,lp,exp,rp,body,_) ->
-      expression ID old_metas table minus exp;
-      statement old_metas table minus body
-  | Ast0.Do(d,body,wh,lp,exp,rp,sem) ->
-      statement old_metas table minus body;
-      expression ID old_metas table minus exp
-  | Ast0.For(fr,lp,exp1,sem1,exp2,sem2,exp3,rp,body,_) ->
-      get_opt (expression ID old_metas table minus) exp1;
-      get_opt (expression ID old_metas table minus) exp2;
-      get_opt (expression ID old_metas table minus) exp3;
-      statement old_metas table minus body
-  | Ast0.Iterator(nm,lp,args,rp,body,_) ->
-      ident ID old_metas table minus nm;
-      dots (expression ID old_metas table minus) args;
-      statement old_metas table minus body
-  | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-      expression ID old_metas table minus exp;
-      dots (case_line old_metas table minus) cases
-  | Ast0.ReturnExpr(ret,exp,sem) -> expression ID old_metas table minus exp
-  | Ast0.MetaStmt(name,_) ->     check_table table minus name
-  | Ast0.MetaStmtList(name,_) -> check_table table minus name
-  | Ast0.Exp(exp) -> expression ID old_metas table minus exp
-  | Ast0.TopExp(exp) -> expression ID old_metas table minus exp
-  | Ast0.Ty(ty) -> typeC old_metas table minus ty
-  | Ast0.Disj(_,rule_elem_dots_list,_,_) ->
-      List.iter (dots (statement old_metas table minus)) rule_elem_dots_list
-  | Ast0.Nest(_,rule_elem_dots,_,w,_) ->
-      dots (statement old_metas table minus) rule_elem_dots;
-      List.iter (whencode (dots (statement old_metas table minus))
-                  (statement old_metas table minus))
-       w
-  | Ast0.Dots(_,x) | Ast0.Circles(_,x) | Ast0.Stars(_,x) ->
-      List.iter
-       (whencode (dots (statement old_metas table minus))
-          (statement old_metas table minus)) x
-  | Ast0.FunDecl(_,fi,name,lp,params,rp,lbrace,body,rbrace) ->
-      ident FN old_metas table minus name;
-      List.iter (fninfo old_metas table minus) fi;
-      parameter_list old_metas table minus params;
-      dots (statement old_metas table minus) body
-  | Ast0.Include(inc,s) -> () (* no metavariables possible *)
-  | Ast0.Define(def,id,_,body) ->
-      ident GLOBAL old_metas table minus id;
-      dots (statement old_metas table minus) body
-  | Ast0.Goto(_,i,_) -> ident ID old_metas table minus i
-  | _ -> () (* no metavariable subterms *)
-
-and fninfo old_metas table minus = function
-    Ast0.FStorage(stg) -> ()
-  | Ast0.FType(ty) -> typeC old_metas table minus ty
-  | Ast0.FInline(inline) -> ()
-  | Ast0.FAttr(attr) -> ()
-
-and whencode notfn alwaysfn = function
-    Ast0.WhenNot a -> notfn a
-  | Ast0.WhenAlways a -> alwaysfn a
-  | Ast0.WhenModifier(_) -> ()
-
-and case_line old_metas table minus c =
-  match Ast0.unwrap c with
-    Ast0.Default(def,colon,code) ->
-      dots (statement old_metas table minus) code
-  | Ast0.Case(case,exp,colon,code) ->
-      dots (statement old_metas table minus) code
-  | Ast0.OptCase(case) -> failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Rules *)
-
-let top_level old_metas table minus t =
-  match Ast0.unwrap t with
-    Ast0.DECL(stmt) -> statement old_metas table minus stmt
-  | Ast0.CODE(stmt_dots) -> dots (statement old_metas table minus) stmt_dots
-  | Ast0.ERRORWORDS(exps) ->
-      List.iter (expression FN old_metas table minus) exps
-  | _ -> () (* no metavariables possible *)
-
-let rule old_metas table minus rules =
-  List.iter (top_level old_metas table minus) rules
-
-(* --------------------------------------------------------------------- *)
-
-let positions table rules =
-  let mcode x =
-    match Ast0.get_pos x with
-      Ast0.MetaPos(name,constraints,_) ->
-       let pos = Ast0.unwrap_mcode name in
-       (find_loop table pos) := true
-    | _ -> () in
-  let option_default = () in
-  let bind x y = () in
-  let donothing r k e = k e in
-  let fn =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing donothing
-      donothing donothing in
-
-  List.iter fn.V0.combiner_top_level rules
-
-let dup_positions rules =
-  let mcode x =
-    match Ast0.get_pos x with
-      Ast0.MetaPos(name,constraints,_) ->
-       let pos = Ast0.unwrap_mcode name in [pos]
-    | _ -> [] in
-  let option_default = [] in
-  let bind x y = x@y in
-
-  (* Case for everything that has a disj.
-     Note, no positions on ( | ) of a disjunction, so no need to recurse on
-     these. *)
-
-  let expression r k e =
-    match Ast0.unwrap e with
-      Ast0.DisjExpr(_,explist,_,_) ->
-       List.fold_left Common.union_set option_default
-         (List.map r.V0.combiner_expression explist)
-    | _ -> k e in
-
-  let typeC r k e = (* not sure relevent because "only after iso" *)
-    match Ast0.unwrap e with
-      Ast0.DisjType(_,types,_,_) ->
-       List.fold_left Common.union_set option_default
-         (List.map r.V0.combiner_typeC types)
-    | _ -> k e in
-
-  let declaration r k e =
-    match Ast0.unwrap e with
-      Ast0.DisjDecl(_,decls,_,_) ->
-       List.fold_left Common.union_set option_default
-         (List.map r.V0.combiner_declaration decls)
-    | _ -> k e in
-
-  let statement r k e =
-    match Ast0.unwrap e with
-      Ast0.Disj(_,stmts,_,_) ->
-       List.fold_left Common.union_set option_default
-         (List.map r.V0.combiner_statement_dots stmts)
-    | _ -> k e in
-
-  let donothing r k e = k e in
-  let fn =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing expression typeC donothing donothing declaration statement
-      donothing donothing in
-
-  let res =
-    List.sort compare
-      (List.fold_left Common.union_set option_default
-        (List.map fn.V0.combiner_top_level rules)) in
-  let rec loop = function
-      [] | [_] -> ()
-    | ((rule,name) as x)::y::_ when x = y ->
-       failwith (Printf.sprintf "duplicate use of %s.%s" rule name)
-    | _::xs -> loop xs in
-  loop res
-
-(* --------------------------------------------------------------------- *)
-
-let make_table l =
-  let table =
-    (Hashtbl.create(List.length l) :
-       ((string * string), bool ref) Hashtbl.t) in
-  List.iter
-    (function x -> Hashtbl.add table (Ast.get_meta_name x) (ref false)) l;
-  table
-
-let add_to_fresh_table l =
-  List.iter
-    (function x ->
-      let name = Ast.get_meta_name x in Hashtbl.replace fresh_table name ())
-    l
-
-let check_all_marked rname err table after_err =
-  Hashtbl.iter
-    (function name ->
-      function (cell) ->
-       if not (!cell)
-       then
-         let (_,name) = name in
-         warning
-           (Printf.sprintf "%s: %s %s not used %s" rname err name after_err))
-    table
-
-let check_meta rname old_metas inherited_metavars metavars minus plus =
-  let old_metas =
-    List.map (function (_,x) -> x) (List.map Ast.get_meta_name old_metas) in
-  let (fresh,other) =
-    List.partition (function Ast.MetaFreshIdDecl(_,_) -> true | _ -> false)
-      metavars in
-  let (err,other) =
-    List.partition (function Ast.MetaErrDecl(_,_) -> true | _ -> false)
-      other in
-  let (ierr,iother) =
-    List.partition (function Ast.MetaErrDecl(_,_) -> true | _ -> false)
-      inherited_metavars in
-  let fresh_table = make_table fresh in
-  let err_table = make_table (err@ierr) in
-  let other_table = make_table other in
-  let iother_table = make_table iother in
-  add_to_fresh_table fresh;
-  rule old_metas [iother_table;other_table;err_table] true minus;
-  positions [iother_table;other_table] minus;
-  dup_positions minus;
-  check_all_marked rname "metavariable" other_table "in the - or context code";
-  rule old_metas [iother_table;fresh_table;err_table] false plus;
-  check_all_marked rname "fresh identifier metavariable" iother_table
-    "in the -, +, or context code";
-  check_all_marked rname "metavariable" fresh_table "in the + code";
-  check_all_marked rname "error metavariable" err_table ""
diff --git a/parsing_cocci/.#check_meta.ml.1.80 b/parsing_cocci/.#check_meta.ml.1.80
deleted file mode 100644 (file)
index b195e42..0000000
+++ /dev/null
@@ -1,532 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* For minus fragment, checks that all of the identifier metavariables that
-are used are not declared as fresh, and check that all declared variables
-are used.  For plus fragment, just check that the variables declared as
-fresh are used.  What is the issue about error variables? (don't remember) *)
-
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-module V0 = Visitor_ast0
-
-(* all fresh identifiers *)
-let fresh_table = (Hashtbl.create(50) : ((string * string), unit) Hashtbl.t)
-
-let warning s = Printf.fprintf stderr "warning: %s\n" s
-
-let promote name = (name,(),Ast0.default_info(),(),None)
-
-(* --------------------------------------------------------------------- *)
-
-let find_loop table name =
-  let rec loop = function
-      [] -> raise Not_found
-    | x::xs -> (try Hashtbl.find x name with Not_found -> loop xs) in
-  loop table
-
-let check_table table minus (name,_,info,_,_) =
-  let rl = info.Ast0.line_start in
-  if minus
-  then
-    (try (find_loop table name) := true
-    with
-      Not_found ->
-       (try
-         Hashtbl.find fresh_table name;
-         let (_,name) = name in
-         failwith
-           (Printf.sprintf
-              "%d: unexpected use of a fresh identifier %s" rl name)
-       with Not_found -> ()))
-  else (try (find_loop table name) := true with Not_found -> ())
-
-let get_opt fn = Common.do_option fn
-
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-let dots fn d =
-  match Ast0.unwrap d with
-    Ast0.DOTS(x) -> List.iter fn x
-  | Ast0.CIRCLES(x) -> List.iter fn x
-  | Ast0.STARS(x) -> List.iter fn x
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-type context = ID | FIELD | FN | GLOBAL
-
-(* heuristic for distinguishing ifdef variables from undeclared metavariables*)
-let is_ifdef name =
-  String.length name > 2 && String.uppercase name = name
-
-let ident context old_metas table minus i =
-  match Ast0.unwrap i with
-    Ast0.Id((name,_,info,_,_) : string Ast0.mcode) ->
-      let rl = info.Ast0.line_start in
-      let err =
-       if List.exists (function x -> x = name) old_metas
-           && (minus || Ast0.get_mcodekind i = Ast0.PLUS)
-       then
-         begin
-           warning
-             (Printf.sprintf
-                "line %d: %s, previously declared as a metavariable, is used as an identifier" rl name);
-             true
-         end
-       else false in
-      (match context with
-       ID ->
-         if not (is_ifdef name) && minus && not err(* warn only once per id *)
-         then
-           warning
-             (Printf.sprintf "line %d: should %s be a metavariable?" rl name)
-      | _ -> ())
-  | Ast0.MetaId(name,_,_) -> check_table table minus name
-  | Ast0.MetaFunc(name,_,_) -> check_table table minus name
-  | Ast0.MetaLocalFunc(name,_,_) -> check_table table minus name
-  | Ast0.OptIdent(_) | Ast0.UniqueIdent(_) ->
-      failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let rec expression context old_metas table minus e =
-  match Ast0.unwrap e with
-    Ast0.Ident(id) ->
-      ident context old_metas table minus id
-  | Ast0.FunCall(fn,lp,args,rp) ->
-      expression FN old_metas table minus fn;
-      dots (expression ID old_metas table minus) args
-  | Ast0.Assignment(left,op,right,_) ->
-      expression context old_metas table minus left;
-      expression ID old_metas table minus right
-  | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-      expression ID old_metas table minus exp1;
-      get_opt (expression ID old_metas table minus) exp2;
-      expression ID old_metas table minus exp3
-  | Ast0.Postfix(exp,op) ->
-      expression ID old_metas table minus exp
-  | Ast0.Infix(exp,op) ->
-      expression ID old_metas table minus exp
-  | Ast0.Unary(exp,op) ->
-      expression ID old_metas table minus exp
-  | Ast0.Binary(left,op,right) ->
-      expression ID old_metas table minus left;
-      expression ID old_metas table minus right
-  | Ast0.Paren(lp,exp,rp) ->
-      expression ID old_metas table minus exp
-  | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-      expression ID old_metas table minus exp1;
-      expression ID old_metas table minus exp2
-  | Ast0.RecordAccess(exp,pt,field) ->
-      expression ID old_metas table minus exp;
-      ident FIELD old_metas table minus field
-  | Ast0.RecordPtAccess(exp,ar,field) ->
-      expression ID old_metas table minus exp;
-      ident FIELD old_metas table minus field
-  | Ast0.Cast(lp,ty,rp,exp) ->
-      typeC old_metas table minus ty; expression ID old_metas table minus exp
-  | Ast0.SizeOfExpr(szf,exp) -> expression ID old_metas table minus exp
-  | Ast0.SizeOfType(szf,lp,ty,rp) -> typeC old_metas table minus ty
-  | Ast0.TypeExp(ty) -> typeC old_metas table minus ty
-  | Ast0.MetaExpr(name,_,Some tys,_,_) ->
-      List.iter
-       (function x ->
-         match get_type_name x with
-           Some(ty) -> check_table table minus (promote ty)
-         | None -> ())
-       tys;
-      check_table table minus name
-  | Ast0.MetaExpr(name,_,_,_,_) | Ast0.MetaErr(name,_,_) ->
-      check_table table minus name
-  | Ast0.MetaExprList(name,None,_) ->
-      check_table table minus name
-  | Ast0.MetaExprList(name,Some lenname,_) ->
-      check_table table minus name;
-      check_table table minus lenname
-  | Ast0.DisjExpr(_,exps,_,_) ->
-      List.iter (expression ID old_metas table minus) exps
-  | Ast0.NestExpr(_,exp_dots,_,w,_) ->
-      dots (expression ID old_metas table minus) exp_dots;
-      get_opt (expression ID old_metas table minus) w
-  | Ast0.Edots(_,Some x) | Ast0.Ecircles(_,Some x) | Ast0.Estars(_,Some x) ->
-      expression ID old_metas table minus x
-  | _ -> () (* no metavariable subterms *)
-
-and get_type_name = function
-    Type_cocci.ConstVol(_,ty) | Type_cocci.Pointer(ty)
-  | Type_cocci.FunctionPointer(ty) | Type_cocci.Array(ty) -> get_type_name ty
-  | Type_cocci.MetaType(nm,_,_) -> Some nm
-  | _ -> None
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and typeC old_metas table minus t =
-  match Ast0.unwrap t with
-    Ast0.ConstVol(cv,ty) -> typeC old_metas table minus ty
-  | Ast0.Pointer(ty,star) -> typeC old_metas table minus ty
-  | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      typeC old_metas table minus ty;
-      parameter_list old_metas table minus params
-  | Ast0.FunctionType(ty,lp1,params,rp1) ->
-      get_opt (typeC old_metas table minus) ty;
-      parameter_list old_metas table minus params
-  | Ast0.Array(ty,lb,size,rb) ->
-      typeC old_metas table minus ty;
-      get_opt (expression ID old_metas table minus) size
-  | Ast0.MetaType(name,_) ->
-      check_table table minus name
-  | Ast0.DisjType(_,types,_,_) ->
-      List.iter (typeC old_metas table minus) types
-  | Ast0.StructUnionName(su,Some id) -> ident GLOBAL old_metas table minus id
-  | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-      typeC old_metas table minus ty;
-      dots (declaration GLOBAL old_metas table minus) decls
-  | Ast0.OptType(ty) | Ast0.UniqueType(ty) ->
-      failwith "unexpected code"
-  | _ -> () (* no metavariable subterms *)
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and declaration context old_metas table minus d =
-  match Ast0.unwrap d with
-    Ast0.Init(stg,ty,id,eq,ini,sem) ->
-      (match Ast0.unwrap ini with
-       Ast0.InitExpr exp ->
-         typeC old_metas table minus ty;
-         ident context old_metas table minus id;
-         expression ID old_metas table minus exp
-      |        _ ->
-         (*
-         if minus
-         then
-           failwith "complex initializer specification not allowed in - code"
-         else*)
-           (typeC old_metas table minus ty;
-            ident context old_metas table minus id;
-            initialiser old_metas table minus ini))
-  | Ast0.UnInit(stg,ty,id,sem) ->
-      typeC old_metas table minus ty; ident context old_metas table minus id
-  | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-      ident ID old_metas table minus name;
-      dots (expression ID old_metas table minus) args
-  | Ast0.TyDecl(ty,sem) -> typeC old_metas table minus ty
-  | Ast0.Typedef(stg,ty,id,sem) ->
-      typeC old_metas table minus ty;
-      typeC old_metas table minus id
-  | Ast0.DisjDecl(_,decls,_,_) ->
-      List.iter (declaration ID old_metas table minus) decls
-  | Ast0.Ddots(_,Some x) -> declaration ID old_metas table minus x
-  | Ast0.Ddots(_,None) -> ()
-  | Ast0.OptDecl(_) | Ast0.UniqueDecl(_) ->
-      failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Initialiser *)
-
-and initialiser old_metas table minus ini =
-  match Ast0.unwrap ini with
-    Ast0.InitExpr(exp) -> expression ID old_metas table minus exp
-  | Ast0.InitList(lb,initlist,rb) ->
-      dots (initialiser old_metas table minus) initlist
-  | Ast0.InitGccDotName(dot,name,eq,ini) ->
-      ident FIELD old_metas table minus name;
-      initialiser old_metas table minus ini
-  | Ast0.InitGccName(name,eq,ini) ->
-      ident FIELD old_metas table minus name;
-      initialiser old_metas table minus ini
-  | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-      expression ID old_metas table minus exp;
-      initialiser old_metas table minus ini
-  | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-      expression ID old_metas table minus exp1;
-      expression ID old_metas table minus exp2;
-      initialiser old_metas table minus ini
-  | Ast0.Idots(_,Some x) -> initialiser old_metas table minus x
-  | Ast0.OptIni(_) | Ast0.UniqueIni(_) ->
-      failwith "unexpected code"
-  | _ -> () (* no metavariable subterms *)
-
-and initialiser_list old_metas table minus =
-  dots (initialiser old_metas table minus)
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and parameterTypeDef old_metas table minus param =
-  match Ast0.unwrap param with
-    Ast0.Param(ty,id) ->
-      get_opt (ident ID old_metas table minus) id;
-      typeC old_metas table minus ty
-  | Ast0.MetaParam(name,_) ->
-      check_table table minus name
-  | Ast0.MetaParamList(name,None,_) ->
-      check_table table minus name
-  | Ast0.MetaParamList(name,Some lenname,_) ->
-      check_table table minus name;
-      check_table table minus lenname
-  | _ -> () (* no metavariable subterms *)
-
-and parameter_list old_metas table minus =
-  dots (parameterTypeDef old_metas table minus)
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and statement old_metas table minus s =
-  match Ast0.unwrap s with
-    Ast0.Decl(_,decl) -> declaration ID old_metas table minus decl
-  | Ast0.Seq(lbrace,body,rbrace) -> dots (statement old_metas table minus) body
-  | Ast0.ExprStatement(exp,sem) -> expression ID old_metas table minus exp
-  | Ast0.IfThen(iff,lp,exp,rp,branch,_) ->
-      expression ID old_metas table minus exp;
-      statement old_metas table minus branch
-  | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,_) ->
-      expression ID old_metas table minus exp;
-      statement old_metas table minus branch1;
-      statement old_metas table minus branch2
-  | Ast0.While(wh,lp,exp,rp,body,_) ->
-      expression ID old_metas table minus exp;
-      statement old_metas table minus body
-  | Ast0.Do(d,body,wh,lp,exp,rp,sem) ->
-      statement old_metas table minus body;
-      expression ID old_metas table minus exp
-  | Ast0.For(fr,lp,exp1,sem1,exp2,sem2,exp3,rp,body,_) ->
-      get_opt (expression ID old_metas table minus) exp1;
-      get_opt (expression ID old_metas table minus) exp2;
-      get_opt (expression ID old_metas table minus) exp3;
-      statement old_metas table minus body
-  | Ast0.Iterator(nm,lp,args,rp,body,_) ->
-      ident ID old_metas table minus nm;
-      dots (expression ID old_metas table minus) args;
-      statement old_metas table minus body
-  | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-      expression ID old_metas table minus exp;
-      dots (case_line old_metas table minus) cases
-  | Ast0.ReturnExpr(ret,exp,sem) -> expression ID old_metas table minus exp
-  | Ast0.MetaStmt(name,_) ->     check_table table minus name
-  | Ast0.MetaStmtList(name,_) -> check_table table minus name
-  | Ast0.Exp(exp) -> expression ID old_metas table minus exp
-  | Ast0.TopExp(exp) -> expression ID old_metas table minus exp
-  | Ast0.Ty(ty) -> typeC old_metas table minus ty
-  | Ast0.Disj(_,rule_elem_dots_list,_,_) ->
-      List.iter (dots (statement old_metas table minus)) rule_elem_dots_list
-  | Ast0.Nest(_,rule_elem_dots,_,w,_) ->
-      dots (statement old_metas table minus) rule_elem_dots;
-      List.iter (whencode (dots (statement old_metas table minus))
-                  (statement old_metas table minus)
-                  (expression ID old_metas table minus))
-       w
-  | Ast0.Dots(_,x) | Ast0.Circles(_,x) | Ast0.Stars(_,x) ->
-      List.iter
-       (whencode (dots (statement old_metas table minus))
-          (statement old_metas table minus)
-          (expression ID old_metas table minus)) x
-  | Ast0.FunDecl(_,fi,name,lp,params,rp,lbrace,body,rbrace) ->
-      ident FN old_metas table minus name;
-      List.iter (fninfo old_metas table minus) fi;
-      parameter_list old_metas table minus params;
-      dots (statement old_metas table minus) body
-  | Ast0.Include(inc,s) -> () (* no metavariables possible *)
-  | Ast0.Define(def,id,_,body) ->
-      ident GLOBAL old_metas table minus id;
-      dots (statement old_metas table minus) body
-  | Ast0.Goto(_,i,_) -> ident ID old_metas table minus i
-  | _ -> () (* no metavariable subterms *)
-
-and fninfo old_metas table minus = function
-    Ast0.FStorage(stg) -> ()
-  | Ast0.FType(ty) -> typeC old_metas table minus ty
-  | Ast0.FInline(inline) -> ()
-  | Ast0.FAttr(attr) -> ()
-
-and whencode notfn alwaysfn expression = function
-    Ast0.WhenNot a -> notfn a
-  | Ast0.WhenAlways a -> alwaysfn a
-  | Ast0.WhenModifier(_) -> ()
-  | Ast0.WhenNotTrue a -> expression a
-  | Ast0.WhenNotFalse a -> expression a
-
-and case_line old_metas table minus c =
-  match Ast0.unwrap c with
-    Ast0.Default(def,colon,code) ->
-      dots (statement old_metas table minus) code
-  | Ast0.Case(case,exp,colon,code) ->
-      dots (statement old_metas table minus) code
-  | Ast0.OptCase(case) -> failwith "unexpected code"
-
-(* --------------------------------------------------------------------- *)
-(* Rules *)
-
-let top_level old_metas table minus t =
-  match Ast0.unwrap t with
-    Ast0.DECL(stmt) -> statement old_metas table minus stmt
-  | Ast0.CODE(stmt_dots) -> dots (statement old_metas table minus) stmt_dots
-  | Ast0.ERRORWORDS(exps) ->
-      List.iter (expression FN old_metas table minus) exps
-  | _ -> () (* no metavariables possible *)
-
-let rule old_metas table minus rules =
-  List.iter (top_level old_metas table minus) rules
-
-(* --------------------------------------------------------------------- *)
-
-let positions table rules =
-  let mcode x =
-    match Ast0.get_pos x with
-      Ast0.MetaPos(name,constraints,_) ->
-       let pos = Ast0.unwrap_mcode name in
-       (find_loop table pos) := true
-    | _ -> () in
-  let option_default = () in
-  let bind x y = () in
-  let donothing r k e = k e in
-  let fn =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing donothing
-      donothing donothing in
-
-  List.iter fn.V0.combiner_top_level rules
-
-let dup_positions rules =
-  let mcode x =
-    match Ast0.get_pos x with
-      Ast0.MetaPos(name,constraints,_) ->
-       let pos = Ast0.unwrap_mcode name in [pos]
-    | _ -> [] in
-  let option_default = [] in
-  let bind x y = x@y in
-
-  (* Case for everything that has a disj.
-     Note, no positions on ( | ) of a disjunction, so no need to recurse on
-     these. *)
-
-  let expression r k e =
-    match Ast0.unwrap e with
-      Ast0.DisjExpr(_,explist,_,_) ->
-       List.fold_left Common.union_set option_default
-         (List.map r.V0.combiner_expression explist)
-    | _ -> k e in
-
-  let typeC r k e = (* not sure relevent because "only after iso" *)
-    match Ast0.unwrap e with
-      Ast0.DisjType(_,types,_,_) ->
-       List.fold_left Common.union_set option_default
-         (List.map r.V0.combiner_typeC types)
-    | _ -> k e in
-
-  let declaration r k e =
-    match Ast0.unwrap e with
-      Ast0.DisjDecl(_,decls,_,_) ->
-       List.fold_left Common.union_set option_default
-         (List.map r.V0.combiner_declaration decls)
-    | _ -> k e in
-
-  let statement r k e =
-    match Ast0.unwrap e with
-      Ast0.Disj(_,stmts,_,_) ->
-       List.fold_left Common.union_set option_default
-         (List.map r.V0.combiner_statement_dots stmts)
-    | _ -> k e in
-
-  let donothing r k e = k e in
-  let fn =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing expression typeC donothing donothing declaration statement
-      donothing donothing in
-
-  let res =
-    List.sort compare
-      (List.fold_left Common.union_set option_default
-        (List.map fn.V0.combiner_top_level rules)) in
-  let rec loop = function
-      [] | [_] -> ()
-    | ((rule,name) as x)::y::_ when x = y ->
-       failwith (Printf.sprintf "duplicate use of %s.%s" rule name)
-    | _::xs -> loop xs in
-  loop res
-
-(* --------------------------------------------------------------------- *)
-
-let make_table l =
-  let table =
-    (Hashtbl.create(List.length l) :
-       ((string * string), bool ref) Hashtbl.t) in
-  List.iter
-    (function x -> Hashtbl.add table (Ast.get_meta_name x) (ref false)) l;
-  table
-
-let add_to_fresh_table l =
-  List.iter
-    (function x ->
-      let name = Ast.get_meta_name x in Hashtbl.replace fresh_table name ())
-    l
-
-let check_all_marked rname err table after_err =
-  Hashtbl.iter
-    (function name ->
-      function (cell) ->
-       if not (!cell)
-       then
-         let (_,name) = name in
-         warning
-           (Printf.sprintf "%s: %s %s not used %s" rname err name after_err))
-    table
-
-let check_meta rname old_metas inherited_metavars metavars minus plus =
-  let old_metas =
-    List.map (function (_,x) -> x) (List.map Ast.get_meta_name old_metas) in
-  let (fresh,other) =
-    List.partition (function Ast.MetaFreshIdDecl(_,_) -> true | _ -> false)
-      metavars in
-  let (err,other) =
-    List.partition (function Ast.MetaErrDecl(_,_) -> true | _ -> false)
-      other in
-  let (ierr,iother) =
-    List.partition (function Ast.MetaErrDecl(_,_) -> true | _ -> false)
-      inherited_metavars in
-  let fresh_table = make_table fresh in
-  let err_table = make_table (err@ierr) in
-  let other_table = make_table other in
-  let iother_table = make_table iother in
-  add_to_fresh_table fresh;
-  rule old_metas [iother_table;other_table;err_table] true minus;
-  positions [iother_table;other_table] minus;
-  dup_positions minus;
-  check_all_marked rname "metavariable" other_table "in the - or context code";
-  rule old_metas [iother_table;fresh_table;err_table] false plus;
-  check_all_marked rname "fresh identifier metavariable" iother_table
-    "in the -, +, or context code";
-  check_all_marked rname "metavariable" fresh_table "in the + code";
-  check_all_marked rname "error metavariable" err_table ""
diff --git a/parsing_cocci/.#compute_lines.ml.1.85 b/parsing_cocci/.#compute_lines.ml.1.85
deleted file mode 100644 (file)
index 5a08d1f..0000000
+++ /dev/null
@@ -1,760 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Computes starting and ending logical lines for statements and
-expressions.  every node gets an index as well. *)
-
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-    
-(* --------------------------------------------------------------------- *)
-(* Result *)
-
-let mkres x e left right =
-  let lstart = Ast0.get_info left in
-  let lend = Ast0.get_info right in
-  let info =
-    { Ast0.line_start = lstart.Ast0.line_start;
-      Ast0.line_end = lend.Ast0.line_end;
-      Ast0.logical_start = lstart.Ast0.logical_start;
-      Ast0.logical_end = lend.Ast0.logical_end;
-      Ast0.attachable_start = lstart.Ast0.attachable_start;
-      Ast0.attachable_end = lend.Ast0.attachable_end;
-      Ast0.mcode_start = lstart.Ast0.mcode_start;
-      Ast0.mcode_end = lend.Ast0.mcode_end;
-      Ast0.column = lstart.Ast0.column;
-      Ast0.offset = lstart.Ast0.offset;
-      (* only for tokens, not inherited upwards *)
-      Ast0.strings_before = []; Ast0.strings_after = []} in
-  {x with Ast0.node = e; Ast0.info = info}
-
-let mkmultires x e left right (astart,start_mcodes) (aend,end_mcodes) =
-  let lstart = Ast0.get_info left in
-  let lend = Ast0.get_info right in
-  let info =
-    { Ast0.line_start = lstart.Ast0.line_start;
-      Ast0.line_end = lend.Ast0.line_end;
-      Ast0.logical_start = lstart.Ast0.logical_start;
-      Ast0.logical_end = lend.Ast0.logical_end;
-      Ast0.attachable_start = astart;
-      Ast0.attachable_end = aend;
-      Ast0.mcode_start = start_mcodes;
-      Ast0.mcode_end = end_mcodes;
-      Ast0.column = lstart.Ast0.column;
-      Ast0.offset = lstart.Ast0.offset;
-      (* only for tokens, not inherited upwards *)
-      Ast0.strings_before = []; Ast0.strings_after = [] } in
-  {x with Ast0.node = e; Ast0.info = info}
-
-(* --------------------------------------------------------------------- *)
-    
-let get_option fn = function
-    None -> None
-  | Some x -> Some (fn x)
-       
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Mcode *)
-
-let promote_mcode (_,_,info,mcodekind,_) =
-  let new_info =
-    {info with
-      Ast0.mcode_start = [mcodekind]; Ast0.mcode_end = [mcodekind]} in
-  {(Ast0.wrap ()) with Ast0.info = new_info; Ast0.mcodekind = ref mcodekind}
-
-let promote_mcode_plus_one (_,_,info,mcodekind,_) =
-  let new_info =
-    {info with
-      Ast0.line_start = info.Ast0.line_start + 1;
-      Ast0.logical_start = info.Ast0.logical_start + 1;
-      Ast0.line_end = info.Ast0.line_end + 1;
-      Ast0.logical_end = info.Ast0.logical_end + 1;
-      Ast0.mcode_start = [mcodekind]; Ast0.mcode_end = [mcodekind]} in
-  {(Ast0.wrap ()) with Ast0.info = new_info; Ast0.mcodekind = ref mcodekind}
-
-let promote_to_statement stm mcodekind =
-  let info = Ast0.get_info stm in
-  let new_info =
-    {info with
-      Ast0.logical_start = info.Ast0.logical_end;
-      Ast0.line_start = info.Ast0.line_end;
-      Ast0.mcode_start = [mcodekind]; Ast0.mcode_end = [mcodekind];
-      Ast0.attachable_start = true; Ast0.attachable_end = true} in
-  {(Ast0.wrap ()) with Ast0.info = new_info; Ast0.mcodekind = ref mcodekind}
-
-let promote_to_statement_start stm mcodekind =
-  let info = Ast0.get_info stm in
-  let new_info =
-    {info with
-      Ast0.logical_end = info.Ast0.logical_start;
-      Ast0.line_end = info.Ast0.line_start;
-      Ast0.mcode_start = [mcodekind]; Ast0.mcode_end = [mcodekind];
-      Ast0.attachable_start = true; Ast0.attachable_end = true} in
-  {(Ast0.wrap ()) with Ast0.info = new_info; Ast0.mcodekind = ref mcodekind}
-
-(* mcode is good by default *)
-let bad_mcode (t,a,info,mcodekind,pos) =
-  let new_info =
-    {info with Ast0.attachable_start = false; Ast0.attachable_end = false} in
-  (t,a,new_info,mcodekind,pos)
-
-let get_all_start_info l =
-  (List.for_all (function x -> (Ast0.get_info x).Ast0.attachable_start) l,
-   List.concat (List.map (function x -> (Ast0.get_info x).Ast0.mcode_start) l))
-
-let get_all_end_info l =
-  (List.for_all (function x -> (Ast0.get_info x).Ast0.attachable_end) l,
-   List.concat (List.map (function x -> (Ast0.get_info x).Ast0.mcode_end) l))
-
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-(* for the logline classification and the mcode field, on both sides, skip
-over initial minus dots, as they don't contribute anything *)
-let dot_list is_dots fn = function
-    [] -> failwith "dots should not be empty"
-  | l ->
-      let get_node l fn =
-       let first = List.hd l in
-       let chosen =
-         match (is_dots first, l) with (true,_::x::_) -> x | _ -> first in
-       (* get the logline decorator and the mcodekind of the chosen node *)
-       fn (Ast0.get_info chosen) in
-      let forward = List.map fn l in
-      let backward = List.rev forward in
-      let (first_attachable,first_mcode) =
-       get_node forward
-         (function x -> (x.Ast0.attachable_start,x.Ast0.mcode_start)) in
-      let (last_attachable,last_mcode) =
-       get_node backward
-         (function x -> (x.Ast0.attachable_end,x.Ast0.mcode_end)) in
-      let first = List.hd forward in
-      let last = List.hd backward in
-      let first_info =
-       { (Ast0.get_info first) with
-         Ast0.attachable_start = first_attachable;
-         Ast0.mcode_start = first_mcode } in
-      let last_info =
-       { (Ast0.get_info last) with
-         Ast0.attachable_end = last_attachable;
-         Ast0.mcode_end = last_mcode } in
-      let first = Ast0.set_info first first_info in
-      let last = Ast0.set_info last last_info in
-      (forward,first,last)
-      
-let dots is_dots prev fn d =
-  match (prev,Ast0.unwrap d) with
-    (Some prev,Ast0.DOTS([])) ->
-      mkres d (Ast0.DOTS []) prev prev
-  | (None,Ast0.DOTS([])) ->
-      Ast0.set_info d
-       {(Ast0.get_info d)
-       with Ast0.attachable_start = false; Ast0.attachable_end = false}
-  | (_,Ast0.DOTS(x)) ->
-      let (l,lstart,lend) = dot_list is_dots fn x in
-      mkres d (Ast0.DOTS l) lstart lend
-  | (_,Ast0.CIRCLES(x)) ->
-      let (l,lstart,lend) = dot_list is_dots fn x in
-      mkres d (Ast0.CIRCLES l) lstart lend
-  | (_,Ast0.STARS(x)) ->
-      let (l,lstart,lend) = dot_list is_dots fn x in
-      mkres d (Ast0.STARS l) lstart lend
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-       
-let rec ident i =
-  match Ast0.unwrap i with
-    Ast0.Id(name) as ui ->
-      let name = promote_mcode name in mkres i ui name name
-  | Ast0.MetaId(name,_,_)
-  | Ast0.MetaFunc(name,_,_) | Ast0.MetaLocalFunc(name,_,_) as ui ->
-      let name = promote_mcode name in mkres i ui name name
-  | Ast0.OptIdent(id) ->
-      let id = ident id in mkres i (Ast0.OptIdent(id)) id id
-  | Ast0.UniqueIdent(id) ->
-      let id = ident id in mkres i (Ast0.UniqueIdent(id)) id id
-       
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let is_exp_dots e =
-  match Ast0.unwrap e with
-    Ast0.Edots(_,_) | Ast0.Ecircles(_,_) | Ast0.Estars(_,_) -> true
-  | _ -> false
-
-let rec expression e =
-  match Ast0.unwrap e with
-    Ast0.Ident(id) ->
-      let id = ident id in
-      mkres e (Ast0.Ident(id)) id id
-  | Ast0.Constant(const) as ue ->
-      let ln = promote_mcode const in
-      mkres e ue ln ln
-  | Ast0.FunCall(fn,lp,args,rp) ->
-      let fn = expression fn in
-      let args = dots is_exp_dots (Some(promote_mcode lp)) expression args in
-      mkres e (Ast0.FunCall(fn,lp,args,rp)) fn (promote_mcode rp)
-  | Ast0.Assignment(left,op,right,simple) ->
-      let left = expression left in
-      let right = expression right in
-      mkres e (Ast0.Assignment(left,op,right,simple)) left right
-  | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-      let exp1 = expression exp1 in
-      let exp2 = get_option expression exp2 in
-      let exp3 = expression exp3 in
-      mkres e (Ast0.CondExpr(exp1,why,exp2,colon,exp3)) exp1 exp3
-  | Ast0.Postfix(exp,op) ->
-      let exp = expression exp in
-      mkres e (Ast0.Postfix(exp,op)) exp (promote_mcode op)
-  | Ast0.Infix(exp,op) ->
-      let exp = expression exp in
-      mkres e (Ast0.Infix(exp,op)) (promote_mcode op) exp
-  | Ast0.Unary(exp,op) ->
-      let exp = expression exp in
-      mkres e (Ast0.Unary(exp,op)) (promote_mcode op) exp
-  | Ast0.Binary(left,op,right) ->
-      let left = expression left in
-      let right = expression right in
-      mkres e (Ast0.Binary(left,op,right)) left right
-  | Ast0.Nested(left,op,right) ->
-      let left = expression left in
-      let right = expression right in
-      mkres e (Ast0.Nested(left,op,right)) left right
-  | Ast0.Paren(lp,exp,rp) ->
-      mkres e (Ast0.Paren(lp,expression exp,rp))
-       (promote_mcode lp) (promote_mcode rp)
-  | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-      let exp1 = expression exp1 in
-      let exp2 = expression exp2 in
-      mkres e (Ast0.ArrayAccess(exp1,lb,exp2,rb)) exp1 (promote_mcode rb)
-  | Ast0.RecordAccess(exp,pt,field) ->
-      let exp = expression exp in
-      let field = ident field in
-      mkres e (Ast0.RecordAccess(exp,pt,field)) exp field
-  | Ast0.RecordPtAccess(exp,ar,field) ->
-      let exp = expression exp in
-      let field = ident field in
-      mkres e (Ast0.RecordPtAccess(exp,ar,field)) exp field
-  | Ast0.Cast(lp,ty,rp,exp) ->
-      let exp = expression exp in
-      mkres e (Ast0.Cast(lp,typeC ty,rp,exp)) (promote_mcode lp) exp
-  | Ast0.SizeOfExpr(szf,exp) ->
-      let exp = expression exp in
-      mkres e (Ast0.SizeOfExpr(szf,exp)) (promote_mcode szf) exp
-  | Ast0.SizeOfType(szf,lp,ty,rp) ->
-      mkres e (Ast0.SizeOfType(szf,lp,typeC ty,rp)) 
-        (promote_mcode szf)  (promote_mcode rp)
-  | Ast0.TypeExp(ty) ->
-      let ty = typeC ty in mkres e (Ast0.TypeExp(ty)) ty ty
-  | Ast0.MetaErr(name,_,_) | Ast0.MetaExpr(name,_,_,_,_)
-  | Ast0.MetaExprList(name,_,_) as ue ->
-      let ln = promote_mcode name in mkres e ue ln ln
-  | Ast0.EComma(cm) ->
-      let cm = bad_mcode cm in
-      let ln = promote_mcode cm in
-      mkres e (Ast0.EComma(cm)) ln ln
-  | Ast0.DisjExpr(starter,exps,mids,ender) ->
-      let starter = bad_mcode starter in
-      let exps = List.map expression exps in
-      let mids = List.map bad_mcode mids in
-      let ender = bad_mcode ender in
-      mkmultires e (Ast0.DisjExpr(starter,exps,mids,ender))
-       (promote_mcode starter) (promote_mcode ender)
-       (get_all_start_info exps) (get_all_end_info exps)
-  | Ast0.NestExpr(starter,exp_dots,ender,whencode,multi) ->
-      let exp_dots = dots is_exp_dots None expression exp_dots in
-      let starter = bad_mcode starter in
-      let ender = bad_mcode ender in
-      mkres e (Ast0.NestExpr(starter,exp_dots,ender,whencode,multi))
-       (promote_mcode starter) (promote_mcode ender)
-  | Ast0.Edots(dots,whencode) ->
-      let dots = bad_mcode dots in
-      let ln = promote_mcode dots in
-      mkres e (Ast0.Edots(dots,whencode)) ln ln
-  | Ast0.Ecircles(dots,whencode) ->
-      let dots = bad_mcode dots in
-      let ln = promote_mcode dots in
-      mkres e (Ast0.Ecircles(dots,whencode)) ln ln
-  | Ast0.Estars(dots,whencode) ->
-      let dots = bad_mcode dots in
-      let ln = promote_mcode dots in
-      mkres e (Ast0.Estars(dots,whencode)) ln ln
-  | Ast0.OptExp(exp) ->
-      let exp = expression exp in
-      mkres e (Ast0.OptExp(exp)) exp exp
-  | Ast0.UniqueExp(exp) ->
-      let exp = expression exp in
-      mkres e (Ast0.UniqueExp(exp)) exp exp
-
-and expression_dots x = dots is_exp_dots None expression x
-       
-(* --------------------------------------------------------------------- *)
-(* Types *)
-       
-and typeC t =
-  match Ast0.unwrap t with
-    Ast0.ConstVol(cv,ty) ->
-      let ty = typeC ty in
-      mkres t (Ast0.ConstVol(cv,ty)) (promote_mcode cv) ty
-  | Ast0.BaseType(ty,None) as ut ->
-      mkres t ut (promote_mcode ty) (promote_mcode ty)
-  | Ast0.BaseType(ty,Some sgn) as ut ->
-      mkres t ut (promote_mcode sgn) (promote_mcode ty)
-  | Ast0.ImplicitInt(sgn) as ut ->
-      mkres t ut (promote_mcode sgn) (promote_mcode sgn)
-  | Ast0.Pointer(ty,star) ->
-      let ty = typeC ty in
-      mkres t (Ast0.Pointer(ty,star)) ty (promote_mcode star)
-  | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      let ty = typeC ty in
-      let params = parameter_list (Some(promote_mcode lp2)) params in
-      mkres t (Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2))
-       ty (promote_mcode rp2)
-  | Ast0.FunctionType(Some ty,lp1,params,rp1) ->
-      let ty = typeC ty in
-      let params = parameter_list (Some(promote_mcode lp1)) params in
-      let res = Ast0.FunctionType(Some ty,lp1,params,rp1) in
-      mkres t res ty (promote_mcode rp1)
-  | Ast0.FunctionType(None,lp1,params,rp1) ->
-      let params = parameter_list (Some(promote_mcode lp1)) params in
-      let res = Ast0.FunctionType(None,lp1,params,rp1) in
-      mkres t res (promote_mcode lp1) (promote_mcode rp1)
-  | Ast0.Array(ty,lb,size,rb) ->
-      let ty = typeC ty in
-      mkres t (Ast0.Array(ty,lb,get_option expression size,rb))
-       ty (promote_mcode rb)
-  | Ast0.StructUnionName(kind,Some name) ->
-      let name = ident name in
-      mkres t (Ast0.StructUnionName(kind,Some name)) (promote_mcode kind) name
-  | Ast0.StructUnionName(kind,None) ->
-      let mc = promote_mcode kind in
-      mkres t (Ast0.StructUnionName(kind,None)) mc mc
-  | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-      let ty = typeC ty in
-      let decls =
-       dots is_decl_dots (Some(promote_mcode lb)) declaration decls in
-      mkres t (Ast0.StructUnionDef(ty,lb,decls,rb)) ty (promote_mcode rb)
-  | Ast0.TypeName(name) as ut ->
-      let ln = promote_mcode name in mkres t ut ln ln
-  | Ast0.MetaType(name,_) as ut ->
-      let ln = promote_mcode name in mkres t ut ln ln
-  | Ast0.DisjType(starter,types,mids,ender) ->
-      let starter = bad_mcode starter in
-      let types = List.map typeC types in
-      let mids = List.map bad_mcode mids in
-      let ender = bad_mcode ender in
-      mkmultires t (Ast0.DisjType(starter,types,mids,ender))
-       (promote_mcode starter) (promote_mcode ender)
-       (get_all_start_info types) (get_all_end_info types)
-  | Ast0.OptType(ty) ->
-      let ty = typeC ty in mkres t (Ast0.OptType(ty)) ty ty
-  | Ast0.UniqueType(ty) ->
-      let ty = typeC ty in mkres t (Ast0.UniqueType(ty)) ty ty
-       
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and is_decl_dots s =
-  match Ast0.unwrap s with
-    Ast0.Ddots(_,_) -> true
-  | _ -> false
-       
-and declaration d =
-  match Ast0.unwrap d with
-    Ast0.Init(stg,ty,id,eq,exp,sem) ->
-      let ty = typeC ty in
-      let id = ident id in
-      let exp = initialiser exp in
-      (match stg with
-       None ->
-         mkres d (Ast0.Init(stg,ty,id,eq,exp,sem)) ty (promote_mcode sem)
-      | Some x -> 
-         mkres d (Ast0.Init(stg,ty,id,eq,exp,sem))
-           (promote_mcode x) (promote_mcode sem))
-  | Ast0.UnInit(stg,ty,id,sem) ->
-      let ty = typeC ty in
-      let id = ident id in
-      (match stg with
-       None ->
-         mkres d (Ast0.UnInit(stg,ty,id,sem)) ty (promote_mcode sem)
-      | Some x ->
-         mkres d (Ast0.UnInit(stg,ty,id,sem))
-           (promote_mcode x) (promote_mcode sem))
-  | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-      let name = ident name in
-      let args = dots is_exp_dots (Some(promote_mcode lp)) expression args in
-      mkres d (Ast0.MacroDecl(name,lp,args,rp,sem)) name (promote_mcode sem)
-  | Ast0.TyDecl(ty,sem) ->
-      let ty = typeC ty in
-      mkres d (Ast0.TyDecl(ty,sem)) ty (promote_mcode sem)
-  | Ast0.Typedef(stg,ty,id,sem) ->
-      let ty = typeC ty in
-      let id = typeC id in
-      mkres d (Ast0.Typedef(stg,ty,id,sem))
-       (promote_mcode stg) (promote_mcode sem)
-  | Ast0.DisjDecl(starter,decls,mids,ender) ->
-      let starter = bad_mcode starter in
-      let decls = List.map declaration decls in
-      let mids = List.map bad_mcode mids in
-      let ender = bad_mcode ender in
-      mkmultires d (Ast0.DisjDecl(starter,decls,mids,ender))
-       (promote_mcode starter) (promote_mcode ender)
-       (get_all_start_info decls) (get_all_end_info decls)
-  | Ast0.Ddots(dots,whencode) ->
-      let dots = bad_mcode dots in
-      let ln = promote_mcode dots in
-      mkres d (Ast0.Ddots(dots,whencode)) ln ln
-  | Ast0.OptDecl(decl) ->
-      let decl = declaration decl in
-      mkres d (Ast0.OptDecl(declaration decl)) decl decl
-  | Ast0.UniqueDecl(decl) ->
-      let decl = declaration decl in
-      mkres d (Ast0.UniqueDecl(declaration decl)) decl decl
-
-(* --------------------------------------------------------------------- *)
-(* Initializer *)
-
-and is_init_dots i =
-  match Ast0.unwrap i with
-    Ast0.Idots(_,_) -> true
-  | _ -> false
-       
-and initialiser i =
-  match Ast0.unwrap i with
-    Ast0.InitExpr(exp) ->
-      let exp = expression exp in
-      mkres i (Ast0.InitExpr(exp)) exp exp
-  | Ast0.InitList(lb,initlist,rb) ->
-      let initlist =
-       dots is_init_dots (Some(promote_mcode lb)) initialiser initlist in
-      mkres i (Ast0.InitList(lb,initlist,rb))
-       (promote_mcode lb) (promote_mcode rb)
-  | Ast0.InitGccDotName(dot,name,eq,ini) ->
-      let name = ident name in
-      let ini = initialiser ini in
-      mkres i (Ast0.InitGccDotName(dot,name,eq,ini)) (promote_mcode dot) ini
-  | Ast0.InitGccName(name,eq,ini) ->
-      let name = ident name in
-      let ini = initialiser ini in
-      mkres i (Ast0.InitGccName(name,eq,ini)) name ini
-  | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-      let exp = expression exp in
-      let ini = initialiser ini in
-      mkres i (Ast0.InitGccIndex(lb,exp,rb,eq,ini)) (promote_mcode lb) ini
-  | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-      let exp1 = expression exp1 in
-      let exp2 = expression exp2 in
-      let ini = initialiser ini in
-      mkres i (Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini))
-       (promote_mcode lb) ini
-  | Ast0.IComma(cm) as up ->
-      let ln = promote_mcode cm in mkres i up ln ln
-  | Ast0.Idots(dots,whencode) ->
-      let dots = bad_mcode dots in
-      let ln = promote_mcode dots in
-      mkres i (Ast0.Idots(dots,whencode)) ln ln
-  | Ast0.OptIni(ini) ->
-      let ini = initialiser ini in
-      mkres i (Ast0.OptIni(ini)) ini ini
-  | Ast0.UniqueIni(ini) ->
-      let ini = initialiser ini in
-      mkres i (Ast0.UniqueIni(ini)) ini ini
-
-and initialiser_list prev = dots is_init_dots prev initialiser
-
-(* for export *)
-and initialiser_dots x = dots is_init_dots None initialiser x
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and is_param_dots p =
-  match Ast0.unwrap p with
-    Ast0.Pdots(_) | Ast0.Pcircles(_) -> true
-  | _ -> false
-       
-and parameterTypeDef p =
-  match Ast0.unwrap p with
-    Ast0.VoidParam(ty) ->
-      let ty = typeC ty in mkres p (Ast0.VoidParam(ty)) ty ty
-  | Ast0.Param(ty,Some id) ->
-      let id = ident id in
-      let ty = typeC ty in mkres p (Ast0.Param(ty,Some id)) ty id
-  | Ast0.Param(ty,None) ->
-      let ty = typeC ty in mkres p (Ast0.Param(ty,None)) ty ty
-  | Ast0.MetaParam(name,_) as up ->
-      let ln = promote_mcode name in mkres p up ln ln
-  | Ast0.MetaParamList(name,_,_) as up ->
-      let ln = promote_mcode name in mkres p up ln ln
-  | Ast0.PComma(cm) ->
-      let cm = bad_mcode cm in
-      let ln = promote_mcode cm in
-      mkres p (Ast0.PComma(cm)) ln ln
-  | Ast0.Pdots(dots) ->
-      let dots = bad_mcode dots in
-      let ln = promote_mcode dots in
-      mkres p (Ast0.Pdots(dots)) ln ln
-  | Ast0.Pcircles(dots) ->
-      let dots = bad_mcode dots in
-      let ln = promote_mcode dots in
-      mkres p (Ast0.Pcircles(dots)) ln ln
-  | Ast0.OptParam(param) ->
-      let res = parameterTypeDef param in
-      mkres p (Ast0.OptParam(res)) res res
-  | Ast0.UniqueParam(param) ->
-      let res = parameterTypeDef param in
-      mkres p (Ast0.UniqueParam(res)) res res
-
-and parameter_list prev = dots is_param_dots prev parameterTypeDef
-
-(* for export *)
-let parameter_dots x = dots is_param_dots None parameterTypeDef x
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-let is_stm_dots s =
-  match Ast0.unwrap s with
-    Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) -> true
-  | _ -> false
-    
-let rec statement s =
-  let res =
-    match Ast0.unwrap s with
-      Ast0.Decl((_,bef),decl) ->
-       let decl = declaration decl in
-       let left = promote_to_statement_start decl bef in
-       mkres s (Ast0.Decl((Ast0.get_info left,bef),decl)) decl decl
-    | Ast0.Seq(lbrace,body,rbrace) -> 
-       let body =
-         dots is_stm_dots (Some(promote_mcode lbrace)) statement body in
-       mkres s (Ast0.Seq(lbrace,body,rbrace))
-         (promote_mcode lbrace) (promote_mcode rbrace)
-    | Ast0.ExprStatement(exp,sem) ->
-       let exp = expression exp in
-       mkres s (Ast0.ExprStatement(exp,sem)) exp (promote_mcode sem)
-    | Ast0.IfThen(iff,lp,exp,rp,branch,(_,aft)) ->
-       let exp = expression exp in
-       let branch = statement branch in
-       let right = promote_to_statement branch aft in
-       mkres s (Ast0.IfThen(iff,lp,exp,rp,branch,(Ast0.get_info right,aft)))
-         (promote_mcode iff) right
-    | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,(_,aft)) ->
-       let exp = expression exp in
-       let branch1 = statement branch1 in
-       let branch2 = statement branch2 in
-       let right = promote_to_statement branch2 aft in
-       mkres s
-         (Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,
-           (Ast0.get_info right,aft)))
-         (promote_mcode iff) right
-    | Ast0.While(wh,lp,exp,rp,body,(_,aft)) ->
-       let exp = expression exp in
-       let body = statement body in
-       let right = promote_to_statement body aft in
-       mkres s (Ast0.While(wh,lp,exp,rp,body,(Ast0.get_info right,aft)))
-         (promote_mcode wh) right
-    | Ast0.Do(d,body,wh,lp,exp,rp,sem) ->
-       let body = statement body in
-       let exp = expression exp in
-       mkres s (Ast0.Do(d,body,wh,lp,exp,rp,sem))
-         (promote_mcode d) (promote_mcode sem)
-    | Ast0.For(fr,lp,exp1,sem1,exp2,sem2,exp3,rp,body,(_,aft)) ->
-       let exp1 = get_option expression exp1 in
-       let exp2 = get_option expression exp2 in
-       let exp3 = get_option expression exp3 in
-       let body = statement body in
-       let right = promote_to_statement body aft in
-       mkres s (Ast0.For(fr,lp,exp1,sem1,exp2,sem2,exp3,rp,body,
-                         (Ast0.get_info right,aft)))
-         (promote_mcode fr) right
-    | Ast0.Iterator(nm,lp,args,rp,body,(_,aft)) ->
-       let nm = ident nm in
-       let args = dots is_exp_dots (Some(promote_mcode lp)) expression args in
-       let body = statement body in
-       let right = promote_to_statement body aft in
-       mkres s (Ast0.Iterator(nm,lp,args,rp,body,(Ast0.get_info right,aft)))
-         nm right
-    | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-       let exp = expression exp in
-       let cases =
-         dots (function _ -> false) (Some(promote_mcode lb)) case_line cases in
-       mkres s
-         (Ast0.Switch(switch,lp,exp,rp,lb,cases,rb))
-         (promote_mcode switch) (promote_mcode rb)
-    | Ast0.Break(br,sem) as us ->
-       mkres s us (promote_mcode br) (promote_mcode sem)
-    | Ast0.Continue(cont,sem) as us ->
-       mkres s us (promote_mcode cont) (promote_mcode sem)
-    | Ast0.Label(l,dd) ->
-       let l = ident l in
-       mkres s (Ast0.Label(l,dd)) l (promote_mcode dd)
-    | Ast0.Goto(goto,id,sem) ->
-       let id = ident id in
-       mkres s (Ast0.Goto(goto,id,sem)) 
-         (promote_mcode goto) (promote_mcode sem)
-    | Ast0.Return(ret,sem) as us ->
-       mkres s us (promote_mcode ret) (promote_mcode sem)
-    | Ast0.ReturnExpr(ret,exp,sem) ->
-       let exp = expression exp in
-       mkres s (Ast0.ReturnExpr(ret,exp,sem)) 
-         (promote_mcode ret) (promote_mcode sem)
-    | Ast0.MetaStmt(name,_)
-    | Ast0.MetaStmtList(name,_) as us ->
-       let ln = promote_mcode name in mkres s us ln ln
-    | Ast0.Exp(exp) ->
-       let exp = expression exp in
-       mkres s (Ast0.Exp(exp)) exp exp
-    | Ast0.TopExp(exp) ->
-       let exp = expression exp in
-       mkres s (Ast0.TopExp(exp)) exp exp
-    | Ast0.Ty(ty) ->
-       let ty = typeC ty in
-       mkres s (Ast0.Ty(ty)) ty ty
-    | Ast0.Disj(starter,rule_elem_dots_list,mids,ender) ->
-       let starter = bad_mcode starter in
-       let mids = List.map bad_mcode mids in
-       let ender = bad_mcode ender in
-       let rec loop prevs = function
-           [] -> []
-         | stm::stms ->
-             (dots is_stm_dots (Some(promote_mcode_plus_one(List.hd prevs)))
-                statement stm)::
-             (loop (List.tl prevs) stms) in
-       let elems = loop (starter::mids) rule_elem_dots_list in
-       mkmultires s (Ast0.Disj(starter,elems,mids,ender))
-         (promote_mcode starter) (promote_mcode ender)
-         (get_all_start_info elems) (get_all_end_info elems)
-    | Ast0.Nest(starter,rule_elem_dots,ender,whencode,multi) ->
-       let starter = bad_mcode starter in
-       let ender = bad_mcode ender in
-       let rule_elem_dots = dots is_stm_dots None statement rule_elem_dots in
-       mkres s (Ast0.Nest(starter,rule_elem_dots,ender,whencode,multi))
-         (promote_mcode starter) (promote_mcode ender)
-    | Ast0.Dots(dots,whencode) ->
-       let dots = bad_mcode dots in
-       let ln = promote_mcode dots in
-       mkres s (Ast0.Dots(dots,whencode)) ln ln
-    | Ast0.Circles(dots,whencode) ->
-       let dots = bad_mcode dots in
-       let ln = promote_mcode dots in
-       mkres s (Ast0.Circles(dots,whencode)) ln ln
-    | Ast0.Stars(dots,whencode) ->
-       let dots = bad_mcode dots in
-       let ln = promote_mcode dots in
-       mkres s (Ast0.Stars(dots,whencode)) ln ln
-    | Ast0.FunDecl((_,bef),fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-       let fninfo =
-         List.map
-           (function Ast0.FType(ty) -> Ast0.FType(typeC ty) | x -> x)
-           fninfo in
-       let name = ident name in
-       let params = parameter_list (Some(promote_mcode lp)) params in
-       let body =
-         dots is_stm_dots (Some(promote_mcode lbrace)) statement body in
-       let left =
-       (* cases on what is leftmost *)
-         match fninfo with
-           [] -> promote_to_statement_start name bef
-         | Ast0.FStorage(stg)::_ ->
-             promote_to_statement_start (promote_mcode stg) bef
-         | Ast0.FType(ty)::_ ->
-             promote_to_statement_start ty bef
-         | Ast0.FInline(inline)::_ ->
-             promote_to_statement_start (promote_mcode inline) bef
-         | Ast0.FAttr(attr)::_ ->
-             promote_to_statement_start (promote_mcode attr) bef in
-      (* pretend it is one line before the start of the function, so that it
-        will catch things defined at top level.  We assume that these will not
-        be defined on the same line as the function.  This is a HACK.
-        A better approach would be to attach top_level things to this node,
-        and other things to the node after, but that would complicate
-        insert_plus, which doesn't distinguish between different mcodekinds *)
-       let res =
-         Ast0.FunDecl((Ast0.get_info left,bef),fninfo,name,lp,params,rp,lbrace,
-                      body,rbrace) in
-      (* have to do this test again, because of typing problems - can't save
-        the result, only use it *)
-       (match fninfo with
-         [] -> mkres s res name (promote_mcode rbrace)
-       | Ast0.FStorage(stg)::_ ->
-           mkres s res (promote_mcode stg) (promote_mcode rbrace)
-       | Ast0.FType(ty)::_ -> mkres s res ty (promote_mcode rbrace)
-       | Ast0.FInline(inline)::_ ->
-           mkres s res (promote_mcode inline) (promote_mcode rbrace)
-       | Ast0.FAttr(attr)::_ ->
-           mkres s res (promote_mcode attr) (promote_mcode rbrace))
-         
-    | Ast0.Include(inc,stm) ->
-       mkres s (Ast0.Include(inc,stm)) (promote_mcode inc) (promote_mcode stm)
-    | Ast0.Define(def,id,params,body) ->
-       let id = ident id in
-       let body = dots is_stm_dots None statement body in
-       mkres s (Ast0.Define(def,id,params,body)) (promote_mcode def) body
-    | Ast0.OptStm(stm) ->
-       let stm = statement stm in mkres s (Ast0.OptStm(stm)) stm stm
-    | Ast0.UniqueStm(stm) ->
-       let stm = statement stm in mkres s (Ast0.UniqueStm(stm)) stm stm in
-  Ast0.set_dots_bef_aft res
-    (match Ast0.get_dots_bef_aft res with
-      Ast0.NoDots -> Ast0.NoDots
-    | Ast0.AddingBetweenDots s ->
-       Ast0.AddingBetweenDots(statement s)
-    | Ast0.DroppingBetweenDots s ->
-       Ast0.DroppingBetweenDots(statement s))
-
-and case_line c =
-  match Ast0.unwrap c with
-    Ast0.Default(def,colon,code) ->
-      let code = dots is_stm_dots (Some(promote_mcode colon)) statement code in
-      mkres c (Ast0.Default(def,colon,code)) (promote_mcode def) code
-  | Ast0.Case(case,exp,colon,code) ->
-      let exp = expression exp in
-      let code = dots is_stm_dots (Some(promote_mcode colon)) statement code in
-      mkres c (Ast0.Case(case,exp,colon,code)) (promote_mcode case) code
-  | Ast0.OptCase(case) ->
-      let case = case_line case in mkres c (Ast0.OptCase(case)) case case
-
-and statement_dots x = dots is_stm_dots None statement x
-       
-(* --------------------------------------------------------------------- *)
-(* Function declaration *)
-       
-let top_level t =
-  match Ast0.unwrap t with
-    Ast0.FILEINFO(old_file,new_file) -> t
-  | Ast0.DECL(stmt) ->
-      let stmt = statement stmt in mkres t (Ast0.DECL(stmt)) stmt stmt
-  | Ast0.CODE(rule_elem_dots) ->
-      let rule_elem_dots = dots is_stm_dots None statement rule_elem_dots in
-      mkres t (Ast0.CODE(rule_elem_dots)) rule_elem_dots rule_elem_dots
-  | Ast0.ERRORWORDS(exps) -> t
-  | Ast0.OTHER(_) -> failwith "eliminated by top_level"
-       
-(* --------------------------------------------------------------------- *)
-(* Entry points *)
-       
-let compute_lines = List.map top_level
-    
diff --git a/parsing_cocci/.#context_neg.ml.1.95 b/parsing_cocci/.#context_neg.ml.1.95
deleted file mode 100644 (file)
index e20fe00..0000000
+++ /dev/null
@@ -1,992 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Detects subtrees that are all minus/plus and nodes that are "binding
-context nodes".  The latter is a node whose structure and immediate tokens
-are the same in the minus and plus trees, and such that for every child,
-the set of context nodes in the child subtree is the same in the minus and
-plus subtrees. *)
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-module U = Unparse_ast0
-
-(* --------------------------------------------------------------------- *)
-(* Generic access to code *)
-
-let set_mcodekind x mcodekind =
-  match x with
-    Ast0.DotsExprTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsInitTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsParamTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsStmtTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsDeclTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsCaseTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.IdentTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.ExprTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      failwith "not possible - iso only"
-  | Ast0.TypeCTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.ParamTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DeclTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.InitTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.StmtTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.CaseLineTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.TopTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-  | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-
-let set_index x index =
-  match x with
-    Ast0.DotsExprTag(d) -> Ast0.set_index d index
-  | Ast0.DotsInitTag(d) -> Ast0.set_index d index
-  | Ast0.DotsParamTag(d) -> Ast0.set_index d index
-  | Ast0.DotsStmtTag(d) -> Ast0.set_index d index
-  | Ast0.DotsDeclTag(d) -> Ast0.set_index d index
-  | Ast0.DotsCaseTag(d) -> Ast0.set_index d index
-  | Ast0.IdentTag(d) -> Ast0.set_index d index
-  | Ast0.ExprTag(d) -> Ast0.set_index d index
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      failwith "not possible - iso only"
-  | Ast0.TypeCTag(d) -> Ast0.set_index d index
-  | Ast0.ParamTag(d) -> Ast0.set_index d index
-  | Ast0.InitTag(d) -> Ast0.set_index d index
-  | Ast0.DeclTag(d) -> Ast0.set_index d index
-  | Ast0.StmtTag(d) -> Ast0.set_index d index
-  | Ast0.CaseLineTag(d) -> Ast0.set_index d index
-  | Ast0.TopTag(d) -> Ast0.set_index d index
-  | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-  | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-
-let get_index = function
-    Ast0.DotsExprTag(d) -> Index.expression_dots d
-  | Ast0.DotsInitTag(d) -> Index.initialiser_dots d
-  | Ast0.DotsParamTag(d) -> Index.parameter_dots d
-  | Ast0.DotsStmtTag(d) -> Index.statement_dots d
-  | Ast0.DotsDeclTag(d) -> Index.declaration_dots d
-  | Ast0.DotsCaseTag(d) -> Index.case_line_dots d
-  | Ast0.IdentTag(d) -> Index.ident d
-  | Ast0.ExprTag(d) -> Index.expression d
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      failwith "not possible - iso only"
-  | Ast0.TypeCTag(d) -> Index.typeC d
-  | Ast0.ParamTag(d) -> Index.parameterTypeDef d
-  | Ast0.InitTag(d) -> Index.initialiser d
-  | Ast0.DeclTag(d) -> Index.declaration d
-  | Ast0.StmtTag(d) -> Index.statement d
-  | Ast0.CaseLineTag(d) -> Index.case_line d
-  | Ast0.TopTag(d) -> Index.top_level d
-  | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-  | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-
-(* --------------------------------------------------------------------- *)
-(* Collect the line numbers of the plus code.  This is used for disjunctions.
-It is not completely clear why this is necessary, but it seems like an easy
-fix for whatever is the problem that is discussed in disj_cases *)
-
-let plus_lines = ref ([] : int list)
-
-let insert n =
-  let rec loop = function
-      [] -> [n]
-    | x::xs ->
-       match compare n x with
-         1 -> x::(loop xs)
-       | 0 -> x::xs
-       | -1 -> n::x::xs
-       | _ -> failwith "not possible" in
-  plus_lines := loop !plus_lines
-
-let find n min max =
-  let rec loop = function
-      [] -> (min,max)
-    | [x] -> if n < x then (min,x) else (x,max)
-    | x1::x2::rest ->
-       if n < x1
-       then (min,x1)
-       else if n > x1 && n < x2 then (x1,x2) else loop (x2::rest) in
-  loop !plus_lines
-
-let collect_plus_lines top =
-  plus_lines := [];
-  let bind x y = () in
-  let option_default = () in
-  let donothing r k e = k e in
-  let mcode (_,_,info,mcodekind,_) =
-    match mcodekind with
-      Ast0.PLUS -> insert info.Ast0.line_start
-    | _ -> () in
-  let fn =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing donothing
-      donothing donothing in
-  fn.V0.combiner_top_level top
-
-(* --------------------------------------------------------------------- *)
-
-type kind = Neutral | AllMarked | NotAllMarked (* marked means + or - *)
-
-(* --------------------------------------------------------------------- *)
-(* The first part analyzes each of the minus tree and the plus tree
-separately *)
-
-(* ints are unique token indices (offset field) *)
-type node =
-    Token (* tokens *) of kind * int (* unique index *) * Ast0.mcodekind *
-       int list (* context tokens *)
-  | Recursor (* children *) of kind *
-       int list (* indices of all tokens at the level below *) *
-       Ast0.mcodekind list (* tokens at the level below *) *
-       int list
-  | Bind (* neighbors *) of kind *
-       int list (* indices of all tokens at current level *) *
-       Ast0.mcodekind list (* tokens at current level *) *
-       int list (* indices of all tokens at the level below *) *
-       Ast0.mcodekind list (* tokens at the level below *)
-       * int list list
-
-let kind2c = function
-    Neutral -> "neutral"
-  | AllMarked -> "allmarked"
-  | NotAllMarked -> "notallmarked"
-
-let node2c = function
-    Token(k,_,_,_) -> Printf.sprintf "token %s\n" (kind2c k)
-  | Recursor(k,_,_,_) -> Printf.sprintf "recursor %s\n" (kind2c k)
-  | Bind(k,_,_,_,_,_) -> Printf.sprintf "bind %s\n" (kind2c k)
-
-(* goal: detect negative in both tokens and recursors, or context only in
-tokens *)
-let bind c1 c2 =
-  let lub = function
-      (k1,k2) when k1 = k2 -> k1
-    | (Neutral,AllMarked) -> AllMarked
-    | (AllMarked,Neutral) -> AllMarked
-    | _ -> NotAllMarked in
-  match (c1,c2) with
-    (* token/token *)
-    (* there are tokens at this level, so ignore the level below *)
-    (Token(k1,i1,t1,l1),Token(k2,i2,t2,l2)) ->
-      Bind(lub(k1,k2),[i1;i2],[t1;t2],[],[],[l1;l2])
-
-    (* token/recursor *)
-    (* there are tokens at this level, so ignore the level below *)
-  | (Token(k1,i1,t1,l1),Recursor(k2,_,_,l2)) ->
-      Bind(lub(k1,k2),[i1],[t1],[],[],[l1;l2])
-  | (Recursor(k1,_,_,l1),Token(k2,i2,t2,l2)) ->
-      Bind(lub(k1,k2),[i2],[t2],[],[],[l1;l2])
-
-    (* token/bind *)
-    (* there are tokens at this level, so ignore the level below *)
-  | (Token(k1,i1,t1,l1),Bind(k2,i2,t2,_,_,l2)) ->
-      Bind(lub(k1,k2),i1::i2,t1::t2,[],[],l1::l2)
-  | (Bind(k1,i1,t1,_,_,l1),Token(k2,i2,t2,l2)) ->
-      Bind(lub(k1,k2),i1@[i2],t1@[t2],[],[],l1@[l2])
-
-    (* recursor/bind *)
-  | (Recursor(k1,bi1,bt1,l1),Bind(k2,i2,t2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),i2,t2,bi1@bi2,bt1@bt2,l1::l2)
-  | (Bind(k1,i1,t1,bi1,bt1,l1),Recursor(k2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),i1,t1,bi1@bi2,bt1@bt2,l1@[l2])
-
-    (* recursor/recursor and bind/bind - not likely to ever occur *)
-  | (Recursor(k1,bi1,bt1,l1),Recursor(k2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),[],[],bi1@bi2,bt1@bt2,[l1;l2])
-  | (Bind(k1,i1,t1,bi1,bt1,l1),Bind(k2,i2,t2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),i1@i2,t1@t2,bi1@bi2,bt1@bt2,l1@l2)
-
-
-let option_default = (*Bind(Neutral,[],[],[],[],[])*)
-  Recursor(Neutral,[],[],[])
-
-let mcode (_,_,info,mcodekind,pos) =
-  let offset = info.Ast0.offset in
-  match mcodekind with
-    Ast0.MINUS(_) -> Token(AllMarked,offset,mcodekind,[])
-  | Ast0.PLUS -> Token(AllMarked,offset,mcodekind,[])
-  | Ast0.CONTEXT(_) -> Token(NotAllMarked,offset,mcodekind,[offset])
-  | _ -> failwith "not possible"
-
-let neutral_mcode (_,_,info,mcodekind,pos) =
-  let offset = info.Ast0.offset in
-  match mcodekind with
-    Ast0.MINUS(_) -> Token(Neutral,offset,mcodekind,[])
-  | Ast0.PLUS -> Token(Neutral,offset,mcodekind,[])
-  | Ast0.CONTEXT(_) -> Token(Neutral,offset,mcodekind,[offset])
-  | _ -> failwith "not possible"
-
-let is_context = function Ast0.CONTEXT(_) -> true | _ -> false
-
-let union_all l = List.fold_left Common.union_set [] l
-
-(* is minus is true when we are processing minus code that might be
-intermingled with plus code.  it is used in disj_cases *)
-let classify is_minus all_marked table code =
-  let mkres builder k il tl bil btl l e =
-    (if k = AllMarked
-    then Ast0.set_mcodekind e (all_marked()) (* definitive *)
-    else
-      let check_index il tl =
-       if List.for_all is_context tl
-       then
-         (let e1 = builder e in
-         let index = (get_index e1)@il in
-         try
-           let _ = Hashtbl.find table index in
-           failwith
-             (Printf.sprintf "%d: index %s already used\n"
-                (Ast0.get_info e).Ast0.line_start
-                (String.concat " " (List.map string_of_int index)))
-         with Not_found -> Hashtbl.add table index (e1,l)) in
-      if il = [] then check_index bil btl else check_index il tl);
-    if il = []
-    then Recursor(k, bil, btl, union_all l)
-    else Recursor(k, il, tl, union_all l) in
-
-  let compute_result builder e = function
-      Bind(k,il,tl,bil,btl,l) -> mkres builder k il tl bil btl l e
-    | Token(k,il,tl,l) -> mkres builder k [il] [tl] [] [] [l] e
-    | Recursor(k,bil,btl,l) -> mkres builder k [] [] bil btl [l] e in
-
-  let make_not_marked = function
-      Bind(k,il,tl,bil,btl,l) -> Bind(NotAllMarked,il,tl,bil,btl,l)
-    | Token(k,il,tl,l) -> Token(NotAllMarked,il,tl,l)
-    | Recursor(k,bil,btl,l) -> Recursor(NotAllMarked,bil,btl,l) in
-
-  let do_nothing builder r k e = compute_result builder e (k e) in
-
-  let disj_cases disj starter code fn ender =
-    (* neutral_mcode used so starter and ender don't have an affect on
-       whether the code is considered all plus/minus, but so that they are
-       consider in the index list, which is needed to make a disj with
-       something in one branch and nothing in the other different from code
-       that just has the something (starter/ender enough, mids not needed
-       for this).  Cannot agglomerate + code over | boundaries, because two -
-       cases might have different + code, and don't want to put the + code
-       together into one unit. *)
-    let make_not_marked =
-      if is_minus
-      then
-       (let min = Ast0.get_line disj in
-       let max = Ast0.get_line_end disj in
-       let (plus_min,plus_max) = find min (min-1) (max+1) in
-       if max > plus_max then make_not_marked else (function x -> x))
-      else make_not_marked in
-    bind (neutral_mcode starter)
-      (bind (List.fold_right bind
-              (List.map make_not_marked (List.map fn code))
-              option_default)
-        (neutral_mcode ender)) in
-
-  (* no whencode in plus tree so have to drop it *)
-  (* need special cases for dots, nests, and disjs *)
-  let expression r k e =
-    compute_result Ast0.expr e
-      (match Ast0.unwrap e with
-       Ast0.NestExpr(starter,exp,ender,whencode,multi) ->
-         k (Ast0.rewrap e (Ast0.NestExpr(starter,exp,ender,None,multi)))
-      | Ast0.Edots(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Edots(dots,None)))
-      | Ast0.Ecircles(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Ecircles(dots,None)))
-      | Ast0.Estars(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Estars(dots,None)))
-      | Ast0.DisjExpr(starter,expr_list,_,ender) -> 
-         disj_cases e starter expr_list r.V0.combiner_expression ender
-      |        _ -> k e) in
-
-  (* not clear why we have the next two cases, since DisjDecl and
-  DisjType shouldn't have been constructed yet, as they only come from isos *)
-  let declaration r k e =
-    compute_result Ast0.decl e
-      (match Ast0.unwrap e with
-       Ast0.DisjDecl(starter,decls,_,ender) ->
-         disj_cases e starter decls r.V0.combiner_declaration ender
-      | Ast0.Ddots(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Ddots(dots,None)))
-       (* Need special cases for the following so that the type will be
-          considered as a unit, rather than distributed around the
-          declared variable.  This needs to be done because of the call to
-          compute_result, ie the processing of each term should make a
-          side-effect on the complete term structure as well as collecting
-          some information about it.  So we have to visit each complete
-          term structure.  In (all?) other such cases, we visit the terms
-          using rebuilder, which just visits the subterms, rather than
-          reordering their components. *)
-      |        Ast0.Init(stg,ty,id,eq,ini,sem) ->
-         bind (match stg with Some stg -> mcode stg | _ -> option_default)
-           (bind (r.V0.combiner_typeC ty)
-              (bind (r.V0.combiner_ident id)
-                 (bind (mcode eq)
-                    (bind (r.V0.combiner_initialiser ini) (mcode sem)))))
-      | Ast0.UnInit(stg,ty,id,sem) ->
-         bind (match stg with Some stg -> mcode stg | _ -> option_default)
-           (bind (r.V0.combiner_typeC ty)
-              (bind (r.V0.combiner_ident id) (mcode sem)))
-      |        _ -> k e) in
-
-  let param r k e =
-    compute_result Ast0.param e
-      (match Ast0.unwrap e with
-       Ast0.Param(ty,Some id) ->
-         (* needed for the same reason as in the Init and UnInit cases *)
-         bind (r.V0.combiner_typeC ty) (r.V0.combiner_ident id)
-      |        _ -> k e) in
-
-  let typeC r k e =
-    compute_result Ast0.typeC e
-      (match Ast0.unwrap e with
-       Ast0.DisjType(starter,types,_,ender) ->
-         disj_cases e starter types r.V0.combiner_typeC ender
-      |        _ -> k e) in
-
-  let initialiser r k i =
-    compute_result Ast0.ini i
-      (match Ast0.unwrap i with
-       Ast0.Idots(dots,whencode) ->
-         k (Ast0.rewrap i (Ast0.Idots(dots,None)))
-      |        _ -> k i) in
-
-  let statement r k s =
-    compute_result Ast0.stmt s
-      (match Ast0.unwrap s with
-       Ast0.Nest(started,stm_dots,ender,whencode,multi) ->
-         k (Ast0.rewrap s (Ast0.Nest(started,stm_dots,ender,[],multi)))
-      | Ast0.Dots(dots,whencode) ->
-         k (Ast0.rewrap s (Ast0.Dots(dots,[])))
-      | Ast0.Circles(dots,whencode) ->
-         k (Ast0.rewrap s (Ast0.Circles(dots,[])))
-      | Ast0.Stars(dots,whencode) ->
-         k (Ast0.rewrap s (Ast0.Stars(dots,[])))
-      | Ast0.Disj(starter,statement_dots_list,_,ender) ->
-         disj_cases s starter statement_dots_list r.V0.combiner_statement_dots
-           ender
-(*  Why? There is nothing there
-       (* cases for everything with extra mcode *)
-      |        Ast0.FunDecl((info,bef),_,_,_,_,_,_,_,_)
-      | Ast0.Decl((info,bef),_) ->
-         bind (mcode ((),(),info,bef)) (k s)
-      | Ast0.IfThen(_,_,_,_,_,(info,aft))
-      | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft))
-      | Ast0.While(_,_,_,_,_,(info,aft)) ->
-      | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft)) ->
-         bind (k s) (mcode ((),(),info,aft))
-      | Ast0.Iterator(_,_,_,_,_,(info,aft))
-*)
-      |        _ -> k s
-
-) in
-
-  let do_top builder r k e = compute_result builder e (k e) in
-
-  let combiner = 
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      (do_nothing Ast0.dotsExpr) (do_nothing Ast0.dotsInit)
-      (do_nothing Ast0.dotsParam) (do_nothing Ast0.dotsStmt)
-      (do_nothing Ast0.dotsDecl) (do_nothing Ast0.dotsCase)
-      (do_nothing Ast0.ident) expression typeC initialiser param declaration
-      statement (do_nothing Ast0.case_line) (do_top Ast0.top) in
-  combiner.V0.combiner_top_level code
-
-(* --------------------------------------------------------------------- *)
-(* Traverse the hash tables and find corresponding context nodes that have
-the same context children *)
-
-(* this is just a sanity check - really only need to look at the top-level
-   structure *)
-let equal_mcode (_,_,info1,_,_) (_,_,info2,_,_) =
-  info1.Ast0.offset = info2.Ast0.offset
-
-let equal_option e1 e2 =
-  match (e1,e2) with
-    (Some x, Some y) -> equal_mcode x y
-  | (None, None) -> true
-  | _ -> false
-
-let dots fn d1 d2 =
-  match (Ast0.unwrap d1,Ast0.unwrap d2) with
-    (Ast0.DOTS(l1),Ast0.DOTS(l2)) -> List.length l1 = List.length l2
-  | (Ast0.CIRCLES(l1),Ast0.CIRCLES(l2)) -> List.length l1 = List.length l2
-  | (Ast0.STARS(l1),Ast0.STARS(l2)) -> List.length l1 = List.length l2
-  | _ -> false
-
-let rec equal_ident i1 i2 =
-  match (Ast0.unwrap i1,Ast0.unwrap i2) with
-    (Ast0.Id(name1),Ast0.Id(name2)) -> equal_mcode name1 name2
-  | (Ast0.MetaId(name1,_,_),Ast0.MetaId(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.MetaFunc(name1,_,_),Ast0.MetaFunc(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.MetaLocalFunc(name1,_,_),Ast0.MetaLocalFunc(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.OptIdent(_),Ast0.OptIdent(_)) -> true
-  | (Ast0.UniqueIdent(_),Ast0.UniqueIdent(_)) -> true
-  | _ -> false
-
-let rec equal_expression e1 e2 =
-  match (Ast0.unwrap e1,Ast0.unwrap e2) with
-    (Ast0.Ident(_),Ast0.Ident(_)) -> true
-  | (Ast0.Constant(const1),Ast0.Constant(const2)) -> equal_mcode const1 const2
-  | (Ast0.FunCall(_,lp1,_,rp1),Ast0.FunCall(_,lp2,_,rp2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.Assignment(_,op1,_,_),Ast0.Assignment(_,op2,_,_)) ->
-      equal_mcode op1 op2
-  | (Ast0.CondExpr(_,why1,_,colon1,_),Ast0.CondExpr(_,why2,_,colon2,_)) ->
-      equal_mcode why1 why2 && equal_mcode colon1 colon2
-  | (Ast0.Postfix(_,op1),Ast0.Postfix(_,op2)) -> equal_mcode op1 op2
-  | (Ast0.Infix(_,op1),Ast0.Infix(_,op2)) -> equal_mcode op1 op2
-  | (Ast0.Unary(_,op1),Ast0.Unary(_,op2)) -> equal_mcode op1 op2
-  | (Ast0.Binary(_,op1,_),Ast0.Binary(_,op2,_)) -> equal_mcode op1 op2
-  | (Ast0.Paren(lp1,_,rp1),Ast0.Paren(lp2,_,rp2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.ArrayAccess(_,lb1,_,rb1),Ast0.ArrayAccess(_,lb2,_,rb2)) ->
-      equal_mcode lb1 lb2 && equal_mcode rb1 rb2
-  | (Ast0.RecordAccess(_,pt1,_),Ast0.RecordAccess(_,pt2,_)) ->
-      equal_mcode pt1 pt2
-  | (Ast0.RecordPtAccess(_,ar1,_),Ast0.RecordPtAccess(_,ar2,_)) ->
-      equal_mcode ar1 ar2
-  | (Ast0.Cast(lp1,_,rp1,_),Ast0.Cast(lp2,_,rp2,_)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.SizeOfExpr(szf1,_),Ast0.SizeOfExpr(szf2,_)) ->
-      equal_mcode szf1 szf2
-  | (Ast0.SizeOfType(szf1,lp1,_,rp1),Ast0.SizeOfType(szf2,lp2,_,rp2)) ->
-      equal_mcode szf1 szf2 && equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.TypeExp(_),Ast0.TypeExp(_)) -> true
-  | (Ast0.MetaErr(name1,_,_),Ast0.MetaErr(name2,_,_))
-  | (Ast0.MetaExpr(name1,_,_,_,_),Ast0.MetaExpr(name2,_,_,_,_))
-  | (Ast0.MetaExprList(name1,_,_),Ast0.MetaExprList(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.EComma(cm1),Ast0.EComma(cm2)) -> equal_mcode cm1 cm2
-  | (Ast0.DisjExpr(starter1,_,mids1,ender1),
-     Ast0.DisjExpr(starter2,_,mids2,ender2)) ->
-       equal_mcode starter1 starter2 && 
-       List.for_all2 equal_mcode mids1 mids2 &&
-       equal_mcode ender1 ender2
-  | (Ast0.NestExpr(starter1,_,ender1,_,m1),
-     Ast0.NestExpr(starter2,_,ender2,_,m2)) ->
-      equal_mcode starter1 starter2 && equal_mcode ender1 ender2 && m1 = m2
-  | (Ast0.Edots(dots1,_),Ast0.Edots(dots2,_))
-  | (Ast0.Ecircles(dots1,_),Ast0.Ecircles(dots2,_))
-  | (Ast0.Estars(dots1,_),Ast0.Estars(dots2,_)) -> equal_mcode dots1 dots2
-  | (Ast0.OptExp(_),Ast0.OptExp(_)) -> true
-  | (Ast0.UniqueExp(_),Ast0.UniqueExp(_)) -> true
-  | _ -> false
-
-let rec equal_typeC t1 t2 =
-  match (Ast0.unwrap t1,Ast0.unwrap t2) with
-    (Ast0.ConstVol(cv1,_),Ast0.ConstVol(cv2,_)) -> equal_mcode cv1 cv2
-  | (Ast0.BaseType(ty1,sign1),Ast0.BaseType(ty2,sign2)) ->
-      equal_mcode ty1 ty2 && equal_option sign1 sign2
-  | (Ast0.ImplicitInt(sign1),Ast0.ImplicitInt(sign2)) ->
-      equal_mcode sign1 sign2
-  | (Ast0.Pointer(_,star1),Ast0.Pointer(_,star2)) ->
-      equal_mcode star1 star2
-  | (Ast0.Array(_,lb1,_,rb1),Ast0.Array(_,lb2,_,rb2)) ->
-      equal_mcode lb1 lb2 && equal_mcode rb1 rb2
-  | (Ast0.StructUnionName(kind1,_),Ast0.StructUnionName(kind2,_)) ->
-      equal_mcode kind1 kind2
-  | (Ast0.FunctionType(ty1,lp1,p1,rp1),Ast0.FunctionType(ty2,lp2,p2,rp2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.StructUnionDef(_,lb1,_,rb1),
-     Ast0.StructUnionDef(_,lb2,_,rb2)) ->
-       equal_mcode lb1 lb2 && equal_mcode rb1 rb2
-  | (Ast0.TypeName(name1),Ast0.TypeName(name2)) -> equal_mcode name1 name2
-  | (Ast0.MetaType(name1,_),Ast0.MetaType(name2,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.DisjType(starter1,_,mids1,ender1),
-     Ast0.DisjType(starter2,_,mids2,ender2)) ->
-       equal_mcode starter1 starter2 && 
-       List.for_all2 equal_mcode mids1 mids2 &&
-       equal_mcode ender1 ender2
-  | (Ast0.OptType(_),Ast0.OptType(_)) -> true
-  | (Ast0.UniqueType(_),Ast0.UniqueType(_)) -> true
-  | _ -> false
-
-let equal_declaration d1 d2 =
-  match (Ast0.unwrap d1,Ast0.unwrap d2) with
-    (Ast0.Init(stg1,_,_,eq1,_,sem1),Ast0.Init(stg2,_,_,eq2,_,sem2)) ->
-      equal_option stg1 stg2 && equal_mcode eq1 eq2 && equal_mcode sem1 sem2
-  | (Ast0.UnInit(stg1,_,_,sem1),Ast0.UnInit(stg2,_,_,sem2)) ->
-      equal_option stg1 stg2 && equal_mcode sem1 sem2
-  | (Ast0.MacroDecl(nm1,lp1,_,rp1,sem1),Ast0.MacroDecl(nm2,lp2,_,rp2,sem2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2 && equal_mcode sem1 sem2
-  | (Ast0.TyDecl(_,sem1),Ast0.TyDecl(_,sem2)) -> equal_mcode sem1 sem2
-  | (Ast0.Ddots(dots1,_),Ast0.Ddots(dots2,_)) -> equal_mcode dots1 dots2
-  | (Ast0.OptDecl(_),Ast0.OptDecl(_)) -> true
-  | (Ast0.UniqueDecl(_),Ast0.UniqueDecl(_)) -> true
-  | (Ast0.DisjDecl _,_) | (_,Ast0.DisjDecl _) ->
-      failwith "DisjDecl not expected here"
-  | _ -> false
-
-let equal_initialiser i1 i2 =
-  match (Ast0.unwrap i1,Ast0.unwrap i2) with
-    (Ast0.InitExpr(_),Ast0.InitExpr(_)) -> true
-  | (Ast0.InitList(lb1,_,rb1),Ast0.InitList(lb2,_,rb2)) ->
-      (equal_mcode lb1 lb2) && (equal_mcode rb1 rb2)
-  | (Ast0.InitGccDotName(dot1,_,eq1,_),Ast0.InitGccDotName(dot2,_,eq2,_)) ->
-      (equal_mcode dot1 dot2) && (equal_mcode eq1 eq2)
-  | (Ast0.InitGccName(_,eq1,_),Ast0.InitGccName(_,eq2,_)) ->
-      equal_mcode eq1 eq2
-  | (Ast0.InitGccIndex(lb1,_,rb1,eq1,_),Ast0.InitGccIndex(lb2,_,rb2,eq2,_)) ->
-      (equal_mcode lb1 lb2) && (equal_mcode rb1 rb2) && (equal_mcode eq1 eq2)
-  | (Ast0.InitGccRange(lb1,_,dots1,_,rb1,eq1,_),
-     Ast0.InitGccRange(lb2,_,dots2,_,rb2,eq2,_)) ->
-      (equal_mcode lb1 lb2) && (equal_mcode dots1 dots2) &&
-       (equal_mcode rb1 rb2) && (equal_mcode eq1 eq2)
- | (Ast0.IComma(cm1),Ast0.IComma(cm2)) -> equal_mcode cm1 cm2
-  | (Ast0.Idots(d1,_),Ast0.Idots(d2,_)) -> equal_mcode d1 d2
-  | (Ast0.OptIni(_),Ast0.OptIni(_)) -> true
-  | (Ast0.UniqueIni(_),Ast0.UniqueIni(_)) -> true
-  | _ -> false
-       
-let equal_parameterTypeDef p1 p2 =
-  match (Ast0.unwrap p1,Ast0.unwrap p2) with
-    (Ast0.VoidParam(_),Ast0.VoidParam(_)) -> true
-  | (Ast0.Param(_,_),Ast0.Param(_,_)) -> true
-  | (Ast0.MetaParam(name1,_),Ast0.MetaParam(name2,_))
-  | (Ast0.MetaParamList(name1,_,_),Ast0.MetaParamList(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.PComma(cm1),Ast0.PComma(cm2)) -> equal_mcode cm1 cm2
-  | (Ast0.Pdots(dots1),Ast0.Pdots(dots2))
-  | (Ast0.Pcircles(dots1),Ast0.Pcircles(dots2)) -> equal_mcode dots1 dots2
-  | (Ast0.OptParam(_),Ast0.OptParam(_)) -> true
-  | (Ast0.UniqueParam(_),Ast0.UniqueParam(_)) -> true
-  | _ -> false
-
-let rec equal_statement s1 s2 =
-  match (Ast0.unwrap s1,Ast0.unwrap s2) with
-    (Ast0.FunDecl(_,fninfo1,_,lp1,_,rp1,lbrace1,_,rbrace1),
-     Ast0.FunDecl(_,fninfo2,_,lp2,_,rp2,lbrace2,_,rbrace2)) ->
-       (List.length fninfo1) = (List.length fninfo2) &&
-       List.for_all2 equal_fninfo fninfo1 fninfo2 &&
-       equal_mcode lp1 lp2 && equal_mcode rp1 rp2 &&
-       equal_mcode lbrace1 lbrace2 && equal_mcode rbrace1 rbrace2
-  | (Ast0.Decl(_,_),Ast0.Decl(_,_)) -> true
-  | (Ast0.Seq(lbrace1,_,rbrace1),Ast0.Seq(lbrace2,_,rbrace2)) ->
-      equal_mcode lbrace1 lbrace2 && equal_mcode rbrace1 rbrace2
-  | (Ast0.ExprStatement(_,sem1),Ast0.ExprStatement(_,sem2)) ->
-      equal_mcode sem1 sem2
-  | (Ast0.IfThen(iff1,lp1,_,rp1,_,_),Ast0.IfThen(iff2,lp2,_,rp2,_,_)) ->
-      equal_mcode iff1 iff2 && equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.IfThenElse(iff1,lp1,_,rp1,_,els1,_,_),
-     Ast0.IfThenElse(iff2,lp2,_,rp2,_,els2,_,_)) ->
-       equal_mcode iff1 iff2 &&
-        equal_mcode lp1 lp2 && equal_mcode rp1 rp2 && equal_mcode els1 els2
-  | (Ast0.While(whl1,lp1,_,rp1,_,_),Ast0.While(whl2,lp2,_,rp2,_,_)) ->
-      equal_mcode whl1 whl2 && equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.Do(d1,_,whl1,lp1,_,rp1,sem1),Ast0.Do(d2,_,whl2,lp2,_,rp2,sem2)) ->
-      equal_mcode whl1 whl2 && equal_mcode d1 d2 &&
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2 && equal_mcode sem1 sem2
-  | (Ast0.For(fr1,lp1,_,sem11,_,sem21,_,rp1,_,_),
-     Ast0.For(fr2,lp2,_,sem12,_,sem22,_,rp2,_,_)) ->
-       equal_mcode fr1 fr2 && equal_mcode lp1 lp2 &&
-       equal_mcode sem11 sem12 && equal_mcode sem21 sem22 &&
-       equal_mcode rp1 rp2
-  | (Ast0.Iterator(nm1,lp1,_,rp1,_,_),Ast0.Iterator(nm2,lp2,_,rp2,_,_)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.Switch(switch1,lp1,_,rp1,lb1,case1,rb1),
-     Ast0.Switch(switch2,lp2,_,rp2,lb2,case2,rb2)) ->
-       equal_mcode switch1 switch2 && equal_mcode lp1 lp2 &&
-       equal_mcode rp1 rp2 && equal_mcode lb1 lb2 &&
-       equal_mcode rb1 rb2
-  | (Ast0.Break(br1,sem1),Ast0.Break(br2,sem2)) ->
-      equal_mcode br1 br2 && equal_mcode sem1 sem2
-  | (Ast0.Continue(cont1,sem1),Ast0.Continue(cont2,sem2)) ->
-      equal_mcode cont1 cont2 && equal_mcode sem1 sem2
-  | (Ast0.Label(_,dd1),Ast0.Label(_,dd2)) ->
-      equal_mcode dd1 dd2
-  | (Ast0.Goto(g1,_,sem1),Ast0.Goto(g2,_,sem2)) ->
-      equal_mcode g1 g2 && equal_mcode sem1 sem2
-  | (Ast0.Return(ret1,sem1),Ast0.Return(ret2,sem2)) ->
-      equal_mcode ret1 ret2 && equal_mcode sem1 sem2
-  | (Ast0.ReturnExpr(ret1,_,sem1),Ast0.ReturnExpr(ret2,_,sem2)) ->
-      equal_mcode ret1 ret2 && equal_mcode sem1 sem2
-  | (Ast0.MetaStmt(name1,_),Ast0.MetaStmt(name2,_))
-  | (Ast0.MetaStmtList(name1,_),Ast0.MetaStmtList(name2,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.Disj(starter1,_,mids1,ender1),Ast0.Disj(starter2,_,mids2,ender2)) ->
-      equal_mcode starter1 starter2 && 
-      List.for_all2 equal_mcode mids1 mids2 &&
-      equal_mcode ender1 ender2
-  | (Ast0.Nest(starter1,_,ender1,_,m1),Ast0.Nest(starter2,_,ender2,_,m2)) ->
-      equal_mcode starter1 starter2 && equal_mcode ender1 ender2 && m1 = m2
-  | (Ast0.Exp(_),Ast0.Exp(_)) -> true
-  | (Ast0.TopExp(_),Ast0.TopExp(_)) -> true
-  | (Ast0.Ty(_),Ast0.Ty(_)) -> true
-  | (Ast0.Dots(d1,_),Ast0.Dots(d2,_))
-  | (Ast0.Circles(d1,_),Ast0.Circles(d2,_))
-  | (Ast0.Stars(d1,_),Ast0.Stars(d2,_)) -> equal_mcode d1 d2
-  | (Ast0.Include(inc1,name1),Ast0.Include(inc2,name2)) ->
-      equal_mcode inc1 inc2 && equal_mcode name1 name2
-  | (Ast0.Define(def1,_,_,_),Ast0.Define(def2,_,_,_)) ->
-      equal_mcode def1 def2
-  | (Ast0.OptStm(_),Ast0.OptStm(_)) -> true
-  | (Ast0.UniqueStm(_),Ast0.UniqueStm(_)) -> true
-  | _ -> false
-
-and equal_fninfo x y =
-  match (x,y) with
-    (Ast0.FStorage(s1),Ast0.FStorage(s2)) -> equal_mcode s1 s2
-  | (Ast0.FType(_),Ast0.FType(_)) -> true
-  | (Ast0.FInline(i1),Ast0.FInline(i2)) -> equal_mcode i1 i2
-  | (Ast0.FAttr(i1),Ast0.FAttr(i2)) -> equal_mcode i1 i2
-  | _ -> false
-
-let equal_case_line c1 c2 =
-  match (Ast0.unwrap c1,Ast0.unwrap c2) with
-    (Ast0.Default(def1,colon1,_),Ast0.Default(def2,colon2,_)) ->
-      equal_mcode def1 def2 && equal_mcode colon1 colon2
-  | (Ast0.Case(case1,_,colon1,_),Ast0.Case(case2,_,colon2,_)) ->
-      equal_mcode case1 case2 && equal_mcode colon1 colon2
-  | (Ast0.OptCase(_),Ast0.OptCase(_)) -> true
-  | _ -> false
-
-let rec equal_top_level t1 t2 =
-  match (Ast0.unwrap t1,Ast0.unwrap t2) with
-    (Ast0.DECL(_),Ast0.DECL(_)) -> true
-  | (Ast0.FILEINFO(old_file1,new_file1),Ast0.FILEINFO(old_file2,new_file2)) ->
-      equal_mcode old_file1 old_file2 && equal_mcode new_file1 new_file2
-  | (Ast0.CODE(_),Ast0.CODE(_)) -> true
-  | (Ast0.ERRORWORDS(_),Ast0.ERRORWORDS(_)) -> true
-  | _ -> false
-
-let root_equal e1 e2 =
-  match (e1,e2) with
-    (Ast0.DotsExprTag(d1),Ast0.DotsExprTag(d2)) -> dots equal_expression d1 d2
-  | (Ast0.DotsParamTag(d1),Ast0.DotsParamTag(d2)) ->
-      dots equal_parameterTypeDef d1 d2
-  | (Ast0.DotsStmtTag(d1),Ast0.DotsStmtTag(d2)) -> dots equal_statement d1 d2
-  | (Ast0.DotsDeclTag(d1),Ast0.DotsDeclTag(d2)) -> dots equal_declaration d1 d2
-  | (Ast0.DotsCaseTag(d1),Ast0.DotsCaseTag(d2)) -> dots equal_case_line d1 d2
-  | (Ast0.IdentTag(i1),Ast0.IdentTag(i2)) -> equal_ident i1 i2
-  | (Ast0.ExprTag(e1),Ast0.ExprTag(e2)) -> equal_expression e1 e2
-  | (Ast0.ArgExprTag(d),_) -> failwith "not possible - iso only"
-  | (Ast0.TypeCTag(t1),Ast0.TypeCTag(t2)) -> equal_typeC t1 t2
-  | (Ast0.ParamTag(p1),Ast0.ParamTag(p2)) -> equal_parameterTypeDef p1 p2
-  | (Ast0.InitTag(d1),Ast0.InitTag(d2)) -> equal_initialiser d1 d2
-  | (Ast0.DeclTag(d1),Ast0.DeclTag(d2)) -> equal_declaration d1 d2
-  | (Ast0.StmtTag(s1),Ast0.StmtTag(s2)) -> equal_statement s1 s2
-  | (Ast0.TopTag(t1),Ast0.TopTag(t2)) -> equal_top_level t1 t2
-  | (Ast0.IsoWhenTag(_),_) | (_,Ast0.IsoWhenTag(_)) ->
-      failwith "only within iso phase"
-  | _ -> false
-
-let default_context _ =
-  Ast0.CONTEXT(ref(Ast.NOTHING,
-                  Ast0.default_token_info,Ast0.default_token_info))
-
-let traverse minus_table plus_table =
-  Hashtbl.iter
-    (function key ->
-      function (e,l) ->
-       try
-         let (plus_e,plus_l) = Hashtbl.find plus_table key in
-         if root_equal e plus_e &&
-           List.for_all (function x -> x)
-             (List.map2 Common.equal_set l plus_l)
-         then
-           let i = Ast0.fresh_index() in
-           (set_index e i; set_index plus_e i;
-            set_mcodekind e (default_context());
-            set_mcodekind plus_e (default_context()))
-       with Not_found -> ())
-    minus_table
-
-(* --------------------------------------------------------------------- *)
-(* contextify the whencode *)
-
-let contextify_all =
-  let bind x y = () in
-  let option_default = () in
-  let mcode x = () in
-  let do_nothing r k e = Ast0.set_mcodekind e (default_context()); k e in
-
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-    do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-    do_nothing do_nothing do_nothing
-
-let contextify_whencode =
-  let bind x y = () in
-  let option_default = () in
-  let mcode x = () in
-  let do_nothing r k e = k e in
-
-  let expression r k e =
-    k e;
-    match Ast0.unwrap e with
-      Ast0.NestExpr(_,_,_,Some whencode,_)
-    | Ast0.Edots(_,Some whencode)
-    | Ast0.Ecircles(_,Some whencode)
-    | Ast0.Estars(_,Some whencode) ->
-       contextify_all.V0.combiner_expression whencode
-    | _ -> () in
-
-  let initialiser r k i =
-    match Ast0.unwrap i with
-      Ast0.Idots(dots,Some whencode) ->
-       contextify_all.V0.combiner_initialiser whencode
-    | _ -> k i in
-
-  let whencode = function
-      Ast0.WhenNot sd -> contextify_all.V0.combiner_statement_dots sd
-    | Ast0.WhenAlways s -> contextify_all.V0.combiner_statement s
-    | Ast0.WhenModifier(_) -> () in
-
-  let statement r k (s : Ast0.statement) =
-    k s;
-    match Ast0.unwrap s with
-      Ast0.Nest(_,_,_,whn,_)
-    | Ast0.Dots(_,whn) | Ast0.Circles(_,whn) | Ast0.Stars(_,whn) ->
-       List.iter whencode whn
-    | _ -> () in
-
-  let combiner = 
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-      do_nothing
-      expression
-      do_nothing initialiser do_nothing do_nothing statement do_nothing
-      do_nothing in
-  combiner.V0.combiner_top_level
-
-(* --------------------------------------------------------------------- *)
-
-(* the first int list is the tokens in the node, the second is the tokens
-in the descendents *)
-let minus_table =
-  (Hashtbl.create(50) : (int list, Ast0.anything * int list list) Hashtbl.t)
-let plus_table =
-  (Hashtbl.create(50) : (int list, Ast0.anything * int list list) Hashtbl.t)
-
-let iscode t =
-  match Ast0.unwrap t with
-    Ast0.DECL(_) -> true
-  | Ast0.FILEINFO(_) -> true
-  | Ast0.ERRORWORDS(_) -> false
-  | Ast0.CODE(_) -> true
-  | Ast0.OTHER(_) -> failwith "unexpected top level code"
-
-(* ------------------------------------------------------------------- *)
-(* alignment of minus and plus *)
-
-let concat = function
-    [] -> []
-  | [s] -> [s]
-  | l ->
-      let rec loop = function
-         [] -> []
-       | x::rest ->
-           (match Ast0.unwrap x with
-             Ast0.DECL(s) -> let stms = loop rest in s::stms
-           | Ast0.CODE(ss) ->
-               let stms = loop rest in
-               (match Ast0.unwrap ss with
-                 Ast0.DOTS(d) -> d@stms
-               | _ -> failwith "no dots allowed in pure plus code")
-           | _ -> failwith "plus code is being discarded") in
-      let res =
-       Compute_lines.statement_dots
-         (Ast0.rewrap (List.hd l) (Ast0.DOTS (loop l))) in
-      [Ast0.rewrap res (Ast0.CODE res)]
-
-let collect_up_to m plus =
-  let minfo = Ast0.get_info m in
-  let mend = minfo.Ast0.logical_end in
-  let rec loop = function
-      [] -> ([],[])
-    | p::plus -> 
-       let pinfo = Ast0.get_info p in
-       let pstart = pinfo.Ast0.logical_start in
-       if pstart > mend
-       then ([],p::plus)
-       else let (plus,rest) = loop plus in (p::plus,rest) in
-  let (plus,rest) = loop plus in
-  (concat plus,rest)
-
-let realign minus plus =
-  let rec loop = function
-      ([],_) -> failwith "not possible, some context required"
-    | ([m],p) -> ([m],concat p)
-    | (m::minus,plus) ->
-       let (p,plus) = collect_up_to m plus in
-       let (minus,plus) = loop (minus,plus) in
-       (m::minus,p@plus) in
-  loop (minus,plus)
-
-(* ------------------------------------------------------------------- *)
-(* check compatible: check that at the top level the minus and plus code is
-of the same kind.  Could go further and make the correspondence between the
-code between ...s. *)
-
-let isonly f l = match Ast0.undots l with [s] -> f s | _ -> false
-
-let isall f l = List.for_all (isonly f) l
-
-let rec is_exp s =
-  match Ast0.unwrap s with
-    Ast0.Exp(e) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_exp stmts
-  | _ -> false
-
-let rec is_ty s =
-  match Ast0.unwrap s with
-    Ast0.Ty(e) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_ty stmts
-  | _ -> false
-
-let rec is_decl s =
-  match Ast0.unwrap s with
-    Ast0.Decl(_,e) -> true
-  | Ast0.FunDecl(_,_,_,_,_,_,_,_,_) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_decl stmts
-  | _ -> false
-
-let rec is_fndecl s =
-  match Ast0.unwrap s with
-    Ast0.FunDecl(_,_,_,_,_,_,_,_,_) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_fndecl stmts
-  | _ -> false
-
-let rec is_toplevel s =
-  match Ast0.unwrap s with
-    Ast0.Decl(_,e) -> true
-  | Ast0.FunDecl(_,_,_,_,_,_,_,_,_) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_toplevel stmts
-  | Ast0.ExprStatement(fc,_) ->
-      (match Ast0.unwrap fc with
-       Ast0.FunCall(_,_,_,_) -> true
-      |        _ -> false)
-  | Ast0.Include(_,_) -> true
-  | Ast0.Define(_,_,_,_) -> true
-  | _ -> false
-
-let check_compatible m p =
-  let fail _ =
-    failwith
-      (Printf.sprintf
-        "incompatible minus and plus code starting on lines %d and %d"
-        (Ast0.get_line m) (Ast0.get_line p)) in
-  match (Ast0.unwrap m, Ast0.unwrap p) with
-    (Ast0.DECL(decl1),Ast0.DECL(decl2)) ->
-      if not (is_decl decl1 && is_decl decl2)
-      then fail()
-  | (Ast0.DECL(decl1),Ast0.CODE(code2)) ->
-      let v1 = is_decl decl1 in
-      let v2 = List.for_all is_toplevel (Ast0.undots code2) in
-      if !Flag.make_hrule = None && v1 && not v2 then fail()
-  | (Ast0.CODE(code1),Ast0.DECL(decl2)) ->
-      let v1 = List.for_all is_toplevel (Ast0.undots code1) in
-      let v2 = is_decl decl2 in
-      if v1 && not v2 then fail()
-  | (Ast0.CODE(code1),Ast0.CODE(code2)) ->
-      let testers = [is_exp;is_ty] in
-      List.iter
-       (function tester ->
-         let v1 = isonly tester code1 in
-         let v2 = isonly tester code2 in
-         if (v1 && not v2) or (!Flag.make_hrule = None && v2 && not v1)
-         then fail())
-       testers;
-      let v1 = isonly is_fndecl code1 in
-      let v2 = List.for_all is_toplevel (Ast0.undots code2) in
-      if !Flag.make_hrule = None && v1 && not v2 then fail()
-  | (Ast0.FILEINFO(_,_),Ast0.FILEINFO(_,_)) -> ()
-  | (Ast0.OTHER(_),Ast0.OTHER(_)) -> ()
-  | _ -> fail()
-
-(* ------------------------------------------------------------------- *)
-
-(* returns a list of corresponding minus and plus trees *)
-let context_neg minus plus =
-  Hashtbl.clear minus_table;
-  Hashtbl.clear plus_table;
-  List.iter contextify_whencode minus;
-  let (minus,plus) = realign minus plus in
-  let rec loop = function
-      ([],[]) -> []
-    | ([],l) ->
-       failwith (Printf.sprintf "%d plus things remaining" (List.length l))
-    | (minus,[]) ->
-       plus_lines := [];
-       let _ =
-         List.map
-           (function m ->
-             classify true
-               (function _ -> Ast0.MINUS(ref([],Ast0.default_token_info)))
-               minus_table m)
-           minus in
-       []
-    | (((m::minus) as mall),((p::plus) as pall)) ->
-       let minfo = Ast0.get_info m in
-       let pinfo = Ast0.get_info p in
-       let mstart = minfo.Ast0.logical_start in
-       let mend = minfo.Ast0.logical_end in
-       let pstart = pinfo.Ast0.logical_start in
-       let pend = pinfo.Ast0.logical_end in
-       if (iscode m or iscode p) &&
-         (mend + 1 = pstart or pend + 1 = mstart or (* adjacent *)
-          (mstart <= pstart && mend >= pstart) or
-          (pstart <= mstart && pend >= mstart)) (* overlapping or nested *)
-       then
-         begin
-           (* ensure that the root of each tree has a unique index,
-              although it might get overwritten if the node is a context
-              node *)
-           let i = Ast0.fresh_index() in
-           Ast0.set_index m i; Ast0.set_index p i;
-           check_compatible m p;
-           collect_plus_lines p;
-           let _ =
-             classify true
-               (function _ -> Ast0.MINUS(ref([],Ast0.default_token_info)))
-               minus_table m in
-           let _ = classify false (function _ -> Ast0.PLUS) plus_table p in
-           traverse minus_table plus_table;
-           (m,p)::loop(minus,plus)
-         end
-       else
-         if not(iscode m or iscode p)
-         then loop(minus,plus)
-         else
-           if mstart < pstart
-           then
-             begin
-               plus_lines := [];
-               let _ =
-                 classify true
-                   (function _ -> Ast0.MINUS(ref([],Ast0.default_token_info)))
-                   minus_table m in
-               loop(minus,pall)
-             end
-           else loop(mall,plus) in
-  loop(minus,plus)
diff --git a/parsing_cocci/.#context_neg.ml.1.96 b/parsing_cocci/.#context_neg.ml.1.96
deleted file mode 100644 (file)
index 93e3293..0000000
+++ /dev/null
@@ -1,1002 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Detects subtrees that are all minus/plus and nodes that are "binding
-context nodes".  The latter is a node whose structure and immediate tokens
-are the same in the minus and plus trees, and such that for every child,
-the set of context nodes in the child subtree is the same in the minus and
-plus subtrees. *)
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-module U = Unparse_ast0
-
-(* --------------------------------------------------------------------- *)
-(* Generic access to code *)
-
-let set_mcodekind x mcodekind =
-  match x with
-    Ast0.DotsExprTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsInitTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsParamTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsStmtTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsDeclTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsCaseTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.IdentTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.ExprTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      failwith "not possible - iso only"
-  | Ast0.TypeCTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.ParamTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DeclTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.InitTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.StmtTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.CaseLineTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.TopTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenTTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenFTag(_) -> failwith "only within iso phase"
-  | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-
-let set_index x index =
-  match x with
-    Ast0.DotsExprTag(d) -> Ast0.set_index d index
-  | Ast0.DotsInitTag(d) -> Ast0.set_index d index
-  | Ast0.DotsParamTag(d) -> Ast0.set_index d index
-  | Ast0.DotsStmtTag(d) -> Ast0.set_index d index
-  | Ast0.DotsDeclTag(d) -> Ast0.set_index d index
-  | Ast0.DotsCaseTag(d) -> Ast0.set_index d index
-  | Ast0.IdentTag(d) -> Ast0.set_index d index
-  | Ast0.ExprTag(d) -> Ast0.set_index d index
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      failwith "not possible - iso only"
-  | Ast0.TypeCTag(d) -> Ast0.set_index d index
-  | Ast0.ParamTag(d) -> Ast0.set_index d index
-  | Ast0.InitTag(d) -> Ast0.set_index d index
-  | Ast0.DeclTag(d) -> Ast0.set_index d index
-  | Ast0.StmtTag(d) -> Ast0.set_index d index
-  | Ast0.CaseLineTag(d) -> Ast0.set_index d index
-  | Ast0.TopTag(d) -> Ast0.set_index d index
-  | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenTTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenFTag(_) -> failwith "only within iso phase"
-  | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-
-let get_index = function
-    Ast0.DotsExprTag(d) -> Index.expression_dots d
-  | Ast0.DotsInitTag(d) -> Index.initialiser_dots d
-  | Ast0.DotsParamTag(d) -> Index.parameter_dots d
-  | Ast0.DotsStmtTag(d) -> Index.statement_dots d
-  | Ast0.DotsDeclTag(d) -> Index.declaration_dots d
-  | Ast0.DotsCaseTag(d) -> Index.case_line_dots d
-  | Ast0.IdentTag(d) -> Index.ident d
-  | Ast0.ExprTag(d) -> Index.expression d
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      failwith "not possible - iso only"
-  | Ast0.TypeCTag(d) -> Index.typeC d
-  | Ast0.ParamTag(d) -> Index.parameterTypeDef d
-  | Ast0.InitTag(d) -> Index.initialiser d
-  | Ast0.DeclTag(d) -> Index.declaration d
-  | Ast0.StmtTag(d) -> Index.statement d
-  | Ast0.CaseLineTag(d) -> Index.case_line d
-  | Ast0.TopTag(d) -> Index.top_level d
-  | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenTTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenFTag(_) -> failwith "only within iso phase"
-  | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-
-(* --------------------------------------------------------------------- *)
-(* Collect the line numbers of the plus code.  This is used for disjunctions.
-It is not completely clear why this is necessary, but it seems like an easy
-fix for whatever is the problem that is discussed in disj_cases *)
-
-let plus_lines = ref ([] : int list)
-
-let insert n =
-  let rec loop = function
-      [] -> [n]
-    | x::xs ->
-       match compare n x with
-         1 -> x::(loop xs)
-       | 0 -> x::xs
-       | -1 -> n::x::xs
-       | _ -> failwith "not possible" in
-  plus_lines := loop !plus_lines
-
-let find n min max =
-  let rec loop = function
-      [] -> (min,max)
-    | [x] -> if n < x then (min,x) else (x,max)
-    | x1::x2::rest ->
-       if n < x1
-       then (min,x1)
-       else if n > x1 && n < x2 then (x1,x2) else loop (x2::rest) in
-  loop !plus_lines
-
-let collect_plus_lines top =
-  plus_lines := [];
-  let bind x y = () in
-  let option_default = () in
-  let donothing r k e = k e in
-  let mcode (_,_,info,mcodekind,_) =
-    match mcodekind with
-      Ast0.PLUS -> insert info.Ast0.line_start
-    | _ -> () in
-  let fn =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing donothing
-      donothing donothing in
-  fn.V0.combiner_top_level top
-
-(* --------------------------------------------------------------------- *)
-
-type kind = Neutral | AllMarked | NotAllMarked (* marked means + or - *)
-
-(* --------------------------------------------------------------------- *)
-(* The first part analyzes each of the minus tree and the plus tree
-separately *)
-
-(* ints are unique token indices (offset field) *)
-type node =
-    Token (* tokens *) of kind * int (* unique index *) * Ast0.mcodekind *
-       int list (* context tokens *)
-  | Recursor (* children *) of kind *
-       int list (* indices of all tokens at the level below *) *
-       Ast0.mcodekind list (* tokens at the level below *) *
-       int list
-  | Bind (* neighbors *) of kind *
-       int list (* indices of all tokens at current level *) *
-       Ast0.mcodekind list (* tokens at current level *) *
-       int list (* indices of all tokens at the level below *) *
-       Ast0.mcodekind list (* tokens at the level below *)
-       * int list list
-
-let kind2c = function
-    Neutral -> "neutral"
-  | AllMarked -> "allmarked"
-  | NotAllMarked -> "notallmarked"
-
-let node2c = function
-    Token(k,_,_,_) -> Printf.sprintf "token %s\n" (kind2c k)
-  | Recursor(k,_,_,_) -> Printf.sprintf "recursor %s\n" (kind2c k)
-  | Bind(k,_,_,_,_,_) -> Printf.sprintf "bind %s\n" (kind2c k)
-
-(* goal: detect negative in both tokens and recursors, or context only in
-tokens *)
-let bind c1 c2 =
-  let lub = function
-      (k1,k2) when k1 = k2 -> k1
-    | (Neutral,AllMarked) -> AllMarked
-    | (AllMarked,Neutral) -> AllMarked
-    | _ -> NotAllMarked in
-  match (c1,c2) with
-    (* token/token *)
-    (* there are tokens at this level, so ignore the level below *)
-    (Token(k1,i1,t1,l1),Token(k2,i2,t2,l2)) ->
-      Bind(lub(k1,k2),[i1;i2],[t1;t2],[],[],[l1;l2])
-
-    (* token/recursor *)
-    (* there are tokens at this level, so ignore the level below *)
-  | (Token(k1,i1,t1,l1),Recursor(k2,_,_,l2)) ->
-      Bind(lub(k1,k2),[i1],[t1],[],[],[l1;l2])
-  | (Recursor(k1,_,_,l1),Token(k2,i2,t2,l2)) ->
-      Bind(lub(k1,k2),[i2],[t2],[],[],[l1;l2])
-
-    (* token/bind *)
-    (* there are tokens at this level, so ignore the level below *)
-  | (Token(k1,i1,t1,l1),Bind(k2,i2,t2,_,_,l2)) ->
-      Bind(lub(k1,k2),i1::i2,t1::t2,[],[],l1::l2)
-  | (Bind(k1,i1,t1,_,_,l1),Token(k2,i2,t2,l2)) ->
-      Bind(lub(k1,k2),i1@[i2],t1@[t2],[],[],l1@[l2])
-
-    (* recursor/bind *)
-  | (Recursor(k1,bi1,bt1,l1),Bind(k2,i2,t2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),i2,t2,bi1@bi2,bt1@bt2,l1::l2)
-  | (Bind(k1,i1,t1,bi1,bt1,l1),Recursor(k2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),i1,t1,bi1@bi2,bt1@bt2,l1@[l2])
-
-    (* recursor/recursor and bind/bind - not likely to ever occur *)
-  | (Recursor(k1,bi1,bt1,l1),Recursor(k2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),[],[],bi1@bi2,bt1@bt2,[l1;l2])
-  | (Bind(k1,i1,t1,bi1,bt1,l1),Bind(k2,i2,t2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),i1@i2,t1@t2,bi1@bi2,bt1@bt2,l1@l2)
-
-
-let option_default = (*Bind(Neutral,[],[],[],[],[])*)
-  Recursor(Neutral,[],[],[])
-
-let mcode (_,_,info,mcodekind,pos) =
-  let offset = info.Ast0.offset in
-  match mcodekind with
-    Ast0.MINUS(_) -> Token(AllMarked,offset,mcodekind,[])
-  | Ast0.PLUS -> Token(AllMarked,offset,mcodekind,[])
-  | Ast0.CONTEXT(_) -> Token(NotAllMarked,offset,mcodekind,[offset])
-  | _ -> failwith "not possible"
-
-let neutral_mcode (_,_,info,mcodekind,pos) =
-  let offset = info.Ast0.offset in
-  match mcodekind with
-    Ast0.MINUS(_) -> Token(Neutral,offset,mcodekind,[])
-  | Ast0.PLUS -> Token(Neutral,offset,mcodekind,[])
-  | Ast0.CONTEXT(_) -> Token(Neutral,offset,mcodekind,[offset])
-  | _ -> failwith "not possible"
-
-let is_context = function Ast0.CONTEXT(_) -> true | _ -> false
-
-let union_all l = List.fold_left Common.union_set [] l
-
-(* is minus is true when we are processing minus code that might be
-intermingled with plus code.  it is used in disj_cases *)
-let classify is_minus all_marked table code =
-  let mkres builder k il tl bil btl l e =
-    (if k = AllMarked
-    then Ast0.set_mcodekind e (all_marked()) (* definitive *)
-    else
-      let check_index il tl =
-       if List.for_all is_context tl
-       then
-         (let e1 = builder e in
-         let index = (get_index e1)@il in
-         try
-           let _ = Hashtbl.find table index in
-           failwith
-             (Printf.sprintf "%d: index %s already used\n"
-                (Ast0.get_info e).Ast0.line_start
-                (String.concat " " (List.map string_of_int index)))
-         with Not_found -> Hashtbl.add table index (e1,l)) in
-      if il = [] then check_index bil btl else check_index il tl);
-    if il = []
-    then Recursor(k, bil, btl, union_all l)
-    else Recursor(k, il, tl, union_all l) in
-
-  let compute_result builder e = function
-      Bind(k,il,tl,bil,btl,l) -> mkres builder k il tl bil btl l e
-    | Token(k,il,tl,l) -> mkres builder k [il] [tl] [] [] [l] e
-    | Recursor(k,bil,btl,l) -> mkres builder k [] [] bil btl [l] e in
-
-  let make_not_marked = function
-      Bind(k,il,tl,bil,btl,l) -> Bind(NotAllMarked,il,tl,bil,btl,l)
-    | Token(k,il,tl,l) -> Token(NotAllMarked,il,tl,l)
-    | Recursor(k,bil,btl,l) -> Recursor(NotAllMarked,bil,btl,l) in
-
-  let do_nothing builder r k e = compute_result builder e (k e) in
-
-  let disj_cases disj starter code fn ender =
-    (* neutral_mcode used so starter and ender don't have an affect on
-       whether the code is considered all plus/minus, but so that they are
-       consider in the index list, which is needed to make a disj with
-       something in one branch and nothing in the other different from code
-       that just has the something (starter/ender enough, mids not needed
-       for this).  Cannot agglomerate + code over | boundaries, because two -
-       cases might have different + code, and don't want to put the + code
-       together into one unit. *)
-    let make_not_marked =
-      if is_minus
-      then
-       (let min = Ast0.get_line disj in
-       let max = Ast0.get_line_end disj in
-       let (plus_min,plus_max) = find min (min-1) (max+1) in
-       if max > plus_max then make_not_marked else (function x -> x))
-      else make_not_marked in
-    bind (neutral_mcode starter)
-      (bind (List.fold_right bind
-              (List.map make_not_marked (List.map fn code))
-              option_default)
-        (neutral_mcode ender)) in
-
-  (* no whencode in plus tree so have to drop it *)
-  (* need special cases for dots, nests, and disjs *)
-  let expression r k e =
-    compute_result Ast0.expr e
-      (match Ast0.unwrap e with
-       Ast0.NestExpr(starter,exp,ender,whencode,multi) ->
-         k (Ast0.rewrap e (Ast0.NestExpr(starter,exp,ender,None,multi)))
-      | Ast0.Edots(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Edots(dots,None)))
-      | Ast0.Ecircles(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Ecircles(dots,None)))
-      | Ast0.Estars(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Estars(dots,None)))
-      | Ast0.DisjExpr(starter,expr_list,_,ender) -> 
-         disj_cases e starter expr_list r.V0.combiner_expression ender
-      |        _ -> k e) in
-
-  (* not clear why we have the next two cases, since DisjDecl and
-  DisjType shouldn't have been constructed yet, as they only come from isos *)
-  let declaration r k e =
-    compute_result Ast0.decl e
-      (match Ast0.unwrap e with
-       Ast0.DisjDecl(starter,decls,_,ender) ->
-         disj_cases e starter decls r.V0.combiner_declaration ender
-      | Ast0.Ddots(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Ddots(dots,None)))
-       (* Need special cases for the following so that the type will be
-          considered as a unit, rather than distributed around the
-          declared variable.  This needs to be done because of the call to
-          compute_result, ie the processing of each term should make a
-          side-effect on the complete term structure as well as collecting
-          some information about it.  So we have to visit each complete
-          term structure.  In (all?) other such cases, we visit the terms
-          using rebuilder, which just visits the subterms, rather than
-          reordering their components. *)
-      |        Ast0.Init(stg,ty,id,eq,ini,sem) ->
-         bind (match stg with Some stg -> mcode stg | _ -> option_default)
-           (bind (r.V0.combiner_typeC ty)
-              (bind (r.V0.combiner_ident id)
-                 (bind (mcode eq)
-                    (bind (r.V0.combiner_initialiser ini) (mcode sem)))))
-      | Ast0.UnInit(stg,ty,id,sem) ->
-         bind (match stg with Some stg -> mcode stg | _ -> option_default)
-           (bind (r.V0.combiner_typeC ty)
-              (bind (r.V0.combiner_ident id) (mcode sem)))
-      |        _ -> k e) in
-
-  let param r k e =
-    compute_result Ast0.param e
-      (match Ast0.unwrap e with
-       Ast0.Param(ty,Some id) ->
-         (* needed for the same reason as in the Init and UnInit cases *)
-         bind (r.V0.combiner_typeC ty) (r.V0.combiner_ident id)
-      |        _ -> k e) in
-
-  let typeC r k e =
-    compute_result Ast0.typeC e
-      (match Ast0.unwrap e with
-       Ast0.DisjType(starter,types,_,ender) ->
-         disj_cases e starter types r.V0.combiner_typeC ender
-      |        _ -> k e) in
-
-  let initialiser r k i =
-    compute_result Ast0.ini i
-      (match Ast0.unwrap i with
-       Ast0.Idots(dots,whencode) ->
-         k (Ast0.rewrap i (Ast0.Idots(dots,None)))
-      |        _ -> k i) in
-
-  let statement r k s =
-    compute_result Ast0.stmt s
-      (match Ast0.unwrap s with
-       Ast0.Nest(started,stm_dots,ender,whencode,multi) ->
-         k (Ast0.rewrap s (Ast0.Nest(started,stm_dots,ender,[],multi)))
-      | Ast0.Dots(dots,whencode) ->
-         k (Ast0.rewrap s (Ast0.Dots(dots,[])))
-      | Ast0.Circles(dots,whencode) ->
-         k (Ast0.rewrap s (Ast0.Circles(dots,[])))
-      | Ast0.Stars(dots,whencode) ->
-         k (Ast0.rewrap s (Ast0.Stars(dots,[])))
-      | Ast0.Disj(starter,statement_dots_list,_,ender) ->
-         disj_cases s starter statement_dots_list r.V0.combiner_statement_dots
-           ender
-(*  Why? There is nothing there
-       (* cases for everything with extra mcode *)
-      |        Ast0.FunDecl((info,bef),_,_,_,_,_,_,_,_)
-      | Ast0.Decl((info,bef),_) ->
-         bind (mcode ((),(),info,bef)) (k s)
-      | Ast0.IfThen(_,_,_,_,_,(info,aft))
-      | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft))
-      | Ast0.While(_,_,_,_,_,(info,aft)) ->
-      | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft)) ->
-         bind (k s) (mcode ((),(),info,aft))
-      | Ast0.Iterator(_,_,_,_,_,(info,aft))
-*)
-      |        _ -> k s
-
-) in
-
-  let do_top builder r k e = compute_result builder e (k e) in
-
-  let combiner = 
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      (do_nothing Ast0.dotsExpr) (do_nothing Ast0.dotsInit)
-      (do_nothing Ast0.dotsParam) (do_nothing Ast0.dotsStmt)
-      (do_nothing Ast0.dotsDecl) (do_nothing Ast0.dotsCase)
-      (do_nothing Ast0.ident) expression typeC initialiser param declaration
-      statement (do_nothing Ast0.case_line) (do_top Ast0.top) in
-  combiner.V0.combiner_top_level code
-
-(* --------------------------------------------------------------------- *)
-(* Traverse the hash tables and find corresponding context nodes that have
-the same context children *)
-
-(* this is just a sanity check - really only need to look at the top-level
-   structure *)
-let equal_mcode (_,_,info1,_,_) (_,_,info2,_,_) =
-  info1.Ast0.offset = info2.Ast0.offset
-
-let equal_option e1 e2 =
-  match (e1,e2) with
-    (Some x, Some y) -> equal_mcode x y
-  | (None, None) -> true
-  | _ -> false
-
-let dots fn d1 d2 =
-  match (Ast0.unwrap d1,Ast0.unwrap d2) with
-    (Ast0.DOTS(l1),Ast0.DOTS(l2)) -> List.length l1 = List.length l2
-  | (Ast0.CIRCLES(l1),Ast0.CIRCLES(l2)) -> List.length l1 = List.length l2
-  | (Ast0.STARS(l1),Ast0.STARS(l2)) -> List.length l1 = List.length l2
-  | _ -> false
-
-let rec equal_ident i1 i2 =
-  match (Ast0.unwrap i1,Ast0.unwrap i2) with
-    (Ast0.Id(name1),Ast0.Id(name2)) -> equal_mcode name1 name2
-  | (Ast0.MetaId(name1,_,_),Ast0.MetaId(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.MetaFunc(name1,_,_),Ast0.MetaFunc(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.MetaLocalFunc(name1,_,_),Ast0.MetaLocalFunc(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.OptIdent(_),Ast0.OptIdent(_)) -> true
-  | (Ast0.UniqueIdent(_),Ast0.UniqueIdent(_)) -> true
-  | _ -> false
-
-let rec equal_expression e1 e2 =
-  match (Ast0.unwrap e1,Ast0.unwrap e2) with
-    (Ast0.Ident(_),Ast0.Ident(_)) -> true
-  | (Ast0.Constant(const1),Ast0.Constant(const2)) -> equal_mcode const1 const2
-  | (Ast0.FunCall(_,lp1,_,rp1),Ast0.FunCall(_,lp2,_,rp2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.Assignment(_,op1,_,_),Ast0.Assignment(_,op2,_,_)) ->
-      equal_mcode op1 op2
-  | (Ast0.CondExpr(_,why1,_,colon1,_),Ast0.CondExpr(_,why2,_,colon2,_)) ->
-      equal_mcode why1 why2 && equal_mcode colon1 colon2
-  | (Ast0.Postfix(_,op1),Ast0.Postfix(_,op2)) -> equal_mcode op1 op2
-  | (Ast0.Infix(_,op1),Ast0.Infix(_,op2)) -> equal_mcode op1 op2
-  | (Ast0.Unary(_,op1),Ast0.Unary(_,op2)) -> equal_mcode op1 op2
-  | (Ast0.Binary(_,op1,_),Ast0.Binary(_,op2,_)) -> equal_mcode op1 op2
-  | (Ast0.Paren(lp1,_,rp1),Ast0.Paren(lp2,_,rp2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.ArrayAccess(_,lb1,_,rb1),Ast0.ArrayAccess(_,lb2,_,rb2)) ->
-      equal_mcode lb1 lb2 && equal_mcode rb1 rb2
-  | (Ast0.RecordAccess(_,pt1,_),Ast0.RecordAccess(_,pt2,_)) ->
-      equal_mcode pt1 pt2
-  | (Ast0.RecordPtAccess(_,ar1,_),Ast0.RecordPtAccess(_,ar2,_)) ->
-      equal_mcode ar1 ar2
-  | (Ast0.Cast(lp1,_,rp1,_),Ast0.Cast(lp2,_,rp2,_)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.SizeOfExpr(szf1,_),Ast0.SizeOfExpr(szf2,_)) ->
-      equal_mcode szf1 szf2
-  | (Ast0.SizeOfType(szf1,lp1,_,rp1),Ast0.SizeOfType(szf2,lp2,_,rp2)) ->
-      equal_mcode szf1 szf2 && equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.TypeExp(_),Ast0.TypeExp(_)) -> true
-  | (Ast0.MetaErr(name1,_,_),Ast0.MetaErr(name2,_,_))
-  | (Ast0.MetaExpr(name1,_,_,_,_),Ast0.MetaExpr(name2,_,_,_,_))
-  | (Ast0.MetaExprList(name1,_,_),Ast0.MetaExprList(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.EComma(cm1),Ast0.EComma(cm2)) -> equal_mcode cm1 cm2
-  | (Ast0.DisjExpr(starter1,_,mids1,ender1),
-     Ast0.DisjExpr(starter2,_,mids2,ender2)) ->
-       equal_mcode starter1 starter2 && 
-       List.for_all2 equal_mcode mids1 mids2 &&
-       equal_mcode ender1 ender2
-  | (Ast0.NestExpr(starter1,_,ender1,_,m1),
-     Ast0.NestExpr(starter2,_,ender2,_,m2)) ->
-      equal_mcode starter1 starter2 && equal_mcode ender1 ender2 && m1 = m2
-  | (Ast0.Edots(dots1,_),Ast0.Edots(dots2,_))
-  | (Ast0.Ecircles(dots1,_),Ast0.Ecircles(dots2,_))
-  | (Ast0.Estars(dots1,_),Ast0.Estars(dots2,_)) -> equal_mcode dots1 dots2
-  | (Ast0.OptExp(_),Ast0.OptExp(_)) -> true
-  | (Ast0.UniqueExp(_),Ast0.UniqueExp(_)) -> true
-  | _ -> false
-
-let rec equal_typeC t1 t2 =
-  match (Ast0.unwrap t1,Ast0.unwrap t2) with
-    (Ast0.ConstVol(cv1,_),Ast0.ConstVol(cv2,_)) -> equal_mcode cv1 cv2
-  | (Ast0.BaseType(ty1,sign1),Ast0.BaseType(ty2,sign2)) ->
-      equal_mcode ty1 ty2 && equal_option sign1 sign2
-  | (Ast0.ImplicitInt(sign1),Ast0.ImplicitInt(sign2)) ->
-      equal_mcode sign1 sign2
-  | (Ast0.Pointer(_,star1),Ast0.Pointer(_,star2)) ->
-      equal_mcode star1 star2
-  | (Ast0.Array(_,lb1,_,rb1),Ast0.Array(_,lb2,_,rb2)) ->
-      equal_mcode lb1 lb2 && equal_mcode rb1 rb2
-  | (Ast0.StructUnionName(kind1,_),Ast0.StructUnionName(kind2,_)) ->
-      equal_mcode kind1 kind2
-  | (Ast0.FunctionType(ty1,lp1,p1,rp1),Ast0.FunctionType(ty2,lp2,p2,rp2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.StructUnionDef(_,lb1,_,rb1),
-     Ast0.StructUnionDef(_,lb2,_,rb2)) ->
-       equal_mcode lb1 lb2 && equal_mcode rb1 rb2
-  | (Ast0.TypeName(name1),Ast0.TypeName(name2)) -> equal_mcode name1 name2
-  | (Ast0.MetaType(name1,_),Ast0.MetaType(name2,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.DisjType(starter1,_,mids1,ender1),
-     Ast0.DisjType(starter2,_,mids2,ender2)) ->
-       equal_mcode starter1 starter2 && 
-       List.for_all2 equal_mcode mids1 mids2 &&
-       equal_mcode ender1 ender2
-  | (Ast0.OptType(_),Ast0.OptType(_)) -> true
-  | (Ast0.UniqueType(_),Ast0.UniqueType(_)) -> true
-  | _ -> false
-
-let equal_declaration d1 d2 =
-  match (Ast0.unwrap d1,Ast0.unwrap d2) with
-    (Ast0.Init(stg1,_,_,eq1,_,sem1),Ast0.Init(stg2,_,_,eq2,_,sem2)) ->
-      equal_option stg1 stg2 && equal_mcode eq1 eq2 && equal_mcode sem1 sem2
-  | (Ast0.UnInit(stg1,_,_,sem1),Ast0.UnInit(stg2,_,_,sem2)) ->
-      equal_option stg1 stg2 && equal_mcode sem1 sem2
-  | (Ast0.MacroDecl(nm1,lp1,_,rp1,sem1),Ast0.MacroDecl(nm2,lp2,_,rp2,sem2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2 && equal_mcode sem1 sem2
-  | (Ast0.TyDecl(_,sem1),Ast0.TyDecl(_,sem2)) -> equal_mcode sem1 sem2
-  | (Ast0.Ddots(dots1,_),Ast0.Ddots(dots2,_)) -> equal_mcode dots1 dots2
-  | (Ast0.OptDecl(_),Ast0.OptDecl(_)) -> true
-  | (Ast0.UniqueDecl(_),Ast0.UniqueDecl(_)) -> true
-  | (Ast0.DisjDecl _,_) | (_,Ast0.DisjDecl _) ->
-      failwith "DisjDecl not expected here"
-  | _ -> false
-
-let equal_initialiser i1 i2 =
-  match (Ast0.unwrap i1,Ast0.unwrap i2) with
-    (Ast0.InitExpr(_),Ast0.InitExpr(_)) -> true
-  | (Ast0.InitList(lb1,_,rb1),Ast0.InitList(lb2,_,rb2)) ->
-      (equal_mcode lb1 lb2) && (equal_mcode rb1 rb2)
-  | (Ast0.InitGccDotName(dot1,_,eq1,_),Ast0.InitGccDotName(dot2,_,eq2,_)) ->
-      (equal_mcode dot1 dot2) && (equal_mcode eq1 eq2)
-  | (Ast0.InitGccName(_,eq1,_),Ast0.InitGccName(_,eq2,_)) ->
-      equal_mcode eq1 eq2
-  | (Ast0.InitGccIndex(lb1,_,rb1,eq1,_),Ast0.InitGccIndex(lb2,_,rb2,eq2,_)) ->
-      (equal_mcode lb1 lb2) && (equal_mcode rb1 rb2) && (equal_mcode eq1 eq2)
-  | (Ast0.InitGccRange(lb1,_,dots1,_,rb1,eq1,_),
-     Ast0.InitGccRange(lb2,_,dots2,_,rb2,eq2,_)) ->
-      (equal_mcode lb1 lb2) && (equal_mcode dots1 dots2) &&
-       (equal_mcode rb1 rb2) && (equal_mcode eq1 eq2)
- | (Ast0.IComma(cm1),Ast0.IComma(cm2)) -> equal_mcode cm1 cm2
-  | (Ast0.Idots(d1,_),Ast0.Idots(d2,_)) -> equal_mcode d1 d2
-  | (Ast0.OptIni(_),Ast0.OptIni(_)) -> true
-  | (Ast0.UniqueIni(_),Ast0.UniqueIni(_)) -> true
-  | _ -> false
-       
-let equal_parameterTypeDef p1 p2 =
-  match (Ast0.unwrap p1,Ast0.unwrap p2) with
-    (Ast0.VoidParam(_),Ast0.VoidParam(_)) -> true
-  | (Ast0.Param(_,_),Ast0.Param(_,_)) -> true
-  | (Ast0.MetaParam(name1,_),Ast0.MetaParam(name2,_))
-  | (Ast0.MetaParamList(name1,_,_),Ast0.MetaParamList(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.PComma(cm1),Ast0.PComma(cm2)) -> equal_mcode cm1 cm2
-  | (Ast0.Pdots(dots1),Ast0.Pdots(dots2))
-  | (Ast0.Pcircles(dots1),Ast0.Pcircles(dots2)) -> equal_mcode dots1 dots2
-  | (Ast0.OptParam(_),Ast0.OptParam(_)) -> true
-  | (Ast0.UniqueParam(_),Ast0.UniqueParam(_)) -> true
-  | _ -> false
-
-let rec equal_statement s1 s2 =
-  match (Ast0.unwrap s1,Ast0.unwrap s2) with
-    (Ast0.FunDecl(_,fninfo1,_,lp1,_,rp1,lbrace1,_,rbrace1),
-     Ast0.FunDecl(_,fninfo2,_,lp2,_,rp2,lbrace2,_,rbrace2)) ->
-       (List.length fninfo1) = (List.length fninfo2) &&
-       List.for_all2 equal_fninfo fninfo1 fninfo2 &&
-       equal_mcode lp1 lp2 && equal_mcode rp1 rp2 &&
-       equal_mcode lbrace1 lbrace2 && equal_mcode rbrace1 rbrace2
-  | (Ast0.Decl(_,_),Ast0.Decl(_,_)) -> true
-  | (Ast0.Seq(lbrace1,_,rbrace1),Ast0.Seq(lbrace2,_,rbrace2)) ->
-      equal_mcode lbrace1 lbrace2 && equal_mcode rbrace1 rbrace2
-  | (Ast0.ExprStatement(_,sem1),Ast0.ExprStatement(_,sem2)) ->
-      equal_mcode sem1 sem2
-  | (Ast0.IfThen(iff1,lp1,_,rp1,_,_),Ast0.IfThen(iff2,lp2,_,rp2,_,_)) ->
-      equal_mcode iff1 iff2 && equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.IfThenElse(iff1,lp1,_,rp1,_,els1,_,_),
-     Ast0.IfThenElse(iff2,lp2,_,rp2,_,els2,_,_)) ->
-       equal_mcode iff1 iff2 &&
-        equal_mcode lp1 lp2 && equal_mcode rp1 rp2 && equal_mcode els1 els2
-  | (Ast0.While(whl1,lp1,_,rp1,_,_),Ast0.While(whl2,lp2,_,rp2,_,_)) ->
-      equal_mcode whl1 whl2 && equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.Do(d1,_,whl1,lp1,_,rp1,sem1),Ast0.Do(d2,_,whl2,lp2,_,rp2,sem2)) ->
-      equal_mcode whl1 whl2 && equal_mcode d1 d2 &&
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2 && equal_mcode sem1 sem2
-  | (Ast0.For(fr1,lp1,_,sem11,_,sem21,_,rp1,_,_),
-     Ast0.For(fr2,lp2,_,sem12,_,sem22,_,rp2,_,_)) ->
-       equal_mcode fr1 fr2 && equal_mcode lp1 lp2 &&
-       equal_mcode sem11 sem12 && equal_mcode sem21 sem22 &&
-       equal_mcode rp1 rp2
-  | (Ast0.Iterator(nm1,lp1,_,rp1,_,_),Ast0.Iterator(nm2,lp2,_,rp2,_,_)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.Switch(switch1,lp1,_,rp1,lb1,case1,rb1),
-     Ast0.Switch(switch2,lp2,_,rp2,lb2,case2,rb2)) ->
-       equal_mcode switch1 switch2 && equal_mcode lp1 lp2 &&
-       equal_mcode rp1 rp2 && equal_mcode lb1 lb2 &&
-       equal_mcode rb1 rb2
-  | (Ast0.Break(br1,sem1),Ast0.Break(br2,sem2)) ->
-      equal_mcode br1 br2 && equal_mcode sem1 sem2
-  | (Ast0.Continue(cont1,sem1),Ast0.Continue(cont2,sem2)) ->
-      equal_mcode cont1 cont2 && equal_mcode sem1 sem2
-  | (Ast0.Label(_,dd1),Ast0.Label(_,dd2)) ->
-      equal_mcode dd1 dd2
-  | (Ast0.Goto(g1,_,sem1),Ast0.Goto(g2,_,sem2)) ->
-      equal_mcode g1 g2 && equal_mcode sem1 sem2
-  | (Ast0.Return(ret1,sem1),Ast0.Return(ret2,sem2)) ->
-      equal_mcode ret1 ret2 && equal_mcode sem1 sem2
-  | (Ast0.ReturnExpr(ret1,_,sem1),Ast0.ReturnExpr(ret2,_,sem2)) ->
-      equal_mcode ret1 ret2 && equal_mcode sem1 sem2
-  | (Ast0.MetaStmt(name1,_),Ast0.MetaStmt(name2,_))
-  | (Ast0.MetaStmtList(name1,_),Ast0.MetaStmtList(name2,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.Disj(starter1,_,mids1,ender1),Ast0.Disj(starter2,_,mids2,ender2)) ->
-      equal_mcode starter1 starter2 && 
-      List.for_all2 equal_mcode mids1 mids2 &&
-      equal_mcode ender1 ender2
-  | (Ast0.Nest(starter1,_,ender1,_,m1),Ast0.Nest(starter2,_,ender2,_,m2)) ->
-      equal_mcode starter1 starter2 && equal_mcode ender1 ender2 && m1 = m2
-  | (Ast0.Exp(_),Ast0.Exp(_)) -> true
-  | (Ast0.TopExp(_),Ast0.TopExp(_)) -> true
-  | (Ast0.Ty(_),Ast0.Ty(_)) -> true
-  | (Ast0.Dots(d1,_),Ast0.Dots(d2,_))
-  | (Ast0.Circles(d1,_),Ast0.Circles(d2,_))
-  | (Ast0.Stars(d1,_),Ast0.Stars(d2,_)) -> equal_mcode d1 d2
-  | (Ast0.Include(inc1,name1),Ast0.Include(inc2,name2)) ->
-      equal_mcode inc1 inc2 && equal_mcode name1 name2
-  | (Ast0.Define(def1,_,_,_),Ast0.Define(def2,_,_,_)) ->
-      equal_mcode def1 def2
-  | (Ast0.OptStm(_),Ast0.OptStm(_)) -> true
-  | (Ast0.UniqueStm(_),Ast0.UniqueStm(_)) -> true
-  | _ -> false
-
-and equal_fninfo x y =
-  match (x,y) with
-    (Ast0.FStorage(s1),Ast0.FStorage(s2)) -> equal_mcode s1 s2
-  | (Ast0.FType(_),Ast0.FType(_)) -> true
-  | (Ast0.FInline(i1),Ast0.FInline(i2)) -> equal_mcode i1 i2
-  | (Ast0.FAttr(i1),Ast0.FAttr(i2)) -> equal_mcode i1 i2
-  | _ -> false
-
-let equal_case_line c1 c2 =
-  match (Ast0.unwrap c1,Ast0.unwrap c2) with
-    (Ast0.Default(def1,colon1,_),Ast0.Default(def2,colon2,_)) ->
-      equal_mcode def1 def2 && equal_mcode colon1 colon2
-  | (Ast0.Case(case1,_,colon1,_),Ast0.Case(case2,_,colon2,_)) ->
-      equal_mcode case1 case2 && equal_mcode colon1 colon2
-  | (Ast0.OptCase(_),Ast0.OptCase(_)) -> true
-  | _ -> false
-
-let rec equal_top_level t1 t2 =
-  match (Ast0.unwrap t1,Ast0.unwrap t2) with
-    (Ast0.DECL(_),Ast0.DECL(_)) -> true
-  | (Ast0.FILEINFO(old_file1,new_file1),Ast0.FILEINFO(old_file2,new_file2)) ->
-      equal_mcode old_file1 old_file2 && equal_mcode new_file1 new_file2
-  | (Ast0.CODE(_),Ast0.CODE(_)) -> true
-  | (Ast0.ERRORWORDS(_),Ast0.ERRORWORDS(_)) -> true
-  | _ -> false
-
-let root_equal e1 e2 =
-  match (e1,e2) with
-    (Ast0.DotsExprTag(d1),Ast0.DotsExprTag(d2)) -> dots equal_expression d1 d2
-  | (Ast0.DotsParamTag(d1),Ast0.DotsParamTag(d2)) ->
-      dots equal_parameterTypeDef d1 d2
-  | (Ast0.DotsStmtTag(d1),Ast0.DotsStmtTag(d2)) -> dots equal_statement d1 d2
-  | (Ast0.DotsDeclTag(d1),Ast0.DotsDeclTag(d2)) -> dots equal_declaration d1 d2
-  | (Ast0.DotsCaseTag(d1),Ast0.DotsCaseTag(d2)) -> dots equal_case_line d1 d2
-  | (Ast0.IdentTag(i1),Ast0.IdentTag(i2)) -> equal_ident i1 i2
-  | (Ast0.ExprTag(e1),Ast0.ExprTag(e2)) -> equal_expression e1 e2
-  | (Ast0.ArgExprTag(d),_) -> failwith "not possible - iso only"
-  | (Ast0.TypeCTag(t1),Ast0.TypeCTag(t2)) -> equal_typeC t1 t2
-  | (Ast0.ParamTag(p1),Ast0.ParamTag(p2)) -> equal_parameterTypeDef p1 p2
-  | (Ast0.InitTag(d1),Ast0.InitTag(d2)) -> equal_initialiser d1 d2
-  | (Ast0.DeclTag(d1),Ast0.DeclTag(d2)) -> equal_declaration d1 d2
-  | (Ast0.StmtTag(s1),Ast0.StmtTag(s2)) -> equal_statement s1 s2
-  | (Ast0.TopTag(t1),Ast0.TopTag(t2)) -> equal_top_level t1 t2
-  | (Ast0.IsoWhenTag(_),_) | (_,Ast0.IsoWhenTag(_))
-  | (Ast0.IsoWhenTTag(_),_) | (_,Ast0.IsoWhenTTag(_))
-  | (Ast0.IsoWhenFTag(_),_) | (_,Ast0.IsoWhenFTag(_)) ->
-      failwith "only within iso phase"
-  | _ -> false
-
-let default_context _ =
-  Ast0.CONTEXT(ref(Ast.NOTHING,
-                  Ast0.default_token_info,Ast0.default_token_info))
-
-let traverse minus_table plus_table =
-  Hashtbl.iter
-    (function key ->
-      function (e,l) ->
-       try
-         let (plus_e,plus_l) = Hashtbl.find plus_table key in
-         if root_equal e plus_e &&
-           List.for_all (function x -> x)
-             (List.map2 Common.equal_set l plus_l)
-         then
-           let i = Ast0.fresh_index() in
-           (set_index e i; set_index plus_e i;
-            set_mcodekind e (default_context());
-            set_mcodekind plus_e (default_context()))
-       with Not_found -> ())
-    minus_table
-
-(* --------------------------------------------------------------------- *)
-(* contextify the whencode *)
-
-let contextify_all =
-  let bind x y = () in
-  let option_default = () in
-  let mcode x = () in
-  let do_nothing r k e = Ast0.set_mcodekind e (default_context()); k e in
-
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-    do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-    do_nothing do_nothing do_nothing
-
-let contextify_whencode =
-  let bind x y = () in
-  let option_default = () in
-  let mcode x = () in
-  let do_nothing r k e = k e in
-
-  let expression r k e =
-    k e;
-    match Ast0.unwrap e with
-      Ast0.NestExpr(_,_,_,Some whencode,_)
-    | Ast0.Edots(_,Some whencode)
-    | Ast0.Ecircles(_,Some whencode)
-    | Ast0.Estars(_,Some whencode) ->
-       contextify_all.V0.combiner_expression whencode
-    | _ -> () in
-
-  let initialiser r k i =
-    match Ast0.unwrap i with
-      Ast0.Idots(dots,Some whencode) ->
-       contextify_all.V0.combiner_initialiser whencode
-    | _ -> k i in
-
-  let whencode = function
-      Ast0.WhenNot sd -> contextify_all.V0.combiner_statement_dots sd
-    | Ast0.WhenAlways s -> contextify_all.V0.combiner_statement s
-    | Ast0.WhenModifier(_) -> ()
-    | Ast0.WhenNotTrue(e) -> contextify_all.V0.combiner_expression e
-    | Ast0.WhenNotFalse(e) -> contextify_all.V0.combiner_expression e in
-
-  let statement r k (s : Ast0.statement) =
-    k s;
-    match Ast0.unwrap s with
-      Ast0.Nest(_,_,_,whn,_)
-    | Ast0.Dots(_,whn) | Ast0.Circles(_,whn) | Ast0.Stars(_,whn) ->
-       List.iter whencode whn
-    | _ -> () in
-
-  let combiner = 
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-      do_nothing
-      expression
-      do_nothing initialiser do_nothing do_nothing statement do_nothing
-      do_nothing in
-  combiner.V0.combiner_top_level
-
-(* --------------------------------------------------------------------- *)
-
-(* the first int list is the tokens in the node, the second is the tokens
-in the descendents *)
-let minus_table =
-  (Hashtbl.create(50) : (int list, Ast0.anything * int list list) Hashtbl.t)
-let plus_table =
-  (Hashtbl.create(50) : (int list, Ast0.anything * int list list) Hashtbl.t)
-
-let iscode t =
-  match Ast0.unwrap t with
-    Ast0.DECL(_) -> true
-  | Ast0.FILEINFO(_) -> true
-  | Ast0.ERRORWORDS(_) -> false
-  | Ast0.CODE(_) -> true
-  | Ast0.OTHER(_) -> failwith "unexpected top level code"
-
-(* ------------------------------------------------------------------- *)
-(* alignment of minus and plus *)
-
-let concat = function
-    [] -> []
-  | [s] -> [s]
-  | l ->
-      let rec loop = function
-         [] -> []
-       | x::rest ->
-           (match Ast0.unwrap x with
-             Ast0.DECL(s) -> let stms = loop rest in s::stms
-           | Ast0.CODE(ss) ->
-               let stms = loop rest in
-               (match Ast0.unwrap ss with
-                 Ast0.DOTS(d) -> d@stms
-               | _ -> failwith "no dots allowed in pure plus code")
-           | _ -> failwith "plus code is being discarded") in
-      let res =
-       Compute_lines.statement_dots
-         (Ast0.rewrap (List.hd l) (Ast0.DOTS (loop l))) in
-      [Ast0.rewrap res (Ast0.CODE res)]
-
-let collect_up_to m plus =
-  let minfo = Ast0.get_info m in
-  let mend = minfo.Ast0.logical_end in
-  let rec loop = function
-      [] -> ([],[])
-    | p::plus -> 
-       let pinfo = Ast0.get_info p in
-       let pstart = pinfo.Ast0.logical_start in
-       if pstart > mend
-       then ([],p::plus)
-       else let (plus,rest) = loop plus in (p::plus,rest) in
-  let (plus,rest) = loop plus in
-  (concat plus,rest)
-
-let realign minus plus =
-  let rec loop = function
-      ([],_) -> failwith "not possible, some context required"
-    | ([m],p) -> ([m],concat p)
-    | (m::minus,plus) ->
-       let (p,plus) = collect_up_to m plus in
-       let (minus,plus) = loop (minus,plus) in
-       (m::minus,p@plus) in
-  loop (minus,plus)
-
-(* ------------------------------------------------------------------- *)
-(* check compatible: check that at the top level the minus and plus code is
-of the same kind.  Could go further and make the correspondence between the
-code between ...s. *)
-
-let isonly f l = match Ast0.undots l with [s] -> f s | _ -> false
-
-let isall f l = List.for_all (isonly f) l
-
-let rec is_exp s =
-  match Ast0.unwrap s with
-    Ast0.Exp(e) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_exp stmts
-  | _ -> false
-
-let rec is_ty s =
-  match Ast0.unwrap s with
-    Ast0.Ty(e) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_ty stmts
-  | _ -> false
-
-let rec is_decl s =
-  match Ast0.unwrap s with
-    Ast0.Decl(_,e) -> true
-  | Ast0.FunDecl(_,_,_,_,_,_,_,_,_) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_decl stmts
-  | _ -> false
-
-let rec is_fndecl s =
-  match Ast0.unwrap s with
-    Ast0.FunDecl(_,_,_,_,_,_,_,_,_) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_fndecl stmts
-  | _ -> false
-
-let rec is_toplevel s =
-  match Ast0.unwrap s with
-    Ast0.Decl(_,e) -> true
-  | Ast0.FunDecl(_,_,_,_,_,_,_,_,_) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_toplevel stmts
-  | Ast0.ExprStatement(fc,_) ->
-      (match Ast0.unwrap fc with
-       Ast0.FunCall(_,_,_,_) -> true
-      |        _ -> false)
-  | Ast0.Include(_,_) -> true
-  | Ast0.Define(_,_,_,_) -> true
-  | _ -> false
-
-let check_compatible m p =
-  let fail _ =
-    failwith
-      (Printf.sprintf
-        "incompatible minus and plus code starting on lines %d and %d"
-        (Ast0.get_line m) (Ast0.get_line p)) in
-  match (Ast0.unwrap m, Ast0.unwrap p) with
-    (Ast0.DECL(decl1),Ast0.DECL(decl2)) ->
-      if not (is_decl decl1 && is_decl decl2)
-      then fail()
-  | (Ast0.DECL(decl1),Ast0.CODE(code2)) ->
-      let v1 = is_decl decl1 in
-      let v2 = List.for_all is_toplevel (Ast0.undots code2) in
-      if !Flag.make_hrule = None && v1 && not v2 then fail()
-  | (Ast0.CODE(code1),Ast0.DECL(decl2)) ->
-      let v1 = List.for_all is_toplevel (Ast0.undots code1) in
-      let v2 = is_decl decl2 in
-      if v1 && not v2 then fail()
-  | (Ast0.CODE(code1),Ast0.CODE(code2)) ->
-      let testers = [is_exp;is_ty] in
-      List.iter
-       (function tester ->
-         let v1 = isonly tester code1 in
-         let v2 = isonly tester code2 in
-         if (v1 && not v2) or (!Flag.make_hrule = None && v2 && not v1)
-         then fail())
-       testers;
-      let v1 = isonly is_fndecl code1 in
-      let v2 = List.for_all is_toplevel (Ast0.undots code2) in
-      if !Flag.make_hrule = None && v1 && not v2 then fail()
-  | (Ast0.FILEINFO(_,_),Ast0.FILEINFO(_,_)) -> ()
-  | (Ast0.OTHER(_),Ast0.OTHER(_)) -> ()
-  | _ -> fail()
-
-(* ------------------------------------------------------------------- *)
-
-(* returns a list of corresponding minus and plus trees *)
-let context_neg minus plus =
-  Hashtbl.clear minus_table;
-  Hashtbl.clear plus_table;
-  List.iter contextify_whencode minus;
-  let (minus,plus) = realign minus plus in
-  let rec loop = function
-      ([],[]) -> []
-    | ([],l) ->
-       failwith (Printf.sprintf "%d plus things remaining" (List.length l))
-    | (minus,[]) ->
-       plus_lines := [];
-       let _ =
-         List.map
-           (function m ->
-             classify true
-               (function _ -> Ast0.MINUS(ref([],Ast0.default_token_info)))
-               minus_table m)
-           minus in
-       []
-    | (((m::minus) as mall),((p::plus) as pall)) ->
-       let minfo = Ast0.get_info m in
-       let pinfo = Ast0.get_info p in
-       let mstart = minfo.Ast0.logical_start in
-       let mend = minfo.Ast0.logical_end in
-       let pstart = pinfo.Ast0.logical_start in
-       let pend = pinfo.Ast0.logical_end in
-       if (iscode m or iscode p) &&
-         (mend + 1 = pstart or pend + 1 = mstart or (* adjacent *)
-          (mstart <= pstart && mend >= pstart) or
-          (pstart <= mstart && pend >= mstart)) (* overlapping or nested *)
-       then
-         begin
-           (* ensure that the root of each tree has a unique index,
-              although it might get overwritten if the node is a context
-              node *)
-           let i = Ast0.fresh_index() in
-           Ast0.set_index m i; Ast0.set_index p i;
-           check_compatible m p;
-           collect_plus_lines p;
-           let _ =
-             classify true
-               (function _ -> Ast0.MINUS(ref([],Ast0.default_token_info)))
-               minus_table m in
-           let _ = classify false (function _ -> Ast0.PLUS) plus_table p in
-           traverse minus_table plus_table;
-           (m,p)::loop(minus,plus)
-         end
-       else
-         if not(iscode m or iscode p)
-         then loop(minus,plus)
-         else
-           if mstart < pstart
-           then
-             begin
-               plus_lines := [];
-               let _ =
-                 classify true
-                   (function _ -> Ast0.MINUS(ref([],Ast0.default_token_info)))
-                   minus_table m in
-               loop(minus,pall)
-             end
-           else loop(mall,plus) in
-  loop(minus,plus)
diff --git a/parsing_cocci/.#context_neg.ml.1.97 b/parsing_cocci/.#context_neg.ml.1.97
deleted file mode 100644 (file)
index abc2054..0000000
+++ /dev/null
@@ -1,1003 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Detects subtrees that are all minus/plus and nodes that are "binding
-context nodes".  The latter is a node whose structure and immediate tokens
-are the same in the minus and plus trees, and such that for every child,
-the set of context nodes in the child subtree is the same in the minus and
-plus subtrees. *)
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-module U = Unparse_ast0
-
-(* --------------------------------------------------------------------- *)
-(* Generic access to code *)
-
-let set_mcodekind x mcodekind =
-  match x with
-    Ast0.DotsExprTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsInitTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsParamTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsStmtTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsDeclTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DotsCaseTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.IdentTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.ExprTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      failwith "not possible - iso only"
-  | Ast0.TypeCTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.ParamTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.DeclTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.InitTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.StmtTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.CaseLineTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.TopTag(d) -> Ast0.set_mcodekind d mcodekind
-  | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenTTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenFTag(_) -> failwith "only within iso phase"
-  | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-
-let set_index x index =
-  match x with
-    Ast0.DotsExprTag(d) -> Ast0.set_index d index
-  | Ast0.DotsInitTag(d) -> Ast0.set_index d index
-  | Ast0.DotsParamTag(d) -> Ast0.set_index d index
-  | Ast0.DotsStmtTag(d) -> Ast0.set_index d index
-  | Ast0.DotsDeclTag(d) -> Ast0.set_index d index
-  | Ast0.DotsCaseTag(d) -> Ast0.set_index d index
-  | Ast0.IdentTag(d) -> Ast0.set_index d index
-  | Ast0.ExprTag(d) -> Ast0.set_index d index
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      failwith "not possible - iso only"
-  | Ast0.TypeCTag(d) -> Ast0.set_index d index
-  | Ast0.ParamTag(d) -> Ast0.set_index d index
-  | Ast0.InitTag(d) -> Ast0.set_index d index
-  | Ast0.DeclTag(d) -> Ast0.set_index d index
-  | Ast0.StmtTag(d) -> Ast0.set_index d index
-  | Ast0.CaseLineTag(d) -> Ast0.set_index d index
-  | Ast0.TopTag(d) -> Ast0.set_index d index
-  | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenTTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenFTag(_) -> failwith "only within iso phase"
-  | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-
-let get_index = function
-    Ast0.DotsExprTag(d) -> Index.expression_dots d
-  | Ast0.DotsInitTag(d) -> Index.initialiser_dots d
-  | Ast0.DotsParamTag(d) -> Index.parameter_dots d
-  | Ast0.DotsStmtTag(d) -> Index.statement_dots d
-  | Ast0.DotsDeclTag(d) -> Index.declaration_dots d
-  | Ast0.DotsCaseTag(d) -> Index.case_line_dots d
-  | Ast0.IdentTag(d) -> Index.ident d
-  | Ast0.ExprTag(d) -> Index.expression d
-  | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      failwith "not possible - iso only"
-  | Ast0.TypeCTag(d) -> Index.typeC d
-  | Ast0.ParamTag(d) -> Index.parameterTypeDef d
-  | Ast0.InitTag(d) -> Index.initialiser d
-  | Ast0.DeclTag(d) -> Index.declaration d
-  | Ast0.StmtTag(d) -> Index.statement d
-  | Ast0.CaseLineTag(d) -> Index.case_line d
-  | Ast0.TopTag(d) -> Index.top_level d
-  | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenTTag(_) -> failwith "only within iso phase"
-  | Ast0.IsoWhenFTag(_) -> failwith "only within iso phase"
-  | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-
-(* --------------------------------------------------------------------- *)
-(* Collect the line numbers of the plus code.  This is used for disjunctions.
-It is not completely clear why this is necessary, but it seems like an easy
-fix for whatever is the problem that is discussed in disj_cases *)
-
-let plus_lines = ref ([] : int list)
-
-let insert n =
-  let rec loop = function
-      [] -> [n]
-    | x::xs ->
-       match compare n x with
-         1 -> x::(loop xs)
-       | 0 -> x::xs
-       | -1 -> n::x::xs
-       | _ -> failwith "not possible" in
-  plus_lines := loop !plus_lines
-
-let find n min max =
-  let rec loop = function
-      [] -> (min,max)
-    | [x] -> if n < x then (min,x) else (x,max)
-    | x1::x2::rest ->
-       if n < x1
-       then (min,x1)
-       else if n > x1 && n < x2 then (x1,x2) else loop (x2::rest) in
-  loop !plus_lines
-
-let collect_plus_lines top =
-  plus_lines := [];
-  let bind x y = () in
-  let option_default = () in
-  let donothing r k e = k e in
-  let mcode (_,_,info,mcodekind,_) =
-    match mcodekind with
-      Ast0.PLUS -> insert info.Ast0.line_start
-    | _ -> () in
-  let fn =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing donothing
-      donothing donothing in
-  fn.V0.combiner_top_level top
-
-(* --------------------------------------------------------------------- *)
-
-type kind = Neutral | AllMarked | NotAllMarked (* marked means + or - *)
-
-(* --------------------------------------------------------------------- *)
-(* The first part analyzes each of the minus tree and the plus tree
-separately *)
-
-(* ints are unique token indices (offset field) *)
-type node =
-    Token (* tokens *) of kind * int (* unique index *) * Ast0.mcodekind *
-       int list (* context tokens *)
-  | Recursor (* children *) of kind *
-       int list (* indices of all tokens at the level below *) *
-       Ast0.mcodekind list (* tokens at the level below *) *
-       int list
-  | Bind (* neighbors *) of kind *
-       int list (* indices of all tokens at current level *) *
-       Ast0.mcodekind list (* tokens at current level *) *
-       int list (* indices of all tokens at the level below *) *
-       Ast0.mcodekind list (* tokens at the level below *)
-       * int list list
-
-let kind2c = function
-    Neutral -> "neutral"
-  | AllMarked -> "allmarked"
-  | NotAllMarked -> "notallmarked"
-
-let node2c = function
-    Token(k,_,_,_) -> Printf.sprintf "token %s\n" (kind2c k)
-  | Recursor(k,_,_,_) -> Printf.sprintf "recursor %s\n" (kind2c k)
-  | Bind(k,_,_,_,_,_) -> Printf.sprintf "bind %s\n" (kind2c k)
-
-(* goal: detect negative in both tokens and recursors, or context only in
-tokens *)
-let bind c1 c2 =
-  let lub = function
-      (k1,k2) when k1 = k2 -> k1
-    | (Neutral,AllMarked) -> AllMarked
-    | (AllMarked,Neutral) -> AllMarked
-    | _ -> NotAllMarked in
-  match (c1,c2) with
-    (* token/token *)
-    (* there are tokens at this level, so ignore the level below *)
-    (Token(k1,i1,t1,l1),Token(k2,i2,t2,l2)) ->
-      Bind(lub(k1,k2),[i1;i2],[t1;t2],[],[],[l1;l2])
-
-    (* token/recursor *)
-    (* there are tokens at this level, so ignore the level below *)
-  | (Token(k1,i1,t1,l1),Recursor(k2,_,_,l2)) ->
-      Bind(lub(k1,k2),[i1],[t1],[],[],[l1;l2])
-  | (Recursor(k1,_,_,l1),Token(k2,i2,t2,l2)) ->
-      Bind(lub(k1,k2),[i2],[t2],[],[],[l1;l2])
-
-    (* token/bind *)
-    (* there are tokens at this level, so ignore the level below *)
-  | (Token(k1,i1,t1,l1),Bind(k2,i2,t2,_,_,l2)) ->
-      Bind(lub(k1,k2),i1::i2,t1::t2,[],[],l1::l2)
-  | (Bind(k1,i1,t1,_,_,l1),Token(k2,i2,t2,l2)) ->
-      Bind(lub(k1,k2),i1@[i2],t1@[t2],[],[],l1@[l2])
-
-    (* recursor/bind *)
-  | (Recursor(k1,bi1,bt1,l1),Bind(k2,i2,t2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),i2,t2,bi1@bi2,bt1@bt2,l1::l2)
-  | (Bind(k1,i1,t1,bi1,bt1,l1),Recursor(k2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),i1,t1,bi1@bi2,bt1@bt2,l1@[l2])
-
-    (* recursor/recursor and bind/bind - not likely to ever occur *)
-  | (Recursor(k1,bi1,bt1,l1),Recursor(k2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),[],[],bi1@bi2,bt1@bt2,[l1;l2])
-  | (Bind(k1,i1,t1,bi1,bt1,l1),Bind(k2,i2,t2,bi2,bt2,l2)) ->
-      Bind(lub(k1,k2),i1@i2,t1@t2,bi1@bi2,bt1@bt2,l1@l2)
-
-
-let option_default = (*Bind(Neutral,[],[],[],[],[])*)
-  Recursor(Neutral,[],[],[])
-
-let mcode (_,_,info,mcodekind,pos) =
-  let offset = info.Ast0.offset in
-  match mcodekind with
-    Ast0.MINUS(_) -> Token(AllMarked,offset,mcodekind,[])
-  | Ast0.PLUS -> Token(AllMarked,offset,mcodekind,[])
-  | Ast0.CONTEXT(_) -> Token(NotAllMarked,offset,mcodekind,[offset])
-  | _ -> failwith "not possible"
-
-let neutral_mcode (_,_,info,mcodekind,pos) =
-  let offset = info.Ast0.offset in
-  match mcodekind with
-    Ast0.MINUS(_) -> Token(Neutral,offset,mcodekind,[])
-  | Ast0.PLUS -> Token(Neutral,offset,mcodekind,[])
-  | Ast0.CONTEXT(_) -> Token(Neutral,offset,mcodekind,[offset])
-  | _ -> failwith "not possible"
-
-let is_context = function Ast0.CONTEXT(_) -> true | _ -> false
-
-let union_all l = List.fold_left Common.union_set [] l
-
-(* is minus is true when we are processing minus code that might be
-intermingled with plus code.  it is used in disj_cases *)
-let classify is_minus all_marked table code =
-  let mkres builder k il tl bil btl l e =
-    (if k = AllMarked
-    then Ast0.set_mcodekind e (all_marked()) (* definitive *)
-    else
-      let check_index il tl =
-       if List.for_all is_context tl
-       then
-         (let e1 = builder e in
-         let index = (get_index e1)@il in
-         try
-           let _ = Hashtbl.find table index in
-           failwith
-             (Printf.sprintf "%d: index %s already used\n"
-                (Ast0.get_info e).Ast0.line_start
-                (String.concat " " (List.map string_of_int index)))
-         with Not_found -> Hashtbl.add table index (e1,l)) in
-      if il = [] then check_index bil btl else check_index il tl);
-    if il = []
-    then Recursor(k, bil, btl, union_all l)
-    else Recursor(k, il, tl, union_all l) in
-
-  let compute_result builder e = function
-      Bind(k,il,tl,bil,btl,l) -> mkres builder k il tl bil btl l e
-    | Token(k,il,tl,l) -> mkres builder k [il] [tl] [] [] [l] e
-    | Recursor(k,bil,btl,l) -> mkres builder k [] [] bil btl [l] e in
-
-  let make_not_marked = function
-      Bind(k,il,tl,bil,btl,l) -> Bind(NotAllMarked,il,tl,bil,btl,l)
-    | Token(k,il,tl,l) -> Token(NotAllMarked,il,tl,l)
-    | Recursor(k,bil,btl,l) -> Recursor(NotAllMarked,bil,btl,l) in
-
-  let do_nothing builder r k e = compute_result builder e (k e) in
-
-  let disj_cases disj starter code fn ender =
-    (* neutral_mcode used so starter and ender don't have an affect on
-       whether the code is considered all plus/minus, but so that they are
-       consider in the index list, which is needed to make a disj with
-       something in one branch and nothing in the other different from code
-       that just has the something (starter/ender enough, mids not needed
-       for this).  Cannot agglomerate + code over | boundaries, because two -
-       cases might have different + code, and don't want to put the + code
-       together into one unit. *)
-    let make_not_marked =
-      if is_minus
-      then
-       (let min = Ast0.get_line disj in
-       let max = Ast0.get_line_end disj in
-       let (plus_min,plus_max) = find min (min-1) (max+1) in
-       if max > plus_max then make_not_marked else (function x -> x))
-      else make_not_marked in
-    bind (neutral_mcode starter)
-      (bind (List.fold_right bind
-              (List.map make_not_marked (List.map fn code))
-              option_default)
-        (neutral_mcode ender)) in
-
-  (* no whencode in plus tree so have to drop it *)
-  (* need special cases for dots, nests, and disjs *)
-  let expression r k e =
-    compute_result Ast0.expr e
-      (match Ast0.unwrap e with
-       Ast0.NestExpr(starter,exp,ender,whencode,multi) ->
-         k (Ast0.rewrap e (Ast0.NestExpr(starter,exp,ender,None,multi)))
-      | Ast0.Edots(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Edots(dots,None)))
-      | Ast0.Ecircles(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Ecircles(dots,None)))
-      | Ast0.Estars(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Estars(dots,None)))
-      | Ast0.DisjExpr(starter,expr_list,_,ender) -> 
-         disj_cases e starter expr_list r.V0.combiner_expression ender
-      |        _ -> k e) in
-
-  (* not clear why we have the next two cases, since DisjDecl and
-  DisjType shouldn't have been constructed yet, as they only come from isos *)
-  let declaration r k e =
-    compute_result Ast0.decl e
-      (match Ast0.unwrap e with
-       Ast0.DisjDecl(starter,decls,_,ender) ->
-         disj_cases e starter decls r.V0.combiner_declaration ender
-      | Ast0.Ddots(dots,whencode) ->
-         k (Ast0.rewrap e (Ast0.Ddots(dots,None)))
-       (* Need special cases for the following so that the type will be
-          considered as a unit, rather than distributed around the
-          declared variable.  This needs to be done because of the call to
-          compute_result, ie the processing of each term should make a
-          side-effect on the complete term structure as well as collecting
-          some information about it.  So we have to visit each complete
-          term structure.  In (all?) other such cases, we visit the terms
-          using rebuilder, which just visits the subterms, rather than
-          reordering their components. *)
-      |        Ast0.Init(stg,ty,id,eq,ini,sem) ->
-         bind (match stg with Some stg -> mcode stg | _ -> option_default)
-           (bind (r.V0.combiner_typeC ty)
-              (bind (r.V0.combiner_ident id)
-                 (bind (mcode eq)
-                    (bind (r.V0.combiner_initialiser ini) (mcode sem)))))
-      | Ast0.UnInit(stg,ty,id,sem) ->
-         bind (match stg with Some stg -> mcode stg | _ -> option_default)
-           (bind (r.V0.combiner_typeC ty)
-              (bind (r.V0.combiner_ident id) (mcode sem)))
-      |        _ -> k e) in
-
-  let param r k e =
-    compute_result Ast0.param e
-      (match Ast0.unwrap e with
-       Ast0.Param(ty,Some id) ->
-         (* needed for the same reason as in the Init and UnInit cases *)
-         bind (r.V0.combiner_typeC ty) (r.V0.combiner_ident id)
-      |        _ -> k e) in
-
-  let typeC r k e =
-    compute_result Ast0.typeC e
-      (match Ast0.unwrap e with
-       Ast0.DisjType(starter,types,_,ender) ->
-         disj_cases e starter types r.V0.combiner_typeC ender
-      |        _ -> k e) in
-
-  let initialiser r k i =
-    compute_result Ast0.ini i
-      (match Ast0.unwrap i with
-       Ast0.Idots(dots,whencode) ->
-         k (Ast0.rewrap i (Ast0.Idots(dots,None)))
-      |        _ -> k i) in
-
-  let statement r k s =
-    compute_result Ast0.stmt s
-      (match Ast0.unwrap s with
-       Ast0.Nest(started,stm_dots,ender,whencode,multi) ->
-         k (Ast0.rewrap s (Ast0.Nest(started,stm_dots,ender,[],multi)))
-      | Ast0.Dots(dots,whencode) ->
-         k (Ast0.rewrap s (Ast0.Dots(dots,[])))
-      | Ast0.Circles(dots,whencode) ->
-         k (Ast0.rewrap s (Ast0.Circles(dots,[])))
-      | Ast0.Stars(dots,whencode) ->
-         k (Ast0.rewrap s (Ast0.Stars(dots,[])))
-      | Ast0.Disj(starter,statement_dots_list,_,ender) ->
-         disj_cases s starter statement_dots_list r.V0.combiner_statement_dots
-           ender
-(*  Why? There is nothing there
-       (* cases for everything with extra mcode *)
-      |        Ast0.FunDecl((info,bef),_,_,_,_,_,_,_,_)
-      | Ast0.Decl((info,bef),_) ->
-         bind (mcode ((),(),info,bef)) (k s)
-      | Ast0.IfThen(_,_,_,_,_,(info,aft))
-      | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft))
-      | Ast0.While(_,_,_,_,_,(info,aft)) ->
-      | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft)) ->
-         bind (k s) (mcode ((),(),info,aft))
-      | Ast0.Iterator(_,_,_,_,_,(info,aft))
-*)
-      |        _ -> k s
-
-) in
-
-  let do_top builder r k e = compute_result builder e (k e) in
-
-  let combiner = 
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      (do_nothing Ast0.dotsExpr) (do_nothing Ast0.dotsInit)
-      (do_nothing Ast0.dotsParam) (do_nothing Ast0.dotsStmt)
-      (do_nothing Ast0.dotsDecl) (do_nothing Ast0.dotsCase)
-      (do_nothing Ast0.ident) expression typeC initialiser param declaration
-      statement (do_nothing Ast0.case_line) (do_top Ast0.top) in
-  combiner.V0.combiner_top_level code
-
-(* --------------------------------------------------------------------- *)
-(* Traverse the hash tables and find corresponding context nodes that have
-the same context children *)
-
-(* this is just a sanity check - really only need to look at the top-level
-   structure *)
-let equal_mcode (_,_,info1,_,_) (_,_,info2,_,_) =
-  info1.Ast0.offset = info2.Ast0.offset
-
-let equal_option e1 e2 =
-  match (e1,e2) with
-    (Some x, Some y) -> equal_mcode x y
-  | (None, None) -> true
-  | _ -> false
-
-let dots fn d1 d2 =
-  match (Ast0.unwrap d1,Ast0.unwrap d2) with
-    (Ast0.DOTS(l1),Ast0.DOTS(l2)) -> List.length l1 = List.length l2
-  | (Ast0.CIRCLES(l1),Ast0.CIRCLES(l2)) -> List.length l1 = List.length l2
-  | (Ast0.STARS(l1),Ast0.STARS(l2)) -> List.length l1 = List.length l2
-  | _ -> false
-
-let rec equal_ident i1 i2 =
-  match (Ast0.unwrap i1,Ast0.unwrap i2) with
-    (Ast0.Id(name1),Ast0.Id(name2)) -> equal_mcode name1 name2
-  | (Ast0.MetaId(name1,_,_),Ast0.MetaId(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.MetaFunc(name1,_,_),Ast0.MetaFunc(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.MetaLocalFunc(name1,_,_),Ast0.MetaLocalFunc(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.OptIdent(_),Ast0.OptIdent(_)) -> true
-  | (Ast0.UniqueIdent(_),Ast0.UniqueIdent(_)) -> true
-  | _ -> false
-
-let rec equal_expression e1 e2 =
-  match (Ast0.unwrap e1,Ast0.unwrap e2) with
-    (Ast0.Ident(_),Ast0.Ident(_)) -> true
-  | (Ast0.Constant(const1),Ast0.Constant(const2)) -> equal_mcode const1 const2
-  | (Ast0.FunCall(_,lp1,_,rp1),Ast0.FunCall(_,lp2,_,rp2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.Assignment(_,op1,_,_),Ast0.Assignment(_,op2,_,_)) ->
-      equal_mcode op1 op2
-  | (Ast0.CondExpr(_,why1,_,colon1,_),Ast0.CondExpr(_,why2,_,colon2,_)) ->
-      equal_mcode why1 why2 && equal_mcode colon1 colon2
-  | (Ast0.Postfix(_,op1),Ast0.Postfix(_,op2)) -> equal_mcode op1 op2
-  | (Ast0.Infix(_,op1),Ast0.Infix(_,op2)) -> equal_mcode op1 op2
-  | (Ast0.Unary(_,op1),Ast0.Unary(_,op2)) -> equal_mcode op1 op2
-  | (Ast0.Binary(_,op1,_),Ast0.Binary(_,op2,_)) -> equal_mcode op1 op2
-  | (Ast0.Paren(lp1,_,rp1),Ast0.Paren(lp2,_,rp2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.ArrayAccess(_,lb1,_,rb1),Ast0.ArrayAccess(_,lb2,_,rb2)) ->
-      equal_mcode lb1 lb2 && equal_mcode rb1 rb2
-  | (Ast0.RecordAccess(_,pt1,_),Ast0.RecordAccess(_,pt2,_)) ->
-      equal_mcode pt1 pt2
-  | (Ast0.RecordPtAccess(_,ar1,_),Ast0.RecordPtAccess(_,ar2,_)) ->
-      equal_mcode ar1 ar2
-  | (Ast0.Cast(lp1,_,rp1,_),Ast0.Cast(lp2,_,rp2,_)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.SizeOfExpr(szf1,_),Ast0.SizeOfExpr(szf2,_)) ->
-      equal_mcode szf1 szf2
-  | (Ast0.SizeOfType(szf1,lp1,_,rp1),Ast0.SizeOfType(szf2,lp2,_,rp2)) ->
-      equal_mcode szf1 szf2 && equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.TypeExp(_),Ast0.TypeExp(_)) -> true
-  | (Ast0.MetaErr(name1,_,_),Ast0.MetaErr(name2,_,_))
-  | (Ast0.MetaExpr(name1,_,_,_,_),Ast0.MetaExpr(name2,_,_,_,_))
-  | (Ast0.MetaExprList(name1,_,_),Ast0.MetaExprList(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.EComma(cm1),Ast0.EComma(cm2)) -> equal_mcode cm1 cm2
-  | (Ast0.DisjExpr(starter1,_,mids1,ender1),
-     Ast0.DisjExpr(starter2,_,mids2,ender2)) ->
-       equal_mcode starter1 starter2 && 
-       List.for_all2 equal_mcode mids1 mids2 &&
-       equal_mcode ender1 ender2
-  | (Ast0.NestExpr(starter1,_,ender1,_,m1),
-     Ast0.NestExpr(starter2,_,ender2,_,m2)) ->
-      equal_mcode starter1 starter2 && equal_mcode ender1 ender2 && m1 = m2
-  | (Ast0.Edots(dots1,_),Ast0.Edots(dots2,_))
-  | (Ast0.Ecircles(dots1,_),Ast0.Ecircles(dots2,_))
-  | (Ast0.Estars(dots1,_),Ast0.Estars(dots2,_)) -> equal_mcode dots1 dots2
-  | (Ast0.OptExp(_),Ast0.OptExp(_)) -> true
-  | (Ast0.UniqueExp(_),Ast0.UniqueExp(_)) -> true
-  | _ -> false
-
-let rec equal_typeC t1 t2 =
-  match (Ast0.unwrap t1,Ast0.unwrap t2) with
-    (Ast0.ConstVol(cv1,_),Ast0.ConstVol(cv2,_)) -> equal_mcode cv1 cv2
-  | (Ast0.BaseType(ty1,sign1),Ast0.BaseType(ty2,sign2)) ->
-      equal_mcode ty1 ty2 && equal_option sign1 sign2
-  | (Ast0.ImplicitInt(sign1),Ast0.ImplicitInt(sign2)) ->
-      equal_mcode sign1 sign2
-  | (Ast0.Pointer(_,star1),Ast0.Pointer(_,star2)) ->
-      equal_mcode star1 star2
-  | (Ast0.Array(_,lb1,_,rb1),Ast0.Array(_,lb2,_,rb2)) ->
-      equal_mcode lb1 lb2 && equal_mcode rb1 rb2
-  | (Ast0.StructUnionName(kind1,_),Ast0.StructUnionName(kind2,_)) ->
-      equal_mcode kind1 kind2
-  | (Ast0.FunctionType(ty1,lp1,p1,rp1),Ast0.FunctionType(ty2,lp2,p2,rp2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.StructUnionDef(_,lb1,_,rb1),
-     Ast0.StructUnionDef(_,lb2,_,rb2)) ->
-       equal_mcode lb1 lb2 && equal_mcode rb1 rb2
-  | (Ast0.TypeName(name1),Ast0.TypeName(name2)) -> equal_mcode name1 name2
-  | (Ast0.MetaType(name1,_),Ast0.MetaType(name2,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.DisjType(starter1,_,mids1,ender1),
-     Ast0.DisjType(starter2,_,mids2,ender2)) ->
-       equal_mcode starter1 starter2 && 
-       List.for_all2 equal_mcode mids1 mids2 &&
-       equal_mcode ender1 ender2
-  | (Ast0.OptType(_),Ast0.OptType(_)) -> true
-  | (Ast0.UniqueType(_),Ast0.UniqueType(_)) -> true
-  | _ -> false
-
-let equal_declaration d1 d2 =
-  match (Ast0.unwrap d1,Ast0.unwrap d2) with
-    (Ast0.Init(stg1,_,_,eq1,_,sem1),Ast0.Init(stg2,_,_,eq2,_,sem2)) ->
-      equal_option stg1 stg2 && equal_mcode eq1 eq2 && equal_mcode sem1 sem2
-  | (Ast0.UnInit(stg1,_,_,sem1),Ast0.UnInit(stg2,_,_,sem2)) ->
-      equal_option stg1 stg2 && equal_mcode sem1 sem2
-  | (Ast0.MacroDecl(nm1,lp1,_,rp1,sem1),Ast0.MacroDecl(nm2,lp2,_,rp2,sem2)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2 && equal_mcode sem1 sem2
-  | (Ast0.TyDecl(_,sem1),Ast0.TyDecl(_,sem2)) -> equal_mcode sem1 sem2
-  | (Ast0.Ddots(dots1,_),Ast0.Ddots(dots2,_)) -> equal_mcode dots1 dots2
-  | (Ast0.OptDecl(_),Ast0.OptDecl(_)) -> true
-  | (Ast0.UniqueDecl(_),Ast0.UniqueDecl(_)) -> true
-  | (Ast0.DisjDecl _,_) | (_,Ast0.DisjDecl _) ->
-      failwith "DisjDecl not expected here"
-  | _ -> false
-
-let equal_initialiser i1 i2 =
-  match (Ast0.unwrap i1,Ast0.unwrap i2) with
-    (Ast0.InitExpr(_),Ast0.InitExpr(_)) -> true
-  | (Ast0.InitList(lb1,_,rb1),Ast0.InitList(lb2,_,rb2)) ->
-      (equal_mcode lb1 lb2) && (equal_mcode rb1 rb2)
-  | (Ast0.InitGccDotName(dot1,_,eq1,_),Ast0.InitGccDotName(dot2,_,eq2,_)) ->
-      (equal_mcode dot1 dot2) && (equal_mcode eq1 eq2)
-  | (Ast0.InitGccName(_,eq1,_),Ast0.InitGccName(_,eq2,_)) ->
-      equal_mcode eq1 eq2
-  | (Ast0.InitGccIndex(lb1,_,rb1,eq1,_),Ast0.InitGccIndex(lb2,_,rb2,eq2,_)) ->
-      (equal_mcode lb1 lb2) && (equal_mcode rb1 rb2) && (equal_mcode eq1 eq2)
-  | (Ast0.InitGccRange(lb1,_,dots1,_,rb1,eq1,_),
-     Ast0.InitGccRange(lb2,_,dots2,_,rb2,eq2,_)) ->
-      (equal_mcode lb1 lb2) && (equal_mcode dots1 dots2) &&
-       (equal_mcode rb1 rb2) && (equal_mcode eq1 eq2)
- | (Ast0.IComma(cm1),Ast0.IComma(cm2)) -> equal_mcode cm1 cm2
-  | (Ast0.Idots(d1,_),Ast0.Idots(d2,_)) -> equal_mcode d1 d2
-  | (Ast0.OptIni(_),Ast0.OptIni(_)) -> true
-  | (Ast0.UniqueIni(_),Ast0.UniqueIni(_)) -> true
-  | _ -> false
-       
-let equal_parameterTypeDef p1 p2 =
-  match (Ast0.unwrap p1,Ast0.unwrap p2) with
-    (Ast0.VoidParam(_),Ast0.VoidParam(_)) -> true
-  | (Ast0.Param(_,_),Ast0.Param(_,_)) -> true
-  | (Ast0.MetaParam(name1,_),Ast0.MetaParam(name2,_))
-  | (Ast0.MetaParamList(name1,_,_),Ast0.MetaParamList(name2,_,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.PComma(cm1),Ast0.PComma(cm2)) -> equal_mcode cm1 cm2
-  | (Ast0.Pdots(dots1),Ast0.Pdots(dots2))
-  | (Ast0.Pcircles(dots1),Ast0.Pcircles(dots2)) -> equal_mcode dots1 dots2
-  | (Ast0.OptParam(_),Ast0.OptParam(_)) -> true
-  | (Ast0.UniqueParam(_),Ast0.UniqueParam(_)) -> true
-  | _ -> false
-
-let rec equal_statement s1 s2 =
-  match (Ast0.unwrap s1,Ast0.unwrap s2) with
-    (Ast0.FunDecl(_,fninfo1,_,lp1,_,rp1,lbrace1,_,rbrace1),
-     Ast0.FunDecl(_,fninfo2,_,lp2,_,rp2,lbrace2,_,rbrace2)) ->
-       (List.length fninfo1) = (List.length fninfo2) &&
-       List.for_all2 equal_fninfo fninfo1 fninfo2 &&
-       equal_mcode lp1 lp2 && equal_mcode rp1 rp2 &&
-       equal_mcode lbrace1 lbrace2 && equal_mcode rbrace1 rbrace2
-  | (Ast0.Decl(_,_),Ast0.Decl(_,_)) -> true
-  | (Ast0.Seq(lbrace1,_,rbrace1),Ast0.Seq(lbrace2,_,rbrace2)) ->
-      equal_mcode lbrace1 lbrace2 && equal_mcode rbrace1 rbrace2
-  | (Ast0.ExprStatement(_,sem1),Ast0.ExprStatement(_,sem2)) ->
-      equal_mcode sem1 sem2
-  | (Ast0.IfThen(iff1,lp1,_,rp1,_,_),Ast0.IfThen(iff2,lp2,_,rp2,_,_)) ->
-      equal_mcode iff1 iff2 && equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.IfThenElse(iff1,lp1,_,rp1,_,els1,_,_),
-     Ast0.IfThenElse(iff2,lp2,_,rp2,_,els2,_,_)) ->
-       equal_mcode iff1 iff2 &&
-        equal_mcode lp1 lp2 && equal_mcode rp1 rp2 && equal_mcode els1 els2
-  | (Ast0.While(whl1,lp1,_,rp1,_,_),Ast0.While(whl2,lp2,_,rp2,_,_)) ->
-      equal_mcode whl1 whl2 && equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.Do(d1,_,whl1,lp1,_,rp1,sem1),Ast0.Do(d2,_,whl2,lp2,_,rp2,sem2)) ->
-      equal_mcode whl1 whl2 && equal_mcode d1 d2 &&
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2 && equal_mcode sem1 sem2
-  | (Ast0.For(fr1,lp1,_,sem11,_,sem21,_,rp1,_,_),
-     Ast0.For(fr2,lp2,_,sem12,_,sem22,_,rp2,_,_)) ->
-       equal_mcode fr1 fr2 && equal_mcode lp1 lp2 &&
-       equal_mcode sem11 sem12 && equal_mcode sem21 sem22 &&
-       equal_mcode rp1 rp2
-  | (Ast0.Iterator(nm1,lp1,_,rp1,_,_),Ast0.Iterator(nm2,lp2,_,rp2,_,_)) ->
-      equal_mcode lp1 lp2 && equal_mcode rp1 rp2
-  | (Ast0.Switch(switch1,lp1,_,rp1,lb1,case1,rb1),
-     Ast0.Switch(switch2,lp2,_,rp2,lb2,case2,rb2)) ->
-       equal_mcode switch1 switch2 && equal_mcode lp1 lp2 &&
-       equal_mcode rp1 rp2 && equal_mcode lb1 lb2 &&
-       equal_mcode rb1 rb2
-  | (Ast0.Break(br1,sem1),Ast0.Break(br2,sem2)) ->
-      equal_mcode br1 br2 && equal_mcode sem1 sem2
-  | (Ast0.Continue(cont1,sem1),Ast0.Continue(cont2,sem2)) ->
-      equal_mcode cont1 cont2 && equal_mcode sem1 sem2
-  | (Ast0.Label(_,dd1),Ast0.Label(_,dd2)) ->
-      equal_mcode dd1 dd2
-  | (Ast0.Goto(g1,_,sem1),Ast0.Goto(g2,_,sem2)) ->
-      equal_mcode g1 g2 && equal_mcode sem1 sem2
-  | (Ast0.Return(ret1,sem1),Ast0.Return(ret2,sem2)) ->
-      equal_mcode ret1 ret2 && equal_mcode sem1 sem2
-  | (Ast0.ReturnExpr(ret1,_,sem1),Ast0.ReturnExpr(ret2,_,sem2)) ->
-      equal_mcode ret1 ret2 && equal_mcode sem1 sem2
-  | (Ast0.MetaStmt(name1,_),Ast0.MetaStmt(name2,_))
-  | (Ast0.MetaStmtList(name1,_),Ast0.MetaStmtList(name2,_)) ->
-      equal_mcode name1 name2
-  | (Ast0.Disj(starter1,_,mids1,ender1),Ast0.Disj(starter2,_,mids2,ender2)) ->
-      equal_mcode starter1 starter2 && 
-      List.for_all2 equal_mcode mids1 mids2 &&
-      equal_mcode ender1 ender2
-  | (Ast0.Nest(starter1,_,ender1,_,m1),Ast0.Nest(starter2,_,ender2,_,m2)) ->
-      equal_mcode starter1 starter2 && equal_mcode ender1 ender2 && m1 = m2
-  | (Ast0.Exp(_),Ast0.Exp(_)) -> true
-  | (Ast0.TopExp(_),Ast0.TopExp(_)) -> true
-  | (Ast0.Ty(_),Ast0.Ty(_)) -> true
-  | (Ast0.TopInit(_),Ast0.TopInit(_)) -> true
-  | (Ast0.Dots(d1,_),Ast0.Dots(d2,_))
-  | (Ast0.Circles(d1,_),Ast0.Circles(d2,_))
-  | (Ast0.Stars(d1,_),Ast0.Stars(d2,_)) -> equal_mcode d1 d2
-  | (Ast0.Include(inc1,name1),Ast0.Include(inc2,name2)) ->
-      equal_mcode inc1 inc2 && equal_mcode name1 name2
-  | (Ast0.Define(def1,_,_,_),Ast0.Define(def2,_,_,_)) ->
-      equal_mcode def1 def2
-  | (Ast0.OptStm(_),Ast0.OptStm(_)) -> true
-  | (Ast0.UniqueStm(_),Ast0.UniqueStm(_)) -> true
-  | _ -> false
-
-and equal_fninfo x y =
-  match (x,y) with
-    (Ast0.FStorage(s1),Ast0.FStorage(s2)) -> equal_mcode s1 s2
-  | (Ast0.FType(_),Ast0.FType(_)) -> true
-  | (Ast0.FInline(i1),Ast0.FInline(i2)) -> equal_mcode i1 i2
-  | (Ast0.FAttr(i1),Ast0.FAttr(i2)) -> equal_mcode i1 i2
-  | _ -> false
-
-let equal_case_line c1 c2 =
-  match (Ast0.unwrap c1,Ast0.unwrap c2) with
-    (Ast0.Default(def1,colon1,_),Ast0.Default(def2,colon2,_)) ->
-      equal_mcode def1 def2 && equal_mcode colon1 colon2
-  | (Ast0.Case(case1,_,colon1,_),Ast0.Case(case2,_,colon2,_)) ->
-      equal_mcode case1 case2 && equal_mcode colon1 colon2
-  | (Ast0.OptCase(_),Ast0.OptCase(_)) -> true
-  | _ -> false
-
-let rec equal_top_level t1 t2 =
-  match (Ast0.unwrap t1,Ast0.unwrap t2) with
-    (Ast0.DECL(_),Ast0.DECL(_)) -> true
-  | (Ast0.FILEINFO(old_file1,new_file1),Ast0.FILEINFO(old_file2,new_file2)) ->
-      equal_mcode old_file1 old_file2 && equal_mcode new_file1 new_file2
-  | (Ast0.CODE(_),Ast0.CODE(_)) -> true
-  | (Ast0.ERRORWORDS(_),Ast0.ERRORWORDS(_)) -> true
-  | _ -> false
-
-let root_equal e1 e2 =
-  match (e1,e2) with
-    (Ast0.DotsExprTag(d1),Ast0.DotsExprTag(d2)) -> dots equal_expression d1 d2
-  | (Ast0.DotsParamTag(d1),Ast0.DotsParamTag(d2)) ->
-      dots equal_parameterTypeDef d1 d2
-  | (Ast0.DotsStmtTag(d1),Ast0.DotsStmtTag(d2)) -> dots equal_statement d1 d2
-  | (Ast0.DotsDeclTag(d1),Ast0.DotsDeclTag(d2)) -> dots equal_declaration d1 d2
-  | (Ast0.DotsCaseTag(d1),Ast0.DotsCaseTag(d2)) -> dots equal_case_line d1 d2
-  | (Ast0.IdentTag(i1),Ast0.IdentTag(i2)) -> equal_ident i1 i2
-  | (Ast0.ExprTag(e1),Ast0.ExprTag(e2)) -> equal_expression e1 e2
-  | (Ast0.ArgExprTag(d),_) -> failwith "not possible - iso only"
-  | (Ast0.TypeCTag(t1),Ast0.TypeCTag(t2)) -> equal_typeC t1 t2
-  | (Ast0.ParamTag(p1),Ast0.ParamTag(p2)) -> equal_parameterTypeDef p1 p2
-  | (Ast0.InitTag(d1),Ast0.InitTag(d2)) -> equal_initialiser d1 d2
-  | (Ast0.DeclTag(d1),Ast0.DeclTag(d2)) -> equal_declaration d1 d2
-  | (Ast0.StmtTag(s1),Ast0.StmtTag(s2)) -> equal_statement s1 s2
-  | (Ast0.TopTag(t1),Ast0.TopTag(t2)) -> equal_top_level t1 t2
-  | (Ast0.IsoWhenTag(_),_) | (_,Ast0.IsoWhenTag(_))
-  | (Ast0.IsoWhenTTag(_),_) | (_,Ast0.IsoWhenTTag(_))
-  | (Ast0.IsoWhenFTag(_),_) | (_,Ast0.IsoWhenFTag(_)) ->
-      failwith "only within iso phase"
-  | _ -> false
-
-let default_context _ =
-  Ast0.CONTEXT(ref(Ast.NOTHING,
-                  Ast0.default_token_info,Ast0.default_token_info))
-
-let traverse minus_table plus_table =
-  Hashtbl.iter
-    (function key ->
-      function (e,l) ->
-       try
-         let (plus_e,plus_l) = Hashtbl.find plus_table key in
-         if root_equal e plus_e &&
-           List.for_all (function x -> x)
-             (List.map2 Common.equal_set l plus_l)
-         then
-           let i = Ast0.fresh_index() in
-           (set_index e i; set_index plus_e i;
-            set_mcodekind e (default_context());
-            set_mcodekind plus_e (default_context()))
-       with Not_found -> ())
-    minus_table
-
-(* --------------------------------------------------------------------- *)
-(* contextify the whencode *)
-
-let contextify_all =
-  let bind x y = () in
-  let option_default = () in
-  let mcode x = () in
-  let do_nothing r k e = Ast0.set_mcodekind e (default_context()); k e in
-
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-    do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-    do_nothing do_nothing do_nothing
-
-let contextify_whencode =
-  let bind x y = () in
-  let option_default = () in
-  let mcode x = () in
-  let do_nothing r k e = k e in
-
-  let expression r k e =
-    k e;
-    match Ast0.unwrap e with
-      Ast0.NestExpr(_,_,_,Some whencode,_)
-    | Ast0.Edots(_,Some whencode)
-    | Ast0.Ecircles(_,Some whencode)
-    | Ast0.Estars(_,Some whencode) ->
-       contextify_all.V0.combiner_expression whencode
-    | _ -> () in
-
-  let initialiser r k i =
-    match Ast0.unwrap i with
-      Ast0.Idots(dots,Some whencode) ->
-       contextify_all.V0.combiner_initialiser whencode
-    | _ -> k i in
-
-  let whencode = function
-      Ast0.WhenNot sd -> contextify_all.V0.combiner_statement_dots sd
-    | Ast0.WhenAlways s -> contextify_all.V0.combiner_statement s
-    | Ast0.WhenModifier(_) -> ()
-    | Ast0.WhenNotTrue(e) -> contextify_all.V0.combiner_expression e
-    | Ast0.WhenNotFalse(e) -> contextify_all.V0.combiner_expression e in
-
-  let statement r k (s : Ast0.statement) =
-    k s;
-    match Ast0.unwrap s with
-      Ast0.Nest(_,_,_,whn,_)
-    | Ast0.Dots(_,whn) | Ast0.Circles(_,whn) | Ast0.Stars(_,whn) ->
-       List.iter whencode whn
-    | _ -> () in
-
-  let combiner = 
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
-      do_nothing
-      expression
-      do_nothing initialiser do_nothing do_nothing statement do_nothing
-      do_nothing in
-  combiner.V0.combiner_top_level
-
-(* --------------------------------------------------------------------- *)
-
-(* the first int list is the tokens in the node, the second is the tokens
-in the descendents *)
-let minus_table =
-  (Hashtbl.create(50) : (int list, Ast0.anything * int list list) Hashtbl.t)
-let plus_table =
-  (Hashtbl.create(50) : (int list, Ast0.anything * int list list) Hashtbl.t)
-
-let iscode t =
-  match Ast0.unwrap t with
-    Ast0.DECL(_) -> true
-  | Ast0.FILEINFO(_) -> true
-  | Ast0.ERRORWORDS(_) -> false
-  | Ast0.CODE(_) -> true
-  | Ast0.OTHER(_) -> failwith "unexpected top level code"
-
-(* ------------------------------------------------------------------- *)
-(* alignment of minus and plus *)
-
-let concat = function
-    [] -> []
-  | [s] -> [s]
-  | l ->
-      let rec loop = function
-         [] -> []
-       | x::rest ->
-           (match Ast0.unwrap x with
-             Ast0.DECL(s) -> let stms = loop rest in s::stms
-           | Ast0.CODE(ss) ->
-               let stms = loop rest in
-               (match Ast0.unwrap ss with
-                 Ast0.DOTS(d) -> d@stms
-               | _ -> failwith "no dots allowed in pure plus code")
-           | _ -> failwith "plus code is being discarded") in
-      let res =
-       Compute_lines.statement_dots
-         (Ast0.rewrap (List.hd l) (Ast0.DOTS (loop l))) in
-      [Ast0.rewrap res (Ast0.CODE res)]
-
-let collect_up_to m plus =
-  let minfo = Ast0.get_info m in
-  let mend = minfo.Ast0.logical_end in
-  let rec loop = function
-      [] -> ([],[])
-    | p::plus -> 
-       let pinfo = Ast0.get_info p in
-       let pstart = pinfo.Ast0.logical_start in
-       if pstart > mend
-       then ([],p::plus)
-       else let (plus,rest) = loop plus in (p::plus,rest) in
-  let (plus,rest) = loop plus in
-  (concat plus,rest)
-
-let realign minus plus =
-  let rec loop = function
-      ([],_) -> failwith "not possible, some context required"
-    | ([m],p) -> ([m],concat p)
-    | (m::minus,plus) ->
-       let (p,plus) = collect_up_to m plus in
-       let (minus,plus) = loop (minus,plus) in
-       (m::minus,p@plus) in
-  loop (minus,plus)
-
-(* ------------------------------------------------------------------- *)
-(* check compatible: check that at the top level the minus and plus code is
-of the same kind.  Could go further and make the correspondence between the
-code between ...s. *)
-
-let isonly f l = match Ast0.undots l with [s] -> f s | _ -> false
-
-let isall f l = List.for_all (isonly f) l
-
-let rec is_exp s =
-  match Ast0.unwrap s with
-    Ast0.Exp(e) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_exp stmts
-  | _ -> false
-
-let rec is_ty s =
-  match Ast0.unwrap s with
-    Ast0.Ty(e) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_ty stmts
-  | _ -> false
-
-let rec is_decl s =
-  match Ast0.unwrap s with
-    Ast0.Decl(_,e) -> true
-  | Ast0.FunDecl(_,_,_,_,_,_,_,_,_) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_decl stmts
-  | _ -> false
-
-let rec is_fndecl s =
-  match Ast0.unwrap s with
-    Ast0.FunDecl(_,_,_,_,_,_,_,_,_) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_fndecl stmts
-  | _ -> false
-
-let rec is_toplevel s =
-  match Ast0.unwrap s with
-    Ast0.Decl(_,e) -> true
-  | Ast0.FunDecl(_,_,_,_,_,_,_,_,_) -> true
-  | Ast0.Disj(_,stmts,_,_) -> isall is_toplevel stmts
-  | Ast0.ExprStatement(fc,_) ->
-      (match Ast0.unwrap fc with
-       Ast0.FunCall(_,_,_,_) -> true
-      |        _ -> false)
-  | Ast0.Include(_,_) -> true
-  | Ast0.Define(_,_,_,_) -> true
-  | _ -> false
-
-let check_compatible m p =
-  let fail _ =
-    failwith
-      (Printf.sprintf
-        "incompatible minus and plus code starting on lines %d and %d"
-        (Ast0.get_line m) (Ast0.get_line p)) in
-  match (Ast0.unwrap m, Ast0.unwrap p) with
-    (Ast0.DECL(decl1),Ast0.DECL(decl2)) ->
-      if not (is_decl decl1 && is_decl decl2)
-      then fail()
-  | (Ast0.DECL(decl1),Ast0.CODE(code2)) ->
-      let v1 = is_decl decl1 in
-      let v2 = List.for_all is_toplevel (Ast0.undots code2) in
-      if !Flag.make_hrule = None && v1 && not v2 then fail()
-  | (Ast0.CODE(code1),Ast0.DECL(decl2)) ->
-      let v1 = List.for_all is_toplevel (Ast0.undots code1) in
-      let v2 = is_decl decl2 in
-      if v1 && not v2 then fail()
-  | (Ast0.CODE(code1),Ast0.CODE(code2)) ->
-      let testers = [is_exp;is_ty] in
-      List.iter
-       (function tester ->
-         let v1 = isonly tester code1 in
-         let v2 = isonly tester code2 in
-         if (v1 && not v2) or (!Flag.make_hrule = None && v2 && not v1)
-         then fail())
-       testers;
-      let v1 = isonly is_fndecl code1 in
-      let v2 = List.for_all is_toplevel (Ast0.undots code2) in
-      if !Flag.make_hrule = None && v1 && not v2 then fail()
-  | (Ast0.FILEINFO(_,_),Ast0.FILEINFO(_,_)) -> ()
-  | (Ast0.OTHER(_),Ast0.OTHER(_)) -> ()
-  | _ -> fail()
-
-(* ------------------------------------------------------------------- *)
-
-(* returns a list of corresponding minus and plus trees *)
-let context_neg minus plus =
-  Hashtbl.clear minus_table;
-  Hashtbl.clear plus_table;
-  List.iter contextify_whencode minus;
-  let (minus,plus) = realign minus plus in
-  let rec loop = function
-      ([],[]) -> []
-    | ([],l) ->
-       failwith (Printf.sprintf "%d plus things remaining" (List.length l))
-    | (minus,[]) ->
-       plus_lines := [];
-       let _ =
-         List.map
-           (function m ->
-             classify true
-               (function _ -> Ast0.MINUS(ref([],Ast0.default_token_info)))
-               minus_table m)
-           minus in
-       []
-    | (((m::minus) as mall),((p::plus) as pall)) ->
-       let minfo = Ast0.get_info m in
-       let pinfo = Ast0.get_info p in
-       let mstart = minfo.Ast0.logical_start in
-       let mend = minfo.Ast0.logical_end in
-       let pstart = pinfo.Ast0.logical_start in
-       let pend = pinfo.Ast0.logical_end in
-       if (iscode m or iscode p) &&
-         (mend + 1 = pstart or pend + 1 = mstart or (* adjacent *)
-          (mstart <= pstart && mend >= pstart) or
-          (pstart <= mstart && pend >= mstart)) (* overlapping or nested *)
-       then
-         begin
-           (* ensure that the root of each tree has a unique index,
-              although it might get overwritten if the node is a context
-              node *)
-           let i = Ast0.fresh_index() in
-           Ast0.set_index m i; Ast0.set_index p i;
-           check_compatible m p;
-           collect_plus_lines p;
-           let _ =
-             classify true
-               (function _ -> Ast0.MINUS(ref([],Ast0.default_token_info)))
-               minus_table m in
-           let _ = classify false (function _ -> Ast0.PLUS) plus_table p in
-           traverse minus_table plus_table;
-           (m,p)::loop(minus,plus)
-         end
-       else
-         if not(iscode m or iscode p)
-         then loop(minus,plus)
-         else
-           if mstart < pstart
-           then
-             begin
-               plus_lines := [];
-               let _ =
-                 classify true
-                   (function _ -> Ast0.MINUS(ref([],Ast0.default_token_info)))
-                   minus_table m in
-               loop(minus,pall)
-             end
-           else loop(mall,plus) in
-  loop(minus,plus)
diff --git a/parsing_cocci/.#disjdistr.ml.1.20 b/parsing_cocci/.#disjdistr.ml.1.20
deleted file mode 100644 (file)
index c624418..0000000
+++ /dev/null
@@ -1,393 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module Ast = Ast_cocci
-module V = Visitor_ast
-
-let disjmult2 e1 e2 k =
-  List.concat
-    (List.map (function e1 -> List.map (function e2 -> k e1 e2) e2) e1)
-
-let disjmult3 e1 e2 e3 k =
-  List.concat
-    (List.map
-       (function e1 ->
-        List.concat
-          (List.map
-             (function e2 -> List.map (function e3 -> k e1 e2 e3) e3)
-             e2))
-       e1)
-
-let rec disjmult f = function
-    [] -> [[]]
-  | x::xs ->
-      let cur = f x in
-      let rest = disjmult f xs in
-      disjmult2 cur rest (function cur -> function rest -> cur :: rest)
-
-let disjoption f = function
-    None -> [None]
-  | Some x -> List.map (function x -> Some x) (f x)
-
-let disjdots f d =
-  match Ast.unwrap d with
-    Ast.DOTS(l) ->
-      List.map (function l -> Ast.rewrap d (Ast.DOTS(l))) (disjmult f l)
-  | Ast.CIRCLES(l) ->
-      List.map (function l -> Ast.rewrap d (Ast.CIRCLES(l))) (disjmult f l)
-  | Ast.STARS(l) ->
-      List.map (function l -> Ast.rewrap d (Ast.STARS(l))) (disjmult f l)
-
-let rec disjty ft =
-  match Ast.unwrap ft with
-    Ast.Type(cv,ty) ->
-      let ty = disjtypeC ty in
-      List.map (function ty -> Ast.rewrap ft (Ast.Type(cv,ty))) ty
-  | Ast.DisjType(types) -> List.concat (List.map disjty types)
-  | Ast.OptType(ty) ->
-      let ty = disjty ty in
-      List.map (function ty -> Ast.rewrap ft (Ast.OptType(ty))) ty
-  | Ast.UniqueType(ty) ->
-      let ty = disjty ty in
-      List.map (function ty -> Ast.rewrap ft (Ast.UniqueType(ty))) ty
-
-and disjtypeC bty =
-  match Ast.unwrap bty with
-    Ast.BaseType(_,_) | Ast.ImplicitInt(_) -> [bty]
-  | Ast.Pointer(ty,star) ->
-      let ty = disjty ty in
-      List.map (function ty -> Ast.rewrap bty (Ast.Pointer(ty,star))) ty
-  | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      let ty = disjty ty in
-      List.map
-       (function ty ->
-         Ast.rewrap bty (Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2)))
-       ty
-  | Ast.FunctionType (s,ty,lp1,params,rp1) ->
-      let ty = disjoption disjty ty in
-      List.map
-       (function ty ->
-         Ast.rewrap bty (Ast.FunctionType (s,ty,lp1,params,rp1)))
-       ty
-  | Ast.Array(ty,lb,size,rb) ->
-      disjmult2 (disjty ty) (disjoption disjexp size)
-       (function ty -> function size ->
-         Ast.rewrap bty (Ast.Array(ty,lb,size,rb)))
-  | Ast.StructUnionName(kind,name) -> [bty]
-  | Ast.StructUnionDef(ty,lb,decls,rb) ->
-      disjmult2 (disjty ty) (disjdots disjdecl decls)
-       (function ty -> function decls ->
-         Ast.rewrap bty (Ast.StructUnionDef(ty,lb,decls,rb)))
-  | Ast.TypeName(_) | Ast.MetaType(_,_,_) -> [bty]
-
-and disjexp e =
-  match Ast.unwrap e with
-    Ast.Ident(_) | Ast.Constant(_) -> [e]
-  | Ast.FunCall(fn,lp,args,rp) ->
-      disjmult2 (disjexp fn) (disjdots disjexp args)
-       (function fn -> function args ->
-         Ast.rewrap e (Ast.FunCall(fn,lp,args,rp)))
-  | Ast.Assignment(left,op,right,simple) ->
-      disjmult2 (disjexp left) (disjexp right)
-       (function left -> function right ->
-         Ast.rewrap e (Ast.Assignment(left,op,right,simple)))
-  | Ast.CondExpr(exp1,why,Some exp2,colon,exp3) ->
-      let res = disjmult disjexp [exp1;exp2;exp3] in
-      List.map
-       (function
-           [exp1;exp2;exp3] ->
-             Ast.rewrap e (Ast.CondExpr(exp1,why,Some exp2,colon,exp3))
-         | _ -> failwith "not possible")
-       res
-  | Ast.CondExpr(exp1,why,None,colon,exp3) ->
-      disjmult2 (disjexp exp1) (disjexp exp3)
-       (function exp1 -> function exp3 ->
-         Ast.rewrap e (Ast.CondExpr(exp1,why,None,colon,exp3)))
-  | Ast.Postfix(exp,op) ->
-      let exp = disjexp exp in
-      List.map (function exp -> Ast.rewrap e (Ast.Postfix(exp,op))) exp
-  | Ast.Infix(exp,op) ->
-      let exp = disjexp exp in
-      List.map (function exp -> Ast.rewrap e (Ast.Infix(exp,op))) exp
-  | Ast.Unary(exp,op) ->
-      let exp = disjexp exp in
-      List.map (function exp -> Ast.rewrap e (Ast.Unary(exp,op))) exp
-  | Ast.Binary(left,op,right) ->
-      disjmult2 (disjexp left) (disjexp right)
-       (function left -> function right ->
-         Ast.rewrap e (Ast.Binary(left,op,right)))
-  | Ast.Nested(exp,op,right) ->
-      (* disj not possible in right *)
-      let exp = disjexp exp in
-      List.map (function exp -> Ast.rewrap e (Ast.Nested(exp,op,right))) exp
-  | Ast.Paren(lp,exp,rp) ->
-      let exp = disjexp exp in
-      List.map (function exp -> Ast.rewrap e (Ast.Paren(lp,exp,rp))) exp
-  | Ast.ArrayAccess(exp1,lb,exp2,rb) ->
-      disjmult2 (disjexp exp1) (disjexp exp2)
-       (function exp1 -> function exp2 ->
-         Ast.rewrap e (Ast.ArrayAccess(exp1,lb,exp2,rb)))
-  | Ast.RecordAccess(exp,pt,field) ->
-      let exp = disjexp exp in
-      List.map
-       (function exp -> Ast.rewrap e (Ast.RecordAccess(exp,pt,field))) exp
-  | Ast.RecordPtAccess(exp,ar,field) ->
-      let exp = disjexp exp in
-      List.map
-       (function exp -> Ast.rewrap e (Ast.RecordPtAccess(exp,ar,field))) exp
-  | Ast.Cast(lp,ty,rp,exp) ->
-      disjmult2 (disjty ty) (disjexp exp)
-       (function ty -> function exp -> Ast.rewrap e (Ast.Cast(lp,ty,rp,exp)))
-  | Ast.SizeOfExpr(szf,exp) ->
-      let exp = disjexp exp in
-      List.map (function exp -> Ast.rewrap e (Ast.SizeOfExpr(szf,exp))) exp
-  | Ast.SizeOfType(szf,lp,ty,rp) ->
-      let ty = disjty ty in
-      List.map
-       (function ty -> Ast.rewrap e (Ast.SizeOfType(szf,lp,ty,rp))) ty
-  | Ast.TypeExp(ty) ->
-      let ty = disjty ty in
-      List.map (function ty -> Ast.rewrap e (Ast.TypeExp(ty))) ty
-  | Ast.MetaErr(_,_,_,_) | Ast.MetaExpr(_,_,_,_,_,_)
-  | Ast.MetaExprList(_,_,_,_) | Ast.EComma(_) -> [e]
-  | Ast.DisjExpr(exp_list) -> List.concat (List.map disjexp exp_list)
-  | Ast.NestExpr(expr_dots,whencode,multi) ->
-      (* not sure what to do here, so ambiguities still possible *)
-      [e]
-  | Ast.Edots(dots,_) | Ast.Ecircles(dots,_) | Ast.Estars(dots,_) -> [e]
-  | Ast.OptExp(exp) ->
-      let exp = disjexp exp in
-      List.map (function exp -> Ast.rewrap e (Ast.OptExp(exp))) exp
-  | Ast.UniqueExp(exp) ->
-      let exp = disjexp exp in
-      List.map (function exp -> Ast.rewrap e (Ast.UniqueExp(exp))) exp
-
-and disjparam p =
-  match Ast.unwrap p with
-    Ast.VoidParam(ty) -> [p] (* void is the only possible value *)
-  | Ast.Param(ty,id) ->
-      let ty = disjty ty in
-      List.map (function ty -> Ast.rewrap p (Ast.Param(ty,id))) ty
-  | Ast.MetaParam(_,_,_) | Ast.MetaParamList(_,_,_,_) | Ast.PComma(_) -> [p]
-  | Ast.Pdots(dots) | Ast.Pcircles(dots) -> [p]
-  | Ast.OptParam(param) ->
-      let param = disjparam param in
-      List.map (function param -> Ast.rewrap p (Ast.OptParam(param))) param
-  | Ast.UniqueParam(param) ->
-      let param = disjparam param in
-      List.map (function param -> Ast.rewrap p (Ast.UniqueParam(param))) param
-
-and disjini i =
-  match Ast.unwrap i with
-    Ast.InitExpr(exp) ->
-      let exp = disjexp exp in
-      List.map (function exp -> Ast.rewrap i (Ast.InitExpr(exp))) exp
-  | Ast.InitList(lb,initlist,rb,whencode) ->
-      List.map
-       (function initlist ->
-         Ast.rewrap i (Ast.InitList(lb,initlist,rb,whencode)))
-       (disjmult disjini initlist)
-  | Ast.InitGccDotName(dot,name,eq,ini) ->
-      let ini = disjini ini in
-      List.map
-       (function ini -> Ast.rewrap i (Ast.InitGccDotName(dot,name,eq,ini)))
-       ini
-  | Ast.InitGccName(name,eq,ini) ->
-      let ini = disjini ini in
-      List.map
-       (function ini -> Ast.rewrap i (Ast.InitGccName(name,eq,ini)))
-       ini
-  | Ast.InitGccIndex(lb,exp,rb,eq,ini) ->
-      disjmult2 (disjexp exp) (disjini ini)
-       (function exp -> function ini ->
-         Ast.rewrap i (Ast.InitGccIndex(lb,exp,rb,eq,ini)))
-  | Ast.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-      disjmult3 (disjexp exp1) (disjexp exp2) (disjini ini)
-       (function exp1 -> function exp2 -> function ini ->
-         Ast.rewrap i (Ast.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini)))
-  | Ast.IComma(comma) -> [i]
-  | Ast.OptIni(ini) -> 
-      let ini = disjini ini in
-      List.map (function ini -> Ast.rewrap i (Ast.OptIni(ini))) ini
-  | Ast.UniqueIni(ini) -> 
-      let ini = disjini ini in
-      List.map (function ini -> Ast.rewrap i (Ast.UniqueIni(ini))) ini
-
-and disjdecl d =
-  match Ast.unwrap d with
-    Ast.Init(stg,ty,id,eq,ini,sem) ->
-      disjmult2 (disjty ty) (disjini ini)
-       (function ty -> function ini ->
-         Ast.rewrap d (Ast.Init(stg,ty,id,eq,ini,sem)))
-  | Ast.UnInit(stg,ty,id,sem) ->
-      let ty = disjty ty in
-      List.map (function ty -> Ast.rewrap d (Ast.UnInit(stg,ty,id,sem))) ty
-  | Ast.MacroDecl(name,lp,args,rp,sem) ->
-      List.map
-       (function args -> Ast.rewrap d (Ast.MacroDecl(name,lp,args,rp,sem)))
-       (disjdots disjexp args)
-  | Ast.TyDecl(ty,sem) ->
-      let ty = disjty ty in
-      List.map (function ty -> Ast.rewrap d (Ast.TyDecl(ty,sem))) ty
-  | Ast.Typedef(stg,ty,id,sem) ->
-      let ty = disjty ty in (* disj not allowed in id *)
-      List.map (function ty -> Ast.rewrap d (Ast.Typedef(stg,ty,id,sem))) ty
-  | Ast.DisjDecl(decls) -> List.concat (List.map disjdecl decls)
-  | Ast.Ddots(_,_) | Ast.MetaDecl(_,_,_) -> [d]
-  | Ast.OptDecl(decl) ->
-      let decl = disjdecl decl in
-      List.map (function decl -> Ast.rewrap d (Ast.OptDecl(decl))) decl
-  | Ast.UniqueDecl(decl) ->
-      let decl = disjdecl decl in
-      List.map (function decl -> Ast.rewrap d (Ast.UniqueDecl(decl))) decl
-
-let generic_orify_rule_elem f re exp rebuild =
-  match f exp with
-    [exp] -> re
-  | orexps -> Ast.rewrap re (Ast.DisjRuleElem (List.map rebuild orexps))
-
-let orify_rule_elem re exp rebuild =
-  generic_orify_rule_elem disjexp re exp rebuild
-
-let orify_rule_elem_ty = generic_orify_rule_elem disjty
-let orify_rule_elem_param = generic_orify_rule_elem disjparam
-let orify_rule_elem_decl = generic_orify_rule_elem disjdecl
-
-let disj_rule_elem r k re =
-  match Ast.unwrap re with      
-    Ast.FunHeader(bef,allminus,fninfo,name,lp,params,rp) ->
-      generic_orify_rule_elem (disjdots disjparam) re params
-       (function params ->
-         Ast.rewrap re
-           (Ast.FunHeader(bef,allminus,fninfo,name,lp,params,rp)))
-  | Ast.Decl(bef,allminus,decl) ->
-      orify_rule_elem_decl re decl
-       (function decl -> Ast.rewrap re (Ast.Decl(bef,allminus,decl)))
-  | Ast.SeqStart(brace) -> re
-  | Ast.SeqEnd(brace) -> re
-  | Ast.ExprStatement(exp,sem) ->
-      orify_rule_elem re exp
-       (function exp -> Ast.rewrap re (Ast.ExprStatement(exp,sem)))
-  | Ast.IfHeader(iff,lp,exp,rp) ->
-      orify_rule_elem re exp
-       (function exp -> Ast.rewrap re (Ast.IfHeader(iff,lp,exp,rp)))
-  | Ast.Else(els) -> re
-  | Ast.WhileHeader(whl,lp,exp,rp) ->
-      orify_rule_elem re exp
-       (function exp -> Ast.rewrap re (Ast.WhileHeader(whl,lp,exp,rp)))
-  | Ast.DoHeader(d) -> re
-  | Ast.WhileTail(whl,lp,exp,rp,sem) ->
-      orify_rule_elem re exp
-       (function exp -> Ast.rewrap re (Ast.WhileTail(whl,lp,exp,rp,sem)))
-  | Ast.ForHeader(fr,lp,e1,sem1,e2,sem2,e3,rp) ->
-      generic_orify_rule_elem (disjmult (disjoption disjexp)) re [e1;e2;e3]
-       (function
-           [exp1;exp2;exp3] ->
-             Ast.rewrap re (Ast.ForHeader(fr,lp,exp1,sem1,exp2,sem2,exp3,rp))
-         | _ -> failwith "not possible")
-  | Ast.IteratorHeader(whl,lp,args,rp) ->
-      generic_orify_rule_elem (disjdots disjexp) re args
-       (function args -> Ast.rewrap re (Ast.IteratorHeader(whl,lp,args,rp)))
-  | Ast.SwitchHeader(switch,lp,exp,rp) ->
-      orify_rule_elem re exp
-       (function exp -> Ast.rewrap re (Ast.SwitchHeader(switch,lp,exp,rp)))
-  | Ast.Break(_,_) | Ast.Continue(_,_) | Ast.Label(_,_) | Ast.Goto(_,_,_)
-  | Ast.Return(_,_) -> re
-  | Ast.ReturnExpr(ret,exp,sem) ->
-      orify_rule_elem re exp
-       (function exp -> Ast.rewrap re (Ast.ReturnExpr(ret,exp,sem)))
-  | Ast.MetaRuleElem(_,_,_) | Ast.MetaStmt(_,_,_,_)
-  | Ast.MetaStmtList(_,_,_) -> re
-  | Ast.Exp(exp) ->
-      orify_rule_elem re exp (function exp -> Ast.rewrap exp (Ast.Exp(exp)))
-  | Ast.TopExp(exp) ->
-      orify_rule_elem re exp (function exp -> Ast.rewrap exp (Ast.TopExp(exp)))
-  | Ast.Ty(ty) ->
-      orify_rule_elem_ty re ty (function ty -> Ast.rewrap ty (Ast.Ty(ty)))
-  | Ast.Include(inc,s) -> re
-  | Ast.DefineHeader(def,id,params) -> re
-  | Ast.Default(def,colon) -> re
-  | Ast.Case(case,exp,colon) ->
-      orify_rule_elem re exp
-       (function exp -> Ast.rewrap re (Ast.Case(case,exp,colon)))
-  | Ast.DisjRuleElem(_) -> failwith "not possible"
-
-let disj_all =
-  let mcode x = x in
-  let donothing r k e = k e in
-  V.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    disj_rule_elem donothing donothing donothing donothing
-
-(* ----------------------------------------------------------------------- *)
-(* collect iso information at the rule_elem level *)
-
-let collect_all_isos =
-  let bind = (@) in
-  let option_default = [] in
-  let mcode r x = [] in
-  let donothing r k e = Common.union_set (Ast.get_isos e) (k e) in
-  let doanything r k e = k e in
-  V.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing doanything
-
-let collect_iso_info =
-  let mcode x = x in
-  let donothing r k e = k e in
-  let rule_elem r k e =
-    match Ast.unwrap e with
-      Ast.DisjRuleElem(l) -> k e
-    | _ ->
-       let isos = collect_all_isos.V.combiner_rule_elem e in
-       Ast.set_isos e isos in
-  V.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing rule_elem donothing donothing
-    donothing donothing
-
-(* ----------------------------------------------------------------------- *)
-
-let disj rules =
-  List.map
-    (function (mv,r) ->
-      match r with
-        Ast.ScriptRule _ -> (mv, r)
-      | Ast.CocciRule (nm, rule_info, r, isexp) ->
-      let res =
-       List.map
-         (function x ->
-           let res = disj_all.V.rebuilder_top_level x in
-           if !Flag.track_iso_usage
-           then collect_iso_info.V.rebuilder_top_level res
-           else res)
-         r in
-      (mv, Ast.CocciRule (nm,rule_info,res,isexp)))
-    rules
diff --git a/parsing_cocci/.#index.ml.1.54 b/parsing_cocci/.#index.ml.1.54
deleted file mode 100644 (file)
index e4b98a2..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* create an index for each constructor *)
-(* current max is 145 *)
-
-(* doesn't really work - requires that identical terms with no token
-subterms (eg dots) not appear on the same line *)
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-
-(* if a dot list is empty, add the starting line of the dot list to the
-address.  Otherwise add 0.  An empty dot list should only match with another
-empty one. *)
-let expression_dots d =
-  let ln = (Ast0.get_info d).Ast0.line_start in
-  match Ast0.unwrap d with
-    Ast0.DOTS(l) -> 1::(if l = [] then [ln] else [0])
-  | Ast0.CIRCLES(l) -> 2::(if l = [] then [ln] else [0])
-  | Ast0.STARS(l) -> 3::(if l = [] then [ln] else [0])
-       
-let initialiser_dots d =
-  let ln = (Ast0.get_info d).Ast0.line_start in
-  match Ast0.unwrap d with
-    Ast0.DOTS(l) -> 113::(if l = [] then [ln] else [0])
-  | Ast0.CIRCLES(l) -> 114::(if l = [] then [ln] else [0])
-  | Ast0.STARS(l) -> 115::(if l = [] then [ln] else [0])
-       
-let parameter_dots d =
-  let ln = (Ast0.get_info d).Ast0.line_start in
-  match Ast0.unwrap d with
-    Ast0.DOTS(l) -> 4::(if l = [] then [ln] else [0])
-  | Ast0.CIRCLES(l) -> 5::(if l = [] then [ln] else [0])
-  | Ast0.STARS(l) -> 6::(if l = [] then [ln] else [0])
-       
-let statement_dots d =
-  let ln = (Ast0.get_info d).Ast0.line_start in
-  match Ast0.unwrap d with
-    Ast0.DOTS(l) -> 7::(if l = [] then [ln] else [0])
-  | Ast0.CIRCLES(l) -> 8::(if l = [] then [ln] else [0])
-  | Ast0.STARS(l) -> 9::(if l = [] then [ln] else [0])
-       
-let declaration_dots d =
-  let ln = (Ast0.get_info d).Ast0.line_start in
-  match Ast0.unwrap d with
-    Ast0.DOTS(l) -> 134::(if l = [] then [ln] else [0])
-  | Ast0.CIRCLES(l) -> 135::(if l = [] then [ln] else [0])
-  | Ast0.STARS(l) -> 136::(if l = [] then [ln] else [0])
-       
-let case_line_dots d =
-  let ln = (Ast0.get_info d).Ast0.line_start in
-  match Ast0.unwrap d with
-    Ast0.DOTS(l) -> 138::(if l = [] then [ln] else [0])
-  | Ast0.CIRCLES(l) -> 139::(if l = [] then [ln] else [0])
-  | Ast0.STARS(l) -> 140::(if l = [] then [ln] else [0])
-       
-let ident i =
-  match Ast0.unwrap i with
-    Ast0.Id(name) -> [10]
-  | Ast0.MetaId(name,_,_) -> [11]
-  | Ast0.MetaFunc(name,_,_) -> [12]
-  | Ast0.MetaLocalFunc(name,_,_) -> [13]
-  | Ast0.OptIdent(id) -> [14]
-  | Ast0.UniqueIdent(id) -> [15]
-       
-let expression e =
-  match Ast0.unwrap e with
-    Ast0.Ident(id) -> [17]
-  | Ast0.Constant(const) -> [18]
-  | Ast0.FunCall(fn,lp,args,rp) -> [19]
-  | Ast0.Assignment(left,op,right,simple) -> [20]
-  | Ast0.CondExpr(exp1,why,exp2,colon,exp3) -> [21]
-  | Ast0.Postfix(exp,op) -> [22]
-  | Ast0.Infix(exp,op) -> [23]
-  | Ast0.Unary(exp,op) -> [24]
-  | Ast0.Binary(left,op,right) -> [25]
-  | Ast0.Nested(left,op,right) -> failwith "nested in index not possible"
-  | Ast0.Paren(lp,exp,rp) -> [26]
-  | Ast0.ArrayAccess(exp1,lb,exp2,rb) -> [27]
-  | Ast0.RecordAccess(exp,pt,field) -> [28]
-  | Ast0.RecordPtAccess(exp,ar,field) -> [29]
-  | Ast0.Cast(lp,ty,rp,exp) -> [30]
-  | Ast0.SizeOfExpr(szf,exp) -> [98] (* added after *)
-  | Ast0.SizeOfType(szf,lp,ty,rp) -> [99] (* added after *)
-  | Ast0.TypeExp(ty) -> [123] (* added after *)
-  | Ast0.MetaErr(name,_,_) -> [32]
-  | Ast0.MetaExpr(name,_,ty,_,_) -> [33]
-  | Ast0.MetaExprList(name,_,_) -> [34]
-  | Ast0.EComma(cm) -> [35]
-  | Ast0.DisjExpr(_,expr_list,_,_) -> [36]
-  | Ast0.NestExpr(_,expr_dots,_,_,_) -> [37]
-  | Ast0.Edots(dots,whencode) -> [38]
-  | Ast0.Ecircles(dots,whencode) -> [39]
-  | Ast0.Estars(dots,whencode) -> [40]
-  | Ast0.OptExp(exp) -> [41]
-  | Ast0.UniqueExp(exp) -> [42]
-
-let typeC t =
-  match Ast0.unwrap t with
-    Ast0.ConstVol(cv,ty) -> [44]
-  | Ast0.BaseType(ty,sign) -> [48]
-  | Ast0.ImplicitInt(sign) -> [129]
-  | Ast0.Pointer(ty,star) -> [49]
-  | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) -> [131]
-  | Ast0.FunctionType(ty,lp1,params,rp1) -> [132]
-  | Ast0.Array(ty,lb,size,rb) -> [50]
-  | Ast0.StructUnionName(kind,name) -> [51]
-  | Ast0.StructUnionDef(ty,lb,decls,rb) -> [117]
-  | Ast0.TypeName(name) -> [52]
-  | Ast0.MetaType(name,_) -> [53]
-  | Ast0.DisjType(_,type_list,_,_) -> [130]
-  | Ast0.OptType(ty) -> [45]
-  | Ast0.UniqueType(ty) -> [46]
-       
-let declaration d =
-  match Ast0.unwrap d with
-    Ast0.Init(stg,ty,id,eq,exp,sem) -> [54]
-  | Ast0.UnInit(stg,ty,id,sem) -> [55]
-  | Ast0.MacroDecl(name,lp,args,rp,sem) -> [137]
-  | Ast0.TyDecl(ty,sem) -> [116]
-  | Ast0.Typedef(stg,ty,id,sem) -> [143]
-  | Ast0.DisjDecl(_,decls,_,_) -> [97] (* added after *)
-  | Ast0.Ddots(dots,whencode) -> [133]
-  | Ast0.OptDecl(decl) -> [56]
-  | Ast0.UniqueDecl(decl) -> [57]
-
-let initialiser i =
-  match Ast0.unwrap i with
-    Ast0.InitExpr(exp) -> [102] (* added after *)
-  | Ast0.InitList(lb,initlist,rb) -> [103]
-  | Ast0.InitGccDotName(dot,name,eq,ini) -> [104]
-  | Ast0.InitGccName(name,eq,ini) -> [105]
-  | Ast0.InitGccIndex(lb,exp,rb,eq,ini) -> [106]
-  | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) -> [107]
-  | Ast0.IComma(cm) -> [108]
-  | Ast0.Idots(d,whencode) -> [109]
-  | Ast0.OptIni(id) -> [110]
-  | Ast0.UniqueIni(id) -> [111]
-
-let parameterTypeDef p =
-  match Ast0.unwrap p with
-    Ast0.VoidParam(ty) -> [59]
-  | Ast0.Param(ty,id) -> [60]
-  | Ast0.MetaParam(name,_) -> [61]
-  | Ast0.MetaParamList(name,_,_) -> [62]
-  | Ast0.PComma(cm) -> [63]
-  | Ast0.Pdots(dots) -> [64]
-  | Ast0.Pcircles(dots) -> [65]
-  | Ast0.OptParam(param) -> [66]
-  | Ast0.UniqueParam(param) -> [67]
-       
-let statement s =
-  match Ast0.unwrap s with
-    Ast0.FunDecl(bef,fninfo,name,lp,params,rp,lbrace,body,rbrace) -> [68]
-  | Ast0.Decl(bef,decl) -> [69]
-  | Ast0.Seq(lbrace,body,rbrace) -> [70]
-  | Ast0.ExprStatement(exp,sem) -> [71]
-  | Ast0.IfThen(iff,lp,exp,rp,branch1,aft) -> [72]
-  | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,aft) -> [73]
-  | Ast0.While(whl,lp,exp,rp,body,_) -> [74]
-  | Ast0.Do(d,body,whl,lp,exp,rp,sem) -> [75]
-  | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,_) -> [76]
-  | Ast0.Iterator(nm,lp,args,rp,body,_) -> [142]
-  | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) -> [125]
-  | Ast0.Break(br,sem) -> [100]
-  | Ast0.Continue(cont,sem) -> [101]
-  | Ast0.Label(l,dd) -> [144]
-  | Ast0.Goto(goto,l,sem) -> [145]
-  | Ast0.Return(ret,sem) -> [77]
-  | Ast0.ReturnExpr(ret,exp,sem) -> [78]
-  | Ast0.MetaStmt(name,_) -> [79]
-  | Ast0.MetaStmtList(name,_) -> [80]
-  | Ast0.Disj(_,statement_dots_list,_,_) -> [81]
-  | Ast0.Nest(_,stmt_dots,_,_,_) -> [82]
-  | Ast0.Exp(exp) -> [83]
-  | Ast0.TopExp(exp) -> [141]
-  | Ast0.Ty(ty) -> [124]
-  | Ast0.Dots(d,whencode) -> [84]
-  | Ast0.Circles(d,whencode) -> [85]
-  | Ast0.Stars(d,whencode) -> [86]
-  | Ast0.Include(inc,name) -> [118]
-  | Ast0.Define(def,id,params,body) -> [119]
-  | Ast0.OptStm(re) -> [87]
-  | Ast0.UniqueStm(re) -> [88]
-
-let case_line c =
-  match Ast0.unwrap c with
-    Ast0.Default(def,colon,code) -> [126]
-  | Ast0.Case(case,exp,colon,code) -> [127]
-  | Ast0.OptCase(case) -> [128]
-
-let top_level t =
-  match Ast0.unwrap t with
-    Ast0.DECL(stmt) -> [90]
-  | Ast0.FILEINFO(old_file,new_file) -> [92]
-  | Ast0.CODE(stmt_dots) -> [94]
-  | Ast0.ERRORWORDS(exps) -> [95]
-  | Ast0.OTHER(_) -> [96]
-
-(* 99-101 already used *)
diff --git a/parsing_cocci/.#insert_plus.ml.1.68 b/parsing_cocci/.#insert_plus.ml.1.68
deleted file mode 100644 (file)
index 12009c7..0000000
+++ /dev/null
@@ -1,941 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* The error message "no available token to attach to" often comes in an
-argument list of unbounded length.  In this case, one should move a comma so
-that there is a comma after the + code. *)
-
-(* Start at all of the corresponding BindContext nodes in the minus and
-plus trees, and traverse their children.  We take the same strategy as
-before: collect the list of minus/context nodes/tokens and the list of plus
-tokens, and then merge them. *)
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-module CN = Context_neg
-
-let get_option f = function
-    None -> []
-  | Some x -> f x
-
-(* --------------------------------------------------------------------- *)
-(* Collect root and all context nodes in a tree *)
-
-let collect_context e =
-  let bind x y = x @ y in
-  let option_default = [] in
-
-  let mcode _ = [] in
-
-  let donothing builder r k e =
-    match Ast0.get_mcodekind e with
-      Ast0.CONTEXT(_) -> (builder e) :: (k e)
-    | _ -> k e in
-
-(* special case for everything that contains whencode, so that we skip over
-it *)
-  let expression r k e =
-    donothing Ast0.expr r k
-      (Ast0.rewrap e
-        (match Ast0.unwrap e with
-          Ast0.NestExpr(starter,exp,ender,whencode,multi) ->
-            Ast0.NestExpr(starter,exp,ender,None,multi)
-        | Ast0.Edots(dots,whencode) -> Ast0.Edots(dots,None)
-        | Ast0.Ecircles(dots,whencode) -> Ast0.Ecircles(dots,None)
-        | Ast0.Estars(dots,whencode) -> Ast0.Estars(dots,None)
-        | e -> e)) in
-
-  let initialiser r k i =
-    donothing Ast0.ini r k
-      (Ast0.rewrap i
-        (match Ast0.unwrap i with
-          Ast0.Idots(dots,whencode) -> Ast0.Idots(dots,None)
-        | i -> i)) in
-
-  let statement r k s =
-    donothing Ast0.stmt r k
-      (Ast0.rewrap s
-        (match Ast0.unwrap s with
-          Ast0.Nest(started,stm_dots,ender,whencode,multi) ->
-            Ast0.Nest(started,stm_dots,ender,[],multi)
-        | Ast0.Dots(dots,whencode) -> Ast0.Dots(dots,[])
-        | Ast0.Circles(dots,whencode) -> Ast0.Circles(dots,[])
-        | Ast0.Stars(dots,whencode) -> Ast0.Stars(dots,[])
-        | s -> s)) in
-
-  let topfn r k e = Ast0.TopTag(e) :: (k e) in
-
-  let res =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      (donothing Ast0.dotsExpr) (donothing Ast0.dotsInit)
-      (donothing Ast0.dotsParam) (donothing Ast0.dotsStmt)
-      (donothing Ast0.dotsDecl) (donothing Ast0.dotsCase)
-      (donothing Ast0.ident) expression (donothing Ast0.typeC) initialiser
-      (donothing Ast0.param) (donothing Ast0.decl) statement
-      (donothing Ast0.case_line) topfn in
-  res.V0.combiner_top_level e
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* collect the possible join points, in order, among the children of a
-BindContext.  Dots are not allowed.  Nests and disjunctions are no problem,
-because their delimiters take up a line by themselves *)
-
-(* An Unfavored token is one that is in a BindContext node; using this causes
-  the node to become Neither, meaning that isomorphisms can't be applied *)
-(* Toplevel is for the bef token of a function declaration and is for
-attaching top-level definitions that should come before the complete
-declaration *)
-type minus_join_point = Favored | Unfavored | Toplevel | Decl
-
-(* Maps the index of a node to the indices of the mcodes it contains *)
-let root_token_table = (Hashtbl.create(50) : (int, int list) Hashtbl.t)
-
-let create_root_token_table minus =
-  Hashtbl.iter
-    (function tokens ->
-      function (node,_) ->
-       let key =
-         match node with
-           Ast0.DotsExprTag(d) -> Ast0.get_index d
-         | Ast0.DotsInitTag(d) -> Ast0.get_index d
-         | Ast0.DotsParamTag(d) -> Ast0.get_index d
-         | Ast0.DotsStmtTag(d) -> Ast0.get_index d
-         | Ast0.DotsDeclTag(d) -> Ast0.get_index d
-         | Ast0.DotsCaseTag(d) -> Ast0.get_index d
-         | Ast0.IdentTag(d) -> Ast0.get_index d
-         | Ast0.ExprTag(d) -> Ast0.get_index d
-         | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-             failwith "not possible - iso only"
-         | Ast0.TypeCTag(d) -> Ast0.get_index d
-         | Ast0.ParamTag(d) -> Ast0.get_index d
-         | Ast0.InitTag(d) -> Ast0.get_index d
-         | Ast0.DeclTag(d) -> Ast0.get_index d
-         | Ast0.StmtTag(d) -> Ast0.get_index d
-         | Ast0.CaseLineTag(d) -> Ast0.get_index d
-         | Ast0.TopTag(d) -> Ast0.get_index d
-         | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-         | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-       in
-       Hashtbl.add root_token_table key tokens)
-    CN.minus_table;
-  List.iter
-    (function r ->
-      let index = Ast0.get_index r in
-      try let _ = Hashtbl.find root_token_table index in ()
-      with Not_found -> Hashtbl.add root_token_table index [])
-    minus
-
-let collect_minus_join_points root =
-  let root_index = Ast0.get_index root in
-  let unfavored_tokens = Hashtbl.find root_token_table root_index in
-  let bind x y = x @ y in
-  let option_default = [] in
-
-  let mcode (_,_,info,mcodekind,_) =
-    if List.mem (info.Ast0.offset) unfavored_tokens
-    then [(Unfavored,info,mcodekind)]
-    else [(Favored,info,mcodekind)] in
-
-  let do_nothing r k e =
-    let info = Ast0.get_info e in
-    let index = Ast0.get_index e in
-    match Ast0.get_mcodekind e with
-      (Ast0.MINUS(_)) as mc -> [(Favored,info,mc)]
-    | (Ast0.CONTEXT(_)) as mc when not(index = root_index) ->
-       (* This was unfavored at one point, but I don't remember why *)
-      [(Favored,info,mc)]
-    | _ -> k e in
-
-(* don't want to attach to the outside of DOTS, because metavariables can't
-bind to that; not good for isomorphisms *)
-
-  let dots f k d =
-    let multibind l =
-      let rec loop = function
-         [] -> option_default
-       | [x] -> x
-       | x::xs -> bind x (loop xs) in
-      loop l in
-
-    match Ast0.unwrap d with
-      Ast0.DOTS(l) -> multibind (List.map f l)
-    | Ast0.CIRCLES(l) -> multibind (List.map f l)
-    | Ast0.STARS(l) -> multibind (List.map f l) in
-
-  let edots r k d = dots r.V0.combiner_expression k d in
-  let idots r k d = dots r.V0.combiner_initialiser k d in
-  let pdots r k d = dots r.V0.combiner_parameter k d in
-  let sdots r k d = dots r.V0.combiner_statement k d in
-  let ddots r k d = dots r.V0.combiner_declaration k d in
-  let cdots r k d = dots r.V0.combiner_case_line k d in
-
-  (* a case for everything that has a Opt *)
-
-  let statement r k s =
-    (*
-    let redo_branched res (ifinfo,aftmc) =
-      let redo fv info mc rest =
-       let new_info = {info with Ast0.attachable_end = false} in
-       List.rev ((Favored,ifinfo,aftmc)::(fv,new_info,mc)::rest) in
-      match List.rev res with
-       [(fv,info,mc)] ->
-         (match mc with
-           Ast0.MINUS(_) | Ast0.CONTEXT(_) ->
-               (* even for -, better for isos not to integrate code after an
-                  if into the if body.
-                  but the problem is that this can extend the region in
-                  which a variable is bound, because a variable bound in the
-                  aft node would seem to have to be live in the whole if,
-                  whereas we might like it to be live in only one branch.
-                  ie ideally, if we can keep the minus code in the right
-                  order, we would like to drop it as close to the bindings
-                  of its free variables.  This could be anywhere in the minus
-                  code.  Perhaps we would like to do this after the
-                  application of isomorphisms, though.
-               *)
-             redo fv info mc []
-         | _ -> res)
-      | (fv,info,mc)::rest ->
-         (match mc with
-           Ast0.CONTEXT(_) -> redo fv info mc rest
-         | _ -> res)
-      | _ -> failwith "unexpected empty code" in *)
-    match Ast0.unwrap s with
- (*     Ast0.IfThen(_,_,_,_,_,aft)
-    | Ast0.IfThenElse(_,_,_,_,_,_,_,aft)
-    | Ast0.While(_,_,_,_,_,aft)
-    | Ast0.For(_,_,_,_,_,_,_,_,_,aft)
-    | Ast0.Iterator(_,_,_,_,_,aft) ->
-       redo_branched (do_nothing r k s) aft*)
-    | Ast0.FunDecl((info,bef),fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-       (Toplevel,info,bef)::(k s)
-    | Ast0.Decl((info,bef),decl) -> (Decl,info,bef)::(k s)
-    | Ast0.Nest(starter,stmt_dots,ender,whencode,multi) ->
-       mcode starter @ r.V0.combiner_statement_dots stmt_dots @ mcode ender
-    | Ast0.Dots(d,whencode) | Ast0.Circles(d,whencode)
-    | Ast0.Stars(d,whencode) -> mcode d (* ignore whencode *)
-    | Ast0.OptStm s | Ast0.UniqueStm s ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_statement s
-    | _ -> do_nothing r k s in
-
-  let expression r k e =
-    match Ast0.unwrap e with
-      Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-       mcode starter @
-       r.V0.combiner_expression_dots expr_dots @ mcode ender
-    | Ast0.Edots(d,whencode) | Ast0.Ecircles(d,whencode)
-    | Ast0.Estars(d,whencode) -> mcode d (* ignore whencode *)
-    | Ast0.OptExp e | Ast0.UniqueExp e ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_expression e
-    | _ -> do_nothing r k e in
-
-  let ident r k e =
-    match Ast0.unwrap e with
-      Ast0.OptIdent i | Ast0.UniqueIdent i ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_ident i
-    | _ -> do_nothing r k e in
-
-  let typeC r k e =
-    match Ast0.unwrap e with
-      Ast0.OptType t | Ast0.UniqueType t ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_typeC t
-    | _ -> do_nothing r k e in
-
-  let decl r k e =
-    match Ast0.unwrap e with
-      Ast0.OptDecl d | Ast0.UniqueDecl d ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_declaration d
-    | _ -> do_nothing r k e in
-
-  let initialiser r k e =
-    match Ast0.unwrap e with
-      Ast0.Idots(d,whencode) -> mcode d (* ignore whencode *)
-    | Ast0.OptIni i | Ast0.UniqueIni i ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_initialiser i
-    | _ -> do_nothing r k e in
-
-  let param r k e =
-    match Ast0.unwrap e with
-      Ast0.OptParam p | Ast0.UniqueParam p ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_parameter p
-    | _ -> do_nothing r k e in
-
-  let case_line r k e =
-    match Ast0.unwrap e with
-      Ast0.OptCase c ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_case_line c
-    | _ -> do_nothing r k e in
-
-  let do_top r k (e: Ast0.top_level) = k e in
-
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    edots idots pdots sdots ddots cdots
-    ident expression typeC initialiser param decl statement case_line do_top
-
-
-let call_collect_minus context_nodes :
-    (int * (minus_join_point * Ast0.info * Ast0.mcodekind) list) list =
-  List.map
-    (function e ->
-      match e with
-       Ast0.DotsExprTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_expression_dots e)
-      | Ast0.DotsInitTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_initialiser_list e)
-      | Ast0.DotsParamTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_parameter_list e)
-      | Ast0.DotsStmtTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_statement_dots e)
-      | Ast0.DotsDeclTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_declaration_dots e)
-      | Ast0.DotsCaseTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_case_line_dots e)
-      | Ast0.IdentTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_ident e)
-      | Ast0.ExprTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_expression e)
-      | Ast0.ArgExprTag(e) | Ast0.TestExprTag(e) ->
-         failwith "not possible - iso only"
-      | Ast0.TypeCTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_typeC e)
-      | Ast0.ParamTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_parameter e)
-      | Ast0.InitTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_initialiser e)
-      | Ast0.DeclTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_declaration e)
-      | Ast0.StmtTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_statement e)
-      | Ast0.CaseLineTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_case_line e)
-      | Ast0.TopTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_top_level e)
-      | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-      | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase")
-    context_nodes
-
-(* result of collecting the join points should be sorted in nondecreasing
-   order by line *)
-let verify l =
-  let get_info = function
-      (Favored,info,_) | (Unfavored,info,_) | (Toplevel,info,_)
-    | (Decl,info,_) -> info in
-  let token_start_line      x = (get_info x).Ast0.logical_start in
-  let token_end_line        x = (get_info x).Ast0.logical_end in
-  let token_real_start_line x = (get_info x).Ast0.line_start in
-  let token_real_end_line   x = (get_info x).Ast0.line_end in
-  List.iter
-    (function
-       (index,((_::_) as l1)) ->
-         let _ =
-           List.fold_left
-             (function (prev,real_prev) ->
-               function cur ->
-                 let ln = token_start_line cur in
-                 if ln < prev
-                 then
-                   failwith
-                     (Printf.sprintf
-                        "error in collection of - tokens %d less than %d"
-                        (token_real_start_line cur) real_prev);
-                 (token_end_line cur,token_real_end_line cur))
-             (token_end_line (List.hd l1), token_real_end_line (List.hd l1))
-             (List.tl l1) in
-         ()
-      |        _ -> ()) (* dots, in eg f() has no join points *)
-    l
-
-let process_minus minus =
-  create_root_token_table minus;
-  List.concat
-    (List.map
-       (function x ->
-        let res = call_collect_minus (collect_context x) in
-        verify res;
-        res)
-       minus)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* collect the plus tokens *)
-
-let mk_baseType x         = Ast.BaseTypeTag x
-let mk_structUnion x      = Ast.StructUnionTag x
-let mk_sign x             = Ast.SignTag x
-let mk_ident x            = Ast.IdentTag (Ast0toast.ident x)
-let mk_expression x       = Ast.ExpressionTag (Ast0toast.expression x)
-let mk_constant x         = Ast.ConstantTag x
-let mk_unaryOp x          = Ast.UnaryOpTag x
-let mk_assignOp x         = Ast.AssignOpTag x
-let mk_fixOp x            = Ast.FixOpTag x
-let mk_binaryOp x         = Ast.BinaryOpTag x
-let mk_arithOp x          = Ast.ArithOpTag x
-let mk_logicalOp x        = Ast.LogicalOpTag x
-let mk_declaration x      = Ast.DeclarationTag (Ast0toast.declaration x)
-let mk_topdeclaration x   = Ast.DeclarationTag (Ast0toast.declaration x)
-let mk_storage x          = Ast.StorageTag x
-let mk_inc_file x         = Ast.IncFileTag x
-let mk_statement x        = Ast.StatementTag (Ast0toast.statement x)
-let mk_case_line x        = Ast.CaseLineTag (Ast0toast.case_line x)
-let mk_const_vol x        = Ast.ConstVolTag x
-let mk_token x info       = Ast.Token (x,Some info)
-let mk_meta (_,x) info    = Ast.Token (x,Some info)
-let mk_code x             = Ast.Code (Ast0toast.top_level x)
-
-let mk_exprdots x  = Ast.ExprDotsTag (Ast0toast.expression_dots x)
-let mk_paramdots x = Ast.ParamDotsTag (Ast0toast.parameter_list x)
-let mk_stmtdots x  = Ast.StmtDotsTag (Ast0toast.statement_dots x)
-let mk_decldots x  = Ast.DeclDotsTag (Ast0toast.declaration_dots x)
-let mk_casedots x  = failwith "+ case lines not supported"
-let mk_typeC x     = Ast.FullTypeTag (Ast0toast.typeC x)
-let mk_init x      = Ast.InitTag (Ast0toast.initialiser x)
-let mk_param x     = Ast.ParamTag (Ast0toast.parameterTypeDef x)
-
-let collect_plus_nodes root =
-  let root_index = Ast0.get_index root in
-
-  let bind x y = x @ y in
-  let option_default = [] in
-
-  let mcode fn (term,_,info,mcodekind,_) =
-    match mcodekind with Ast0.PLUS -> [(info,fn term)] | _ -> [] in
-
-  let imcode fn (term,_,info,mcodekind,_) =
-    match mcodekind with
-      Ast0.PLUS -> [(info,fn term (Ast0toast.convert_info info))]
-    | _ -> [] in
-
-  let do_nothing fn r k e =
-    match Ast0.get_mcodekind e with
-      (Ast0.CONTEXT(_)) when not(Ast0.get_index e = root_index) -> []
-    | Ast0.PLUS -> [(Ast0.get_info e,fn e)]
-    | _ -> k e in
-
-  (* case for everything that is just a wrapper for a simpler thing *)
-  let stmt r k e =
-    match Ast0.unwrap e with
-      Ast0.Exp(exp) -> r.V0.combiner_expression exp
-    | Ast0.TopExp(exp) -> r.V0.combiner_expression exp
-    | Ast0.Ty(ty) -> r.V0.combiner_typeC ty
-    | Ast0.Decl(_,decl) -> r.V0.combiner_declaration decl
-    | _ -> do_nothing mk_statement r k e in
-
-  (* statementTag is preferred, because it indicates that one statement is
-  replaced by one statement, in single_statement *)
-  let stmt_dots r k e =
-    match Ast0.unwrap e with
-      Ast0.DOTS([s]) | Ast0.CIRCLES([s]) | Ast0.STARS([s]) ->
-       r.V0.combiner_statement s
-    | _ -> do_nothing mk_stmtdots r k e in
-
-  let toplevel r k e =
-    match Ast0.unwrap e with
-      Ast0.DECL(s) -> r.V0.combiner_statement s
-    | Ast0.CODE(sdots) -> r.V0.combiner_statement_dots sdots
-    | _ -> do_nothing mk_code r k e in
-
-  let initdots r k e = k e in
-
-  V0.combiner bind option_default
-    (imcode mk_meta) (imcode mk_token) (mcode mk_constant) (mcode mk_assignOp)
-    (mcode mk_fixOp)
-    (mcode mk_unaryOp) (mcode mk_binaryOp) (mcode mk_const_vol)
-    (mcode mk_baseType) (mcode mk_sign) (mcode mk_structUnion)
-    (mcode mk_storage) (mcode mk_inc_file)
-    (do_nothing mk_exprdots) initdots
-    (do_nothing mk_paramdots) stmt_dots (do_nothing mk_decldots)
-    (do_nothing mk_casedots)
-    (do_nothing mk_ident) (do_nothing mk_expression)
-    (do_nothing mk_typeC) (do_nothing mk_init) (do_nothing mk_param)
-    (do_nothing mk_declaration)
-    stmt (do_nothing mk_case_line) toplevel
-
-let call_collect_plus context_nodes :
-    (int * (Ast0.info * Ast.anything) list) list =
-  List.map
-    (function e ->
-      match e with
-       Ast0.DotsExprTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_expression_dots e)
-      | Ast0.DotsInitTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_initialiser_list e)
-      | Ast0.DotsParamTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_parameter_list e)
-      | Ast0.DotsStmtTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_statement_dots e)
-      | Ast0.DotsDeclTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_declaration_dots e)
-      | Ast0.DotsCaseTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_case_line_dots e)
-      | Ast0.IdentTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_ident e)
-      | Ast0.ExprTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_expression e)
-      | Ast0.ArgExprTag(_) | Ast0.TestExprTag(_) ->
-         failwith "not possible - iso only"
-      | Ast0.TypeCTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_typeC e)
-      | Ast0.InitTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_initialiser e)
-      | Ast0.ParamTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_parameter e)
-      | Ast0.DeclTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_declaration e)
-      | Ast0.StmtTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_statement e)
-      | Ast0.CaseLineTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_case_line e)
-      | Ast0.TopTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_top_level e)
-      | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-      | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase")
-    context_nodes
-
-(* The plus fragments are converted to a list of lists of lists.
-Innermost list: Elements have type anything.  For any pair of successive
-elements, n and n+1, the ending line of n is the same as the starting line
-of n+1.
-Middle lists: For any pair of successive elements, n and n+1, the ending
-line of n is one less than the starting line of n+1.
-Outer list: For any pair of successive elements, n and n+1, the ending
-line of n is more than one less than the starting line of n+1. *)
-
-let logstart info = info.Ast0.logical_start
-let logend info = info.Ast0.logical_end
-
-let redo info start finish =
-  {{info with Ast0.logical_start = start} with Ast0.logical_end = finish}
-
-let rec find_neighbors (index,l) :
-    int * (Ast0.info * (Ast.anything list list)) list =
-  let rec loop = function
-      [] -> []
-    | (i,x)::rest ->
-       (match loop rest with
-         ((i1,(x1::rest_inner))::rest_middle)::rest_outer ->
-           let finish1 = logend i in
-           let start2 = logstart i1 in
-           if finish1 = start2
-           then
-             ((redo i (logstart i) (logend i1),(x::x1::rest_inner))
-              ::rest_middle)
-             ::rest_outer
-           else if finish1 + 1 = start2
-           then ((i,[x])::(i1,(x1::rest_inner))::rest_middle)::rest_outer
-           else [(i,[x])]::((i1,(x1::rest_inner))::rest_middle)::rest_outer
-       | _ -> [[(i,[x])]]) (* rest must be [] *) in
-  let res =
-    List.map
-      (function l ->
-       let (start_info,_) = List.hd l in
-       let (end_info,_) = List.hd (List.rev l) in
-       (redo start_info (logstart start_info) (logend end_info),
-        List.map (function (_,x) -> x) l))
-      (loop l) in
-  (index,res)
-
-let process_plus plus :
-    (int * (Ast0.info * Ast.anything list list) list) list =
-  List.concat
-    (List.map
-       (function x ->
-        List.map find_neighbors (call_collect_plus (collect_context x)))
-       plus)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* merge *)
-(*
-let merge_one = function
-    (m1::m2::minus_info,p::plus_info) ->
-      if p < m1, then
-         attach p to the beginning of m1.bef if m1 is Good, fail if it is bad
-      if p > m1 && p < m2, then consider the following possibilities, in order
-         m1 is Good and favored: attach to the beginning of m1.aft
-         m2 is Good and favored: attach to the beginning of m2.bef; drop m1
-         m1 is Good and unfavored: attach to the beginning of m1.aft
-         m2 is Good and unfavored: attach to the beginning of m2.bef; drop m1
-         also flip m1.bef if the first where > m1
-         if we drop m1, then flip m1.aft first
-      if p > m2
-         m2 is Good and favored: attach to the beginning of m2.aft; drop m1
-*)
-
-(* end of first argument < start/end of second argument *)
-let less_than_start info1 info2 =
-  info1.Ast0.logical_end < info2.Ast0.logical_start
-let less_than_end info1 info2 =
-  info1.Ast0.logical_end < info2.Ast0.logical_end
-let greater_than_end info1 info2 =
-  info1.Ast0.logical_start > info2.Ast0.logical_end
-let good_start info = info.Ast0.attachable_start
-let good_end info = info.Ast0.attachable_end
-
-let toplevel = function Toplevel -> true | Favored | Unfavored | Decl -> false
-let decl = function Decl -> true | Favored | Unfavored | Toplevel -> false
-let favored = function Favored -> true | Unfavored | Toplevel | Decl -> false
-
-let top_code =
-  List.for_all (List.for_all (function Ast.Code _ -> true | _ -> false))
-
-(* The following is probably not correct.  The idea is to detect what
-should be placed completely before the declaration.  So type/storage
-related things do not fall into this category, and complete statements do
-fall into this category.  But perhaps other things should be in this
-category as well, such as { or ;? *)
-let predecl_code =
-  let tester = function
-      (* the following should definitely be true *)
-      Ast.DeclarationTag _
-    | Ast.StatementTag _
-    | Ast.Rule_elemTag _
-    | Ast.StmtDotsTag _
-    | Ast.Code _ -> true
-      (* the following should definitely be false *)
-    | Ast.FullTypeTag _ | Ast.BaseTypeTag _ | Ast.StructUnionTag _
-    | Ast.SignTag _
-    | Ast.StorageTag _ | Ast.ConstVolTag _ | Ast.TypeCTag _ -> false
-      (* not sure about the rest *)
-    | _ -> false in
-  List.for_all (List.for_all tester)
-
-let pr = Printf.sprintf
-
-let insert thing thinginfo into intoinfo =
-  let get_last l = let l = List.rev l in (List.rev(List.tl l),List.hd l) in
-  let get_first l = (List.hd l,List.tl l) in
-  let thing_start = thinginfo.Ast0.logical_start in
-  let thing_end = thinginfo.Ast0.logical_end in
-  let thing_offset = thinginfo.Ast0.offset in
-  let into_start = intoinfo.Ast0.tline_start in
-  let into_end = intoinfo.Ast0.tline_end in
-  let into_left_offset = intoinfo.Ast0.left_offset in
-  let into_right_offset = intoinfo.Ast0.right_offset in
-  Printf.printf "thing start %d thing end %d into start %d into end %d\n"
-    thing_start thing_end into_start into_end;
-  if thing_end < into_start && thing_start < into_start
-  then (thing@into,
-       {{intoinfo with Ast0.tline_start = thing_start}
-       with Ast0.left_offset = thing_offset})
-  else if thing_end = into_start && thing_offset < into_left_offset
-  then
-    let (prev,last) = get_last thing in
-    let (first,rest) = get_first into in
-    (prev@[last@first]@rest,
-     {{intoinfo with Ast0.tline_start = thing_start}
-     with Ast0.left_offset = thing_offset})
-  else if thing_start > into_end && thing_end > into_end
-  then (into@thing,
-       {{intoinfo with Ast0.tline_end = thing_end}
-       with Ast0.right_offset = thing_offset})
-  else if thing_start = into_end && thing_offset > into_right_offset
-  then
-    let (first,rest) = get_first thing in
-    let (prev,last) = get_last into in
-    (prev@[last@first]@rest,
-     {{intoinfo with Ast0.tline_end = thing_end}
-     with Ast0.right_offset = thing_offset})
-  else
-    begin
-      Printf.printf "thing start %d thing end %d into start %d into end %d\n"
-       thing_start thing_end into_start into_end;
-      Printf.printf "thing offset %d left offset %d right offset %d\n"
-       thing_offset into_left_offset into_right_offset;
-      Pretty_print_cocci.print_anything "" thing;
-      failwith "can't figure out where to put the + code"
-    end
-
-let init thing info =
-  (thing,
-   {Ast0.tline_start = info.Ast0.logical_start;
-     Ast0.tline_end = info.Ast0.logical_end;
-     Ast0.left_offset = info.Ast0.offset;
-     Ast0.right_offset = info.Ast0.offset})
-
-let attachbefore (infop,p) = function
-    Ast0.MINUS(replacements) ->
-      (match !replacements with
-       ([],ti) -> replacements := init p infop
-      |        (repl,ti) -> replacements := insert p infop repl ti)
-  | Ast0.CONTEXT(neighbors) ->
-      let (repl,ti1,ti2) = !neighbors in
-      (match repl with
-       Ast.BEFORE(bef) ->
-         let (bef,ti1) = insert p infop bef ti1 in
-         neighbors := (Ast.BEFORE(bef),ti1,ti2)
-      |        Ast.AFTER(aft) -> 
-         let (bef,ti1) = init p infop in
-         neighbors := (Ast.BEFOREAFTER(bef,aft),ti1,ti2)
-      |        Ast.BEFOREAFTER(bef,aft) ->
-         let (bef,ti1) = insert p infop bef ti1 in
-         neighbors := (Ast.BEFOREAFTER(bef,aft),ti1,ti2)
-      |        Ast.NOTHING ->
-         let (bef,ti1) = init p infop in
-         neighbors := (Ast.BEFORE(bef),ti1,ti2))
-  | _ -> failwith "not possible for attachbefore"
-
-let attachafter (infop,p) = function
-    Ast0.MINUS(replacements) ->
-      (match !replacements with
-       ([],ti) -> replacements := init p infop
-      |        (repl,ti) -> replacements := insert p infop repl ti)
-  | Ast0.CONTEXT(neighbors) ->
-      let (repl,ti1,ti2) = !neighbors in
-      (match repl with
-       Ast.BEFORE(bef) ->
-         let (aft,ti2) = init p infop in
-         neighbors := (Ast.BEFOREAFTER(bef,aft),ti1,ti2)
-      |        Ast.AFTER(aft) -> 
-         let (aft,ti2) = insert p infop aft ti2 in
-         neighbors := (Ast.AFTER(aft),ti1,ti2)
-      |        Ast.BEFOREAFTER(bef,aft) ->
-         let (aft,ti2) = insert p infop aft ti2 in
-         neighbors := (Ast.BEFOREAFTER(bef,aft),ti1,ti2)
-      |        Ast.NOTHING ->
-         let (aft,ti2) = init p infop in
-         neighbors := (Ast.AFTER(aft),ti1,ti2))
-  | _ -> failwith "not possible for attachbefore"
-
-let attach_all_before ps m =
-  List.iter (function x -> attachbefore x m) ps
-
-let attach_all_after ps m =
-  List.iter (function x -> attachafter x m) ps
-
-let split_at_end info ps =
-  let split_point =  info.Ast0.logical_end in
-  List.partition
-    (function (info,_) -> info.Ast0.logical_end < split_point)
-    ps
-
-let allminus = function
-    Ast0.MINUS(_) -> true
-  | _ -> false
-
-let rec before_m1 ((f1,infom1,m1) as x1) ((f2,infom2,m2) as x2) rest = function
-    [] -> ()
-  | (((infop,_) as p) :: ps) as all ->
-      if less_than_start infop infom1 or
-       (allminus m1 && less_than_end infop infom1) (* account for trees *)
-      then
-       if good_start infom1
-       then (attachbefore p m1; before_m1 x1 x2 rest ps)
-       else
-         failwith
-           (pr "%d: no available token to attach to" infop.Ast0.line_start)
-      else after_m1 x1 x2 rest all
-
-and after_m1 ((f1,infom1,m1) as x1) ((f2,infom2,m2) as x2) rest = function
-    [] -> ()
-  | (((infop,pcode) as p) :: ps) as all ->
-      (* if the following is false, then some + code is stuck in the middle
-        of some context code (m1).  could drop down to the token level.
-        this might require adjustments in ast0toast as well, when + code on
-        expressions is dropped down to + code on expressions.  it might
-        also break some invariants on which iso depends, particularly on
-        what it can infer from something being CONTEXT with no top-level
-        modifications.  for the moment, we thus give an error, asking the
-        user to rewrite the semantic patch. *)
-      if greater_than_end infop infom1
-      then
-       if less_than_start infop infom2
-       then
-         if predecl_code pcode && good_end infom1 && decl f1
-         then (attachafter p m1; after_m1 x1 x2 rest ps)
-         else if predecl_code pcode && good_start infom2 && decl f2
-         then before_m2 x2 rest all
-         else if top_code pcode && good_end infom1 && toplevel f1
-         then (attachafter p m1; after_m1 x1 x2 rest ps)
-         else if top_code pcode && good_start infom2 && toplevel f2
-         then before_m2 x2 rest all
-         else if good_end infom1 && favored f1
-         then (attachafter p m1; after_m1 x1 x2 rest ps)
-         else if good_start infom2 && favored f2
-         then before_m2 x2 rest all
-         else if good_end infom1
-         then (attachafter p m1; after_m1 x1 x2 rest ps)
-         else if good_start infom2
-         then before_m2 x2 rest all
-         else
-           failwith
-             (pr "%d: no available token to attach to" infop.Ast0.line_start)
-       else after_m2 x2 rest all
-      else
-       begin
-         Printf.printf "between: p start %d p end %d m1 start %d m1 end %d m2 start %d m2 end %d\n"
-           infop.Ast0.line_start infop.Ast0.line_end
-           infom1.Ast0.line_start infom1.Ast0.line_end
-           infom2.Ast0.line_start infom2.Ast0.line_end;
-         Pretty_print_cocci.print_anything "" pcode;
-         failwith
-           "The semantic patch is structured in a way that may give bad results with isomorphisms.  Please try to rewrite it by moving + code out from -/context terms."
-       end
-
-and before_m2 ((f2,infom2,m2) as x2) rest
-    (p : (Ast0.info * Ast.anything list list) list) =
-  match (rest,p) with
-    (_,[]) -> ()
-  | ([],((infop,_)::_)) ->
-      let (bef_m2,aft_m2) = split_at_end infom2 p in (* bef_m2 isn't empty *)
-      if good_start infom2
-      then (attach_all_before bef_m2 m2; after_m2 x2 rest aft_m2)
-      else
-       failwith
-         (pr "%d: no available token to attach to" infop.Ast0.line_start)
-  | (m::ms,_) -> before_m1 x2 m ms p
-
-and after_m2 ((f2,infom2,m2) as x2) rest
-    (p : (Ast0.info * Ast.anything list list) list) =
-  match (rest,p) with
-    (_,[]) -> ()
-  | ([],((infop,_)::_)) ->
-      if good_end infom2
-      then attach_all_after p m2
-      else
-       failwith
-         (pr "%d: no available token to attach to" infop.Ast0.line_start)
-  | (m::ms,_) -> after_m1 x2 m ms p
-
-let merge_one : (minus_join_point * Ast0.info * 'a) list *
-    (Ast0.info * Ast.anything list list) list -> unit = function (m,p) ->
-  (*
-  Printf.printf "minus code\n";
-  List.iter
-    (function (_,info,_) ->
-      Printf.printf "start %d end %d real_start %d real_end %d\n"
-       info.Ast0.logical_start info.Ast0.logical_end
-       info.Ast0.line_start info.Ast0.line_end)
-    m;
-  Printf.printf "plus code\n";
-  List.iter
-    (function (info,p) ->
-      Printf.printf "start %d end %d real_start %d real_end %d\n"
-       info.Ast0.logical_start info.Ast0.logical_end
-       info.Ast0.line_end info.Ast0.line_end;
-      Pretty_print_cocci.print_anything "" p;
-      Format.print_newline())
-    p;
-  *)
-  match (m,p) with
-    (_,[]) -> ()
-  | (m1::m2::restm,p) -> before_m1 m1 m2 restm p
-  | ([m],p) -> before_m2 m [] p
-  | ([],_) -> failwith "minus tree ran out before the plus tree"
-
-let merge minus_list plus_list =
-  (*
-  Printf.printf "minus list %s\n"
-    (String.concat " "
-       (List.map (function (x,_) -> string_of_int x) minus_list));
-  Printf.printf "plus list %s\n"
-    (String.concat " "
-       (List.map (function (x,_) -> string_of_int x) plus_list));
-  *)
-  List.iter
-    (function (index,minus_info) ->
-      let plus_info = List.assoc index plus_list in
-      merge_one (minus_info,plus_info))
-    minus_list
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Need to check that CONTEXT nodes have nothing attached to their tokens.
-If they do, they become MIXED *)
-
-let reevaluate_contextness =
-   let bind = (@) in
-   let option_default = [] in
-
-   let mcode (_,_,_,mc,_) =
-     match mc with
-       Ast0.CONTEXT(mc) -> let (ba,_,_) = !mc in [ba]
-     | _ -> [] in
-
-   let donothing r k e =
-     match Ast0.get_mcodekind e with
-       Ast0.CONTEXT(mc) ->
-        if List.exists (function Ast.NOTHING -> false | _ -> true) (k e)
-        then Ast0.set_mcodekind e (Ast0.MIXED(mc));
-        []
-     | _ -> let _ = k e in [] in
-
-  let res =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing donothing
-      donothing
-      donothing donothing donothing donothing donothing donothing donothing in
-  res.V0.combiner_top_level
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-
-let insert_plus minus plus =
-  let minus_stream = process_minus minus in
-  let plus_stream = process_plus plus in
-  merge minus_stream plus_stream;
-  List.iter (function x -> let _ =  reevaluate_contextness x in ()) minus
diff --git a/parsing_cocci/.#insert_plus.ml.1.69 b/parsing_cocci/.#insert_plus.ml.1.69
deleted file mode 100644 (file)
index 7609cf8..0000000
+++ /dev/null
@@ -1,946 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* The error message "no available token to attach to" often comes in an
-argument list of unbounded length.  In this case, one should move a comma so
-that there is a comma after the + code. *)
-
-(* Start at all of the corresponding BindContext nodes in the minus and
-plus trees, and traverse their children.  We take the same strategy as
-before: collect the list of minus/context nodes/tokens and the list of plus
-tokens, and then merge them. *)
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-module CN = Context_neg
-
-let get_option f = function
-    None -> []
-  | Some x -> f x
-
-(* --------------------------------------------------------------------- *)
-(* Collect root and all context nodes in a tree *)
-
-let collect_context e =
-  let bind x y = x @ y in
-  let option_default = [] in
-
-  let mcode _ = [] in
-
-  let donothing builder r k e =
-    match Ast0.get_mcodekind e with
-      Ast0.CONTEXT(_) -> (builder e) :: (k e)
-    | _ -> k e in
-
-(* special case for everything that contains whencode, so that we skip over
-it *)
-  let expression r k e =
-    donothing Ast0.expr r k
-      (Ast0.rewrap e
-        (match Ast0.unwrap e with
-          Ast0.NestExpr(starter,exp,ender,whencode,multi) ->
-            Ast0.NestExpr(starter,exp,ender,None,multi)
-        | Ast0.Edots(dots,whencode) -> Ast0.Edots(dots,None)
-        | Ast0.Ecircles(dots,whencode) -> Ast0.Ecircles(dots,None)
-        | Ast0.Estars(dots,whencode) -> Ast0.Estars(dots,None)
-        | e -> e)) in
-
-  let initialiser r k i =
-    donothing Ast0.ini r k
-      (Ast0.rewrap i
-        (match Ast0.unwrap i with
-          Ast0.Idots(dots,whencode) -> Ast0.Idots(dots,None)
-        | i -> i)) in
-
-  let statement r k s =
-    donothing Ast0.stmt r k
-      (Ast0.rewrap s
-        (match Ast0.unwrap s with
-          Ast0.Nest(started,stm_dots,ender,whencode,multi) ->
-            Ast0.Nest(started,stm_dots,ender,[],multi)
-        | Ast0.Dots(dots,whencode) -> Ast0.Dots(dots,[])
-        | Ast0.Circles(dots,whencode) -> Ast0.Circles(dots,[])
-        | Ast0.Stars(dots,whencode) -> Ast0.Stars(dots,[])
-        | s -> s)) in
-
-  let topfn r k e = Ast0.TopTag(e) :: (k e) in
-
-  let res =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      (donothing Ast0.dotsExpr) (donothing Ast0.dotsInit)
-      (donothing Ast0.dotsParam) (donothing Ast0.dotsStmt)
-      (donothing Ast0.dotsDecl) (donothing Ast0.dotsCase)
-      (donothing Ast0.ident) expression (donothing Ast0.typeC) initialiser
-      (donothing Ast0.param) (donothing Ast0.decl) statement
-      (donothing Ast0.case_line) topfn in
-  res.V0.combiner_top_level e
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* collect the possible join points, in order, among the children of a
-BindContext.  Dots are not allowed.  Nests and disjunctions are no problem,
-because their delimiters take up a line by themselves *)
-
-(* An Unfavored token is one that is in a BindContext node; using this causes
-  the node to become Neither, meaning that isomorphisms can't be applied *)
-(* Toplevel is for the bef token of a function declaration and is for
-attaching top-level definitions that should come before the complete
-declaration *)
-type minus_join_point = Favored | Unfavored | Toplevel | Decl
-
-(* Maps the index of a node to the indices of the mcodes it contains *)
-let root_token_table = (Hashtbl.create(50) : (int, int list) Hashtbl.t)
-
-let create_root_token_table minus =
-  Hashtbl.iter
-    (function tokens ->
-      function (node,_) ->
-       let key =
-         match node with
-           Ast0.DotsExprTag(d) -> Ast0.get_index d
-         | Ast0.DotsInitTag(d) -> Ast0.get_index d
-         | Ast0.DotsParamTag(d) -> Ast0.get_index d
-         | Ast0.DotsStmtTag(d) -> Ast0.get_index d
-         | Ast0.DotsDeclTag(d) -> Ast0.get_index d
-         | Ast0.DotsCaseTag(d) -> Ast0.get_index d
-         | Ast0.IdentTag(d) -> Ast0.get_index d
-         | Ast0.ExprTag(d) -> Ast0.get_index d
-         | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-             failwith "not possible - iso only"
-         | Ast0.TypeCTag(d) -> Ast0.get_index d
-         | Ast0.ParamTag(d) -> Ast0.get_index d
-         | Ast0.InitTag(d) -> Ast0.get_index d
-         | Ast0.DeclTag(d) -> Ast0.get_index d
-         | Ast0.StmtTag(d) -> Ast0.get_index d
-         | Ast0.CaseLineTag(d) -> Ast0.get_index d
-         | Ast0.TopTag(d) -> Ast0.get_index d
-         | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-         | Ast0.IsoWhenTTag(_) -> failwith "only within iso phase"
-         | Ast0.IsoWhenFTag(_) -> failwith "only within iso phase"
-         | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase"
-       in
-       Hashtbl.add root_token_table key tokens)
-    CN.minus_table;
-  List.iter
-    (function r ->
-      let index = Ast0.get_index r in
-      try let _ = Hashtbl.find root_token_table index in ()
-      with Not_found -> Hashtbl.add root_token_table index [])
-    minus
-
-let collect_minus_join_points root =
-  let root_index = Ast0.get_index root in
-  let unfavored_tokens = Hashtbl.find root_token_table root_index in
-  let bind x y = x @ y in
-  let option_default = [] in
-
-  let mcode (_,_,info,mcodekind,_) =
-    if List.mem (info.Ast0.offset) unfavored_tokens
-    then [(Unfavored,info,mcodekind)]
-    else [(Favored,info,mcodekind)] in
-
-  let do_nothing r k e =
-    let info = Ast0.get_info e in
-    let index = Ast0.get_index e in
-    match Ast0.get_mcodekind e with
-      (Ast0.MINUS(_)) as mc -> [(Favored,info,mc)]
-    | (Ast0.CONTEXT(_)) as mc when not(index = root_index) ->
-       (* This was unfavored at one point, but I don't remember why *)
-      [(Favored,info,mc)]
-    | _ -> k e in
-
-(* don't want to attach to the outside of DOTS, because metavariables can't
-bind to that; not good for isomorphisms *)
-
-  let dots f k d =
-    let multibind l =
-      let rec loop = function
-         [] -> option_default
-       | [x] -> x
-       | x::xs -> bind x (loop xs) in
-      loop l in
-
-    match Ast0.unwrap d with
-      Ast0.DOTS(l) -> multibind (List.map f l)
-    | Ast0.CIRCLES(l) -> multibind (List.map f l)
-    | Ast0.STARS(l) -> multibind (List.map f l) in
-
-  let edots r k d = dots r.V0.combiner_expression k d in
-  let idots r k d = dots r.V0.combiner_initialiser k d in
-  let pdots r k d = dots r.V0.combiner_parameter k d in
-  let sdots r k d = dots r.V0.combiner_statement k d in
-  let ddots r k d = dots r.V0.combiner_declaration k d in
-  let cdots r k d = dots r.V0.combiner_case_line k d in
-
-  (* a case for everything that has a Opt *)
-
-  let statement r k s =
-    (*
-    let redo_branched res (ifinfo,aftmc) =
-      let redo fv info mc rest =
-       let new_info = {info with Ast0.attachable_end = false} in
-       List.rev ((Favored,ifinfo,aftmc)::(fv,new_info,mc)::rest) in
-      match List.rev res with
-       [(fv,info,mc)] ->
-         (match mc with
-           Ast0.MINUS(_) | Ast0.CONTEXT(_) ->
-               (* even for -, better for isos not to integrate code after an
-                  if into the if body.
-                  but the problem is that this can extend the region in
-                  which a variable is bound, because a variable bound in the
-                  aft node would seem to have to be live in the whole if,
-                  whereas we might like it to be live in only one branch.
-                  ie ideally, if we can keep the minus code in the right
-                  order, we would like to drop it as close to the bindings
-                  of its free variables.  This could be anywhere in the minus
-                  code.  Perhaps we would like to do this after the
-                  application of isomorphisms, though.
-               *)
-             redo fv info mc []
-         | _ -> res)
-      | (fv,info,mc)::rest ->
-         (match mc with
-           Ast0.CONTEXT(_) -> redo fv info mc rest
-         | _ -> res)
-      | _ -> failwith "unexpected empty code" in *)
-    match Ast0.unwrap s with
- (*     Ast0.IfThen(_,_,_,_,_,aft)
-    | Ast0.IfThenElse(_,_,_,_,_,_,_,aft)
-    | Ast0.While(_,_,_,_,_,aft)
-    | Ast0.For(_,_,_,_,_,_,_,_,_,aft)
-    | Ast0.Iterator(_,_,_,_,_,aft) ->
-       redo_branched (do_nothing r k s) aft*)
-    | Ast0.FunDecl((info,bef),fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-       (Toplevel,info,bef)::(k s)
-    | Ast0.Decl((info,bef),decl) -> (Decl,info,bef)::(k s)
-    | Ast0.Nest(starter,stmt_dots,ender,whencode,multi) ->
-       mcode starter @ r.V0.combiner_statement_dots stmt_dots @ mcode ender
-    | Ast0.Dots(d,whencode) | Ast0.Circles(d,whencode)
-    | Ast0.Stars(d,whencode) -> mcode d (* ignore whencode *)
-    | Ast0.OptStm s | Ast0.UniqueStm s ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_statement s
-    | _ -> do_nothing r k s in
-
-  let expression r k e =
-    match Ast0.unwrap e with
-      Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-       mcode starter @
-       r.V0.combiner_expression_dots expr_dots @ mcode ender
-    | Ast0.Edots(d,whencode) | Ast0.Ecircles(d,whencode)
-    | Ast0.Estars(d,whencode) -> mcode d (* ignore whencode *)
-    | Ast0.OptExp e | Ast0.UniqueExp e ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_expression e
-    | _ -> do_nothing r k e in
-
-  let ident r k e =
-    match Ast0.unwrap e with
-      Ast0.OptIdent i | Ast0.UniqueIdent i ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_ident i
-    | _ -> do_nothing r k e in
-
-  let typeC r k e =
-    match Ast0.unwrap e with
-      Ast0.OptType t | Ast0.UniqueType t ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_typeC t
-    | _ -> do_nothing r k e in
-
-  let decl r k e =
-    match Ast0.unwrap e with
-      Ast0.OptDecl d | Ast0.UniqueDecl d ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_declaration d
-    | _ -> do_nothing r k e in
-
-  let initialiser r k e =
-    match Ast0.unwrap e with
-      Ast0.Idots(d,whencode) -> mcode d (* ignore whencode *)
-    | Ast0.OptIni i | Ast0.UniqueIni i ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_initialiser i
-    | _ -> do_nothing r k e in
-
-  let param r k e =
-    match Ast0.unwrap e with
-      Ast0.OptParam p | Ast0.UniqueParam p ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_parameter p
-    | _ -> do_nothing r k e in
-
-  let case_line r k e =
-    match Ast0.unwrap e with
-      Ast0.OptCase c ->
-       (* put the + code on the thing, not on the opt *)
-       r.V0.combiner_case_line c
-    | _ -> do_nothing r k e in
-
-  let do_top r k (e: Ast0.top_level) = k e in
-
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    edots idots pdots sdots ddots cdots
-    ident expression typeC initialiser param decl statement case_line do_top
-
-
-let call_collect_minus context_nodes :
-    (int * (minus_join_point * Ast0.info * Ast0.mcodekind) list) list =
-  List.map
-    (function e ->
-      match e with
-       Ast0.DotsExprTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_expression_dots e)
-      | Ast0.DotsInitTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_initialiser_list e)
-      | Ast0.DotsParamTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_parameter_list e)
-      | Ast0.DotsStmtTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_statement_dots e)
-      | Ast0.DotsDeclTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_declaration_dots e)
-      | Ast0.DotsCaseTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_case_line_dots e)
-      | Ast0.IdentTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_ident e)
-      | Ast0.ExprTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_expression e)
-      | Ast0.ArgExprTag(e) | Ast0.TestExprTag(e) ->
-         failwith "not possible - iso only"
-      | Ast0.TypeCTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_typeC e)
-      | Ast0.ParamTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_parameter e)
-      | Ast0.InitTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_initialiser e)
-      | Ast0.DeclTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_declaration e)
-      | Ast0.StmtTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_statement e)
-      | Ast0.CaseLineTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_case_line e)
-      | Ast0.TopTag(e) ->
-         (Ast0.get_index e,
-          (collect_minus_join_points e).V0.combiner_top_level e)
-      | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-      | Ast0.IsoWhenTTag(_) -> failwith "only within iso phase"
-      | Ast0.IsoWhenFTag(_) -> failwith "only within iso phase"
-      | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase")
-    context_nodes
-
-(* result of collecting the join points should be sorted in nondecreasing
-   order by line *)
-let verify l =
-  let get_info = function
-      (Favored,info,_) | (Unfavored,info,_) | (Toplevel,info,_)
-    | (Decl,info,_) -> info in
-  let token_start_line      x = (get_info x).Ast0.logical_start in
-  let token_end_line        x = (get_info x).Ast0.logical_end in
-  let token_real_start_line x = (get_info x).Ast0.line_start in
-  let token_real_end_line   x = (get_info x).Ast0.line_end in
-  List.iter
-    (function
-       (index,((_::_) as l1)) ->
-         let _ =
-           List.fold_left
-             (function (prev,real_prev) ->
-               function cur ->
-                 let ln = token_start_line cur in
-                 if ln < prev
-                 then
-                   failwith
-                     (Printf.sprintf
-                        "error in collection of - tokens %d less than %d"
-                        (token_real_start_line cur) real_prev);
-                 (token_end_line cur,token_real_end_line cur))
-             (token_end_line (List.hd l1), token_real_end_line (List.hd l1))
-             (List.tl l1) in
-         ()
-      |        _ -> ()) (* dots, in eg f() has no join points *)
-    l
-
-let process_minus minus =
-  create_root_token_table minus;
-  List.concat
-    (List.map
-       (function x ->
-        let res = call_collect_minus (collect_context x) in
-        verify res;
-        res)
-       minus)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* collect the plus tokens *)
-
-let mk_baseType x         = Ast.BaseTypeTag x
-let mk_structUnion x      = Ast.StructUnionTag x
-let mk_sign x             = Ast.SignTag x
-let mk_ident x            = Ast.IdentTag (Ast0toast.ident x)
-let mk_expression x       = Ast.ExpressionTag (Ast0toast.expression x)
-let mk_constant x         = Ast.ConstantTag x
-let mk_unaryOp x          = Ast.UnaryOpTag x
-let mk_assignOp x         = Ast.AssignOpTag x
-let mk_fixOp x            = Ast.FixOpTag x
-let mk_binaryOp x         = Ast.BinaryOpTag x
-let mk_arithOp x          = Ast.ArithOpTag x
-let mk_logicalOp x        = Ast.LogicalOpTag x
-let mk_declaration x      = Ast.DeclarationTag (Ast0toast.declaration x)
-let mk_topdeclaration x   = Ast.DeclarationTag (Ast0toast.declaration x)
-let mk_storage x          = Ast.StorageTag x
-let mk_inc_file x         = Ast.IncFileTag x
-let mk_statement x        = Ast.StatementTag (Ast0toast.statement x)
-let mk_case_line x        = Ast.CaseLineTag (Ast0toast.case_line x)
-let mk_const_vol x        = Ast.ConstVolTag x
-let mk_token x info       = Ast.Token (x,Some info)
-let mk_meta (_,x) info    = Ast.Token (x,Some info)
-let mk_code x             = Ast.Code (Ast0toast.top_level x)
-
-let mk_exprdots x  = Ast.ExprDotsTag (Ast0toast.expression_dots x)
-let mk_paramdots x = Ast.ParamDotsTag (Ast0toast.parameter_list x)
-let mk_stmtdots x  = Ast.StmtDotsTag (Ast0toast.statement_dots x)
-let mk_decldots x  = Ast.DeclDotsTag (Ast0toast.declaration_dots x)
-let mk_casedots x  = failwith "+ case lines not supported"
-let mk_typeC x     = Ast.FullTypeTag (Ast0toast.typeC x)
-let mk_init x      = Ast.InitTag (Ast0toast.initialiser x)
-let mk_param x     = Ast.ParamTag (Ast0toast.parameterTypeDef x)
-
-let collect_plus_nodes root =
-  let root_index = Ast0.get_index root in
-
-  let bind x y = x @ y in
-  let option_default = [] in
-
-  let mcode fn (term,_,info,mcodekind,_) =
-    match mcodekind with Ast0.PLUS -> [(info,fn term)] | _ -> [] in
-
-  let imcode fn (term,_,info,mcodekind,_) =
-    match mcodekind with
-      Ast0.PLUS -> [(info,fn term (Ast0toast.convert_info info))]
-    | _ -> [] in
-
-  let do_nothing fn r k e =
-    match Ast0.get_mcodekind e with
-      (Ast0.CONTEXT(_)) when not(Ast0.get_index e = root_index) -> []
-    | Ast0.PLUS -> [(Ast0.get_info e,fn e)]
-    | _ -> k e in
-
-  (* case for everything that is just a wrapper for a simpler thing *)
-  let stmt r k e =
-    match Ast0.unwrap e with
-      Ast0.Exp(exp) -> r.V0.combiner_expression exp
-    | Ast0.TopExp(exp) -> r.V0.combiner_expression exp
-    | Ast0.Ty(ty) -> r.V0.combiner_typeC ty
-    | Ast0.Decl(_,decl) -> r.V0.combiner_declaration decl
-    | _ -> do_nothing mk_statement r k e in
-
-  (* statementTag is preferred, because it indicates that one statement is
-  replaced by one statement, in single_statement *)
-  let stmt_dots r k e =
-    match Ast0.unwrap e with
-      Ast0.DOTS([s]) | Ast0.CIRCLES([s]) | Ast0.STARS([s]) ->
-       r.V0.combiner_statement s
-    | _ -> do_nothing mk_stmtdots r k e in
-
-  let toplevel r k e =
-    match Ast0.unwrap e with
-      Ast0.DECL(s) -> r.V0.combiner_statement s
-    | Ast0.CODE(sdots) -> r.V0.combiner_statement_dots sdots
-    | _ -> do_nothing mk_code r k e in
-
-  let initdots r k e = k e in
-
-  V0.combiner bind option_default
-    (imcode mk_meta) (imcode mk_token) (mcode mk_constant) (mcode mk_assignOp)
-    (mcode mk_fixOp)
-    (mcode mk_unaryOp) (mcode mk_binaryOp) (mcode mk_const_vol)
-    (mcode mk_baseType) (mcode mk_sign) (mcode mk_structUnion)
-    (mcode mk_storage) (mcode mk_inc_file)
-    (do_nothing mk_exprdots) initdots
-    (do_nothing mk_paramdots) stmt_dots (do_nothing mk_decldots)
-    (do_nothing mk_casedots)
-    (do_nothing mk_ident) (do_nothing mk_expression)
-    (do_nothing mk_typeC) (do_nothing mk_init) (do_nothing mk_param)
-    (do_nothing mk_declaration)
-    stmt (do_nothing mk_case_line) toplevel
-
-let call_collect_plus context_nodes :
-    (int * (Ast0.info * Ast.anything) list) list =
-  List.map
-    (function e ->
-      match e with
-       Ast0.DotsExprTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_expression_dots e)
-      | Ast0.DotsInitTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_initialiser_list e)
-      | Ast0.DotsParamTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_parameter_list e)
-      | Ast0.DotsStmtTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_statement_dots e)
-      | Ast0.DotsDeclTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_declaration_dots e)
-      | Ast0.DotsCaseTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_case_line_dots e)
-      | Ast0.IdentTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_ident e)
-      | Ast0.ExprTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_expression e)
-      | Ast0.ArgExprTag(_) | Ast0.TestExprTag(_) ->
-         failwith "not possible - iso only"
-      | Ast0.TypeCTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_typeC e)
-      | Ast0.InitTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_initialiser e)
-      | Ast0.ParamTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_parameter e)
-      | Ast0.DeclTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_declaration e)
-      | Ast0.StmtTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_statement e)
-      | Ast0.CaseLineTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_case_line e)
-      | Ast0.TopTag(e) ->
-         (Ast0.get_index e,
-          (collect_plus_nodes e).V0.combiner_top_level e)
-      | Ast0.IsoWhenTag(_) -> failwith "only within iso phase"
-      | Ast0.IsoWhenTTag(_) -> failwith "only within iso phase"
-      | Ast0.IsoWhenFTag(_) -> failwith "only within iso phase"
-      | Ast0.MetaPosTag(p) -> failwith "metapostag only within iso phase")
-    context_nodes
-
-(* The plus fragments are converted to a list of lists of lists.
-Innermost list: Elements have type anything.  For any pair of successive
-elements, n and n+1, the ending line of n is the same as the starting line
-of n+1.
-Middle lists: For any pair of successive elements, n and n+1, the ending
-line of n is one less than the starting line of n+1.
-Outer list: For any pair of successive elements, n and n+1, the ending
-line of n is more than one less than the starting line of n+1. *)
-
-let logstart info = info.Ast0.logical_start
-let logend info = info.Ast0.logical_end
-
-let redo info start finish =
-  {{info with Ast0.logical_start = start} with Ast0.logical_end = finish}
-
-let rec find_neighbors (index,l) :
-    int * (Ast0.info * (Ast.anything list list)) list =
-  let rec loop = function
-      [] -> []
-    | (i,x)::rest ->
-       (match loop rest with
-         ((i1,(x1::rest_inner))::rest_middle)::rest_outer ->
-           let finish1 = logend i in
-           let start2 = logstart i1 in
-           if finish1 = start2
-           then
-             ((redo i (logstart i) (logend i1),(x::x1::rest_inner))
-              ::rest_middle)
-             ::rest_outer
-           else if finish1 + 1 = start2
-           then ((i,[x])::(i1,(x1::rest_inner))::rest_middle)::rest_outer
-           else [(i,[x])]::((i1,(x1::rest_inner))::rest_middle)::rest_outer
-       | _ -> [[(i,[x])]]) (* rest must be [] *) in
-  let res =
-    List.map
-      (function l ->
-       let (start_info,_) = List.hd l in
-       let (end_info,_) = List.hd (List.rev l) in
-       (redo start_info (logstart start_info) (logend end_info),
-        List.map (function (_,x) -> x) l))
-      (loop l) in
-  (index,res)
-
-let process_plus plus :
-    (int * (Ast0.info * Ast.anything list list) list) list =
-  List.concat
-    (List.map
-       (function x ->
-        List.map find_neighbors (call_collect_plus (collect_context x)))
-       plus)
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* merge *)
-(*
-let merge_one = function
-    (m1::m2::minus_info,p::plus_info) ->
-      if p < m1, then
-         attach p to the beginning of m1.bef if m1 is Good, fail if it is bad
-      if p > m1 && p < m2, then consider the following possibilities, in order
-         m1 is Good and favored: attach to the beginning of m1.aft
-         m2 is Good and favored: attach to the beginning of m2.bef; drop m1
-         m1 is Good and unfavored: attach to the beginning of m1.aft
-         m2 is Good and unfavored: attach to the beginning of m2.bef; drop m1
-         also flip m1.bef if the first where > m1
-         if we drop m1, then flip m1.aft first
-      if p > m2
-         m2 is Good and favored: attach to the beginning of m2.aft; drop m1
-*)
-
-(* end of first argument < start/end of second argument *)
-let less_than_start info1 info2 =
-  info1.Ast0.logical_end < info2.Ast0.logical_start
-let less_than_end info1 info2 =
-  info1.Ast0.logical_end < info2.Ast0.logical_end
-let greater_than_end info1 info2 =
-  info1.Ast0.logical_start > info2.Ast0.logical_end
-let good_start info = info.Ast0.attachable_start
-let good_end info = info.Ast0.attachable_end
-
-let toplevel = function Toplevel -> true | Favored | Unfavored | Decl -> false
-let decl = function Decl -> true | Favored | Unfavored | Toplevel -> false
-let favored = function Favored -> true | Unfavored | Toplevel | Decl -> false
-
-let top_code =
-  List.for_all (List.for_all (function Ast.Code _ -> true | _ -> false))
-
-(* The following is probably not correct.  The idea is to detect what
-should be placed completely before the declaration.  So type/storage
-related things do not fall into this category, and complete statements do
-fall into this category.  But perhaps other things should be in this
-category as well, such as { or ;? *)
-let predecl_code =
-  let tester = function
-      (* the following should definitely be true *)
-      Ast.DeclarationTag _
-    | Ast.StatementTag _
-    | Ast.Rule_elemTag _
-    | Ast.StmtDotsTag _
-    | Ast.Code _ -> true
-      (* the following should definitely be false *)
-    | Ast.FullTypeTag _ | Ast.BaseTypeTag _ | Ast.StructUnionTag _
-    | Ast.SignTag _
-    | Ast.StorageTag _ | Ast.ConstVolTag _ | Ast.TypeCTag _ -> false
-      (* not sure about the rest *)
-    | _ -> false in
-  List.for_all (List.for_all tester)
-
-let pr = Printf.sprintf
-
-let insert thing thinginfo into intoinfo =
-  let get_last l = let l = List.rev l in (List.rev(List.tl l),List.hd l) in
-  let get_first l = (List.hd l,List.tl l) in
-  let thing_start = thinginfo.Ast0.logical_start in
-  let thing_end = thinginfo.Ast0.logical_end in
-  let thing_offset = thinginfo.Ast0.offset in
-  let into_start = intoinfo.Ast0.tline_start in
-  let into_end = intoinfo.Ast0.tline_end in
-  let into_left_offset = intoinfo.Ast0.left_offset in
-  let into_right_offset = intoinfo.Ast0.right_offset in
-  if thing_end < into_start && thing_start < into_start
-  then (thing@into,
-       {{intoinfo with Ast0.tline_start = thing_start}
-       with Ast0.left_offset = thing_offset})
-  else if thing_end = into_start && thing_offset < into_left_offset
-  then
-    let (prev,last) = get_last thing in
-    let (first,rest) = get_first into in
-    (prev@[last@first]@rest,
-     {{intoinfo with Ast0.tline_start = thing_start}
-     with Ast0.left_offset = thing_offset})
-  else if thing_start > into_end && thing_end > into_end
-  then (into@thing,
-       {{intoinfo with Ast0.tline_end = thing_end}
-       with Ast0.right_offset = thing_offset})
-  else if thing_start = into_end && thing_offset > into_right_offset
-  then
-    let (first,rest) = get_first thing in
-    let (prev,last) = get_last into in
-    (prev@[last@first]@rest,
-     {{intoinfo with Ast0.tline_end = thing_end}
-     with Ast0.right_offset = thing_offset})
-  else
-    begin
-      Printf.printf "thing start %d thing end %d into start %d into end %d\n"
-       thing_start thing_end into_start into_end;
-      Printf.printf "thing offset %d left offset %d right offset %d\n"
-       thing_offset into_left_offset into_right_offset;
-      Pretty_print_cocci.print_anything "" thing;
-      Pretty_print_cocci.print_anything "" into;
-      failwith "can't figure out where to put the + code"
-    end
-
-let init thing info =
-  (thing,
-   {Ast0.tline_start = info.Ast0.logical_start;
-     Ast0.tline_end = info.Ast0.logical_end;
-     Ast0.left_offset = info.Ast0.offset;
-     Ast0.right_offset = info.Ast0.offset})
-
-let attachbefore (infop,p) = function
-    Ast0.MINUS(replacements) ->
-      (match !replacements with
-       ([],ti) -> replacements := init p infop
-      |        (repl,ti) -> replacements := insert p infop repl ti)
-  | Ast0.CONTEXT(neighbors) ->
-      let (repl,ti1,ti2) = !neighbors in
-      (match repl with
-       Ast.BEFORE(bef) ->
-         let (bef,ti1) = insert p infop bef ti1 in
-         neighbors := (Ast.BEFORE(bef),ti1,ti2)
-      |        Ast.AFTER(aft) -> 
-         let (bef,ti1) = init p infop in
-         neighbors := (Ast.BEFOREAFTER(bef,aft),ti1,ti2)
-      |        Ast.BEFOREAFTER(bef,aft) ->
-         let (bef,ti1) = insert p infop bef ti1 in
-         neighbors := (Ast.BEFOREAFTER(bef,aft),ti1,ti2)
-      |        Ast.NOTHING ->
-         let (bef,ti1) = init p infop in
-         neighbors := (Ast.BEFORE(bef),ti1,ti2))
-  | _ -> failwith "not possible for attachbefore"
-
-let attachafter (infop,p) = function
-    Ast0.MINUS(replacements) ->
-      (match !replacements with
-       ([],ti) -> replacements := init p infop
-      |        (repl,ti) -> replacements := insert p infop repl ti)
-  | Ast0.CONTEXT(neighbors) ->
-      let (repl,ti1,ti2) = !neighbors in
-      (match repl with
-       Ast.BEFORE(bef) ->
-         let (aft,ti2) = init p infop in
-         neighbors := (Ast.BEFOREAFTER(bef,aft),ti1,ti2)
-      |        Ast.AFTER(aft) -> 
-         let (aft,ti2) = insert p infop aft ti2 in
-         neighbors := (Ast.AFTER(aft),ti1,ti2)
-      |        Ast.BEFOREAFTER(bef,aft) ->
-         let (aft,ti2) = insert p infop aft ti2 in
-         neighbors := (Ast.BEFOREAFTER(bef,aft),ti1,ti2)
-      |        Ast.NOTHING ->
-         let (aft,ti2) = init p infop in
-         neighbors := (Ast.AFTER(aft),ti1,ti2))
-  | _ -> failwith "not possible for attachbefore"
-
-let attach_all_before ps m =
-  List.iter (function x -> attachbefore x m) ps
-
-let attach_all_after ps m =
-  List.iter (function x -> attachafter x m) ps
-
-let split_at_end info ps =
-  let split_point =  info.Ast0.logical_end in
-  List.partition
-    (function (info,_) -> info.Ast0.logical_end < split_point)
-    ps
-
-let allminus = function
-    Ast0.MINUS(_) -> true
-  | _ -> false
-
-let rec before_m1 ((f1,infom1,m1) as x1) ((f2,infom2,m2) as x2) rest = function
-    [] -> ()
-  | (((infop,_) as p) :: ps) as all ->
-      if less_than_start infop infom1 or
-       (allminus m1 && less_than_end infop infom1) (* account for trees *)
-      then
-       if good_start infom1
-       then (attachbefore p m1; before_m1 x1 x2 rest ps)
-       else
-         failwith
-           (pr "%d: no available token to attach to" infop.Ast0.line_start)
-      else after_m1 x1 x2 rest all
-
-and after_m1 ((f1,infom1,m1) as x1) ((f2,infom2,m2) as x2) rest = function
-    [] -> ()
-  | (((infop,pcode) as p) :: ps) as all ->
-      (* if the following is false, then some + code is stuck in the middle
-        of some context code (m1).  could drop down to the token level.
-        this might require adjustments in ast0toast as well, when + code on
-        expressions is dropped down to + code on expressions.  it might
-        also break some invariants on which iso depends, particularly on
-        what it can infer from something being CONTEXT with no top-level
-        modifications.  for the moment, we thus give an error, asking the
-        user to rewrite the semantic patch. *)
-      if greater_than_end infop infom1
-      then
-       if less_than_start infop infom2
-       then
-         if predecl_code pcode && good_end infom1 && decl f1
-         then (attachafter p m1; after_m1 x1 x2 rest ps)
-         else if predecl_code pcode && good_start infom2 && decl f2
-         then before_m2 x2 rest all
-         else if top_code pcode && good_end infom1 && toplevel f1
-         then (attachafter p m1; after_m1 x1 x2 rest ps)
-         else if top_code pcode && good_start infom2 && toplevel f2
-         then before_m2 x2 rest all
-         else if good_end infom1 && favored f1
-         then (attachafter p m1; after_m1 x1 x2 rest ps)
-         else if good_start infom2 && favored f2
-         then before_m2 x2 rest all
-         else if good_end infom1
-         then (attachafter p m1; after_m1 x1 x2 rest ps)
-         else if good_start infom2
-         then before_m2 x2 rest all
-         else
-           failwith
-             (pr "%d: no available token to attach to" infop.Ast0.line_start)
-       else after_m2 x2 rest all
-      else
-       begin
-         Printf.printf "between: p start %d p end %d m1 start %d m1 end %d m2 start %d m2 end %d\n"
-           infop.Ast0.line_start infop.Ast0.line_end
-           infom1.Ast0.line_start infom1.Ast0.line_end
-           infom2.Ast0.line_start infom2.Ast0.line_end;
-         Pretty_print_cocci.print_anything "" pcode;
-         failwith
-           "The semantic patch is structured in a way that may give bad results with isomorphisms.  Please try to rewrite it by moving + code out from -/context terms."
-       end
-
-and before_m2 ((f2,infom2,m2) as x2) rest
-    (p : (Ast0.info * Ast.anything list list) list) =
-  match (rest,p) with
-    (_,[]) -> ()
-  | ([],((infop,_)::_)) ->
-      let (bef_m2,aft_m2) = split_at_end infom2 p in (* bef_m2 isn't empty *)
-      if good_start infom2
-      then (attach_all_before bef_m2 m2; after_m2 x2 rest aft_m2)
-      else
-       failwith
-         (pr "%d: no available token to attach to" infop.Ast0.line_start)
-  | (m::ms,_) -> before_m1 x2 m ms p
-
-and after_m2 ((f2,infom2,m2) as x2) rest
-    (p : (Ast0.info * Ast.anything list list) list) =
-  match (rest,p) with
-    (_,[]) -> ()
-  | ([],((infop,_)::_)) ->
-      if good_end infom2
-      then attach_all_after p m2
-      else
-       failwith
-         (pr "%d: no available token to attach to" infop.Ast0.line_start)
-  | (m::ms,_) -> after_m1 x2 m ms p
-
-let merge_one : (minus_join_point * Ast0.info * 'a) list *
-    (Ast0.info * Ast.anything list list) list -> unit = function (m,p) ->
-  (*
-  Printf.printf "minus code\n";
-  List.iter
-    (function (_,info,_) ->
-      Printf.printf "start %d end %d real_start %d real_end %d\n"
-       info.Ast0.logical_start info.Ast0.logical_end
-       info.Ast0.line_start info.Ast0.line_end)
-    m;
-  Printf.printf "plus code\n";
-  List.iter
-    (function (info,p) ->
-      Printf.printf "start %d end %d real_start %d real_end %d\n"
-       info.Ast0.logical_start info.Ast0.logical_end
-       info.Ast0.line_end info.Ast0.line_end;
-      Pretty_print_cocci.print_anything "" p;
-      Format.print_newline())
-    p;
-  *)
-  match (m,p) with
-    (_,[]) -> ()
-  | (m1::m2::restm,p) -> before_m1 m1 m2 restm p
-  | ([m],p) -> before_m2 m [] p
-  | ([],_) -> failwith "minus tree ran out before the plus tree"
-
-let merge minus_list plus_list =
-  (*
-  Printf.printf "minus list %s\n"
-    (String.concat " "
-       (List.map (function (x,_) -> string_of_int x) minus_list));
-  Printf.printf "plus list %s\n"
-    (String.concat " "
-       (List.map (function (x,_) -> string_of_int x) plus_list));
-  *)
-  List.iter
-    (function (index,minus_info) ->
-      let plus_info = List.assoc index plus_list in
-      merge_one (minus_info,plus_info))
-    minus_list
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Need to check that CONTEXT nodes have nothing attached to their tokens.
-If they do, they become MIXED *)
-
-let reevaluate_contextness =
-   let bind = (@) in
-   let option_default = [] in
-
-   let mcode (_,_,_,mc,_) =
-     match mc with
-       Ast0.CONTEXT(mc) -> let (ba,_,_) = !mc in [ba]
-     | _ -> [] in
-
-   let donothing r k e =
-     match Ast0.get_mcodekind e with
-       Ast0.CONTEXT(mc) ->
-        if List.exists (function Ast.NOTHING -> false | _ -> true) (k e)
-        then Ast0.set_mcodekind e (Ast0.MIXED(mc));
-        []
-     | _ -> let _ = k e in [] in
-
-  let res =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing donothing
-      donothing
-      donothing donothing donothing donothing donothing donothing donothing in
-  res.V0.combiner_top_level
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-
-let insert_plus minus plus =
-  let minus_stream = process_minus minus in
-  let plus_stream = process_plus plus in
-  merge minus_stream plus_stream;
-  List.iter (function x -> let _ =  reevaluate_contextness x in ()) minus
diff --git a/parsing_cocci/.#iso_pattern.ml.1.136 b/parsing_cocci/.#iso_pattern.ml.1.136
deleted file mode 100644 (file)
index 6bbf1a7..0000000
+++ /dev/null
@@ -1,2306 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Potential problem: offset of mcode is not updated when an iso is
-instantiated, implying that a term may end up with many mcodes with the
-same offset.  On the other hand, at the moment offset only seems to be used
-before this phase.  Furthermore add_dot_binding relies on the offset to
-remain the same between matching an iso and instantiating it with bindings. *)
-
-(* --------------------------------------------------------------------- *)
-(* match a SmPL expression against a SmPL abstract syntax tree,
-either - or + *)
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-
-let current_rule = ref ""
-
-(* --------------------------------------------------------------------- *)
-
-type isomorphism =
-    Ast_cocci.metavar list * Ast0_cocci.anything list list * string (* name *)
-
-let strip_info =
-  let mcode (term,_,_,_,_) =
-    (term,Ast0.NONE,Ast0.default_info(),Ast0.PLUS,ref Ast0.NoMetaPos) in
-  let donothing r k e =
-    let x = k e in
-    {(Ast0.wrap (Ast0.unwrap x)) with
-      Ast0.mcodekind = ref Ast0.PLUS;
-      Ast0.true_if_test = x.Ast0.true_if_test} in
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing
-
-let anything_equal = function
-    (Ast0.DotsExprTag(d1),Ast0.DotsExprTag(d2)) ->
-      failwith "not a possible variable binding" (*not sure why these are pbs*)
-  | (Ast0.DotsInitTag(d1),Ast0.DotsInitTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsParamTag(d1),Ast0.DotsParamTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsStmtTag(d1),Ast0.DotsStmtTag(d2)) ->
-      (strip_info.V0.rebuilder_statement_dots d1) =
-      (strip_info.V0.rebuilder_statement_dots d2)
-  | (Ast0.DotsDeclTag(d1),Ast0.DotsDeclTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsCaseTag(d1),Ast0.DotsCaseTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.IdentTag(d1),Ast0.IdentTag(d2)) ->
-      (strip_info.V0.rebuilder_ident d1) = (strip_info.V0.rebuilder_ident d2)
-  | (Ast0.ExprTag(d1),Ast0.ExprTag(d2)) ->
-      (strip_info.V0.rebuilder_expression d1) =
-      (strip_info.V0.rebuilder_expression d2)
-  | (Ast0.ArgExprTag(_),_) | (_,Ast0.ArgExprTag(_)) ->
-      failwith "not possible - only in isos1"
-  | (Ast0.TestExprTag(_),_) | (_,Ast0.TestExprTag(_)) ->
-      failwith "not possible - only in isos1"
-  | (Ast0.TypeCTag(d1),Ast0.TypeCTag(d2)) ->
-      (strip_info.V0.rebuilder_typeC d1) =
-      (strip_info.V0.rebuilder_typeC d2)
-  | (Ast0.InitTag(d1),Ast0.InitTag(d2)) ->
-      (strip_info.V0.rebuilder_initialiser d1) =
-      (strip_info.V0.rebuilder_initialiser d2)
-  | (Ast0.ParamTag(d1),Ast0.ParamTag(d2)) ->
-      (strip_info.V0.rebuilder_parameter d1) =
-      (strip_info.V0.rebuilder_parameter d2)
-  | (Ast0.DeclTag(d1),Ast0.DeclTag(d2)) ->
-      (strip_info.V0.rebuilder_declaration d1) =
-      (strip_info.V0.rebuilder_declaration d2)
-  | (Ast0.StmtTag(d1),Ast0.StmtTag(d2)) ->
-      (strip_info.V0.rebuilder_statement d1) =
-      (strip_info.V0.rebuilder_statement d2)
-  | (Ast0.CaseLineTag(d1),Ast0.CaseLineTag(d2)) ->
-      (strip_info.V0.rebuilder_case_line d1) =
-      (strip_info.V0.rebuilder_case_line d2)
-  | (Ast0.TopTag(d1),Ast0.TopTag(d2)) ->
-      (strip_info.V0.rebuilder_top_level d1) =
-      (strip_info.V0.rebuilder_top_level d2)
-  | (Ast0.IsoWhenTag(_),_) | (_,Ast0.IsoWhenTag(_)) ->
-      failwith "only for isos within iso phase"
-  | _ -> false
-
-let term (var1,_,_,_,_) = var1
-let dot_term (var1,_,info,_,_) = ("", var1 ^ (string_of_int info.Ast0.offset))
-
-
-type reason =
-    NotPure of Ast0.pure * (string * string) * Ast0.anything
-  | NotPureLength of (string * string)
-  | ContextRequired of Ast0.anything
-  | NonMatch
-  | Braces of Ast0.statement
-  | Position of string * string
-
-let interpret_reason name line reason printer =
-  Printf.printf
-    "warning: iso %s does not match the code below on line %d\n" name line;
-  printer(); Format.print_newline();
-  match reason with
-    NotPure(Ast0.Pure,(_,var),nonpure) ->
-      Printf.printf
-       "pure metavariable %s is matched against the following nonpure code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPure(Ast0.Context,(_,var),nonpure) ->
-      Printf.printf
-       "context metavariable %s is matched against the following\nnoncontext code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPure(Ast0.PureContext,(_,var),nonpure) ->
-      Printf.printf
-       "pure context metavariable %s is matched against the following\nnonpure or noncontext code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPureLength((_,var)) ->
-      Printf.printf
-       "pure metavariable %s is matched against too much or too little code\n"
-       var;
-  | ContextRequired(term) ->
-      Printf.printf
-       "the following code matched is not uniformly minus or context,\nor contains a disjunction:\n";
-      Unparse_ast0.unparse_anything term
-  | Braces(s) ->
-      Printf.printf "braces must be all minus (plus code allowed) or all\ncontext (plus code not allowed in the body) to match:\n";
-      Unparse_ast0.statement "" s;
-      Format.print_newline()
-  | Position(rule,name) ->
-      Printf.printf "position variable %s.%s conflicts with an isomorphism\n"
-       rule name;
-  | _ -> failwith "not possible"
-
-type 'a either = OK of 'a | Fail of reason
-
-let add_binding var exp bindings =
-  let var = term var in
-  let attempt bindings =
-    try
-      let cur = List.assoc var bindings in
-      if anything_equal(exp,cur) then [bindings] else []
-    with Not_found -> [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-let add_dot_binding var exp bindings =
-  let var = dot_term var in
-  let attempt bindings =
-    try
-      let cur = List.assoc var bindings in
-      if anything_equal(exp,cur) then [bindings] else []
-    with Not_found -> [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-(* multi-valued *)
-let add_multi_dot_binding var exp bindings =
-  let var = dot_term var in
-  let attempt bindings = [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-let rec nub ls =
-  match ls with
-    [] -> []
-  | (x::xs) when (List.mem x xs) -> nub xs
-  | (x::xs) -> x::(nub xs)
-
-(* --------------------------------------------------------------------- *)
-
-let init_env = [[]]
-
-let debug str m binding =
-  let res = m binding in
-  (match res with
-    None -> Printf.printf "%s: failed\n" str
-  | Some binding ->
-      List.iter
-       (function binding ->
-         Printf.printf "%s: %s\n" str
-           (String.concat " " (List.map (function (x,_) -> x) binding)))
-       binding);
-  res
-
-let conjunct_bindings
-    (m1 : 'binding -> 'binding either)
-    (m2 : 'binding -> 'binding either)
-    (binding : 'binding) : 'binding either =
-  match m1 binding with Fail(reason) -> Fail(reason) | OK binding -> m2 binding
-
-let rec conjunct_many_bindings = function
-    [] -> failwith "not possible"
-  | [x] -> x
-  | x::xs -> conjunct_bindings x (conjunct_many_bindings xs)
-
-let mcode_equal (x,_,_,_,_) (y,_,_,_,_) = x = y
-
-let return b binding = if b then OK binding else Fail NonMatch
-let return_false reason binding = Fail reason
-
-let match_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> return true
-  | _ -> return false
-
-let bool_match_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> true
-  | _ -> false
-
-(* context_required is for the example
-   if (
-+      (int * )
-       x == NULL)
-  where we can't change x == NULL to eg NULL == x.  So there can either be
-  nothing attached to the root or the term has to be all removed.
-  if would be nice if we knew more about the relationship between the - and +
-  code, because in the case where the + code is a separate statement in a
-  sequence, this is not a problem.  Perhaps something could be done in
-  insert_plus
-
-   The example seems strange.  Why isn't the cast attached to x?
- *)
-let is_context e =
-  !Flag.sgrep_mode2 or (* everything is context for sgrep *)
-  (match Ast0.get_mcodekind e with
-    Ast0.CONTEXT(cell) -> true
-  | _ -> false)
-
-(* needs a special case when there is a Disj or an empty DOTS
-   the following stops at the statement level, and gives true if one
-   statement is replaced by another *)
-let rec is_pure_context s =
-  !Flag.sgrep_mode2 or (* everything is context for sgrep *)
-  (match Ast0.unwrap s with
-    Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-      List.for_all
-       (function x ->
-         match Ast0.undots x with
-           [s] -> is_pure_context s
-         | _ -> false (* could we do better? *))
-       statement_dots_list
-  | _ ->
-      (match Ast0.get_mcodekind s with
-       Ast0.CONTEXT(mc) ->
-         (match !mc with
-           (Ast.NOTHING,_,_) -> true
-         | _ -> false)
-      | Ast0.MINUS(mc) ->
-         (match !mc with
-       (* do better for the common case of replacing a stmt by another one *)
-           ([[Ast.StatementTag(s)]],_) ->
-             (match Ast.unwrap s with
-               Ast.IfThen(_,_,_) -> false (* potentially dangerous *)
-             | _ -> true)
-         |     (_,_) -> false)
-      | _ -> false))
-
-let is_minus e =
-  match Ast0.get_mcodekind e with Ast0.MINUS(cell) -> true | _ -> false
-
-let match_list matcher is_list_matcher do_list_match la lb =
-  let rec loop = function
-      ([],[]) -> return true
-    | ([x],lb) when is_list_matcher x -> do_list_match x lb
-    | (x::xs,y::ys) -> conjunct_bindings (matcher x y) (loop (xs,ys))
-    | _ -> return false in
-  loop (la,lb)
-
-let match_maker checks_needed context_required whencode_allowed =
-
-  let check_mcode pmc cmc binding =
-    if checks_needed
-    then
-      match Ast0.get_pos cmc with
-       (Ast0.MetaPos (name,_,_)) as x ->
-         (match Ast0.get_pos pmc with
-           Ast0.MetaPos (name1,_,_) ->
-             add_binding name1 (Ast0.MetaPosTag x) binding
-         | Ast0.NoMetaPos ->
-             let (rule,name) = Ast0.unwrap_mcode name in
-             Fail (Position(rule,name)))
-      | Ast0.NoMetaPos -> OK binding
-    else OK binding in
-
-  let match_dots matcher is_list_matcher do_list_match d1 d2 =
-    match (Ast0.unwrap d1, Ast0.unwrap d2) with
-      (Ast0.DOTS(la),Ast0.DOTS(lb))
-    | (Ast0.CIRCLES(la),Ast0.CIRCLES(lb))
-    | (Ast0.STARS(la),Ast0.STARS(lb)) ->
-       match_list matcher is_list_matcher (do_list_match d2) la lb
-    | _ -> return false in
-
-  let is_elist_matcher el =
-    match Ast0.unwrap el with Ast0.MetaExprList(_,_,_) -> true | _ -> false in
-
-  let is_plist_matcher pl =
-    match Ast0.unwrap pl with Ast0.MetaParamList(_,_,_) -> true | _ -> false in
-
-  let is_slist_matcher pl =
-    match Ast0.unwrap pl with Ast0.MetaStmtList(_,_) -> true | _ -> false in
-
-  let no_list _ = false in
-
-  let build_dots pattern data =
-    match Ast0.unwrap pattern with
-      Ast0.DOTS(_) -> Ast0.rewrap pattern (Ast0.DOTS(data))
-    | Ast0.CIRCLES(_) -> Ast0.rewrap pattern (Ast0.CIRCLES(data))
-    | Ast0.STARS(_) -> Ast0.rewrap pattern (Ast0.STARS(data)) in
-
-  let pure_sp_code =
-    let bind = Ast0.lub_pure in
-    let option_default = Ast0.Context in
-    let pure_mcodekind = function
-       Ast0.CONTEXT(mc) ->
-         (match !mc with
-           (Ast.NOTHING,_,_) -> Ast0.PureContext
-         | _ -> Ast0.Context)
-      | Ast0.MINUS(mc) ->
-         (match !mc with ([],_) -> Ast0.Pure | _ ->  Ast0.Impure)
-      | _ -> Ast0.Impure in
-    let donothing r k e =
-      bind (pure_mcodekind (Ast0.get_mcodekind e)) (k e) in
-
-    let mcode m = pure_mcodekind (Ast0.get_mcode_mcodekind m) in
-
-    (* a case for everything that has a metavariable *)
-    (* pure is supposed to match only unitary metavars, not anything that
-       contains only unitary metavars *)
-    let ident r k i =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind i)) (k i))
-       (match Ast0.unwrap i with
-         Ast0.MetaId(name,_,pure) | Ast0.MetaFunc(name,_,pure)
-       | Ast0.MetaLocalFunc(name,_,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let expression r k e =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind e)) (k e))
-       (match Ast0.unwrap e with
-         Ast0.MetaErr(name,_,pure)
-       | Ast0.MetaExpr(name,_,_,_,pure) | Ast0.MetaExprList(name,_,pure) ->
-           pure
-       | _ -> Ast0.Impure) in
-
-    let typeC r k t =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind t)) (k t))
-       (match Ast0.unwrap t with
-         Ast0.MetaType(name,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let param r k p =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind p)) (k p))
-       (match Ast0.unwrap p with
-         Ast0.MetaParam(name,pure) | Ast0.MetaParamList(name,_,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let stmt r k s =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind s)) (k s))
-       (match Ast0.unwrap s with
-         Ast0.MetaStmt(name,pure) | Ast0.MetaStmtList(name,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    V0.combiner bind option_default 
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      ident expression typeC donothing param donothing stmt donothing
-      donothing in
-
-  let add_pure_list_binding name pure is_pure builder1 builder2 lst =
-    match (checks_needed,pure) with
-      (true,Ast0.Pure) | (true,Ast0.Context) | (true,Ast0.PureContext) ->
-       (match lst with
-         [x] ->
-           if (Ast0.lub_pure (is_pure x) pure) = pure
-           then add_binding name (builder1 lst)
-           else return_false (NotPure (pure,term name,builder1 lst))
-       | _ -> return_false (NotPureLength (term name)))
-    | (false,_) | (_,Ast0.Impure) -> add_binding name (builder2 lst) in
-
-  let add_pure_binding name pure is_pure builder x =
-    match (checks_needed,pure) with
-      (true,Ast0.Pure) | (true,Ast0.Context) | (true,Ast0.PureContext) ->
-       if (Ast0.lub_pure (is_pure x) pure) = pure
-       then add_binding name (builder x)
-       else return_false (NotPure (pure,term name, builder x))
-    | (false,_) | (_,Ast0.Impure) ->  add_binding name (builder x) in
-
-  let do_elist_match builder el lst =
-    match Ast0.unwrap el with
-      Ast0.MetaExprList(name,lenname,pure) ->
-        (*how to handle lenname? should it be an option type and always None?*)
-       failwith "expr list pattern not supported in iso"
-       (*add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_expression
-         (function lst -> Ast0.ExprTag(List.hd lst))
-         (function lst -> Ast0.DotsExprTag(build_dots builder lst))
-         lst*)
-    | _ -> failwith "not possible" in
-
-  let do_plist_match builder pl lst =
-    match Ast0.unwrap pl with
-      Ast0.MetaParamList(name,lename,pure) ->
-       failwith "param list pattern not supported in iso"
-       (*add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_parameter
-         (function lst -> Ast0.ParamTag(List.hd lst))
-         (function lst -> Ast0.DotsParamTag(build_dots builder lst))
-         lst*)
-    | _ -> failwith "not possible" in
-
-  let do_slist_match builder sl lst =
-    match Ast0.unwrap sl with
-      Ast0.MetaStmtList(name,pure) ->
-       add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_statement
-         (function lst -> Ast0.StmtTag(List.hd lst))
-         (function lst -> Ast0.DotsStmtTag(build_dots builder lst))
-         lst
-    | _ -> failwith "not possible" in
-
-  let do_nolist_match _ _ = failwith "not possible" in
-
-  let rec match_ident pattern id =
-    match Ast0.unwrap pattern with
-      Ast0.MetaId(name,_,pure) ->
-       (add_pure_binding name pure pure_sp_code.V0.combiner_ident
-         (function id -> Ast0.IdentTag id) id)
-    | Ast0.MetaFunc(name,_,pure) -> failwith "metafunc not supported"
-    | Ast0.MetaLocalFunc(name,_,pure) -> failwith "metalocalfunc not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context id
-       then
-         match (up,Ast0.unwrap id) with
-           (Ast0.Id(namea),Ast0.Id(nameb)) ->
-             if mcode_equal namea nameb
-             then check_mcode namea nameb
-             else return false
-         | (Ast0.OptIdent(ida),Ast0.OptIdent(idb))
-         | (Ast0.UniqueIdent(ida),Ast0.UniqueIdent(idb)) ->
-             match_ident ida idb
-         | (_,Ast0.OptIdent(idb))
-         | (_,Ast0.UniqueIdent(idb)) -> match_ident pattern idb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.IdentTag id)) in
-
-  (* should we do something about matching metavars against ...? *)
-  let rec match_expr pattern expr =
-    match Ast0.unwrap pattern with
-      Ast0.MetaExpr(name,_,ty,form,pure) ->
-       let form_ok =
-         match (form,expr) with
-           (Ast.ANY,_) -> true
-         | (Ast.CONST,e) ->
-             let rec matches e =
-               match Ast0.unwrap e with
-                 Ast0.Constant(c) -> true
-               | Ast0.Cast(lp,ty,rp,e) -> matches e
-               | Ast0.SizeOfExpr(se,exp) -> true
-               | Ast0.SizeOfType(se,lp,ty,rp) -> true
-               | Ast0.MetaExpr(nm,_,_,Ast.CONST,p) ->
-                   (Ast0.lub_pure p pure) = pure
-               | _ -> false in
-             matches e
-         | (Ast.ID,e) | (Ast.LocalID,e) ->
-             let rec matches e =
-               match Ast0.unwrap e with
-                 Ast0.Ident(c) -> true
-               | Ast0.Cast(lp,ty,rp,e) -> matches e
-               | Ast0.MetaExpr(nm,_,_,Ast.ID,p) ->
-                   (Ast0.lub_pure p pure) = pure
-               | _ -> false in
-             matches e in
-       if form_ok
-       then
-         match ty with
-           Some ts ->
-             if List.exists
-                 (function Type_cocci.MetaType(_,_,_) -> true | _ -> false)
-                 ts
-             then
-               (match ts with
-                 [Type_cocci.MetaType(tyname,_,_)] ->
-                   let expty =
-                     match (Ast0.unwrap expr,Ast0.get_type expr) with
-                 (* easier than updating type inferencer to manage multiple
-                    types *)
-                       (Ast0.MetaExpr(_,_,Some tts,_,_),_) -> Some tts
-                     | (_,Some ty) -> Some [ty]
-                     | _ -> None in
-                   (match expty with
-                     Some expty ->
-                       let tyname = Ast0.rewrap_mcode name tyname in
-                       (function bindings ->
-                         let attempts =
-                           List.map
-                             (function expty ->
-                               (try
-                                 conjunct_bindings
-                                   (add_pure_binding tyname Ast0.Impure
-                                      (function _ -> Ast0.Impure)
-                                      (function ty -> Ast0.TypeCTag ty)
-                                      (Ast0.rewrap expr
-                                         (Ast0.reverse_type expty)))
-                                   (add_pure_binding name pure
-                                      pure_sp_code.V0.combiner_expression
-                                      (function expr -> Ast0.ExprTag expr)
-                                      expr)
-                                   bindings
-                               with Ast0.TyConv ->
-                                 Printf.printf "warning: unconvertible type";
-                                 return false bindings))
-                             expty in
-                         match
-                           List.concat
-                             (List.map (function Fail _ -> [] | OK x -> x)
-                                attempts)
-                         with
-                           [] -> Fail NonMatch
-                         | x -> OK x)
-                   |   _ ->
-                 (*Printf.printf
-                    "warning: type metavar can only match one type";*)
-                       return false)
-               | _ ->
-                   failwith
-                     "mixture of metatype and other types not supported")
-             else
-               let expty = Ast0.get_type expr in
-               if List.exists (function t -> Type_cocci.compatible t expty) ts
-               then
-                 add_pure_binding name pure
-                   pure_sp_code.V0.combiner_expression
-                   (function expr -> Ast0.ExprTag expr)
-                   expr
-               else return false
-         | None ->
-             add_pure_binding name pure pure_sp_code.V0.combiner_expression
-               (function expr -> Ast0.ExprTag expr)
-               expr
-       else return false
-    | Ast0.MetaErr(namea,_,pure) -> failwith "metaerr not supported"
-    | Ast0.MetaExprList(_,_,_) -> failwith "metaexprlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context expr
-       then
-         match (up,Ast0.unwrap expr) with
-           (Ast0.Ident(ida),Ast0.Ident(idb)) ->
-             match_ident ida idb
-         | (Ast0.Constant(consta),Ast0.Constant(constb)) ->
-             if mcode_equal consta constb
-             then check_mcode consta constb
-             else return false
-         | (Ast0.FunCall(fna,lp1,argsa,rp1),Ast0.FunCall(fnb,lp,argsb,rp)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp; match_expr fna fnb;
-                 match_dots match_expr is_elist_matcher do_elist_match
-                   argsa argsb]
-         | (Ast0.Assignment(lefta,opa,righta,_),
-            Ast0.Assignment(leftb,opb,rightb,_)) ->
-              if mcode_equal opa opb
-              then
-                conjunct_many_bindings
-                  [check_mcode opa opb; match_expr lefta leftb;
-                    match_expr righta rightb]
-              else return false
-         | (Ast0.CondExpr(exp1a,lp1,exp2a,rp1,exp3a),
-            Ast0.CondExpr(exp1b,lp,exp2b,rp,exp3b)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  match_expr exp1a exp1b; match_option match_expr exp2a exp2b;
-                  match_expr exp3a exp3b]
-         | (Ast0.Postfix(expa,opa),Ast0.Postfix(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Infix(expa,opa),Ast0.Infix(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Unary(expa,opa),Ast0.Unary(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Binary(lefta,opa,righta),Ast0.Binary(leftb,opb,rightb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_many_bindings
-                 [check_mcode opa opb; match_expr lefta leftb;
-                   match_expr righta rightb]
-             else return false
-         | (Ast0.Paren(lp1,expa,rp1),Ast0.Paren(lp,expb,rp)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp; match_expr expa expb]
-         | (Ast0.ArrayAccess(exp1a,lb1,exp2a,rb1),
-            Ast0.ArrayAccess(exp1b,lb,exp2b,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_expr exp1a exp1b; match_expr exp2a exp2b]
-         | (Ast0.RecordAccess(expa,opa,fielda),
-            Ast0.RecordAccess(expb,op,fieldb))
-         | (Ast0.RecordPtAccess(expa,opa,fielda),
-            Ast0.RecordPtAccess(expb,op,fieldb)) ->
-              conjunct_many_bindings
-                [check_mcode opa op; match_expr expa expb;
-                  match_ident fielda fieldb]
-         | (Ast0.Cast(lp1,tya,rp1,expa),Ast0.Cast(lp,tyb,rp,expb)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp;
-                 match_typeC tya tyb; match_expr expa expb]
-         | (Ast0.SizeOfExpr(szf1,expa),Ast0.SizeOfExpr(szf,expb)) ->
-             conjunct_bindings (check_mcode szf1 szf) (match_expr expa expb)
-         | (Ast0.SizeOfType(szf1,lp1,tya,rp1),
-            Ast0.SizeOfType(szf,lp,tyb,rp)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode szf1 szf; match_typeC tya tyb]
-         | (Ast0.TypeExp(tya),Ast0.TypeExp(tyb)) ->
-             match_typeC tya tyb
-         | (Ast0.EComma(cm1),Ast0.EComma(cm)) -> check_mcode cm1 cm
-         | (Ast0.DisjExpr(_,expsa,_,_),_) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.NestExpr(_,exp_dotsa,_,_,_),_) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.Edots(d,None),Ast0.Edots(d1,None))
-         | (Ast0.Ecircles(d,None),Ast0.Ecircles(d1,None))
-         | (Ast0.Estars(d,None),Ast0.Estars(d1,None)) -> check_mcode d d1
-         | (Ast0.Edots(ed,None),Ast0.Edots(ed1,Some wc))
-         | (Ast0.Ecircles(ed,None),Ast0.Ecircles(ed1,Some wc))
-         | (Ast0.Estars(ed,None),Ast0.Estars(ed1,Some wc)) ->
-           (* hope that mcode of edots is unique somehow *)
-             conjunct_bindings (check_mcode ed ed1)
-               (let (edots_whencode_allowed,_,_) = whencode_allowed in
-               if edots_whencode_allowed
-               then add_dot_binding ed (Ast0.ExprTag wc)
-               else
-                 (Printf.printf
-                    "warning: not applying iso because of whencode";
-                  return false))
-         | (Ast0.Edots(_,Some _),_) | (Ast0.Ecircles(_,Some _),_)
-         | (Ast0.Estars(_,Some _),_) ->
-             failwith "whencode not allowed in a pattern1"
-         | (Ast0.OptExp(expa),Ast0.OptExp(expb))
-         | (Ast0.UniqueExp(expa),Ast0.UniqueExp(expb)) -> match_expr expa expb
-         | (_,Ast0.OptExp(expb))
-         | (_,Ast0.UniqueExp(expb)) -> match_expr pattern expb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.ExprTag expr))
-           
-(* the special case for function types prevents the eg T X; -> T X = E; iso
-   from applying, which doesn't seem very relevant, but it also avoids a
-   mysterious bug that is obtained with eg int attach(...); *)
-  and match_typeC pattern t =
-    match Ast0.unwrap pattern with
-      Ast0.MetaType(name,pure) ->
-       (match Ast0.unwrap t with
-         Ast0.FunctionType(tya,lp1a,paramsa,rp1a) -> return false
-       | _ ->
-           add_pure_binding name pure pure_sp_code.V0.combiner_typeC
-             (function ty -> Ast0.TypeCTag ty)
-             t)
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context t
-       then
-         match (up,Ast0.unwrap t) with
-           (Ast0.ConstVol(cva,tya),Ast0.ConstVol(cvb,tyb)) ->
-             if mcode_equal cva cvb
-             then
-               conjunct_bindings (check_mcode cva cvb) (match_typeC tya tyb)
-             else return false
-         | (Ast0.BaseType(tya,signa),Ast0.BaseType(tyb,signb)) ->
-             if (mcode_equal tya tyb &&
-                 bool_match_option mcode_equal signa signb)
-             then
-               conjunct_bindings (check_mcode tya tyb)
-                 (match_option check_mcode signa signb)
-             else return false
-         | (Ast0.ImplicitInt(signa),Ast0.ImplicitInt(signb)) ->
-             if mcode_equal signa signb
-             then check_mcode signa signb
-             else return false
-         | (Ast0.Pointer(tya,star1),Ast0.Pointer(tyb,star)) ->
-             conjunct_bindings (check_mcode star1 star) (match_typeC tya tyb)
-         | (Ast0.FunctionPointer(tya,lp1a,stara,rp1a,lp2a,paramsa,rp2a),
-            Ast0.FunctionPointer(tyb,lp1b,starb,rp1b,lp2b,paramsb,rp2b)) ->
-              conjunct_many_bindings
-                [check_mcode stara starb; check_mcode lp1a lp1b;
-                  check_mcode rp1a rp1b; check_mcode lp2a lp2b;
-                  check_mcode rp2a rp2b; match_typeC tya tyb;
-                  match_dots match_param is_plist_matcher
-                    do_plist_match paramsa paramsb]
-         | (Ast0.FunctionType(tya,lp1a,paramsa,rp1a),
-            Ast0.FunctionType(tyb,lp1b,paramsb,rp1b)) ->
-              conjunct_many_bindings
-                [check_mcode lp1a lp1b; check_mcode rp1a rp1b;
-                  match_option match_typeC tya tyb;
-                  match_dots match_param is_plist_matcher do_plist_match
-                    paramsa paramsb]
-         | (Ast0.Array(tya,lb1,sizea,rb1),Ast0.Array(tyb,lb,sizeb,rb)) ->
-             conjunct_many_bindings
-               [check_mcode lb1 lb; check_mcode rb1 rb;
-                 match_typeC tya tyb; match_option match_expr sizea sizeb]
-         | (Ast0.StructUnionName(kinda,Some namea),
-            Ast0.StructUnionName(kindb,Some nameb)) ->
-              if mcode_equal kinda kindb
-              then
-                conjunct_bindings (check_mcode kinda kindb)
-                  (match_ident namea nameb)
-              else return false
-         | (Ast0.StructUnionDef(tya,lb1,declsa,rb1),
-            Ast0.StructUnionDef(tyb,lb,declsb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_typeC tya tyb;
-                  match_dots match_decl no_list do_nolist_match declsa declsb]
-         | (Ast0.TypeName(namea),Ast0.TypeName(nameb)) ->
-             if mcode_equal namea nameb
-             then check_mcode namea nameb
-             else return false
-         | (Ast0.DisjType(_,typesa,_,_),Ast0.DisjType(_,typesb,_,_)) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.OptType(tya),Ast0.OptType(tyb))
-         | (Ast0.UniqueType(tya),Ast0.UniqueType(tyb)) -> match_typeC tya tyb
-         | (_,Ast0.OptType(tyb))
-         | (_,Ast0.UniqueType(tyb)) -> match_typeC pattern tyb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.TypeCTag t))
-           
-  and match_decl pattern d =
-    if not(checks_needed) or not(context_required) or is_context d
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap d) with
-       (Ast0.Init(stga,tya,ida,eq1,inia,sc1),
-        Ast0.Init(stgb,tyb,idb,eq,inib,sc)) ->
-         if bool_match_option mcode_equal stga stgb
-         then
-           conjunct_many_bindings
-             [check_mcode eq1 eq; check_mcode sc1 sc;
-               match_option check_mcode stga stgb;
-               match_typeC tya tyb; match_ident ida idb;
-               match_init inia inib]
-         else return false
-      | (Ast0.UnInit(stga,tya,ida,sc1),Ast0.UnInit(stgb,tyb,idb,sc)) ->
-         if bool_match_option mcode_equal stga stgb
-         then
-           conjunct_many_bindings
-             [check_mcode sc1 sc; match_option check_mcode stga stgb;
-               match_typeC tya tyb; match_ident ida idb]
-         else return false
-      | (Ast0.MacroDecl(namea,lp1,argsa,rp1,sc1),
-        Ast0.MacroDecl(nameb,lp,argsb,rp,sc)) ->
-          conjunct_many_bindings
-            [match_ident namea nameb;
-              check_mcode lp1 lp; check_mcode rp1 rp;
-              check_mcode sc1 sc;
-              match_dots match_expr is_elist_matcher do_elist_match
-                argsa argsb]
-      | (Ast0.TyDecl(tya,sc1),Ast0.TyDecl(tyb,sc)) ->
-         conjunct_bindings (check_mcode sc1 sc) (match_typeC tya tyb)
-      | (Ast0.Typedef(stga,tya,ida,sc1),Ast0.Typedef(stgb,tyb,idb,sc)) ->
-         conjunct_bindings (check_mcode sc1 sc)
-           (conjunct_bindings (match_typeC tya tyb) (match_typeC ida idb))
-      | (Ast0.DisjDecl(_,declsa,_,_),Ast0.DisjDecl(_,declsb,_,_)) ->
-         failwith "not allowed in the pattern of an isomorphism"
-      | (Ast0.Ddots(d1,None),Ast0.Ddots(d,None)) -> check_mcode d1 d
-      |        (Ast0.Ddots(dd,None),Ast0.Ddots(d,Some wc)) ->
-         conjunct_bindings (check_mcode dd d)
-           (* hope that mcode of ddots is unique somehow *)
-           (let (ddots_whencode_allowed,_,_) = whencode_allowed in
-           if ddots_whencode_allowed
-           then add_dot_binding dd (Ast0.DeclTag wc)
-           else
-             (Printf.printf "warning: not applying iso because of whencode";
-              return false))
-      | (Ast0.Ddots(_,Some _),_) ->
-         failwith "whencode not allowed in a pattern1"
-           
-      | (Ast0.OptDecl(decla),Ast0.OptDecl(declb))
-      | (Ast0.UniqueDecl(decla),Ast0.UniqueDecl(declb)) ->
-         match_decl decla declb
-      | (_,Ast0.OptDecl(declb))
-      | (_,Ast0.UniqueDecl(declb)) ->
-         match_decl pattern declb
-      | _ -> return false
-    else return_false (ContextRequired (Ast0.DeclTag d))
-       
-  and match_init pattern i =
-    if not(checks_needed) or not(context_required) or is_context i
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap i) with
-       (Ast0.InitExpr(expa),Ast0.InitExpr(expb)) ->
-         match_expr expa expb
-      | (Ast0.InitList(lb1,initlista,rb1),Ast0.InitList(lb,initlistb,rb)) ->
-         conjunct_many_bindings
-           [check_mcode lb1 lb; check_mcode rb1 rb;
-             match_dots match_init no_list do_nolist_match
-               initlista initlistb]
-      | (Ast0.InitGccDotName(d1,namea,e1,inia),
-        Ast0.InitGccDotName(d,nameb,e,inib)) ->
-          conjunct_many_bindings
-            [check_mcode d1 d; check_mcode e1 e;
-              match_ident namea nameb; match_init inia inib]
-      | (Ast0.InitGccName(namea,c1,inia),Ast0.InitGccName(nameb,c,inib)) ->
-         conjunct_many_bindings
-           [check_mcode c1 c; match_ident namea nameb;
-             match_init inia inib]
-      | (Ast0.InitGccIndex(lb1,expa,rb1,e1,inia),
-        Ast0.InitGccIndex(lb2,expb,rb2,e2,inib)) ->
-         conjunct_many_bindings
-            [check_mcode lb1 lb2; check_mcode rb1 rb2; check_mcode e1 e2;
-              match_expr expa expb; match_init inia inib]
-      | (Ast0.InitGccRange(lb1,exp1a,d1,exp2a,rb1,e1,inia),
-        Ast0.InitGccRange(lb2,exp1b,d2,exp2b,rb2,e2,inib)) ->
-         conjunct_many_bindings
-            [check_mcode lb1 lb2; check_mcode d1 d2;
-              check_mcode rb1 rb2; check_mcode e1 e2;
-              match_expr exp1a exp1b; match_expr exp2a exp2b;
-              match_init inia inib]
-      | (Ast0.IComma(c1),Ast0.IComma(c)) -> check_mcode c1 c
-      | (Ast0.Idots(d1,None),Ast0.Idots(d,None)) -> check_mcode d1 d
-      | (Ast0.Idots(id,None),Ast0.Idots(d,Some wc)) ->
-         conjunct_bindings (check_mcode id d)
-         (* hope that mcode of edots is unique somehow *)
-           (let (_,idots_whencode_allowed,_) = whencode_allowed in
-           if idots_whencode_allowed
-           then add_dot_binding id (Ast0.InitTag wc)
-           else
-             (Printf.printf "warning: not applying iso because of whencode";
-              return false))
-      | (Ast0.Idots(_,Some _),_) ->
-         failwith "whencode not allowed in a pattern2"
-      | (Ast0.OptIni(ia),Ast0.OptIni(ib))
-      | (Ast0.UniqueIni(ia),Ast0.UniqueIni(ib)) -> match_init ia ib
-      | (_,Ast0.OptIni(ib))
-      | (_,Ast0.UniqueIni(ib)) -> match_init pattern ib
-      | _ -> return false
-    else return_false (ContextRequired (Ast0.InitTag i))
-       
-  and match_param pattern p =
-    match Ast0.unwrap pattern with
-      Ast0.MetaParam(name,pure) ->
-       add_pure_binding name pure pure_sp_code.V0.combiner_parameter
-         (function p -> Ast0.ParamTag p)
-         p
-    | Ast0.MetaParamList(name,_,pure) -> failwith "metaparamlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context p
-       then
-         match (up,Ast0.unwrap p) with
-           (Ast0.VoidParam(tya),Ast0.VoidParam(tyb)) -> match_typeC tya tyb
-         | (Ast0.Param(tya,ida),Ast0.Param(tyb,idb)) ->
-             conjunct_bindings (match_typeC tya tyb)
-               (match_option match_ident ida idb)
-         | (Ast0.PComma(c1),Ast0.PComma(c)) -> check_mcode c1 c
-         | (Ast0.Pdots(d1),Ast0.Pdots(d))
-         | (Ast0.Pcircles(d1),Ast0.Pcircles(d)) -> check_mcode d1 d
-         | (Ast0.OptParam(parama),Ast0.OptParam(paramb))
-         | (Ast0.UniqueParam(parama),Ast0.UniqueParam(paramb)) ->
-             match_param parama paramb
-         | (_,Ast0.OptParam(paramb))
-         | (_,Ast0.UniqueParam(paramb)) -> match_param pattern paramb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.ParamTag p))
-           
-  and match_statement pattern s =
-    match Ast0.unwrap pattern with
-      Ast0.MetaStmt(name,pure) ->
-       (match Ast0.unwrap s with
-         Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) ->
-           return false (* ... is not a single statement *)
-       | _ ->
-           add_pure_binding name pure pure_sp_code.V0.combiner_statement
-             (function ty -> Ast0.StmtTag ty)
-             s)
-    | Ast0.MetaStmtList(name,pure) -> failwith "metastmtlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context s
-       then
-         match (up,Ast0.unwrap s) with
-           (Ast0.FunDecl(_,fninfoa,namea,lp1,paramsa,rp1,lb1,bodya,rb1),
-            Ast0.FunDecl(_,fninfob,nameb,lp,paramsb,rp,lb,bodyb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_fninfo fninfoa fninfob; match_ident namea nameb;
-                  match_dots match_param is_plist_matcher do_plist_match
-                    paramsa paramsb;
-                  match_dots match_statement is_slist_matcher do_slist_match
-                    bodya bodyb]
-         | (Ast0.Decl(_,decla),Ast0.Decl(_,declb)) ->
-             match_decl decla declb
-         | (Ast0.Seq(lb1,bodya,rb1),Ast0.Seq(lb,bodyb,rb)) ->
-             (* seqs can only match if they are all minus (plus code
-                allowed) or all context (plus code not allowed in the body).
-                we could be more permissive if the expansions of the isos are
-                also all seqs, but this would be hard to check except at top
-                level, and perhaps not worth checking even in that case.
-                Overall, the issue is that braces are used where single
-                statements are required, and something not satisfying these
-                conditions can cause a single statement to become a
-                non-single statement after the transformation.
-
-                example: if { ... -foo(); ... }
-                if we let the sequence convert to just -foo();
-                then we produce invalid code.  For some reason,
-                single_statement can't deal with this case, perhaps because
-                it starts introducing too many braces?  don't remember the
-                exact problem...
-             *)
-             conjunct_bindings (check_mcode lb1 lb)
-               (conjunct_bindings (check_mcode rb1 rb)
-                  (if not(checks_needed) or is_minus s or
-                    (is_context s &&
-                     List.for_all is_pure_context (Ast0.undots bodyb))
-                  then
-                    match_dots match_statement is_slist_matcher do_slist_match
-                      bodya bodyb
-                  else return_false (Braces(s))))
-         | (Ast0.ExprStatement(expa,sc1),Ast0.ExprStatement(expb,sc)) ->
-             conjunct_bindings (check_mcode sc1 sc) (match_expr expa expb)
-         | (Ast0.IfThen(if1,lp1,expa,rp1,branch1a,_),
-            Ast0.IfThen(if2,lp2,expb,rp2,branch1b,_)) ->
-              conjunct_many_bindings
-                [check_mcode if1 if2; check_mcode lp1 lp2;
-                  check_mcode rp1 rp2;
-                  match_expr expa expb;
-                  match_statement branch1a branch1b]
-         | (Ast0.IfThenElse(if1,lp1,expa,rp1,branch1a,e1,branch2a,_),
-            Ast0.IfThenElse(if2,lp2,expb,rp2,branch1b,e2,branch2b,_)) ->
-              conjunct_many_bindings
-                [check_mcode if1 if2; check_mcode lp1 lp2;
-                  check_mcode rp1 rp2; check_mcode e1 e2;
-                  match_expr expa expb;
-                  match_statement branch1a branch1b;
-                  match_statement branch2a branch2b]
-         | (Ast0.While(w1,lp1,expa,rp1,bodya,_),
-            Ast0.While(w,lp,expb,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [check_mcode w1 w; check_mcode lp1 lp;
-                  check_mcode rp1 rp; match_expr expa expb;
-                  match_statement bodya bodyb]
-         | (Ast0.Do(d1,bodya,w1,lp1,expa,rp1,_),
-            Ast0.Do(d,bodyb,w,lp,expb,rp,_)) ->
-              conjunct_many_bindings
-                [check_mcode d1 d; check_mcode w1 w; check_mcode lp1 lp;
-                  check_mcode rp1 rp; match_statement bodya bodyb;
-                  match_expr expa expb]
-         | (Ast0.For(f1,lp1,e1a,sc1a,e2a,sc2a,e3a,rp1,bodya,_),
-            Ast0.For(f,lp,e1b,sc1b,e2b,sc2b,e3b,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [check_mcode f1 f; check_mcode lp1 lp; check_mcode sc1a sc1b;
-                  check_mcode sc2a sc2b; check_mcode rp1 rp;
-                  match_option match_expr e1a e1b;
-                  match_option match_expr e2a e2b;
-                  match_option match_expr e3a e3b;
-                  match_statement bodya bodyb]
-         | (Ast0.Iterator(nma,lp1,argsa,rp1,bodya,_),
-            Ast0.Iterator(nmb,lp,argsb,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [match_ident nma nmb;
-                  check_mcode lp1 lp; check_mcode rp1 rp;
-                  match_dots match_expr is_elist_matcher do_elist_match
-                    argsa argsb;
-                  match_statement bodya bodyb]
-         | (Ast0.Switch(s1,lp1,expa,rp1,lb1,casesa,rb1),
-            Ast0.Switch(s,lp,expb,rp,lb,casesb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode s1 s; check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_expr expa expb;
-                  match_dots match_case_line no_list do_nolist_match
-                    casesa casesb]
-         | (Ast0.Break(b1,sc1),Ast0.Break(b,sc))
-         | (Ast0.Continue(b1,sc1),Ast0.Continue(b,sc)) ->
-             conjunct_bindings (check_mcode b1 b) (check_mcode sc1 sc)
-         | (Ast0.Label(l1,c1),Ast0.Label(l2,c)) ->
-             conjunct_bindings (match_ident l1 l2) (check_mcode c1 c)
-         | (Ast0.Goto(g1,l1,sc1),Ast0.Goto(g,l2,sc)) ->
-             conjunct_many_bindings
-               [check_mcode g1 g; check_mcode sc1 sc; match_ident l1 l2]
-         | (Ast0.Return(r1,sc1),Ast0.Return(r,sc)) ->
-             conjunct_bindings (check_mcode r1 r) (check_mcode sc1 sc)
-         | (Ast0.ReturnExpr(r1,expa,sc1),Ast0.ReturnExpr(r,expb,sc)) ->
-             conjunct_many_bindings
-               [check_mcode r1 r; check_mcode sc1 sc; match_expr expa expb]
-         | (Ast0.Disj(_,statement_dots_lista,_,_),_) ->
-             failwith "disj not supported in patterns"
-         | (Ast0.Nest(_,stmt_dotsa,_,_,_),_) ->
-             failwith "nest not supported in patterns"
-         | (Ast0.Exp(expa),Ast0.Exp(expb)) -> match_expr expa expb
-         | (Ast0.TopExp(expa),Ast0.TopExp(expb)) -> match_expr expa expb
-         | (Ast0.Exp(expa),Ast0.TopExp(expb)) -> match_expr expa expb
-         | (Ast0.Ty(tya),Ast0.Ty(tyb)) -> match_typeC tya tyb
-         | (Ast0.Dots(d,[]),Ast0.Dots(d1,wc))
-         | (Ast0.Circles(d,[]),Ast0.Circles(d1,wc))
-         | (Ast0.Stars(d,[]),Ast0.Stars(d1,wc)) ->
-             (match wc with
-               [] -> check_mcode d d1
-             | _ ->
-                 let (_,_,dots_whencode_allowed) = whencode_allowed in
-                 if dots_whencode_allowed
-                 then
-                   conjunct_bindings (check_mcode d d1)
-                     (List.fold_left
-                        (function prev ->
-                          function
-                            | Ast0.WhenNot wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.DotsStmtTag wc))
-                            | Ast0.WhenAlways wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d (Ast0.StmtTag wc))
-                            | Ast0.WhenModifier(x) ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.IsoWhenTag x)))
-                        (return true) wc)
-                 else
-                   (Printf.printf
-                      "warning: not applying iso because of whencode";
-                    return false))
-         | (Ast0.Dots(_,_::_),_) | (Ast0.Circles(_,_::_),_)
-         | (Ast0.Stars(_,_::_),_) ->
-             failwith "whencode not allowed in a pattern3"
-         | (Ast0.OptStm(rea),Ast0.OptStm(reb))
-         | (Ast0.UniqueStm(rea),Ast0.UniqueStm(reb)) ->
-             match_statement rea reb
-         | (_,Ast0.OptStm(reb))
-         | (_,Ast0.UniqueStm(reb)) -> match_statement pattern reb
-         |     _ -> return false
-       else return_false (ContextRequired (Ast0.StmtTag s))
-           
-  (* first should provide a subset of the information in the second *)
-  and match_fninfo patterninfo cinfo =
-    let patterninfo = List.sort compare patterninfo in
-    let cinfo = List.sort compare cinfo in
-    let rec loop = function
-       (Ast0.FStorage(sta)::resta,Ast0.FStorage(stb)::restb) ->
-         if mcode_equal sta stb
-         then conjunct_bindings (check_mcode sta stb) (loop (resta,restb))
-         else return false
-      |        (Ast0.FType(tya)::resta,Ast0.FType(tyb)::restb) ->
-         conjunct_bindings (match_typeC tya tyb) (loop (resta,restb))
-      |        (Ast0.FInline(ia)::resta,Ast0.FInline(ib)::restb) ->
-         if mcode_equal ia ib
-         then conjunct_bindings (check_mcode ia ib) (loop (resta,restb))
-         else return false
-      |        (Ast0.FAttr(ia)::resta,Ast0.FAttr(ib)::restb) ->
-         if mcode_equal ia ib
-         then conjunct_bindings (check_mcode ia ib) (loop (resta,restb))
-         else return false
-      |        (x::resta,((y::_) as restb)) ->
-         (match compare x y with
-           -1 -> return false
-         | 1 -> loop (resta,restb)
-         | _ -> failwith "not possible")
-      |        _ -> return false in
-    loop (patterninfo,cinfo)
-      
-  and match_case_line pattern c =
-    if not(checks_needed) or not(context_required) or is_context c
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap c) with
-       (Ast0.Default(d1,c1,codea),Ast0.Default(d,c,codeb)) ->
-         conjunct_many_bindings
-           [check_mcode d1 d; check_mcode c1 c;
-             match_dots match_statement is_slist_matcher do_slist_match
-               codea codeb]
-      | (Ast0.Case(ca1,expa,c1,codea),Ast0.Case(ca,expb,c,codeb)) ->
-         conjunct_many_bindings
-           [check_mcode ca1 ca; check_mcode c1 c; match_expr expa expb;
-             match_dots match_statement is_slist_matcher do_slist_match
-               codea codeb]
-      |        (Ast0.OptCase(ca),Ast0.OptCase(cb)) -> match_case_line ca cb
-      |        (_,Ast0.OptCase(cb)) -> match_case_line pattern cb
-      |        _ -> return false
-    else return_false (ContextRequired (Ast0.CaseLineTag c)) in
-  
-  let match_statement_dots x y =
-    match_dots match_statement is_slist_matcher do_slist_match x y in
-  
-  (match_expr, match_decl, match_statement, match_typeC,
-   match_statement_dots)
-    
-let match_expr dochecks context_required whencode_allowed =
-  let (fn,_,_,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_decl dochecks context_required whencode_allowed =
-  let (_,fn,_,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_statement dochecks context_required whencode_allowed =
-  let (_,_,fn,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_typeC dochecks context_required whencode_allowed =
-  let (_,_,_,fn,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_statement_dots dochecks context_required whencode_allowed =
-  let (_,_,_,_,fn) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-(* --------------------------------------------------------------------- *)
-(* make an entire tree MINUS *)
-    
-let make_minus =
-  let mcode (term,arity,info,mcodekind,pos) =
-    let new_mcodekind =
-     match mcodekind with
-       Ast0.CONTEXT(mc) ->
-        (match !mc with
-          (Ast.NOTHING,_,_) -> Ast0.MINUS(ref([],Ast0.default_token_info))
-        | _ -> failwith "make_minus: unexpected befaft")
-     | Ast0.MINUS(mc) -> mcodekind (* in the part copied from the src term *)
-     | _ -> failwith "make_minus mcode: unexpected mcodekind" in
-    (term,arity,info,new_mcodekind,pos) in
-  
-  let update_mc mcodekind e =
-    match !mcodekind with
-      Ast0.CONTEXT(mc) ->
-       (match !mc with
-         (Ast.NOTHING,_,_) ->
-           mcodekind := Ast0.MINUS(ref([],Ast0.default_token_info))
-       | _ -> failwith "make_minus: unexpected befaft")
-    | Ast0.MINUS(_mc) -> () (* in the part copied from the src term *)
-    | Ast0.PLUS -> failwith "make_minus donothing: unexpected plus mcodekind"
-    | _ -> failwith "make_minus donothing: unexpected mcodekind" in
-  
-  let donothing r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    let e = k e in update_mc mcodekind e; e in
-  
-  (* special case for whencode, because it isn't processed by contextneg,
-     since it doesn't appear in the + code *)
-  (* cases for dots and nests *)
-  let expression r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Edots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Edots(mcode d,whencode))
-    | Ast0.Ecircles(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Ecircles(mcode d,whencode))
-    | Ast0.Estars(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Estars(mcode d,whencode))
-    | Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-       update_mc mcodekind e;
-       Ast0.rewrap e
-         (Ast0.NestExpr(mcode starter,
-                        r.V0.rebuilder_expression_dots expr_dots,
-                        mcode ender,whencode,multi))
-    | _ -> donothing r k e in
-  
-  let declaration r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Ddots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Ddots(mcode d,whencode))
-    | _ -> donothing r k e in
-  
-  let statement r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Dots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Dots(mcode d,whencode))
-    | Ast0.Circles(d,whencode) ->
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Circles(mcode d,whencode))
-    | Ast0.Stars(d,whencode) ->
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Stars(mcode d,whencode))
-    | Ast0.Nest(starter,stmt_dots,ender,whencode,multi) ->
-       update_mc mcodekind e;
-       Ast0.rewrap e
-         (Ast0.Nest(mcode starter,r.V0.rebuilder_statement_dots stmt_dots,
-                    mcode ender,whencode,multi))
-    | _ -> donothing r k e in
-  
-  let initialiser r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Idots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Idots(mcode d,whencode))
-    | _ -> donothing r k e in
-  
-  let dots r k e =
-    let info = Ast0.get_info e in
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.DOTS([]) ->
-       (* if context is - this should be - as well.  There are no tokens
-          here though, so the bottom-up minusifier in context_neg leaves it
-          as mixed.  It would be better to fix context_neg, but that would
-          require a special case for each term with a dots subterm. *)
-       (match !mcodekind with
-         Ast0.MIXED(mc) ->
-           (match !mc with
-             (Ast.NOTHING,_,_) ->
-               mcodekind := Ast0.MINUS(ref([],Ast0.default_token_info));
-               e
-           | _ -> failwith "make_minus: unexpected befaft")
-         (* code already processed by an enclosing iso *)
-       | Ast0.MINUS(mc) -> e
-       | _ ->
-           failwith
-             (Printf.sprintf
-                "%d: make_minus donothingxxx: unexpected mcodekind"
-                info.Ast0.line_start))
-    | _ -> donothing r k e in
-  
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    dots dots dots dots dots dots
-    donothing expression donothing initialiser donothing declaration
-    statement donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-(* rebuild mcode cells in an instantiated alt *)
-    
-(* mcodes will be side effected later with plus code, so we have to copy
-   them on instantiating an isomorphism.  One could wonder whether it would
-   be better not to use side-effects, but they are convenient for insert_plus
-   where is it useful to manipulate a list of the mcodes but side-effect a
-   tree *)
-(* hmm... Insert_plus is called before Iso_pattern... *)
-let rebuild_mcode start_line =
-  let copy_mcodekind = function
-      Ast0.CONTEXT(mc) -> Ast0.CONTEXT(ref (!mc))
-    | Ast0.MINUS(mc) -> Ast0.MINUS(ref (!mc))
-    | Ast0.MIXED(mc) -> Ast0.MIXED(ref (!mc))
-    | Ast0.PLUS ->
-       (* this function is used elsewhere where we need to rebuild the
-          indices, and so we allow PLUS code as well *)
-        Ast0.PLUS in
-  
-  let mcode (term,arity,info,mcodekind,pos) =
-    let info =
-      match start_line with
-       Some x -> {info with Ast0.line_start = x; Ast0.line_end = x}
-      |        None -> info in
-    (term,arity,info,copy_mcodekind mcodekind,pos) in
-  
-  let copy_one x =
-    let old_info = Ast0.get_info x in
-    let info =
-      match start_line with
-       Some x -> {old_info with Ast0.line_start = x; Ast0.line_end = x}
-      |        None -> old_info in
-    {x with Ast0.info = info; Ast0.index = ref(Ast0.get_index x);
-      Ast0.mcodekind = ref (copy_mcodekind (Ast0.get_mcodekind x))} in
-  
-  let donothing r k e = copy_one (k e) in
-  
-  (* case for control operators (if, etc) *)
-  let statement r k e =
-    let s = k e in
-    let res =
-      copy_one
-       (Ast0.rewrap s
-          (match Ast0.unwrap s with
-            Ast0.Decl((info,mc),decl) ->
-              Ast0.Decl((info,copy_mcodekind mc),decl)
-          | Ast0.IfThen(iff,lp,tst,rp,branch,(info,mc)) ->
-              Ast0.IfThen(iff,lp,tst,rp,branch,(info,copy_mcodekind mc))
-          | Ast0.IfThenElse(iff,lp,tst,rp,branch1,els,branch2,(info,mc)) ->
-              Ast0.IfThenElse(iff,lp,tst,rp,branch1,els,branch2,
-                (info,copy_mcodekind mc))
-          | Ast0.While(whl,lp,exp,rp,body,(info,mc)) ->
-              Ast0.While(whl,lp,exp,rp,body,(info,copy_mcodekind mc))
-          | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,(info,mc)) ->
-              Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,
-                       (info,copy_mcodekind mc))
-          | Ast0.Iterator(nm,lp,args,rp,body,(info,mc)) ->
-              Ast0.Iterator(nm,lp,args,rp,body,(info,copy_mcodekind mc))
-          | Ast0.FunDecl
-              ((info,mc),fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-                Ast0.FunDecl
-                  ((info,copy_mcodekind mc),
-                   fninfo,name,lp,params,rp,lbrace,body,rbrace)
-          | s -> s)) in
-    Ast0.set_dots_bef_aft res
-      (match Ast0.get_dots_bef_aft res with
-       Ast0.NoDots -> Ast0.NoDots
-      | Ast0.AddingBetweenDots s ->
-         Ast0.AddingBetweenDots(r.V0.rebuilder_statement s)
-      | Ast0.DroppingBetweenDots s ->
-         Ast0.DroppingBetweenDots(r.V0.rebuilder_statement s)) in
-  
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing
-    donothing statement donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-(* The problem of whencode.  If an isomorphism contains dots in multiple
-   rules, then the code that is matched cannot contain whencode, because we
-   won't know which dots it goes with. Should worry about nests, but they
-   aren't allowed in isomorphisms for the moment. *)
-    
-let count_edots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let exprfn r k e =
-    match Ast0.unwrap e with
-      Ast0.Edots(_,_) | Ast0.Ecircles(_,_) | Ast0.Estars(_,_) -> 1
-    | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing exprfn donothing donothing donothing donothing donothing
-    donothing donothing
-    
-let count_idots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let initfn r k e =
-    match Ast0.unwrap e with Ast0.Idots(_,_) -> 1 | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing initfn donothing donothing donothing
-    donothing donothing
-    
-let count_dots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let stmtfn r k e =
-    match Ast0.unwrap e with
-      Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) -> 1
-    | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing stmtfn
-    donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-    
-let lookup name bindings mv_bindings =
-  try Common.Left (List.assoc (term name) bindings)
-  with
-    Not_found ->
-      (* failure is not possible anymore *)
-      Common.Right (List.assoc (term name) mv_bindings)
-
-(* mv_bindings is for the fresh metavariables that are introduced by the
-isomorphism *)
-let instantiate bindings mv_bindings =
-  let mcode x =
-    match Ast0.get_pos x with
-      Ast0.MetaPos(name,_,_) ->
-       (try
-         match lookup name bindings mv_bindings with
-           Common.Left(Ast0.MetaPosTag(id)) -> Ast0.set_pos id x
-         | _ -> failwith "not possible"
-       with Not_found -> Ast0.set_pos Ast0.NoMetaPos x)
-    | _ -> x in
-  let donothing r k e = k e in
-
-  (* cases where metavariables can occur *)
-  let identfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaId(name,constraints,pure) ->
-       (rebuild_mcode None).V0.rebuilder_ident
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.IdentTag(id)) -> id
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaId
-                  (Ast0.set_mcode_data new_mv name,constraints,pure)))
-    | Ast0.MetaFunc(name,_,pure) -> failwith "metafunc not supported"
-    | Ast0.MetaLocalFunc(name,_,pure) -> failwith "metalocalfunc not supported"
-    | _ -> e in
-
-  (* case for list metavariables *)
-  let rec elist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaExprList(name,lenname,pure) ->
-           failwith "meta_expr_list in iso not supported"
-           (*match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsExprTag(exp)) ->
-               (match same_dots exp with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.ExprTag(exp)) -> [exp]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported"*)
-       | _ -> [r.V0.rebuilder_expression x])
-    | x::xs -> (r.V0.rebuilder_expression x)::(elist r same_dots xs) in
-
-  let rec plist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaParamList(name,lenname,pure) ->
-           failwith "meta_param_list in iso not supported"
-           (*match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsParamTag(param)) ->
-               (match same_dots param with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.ParamTag(param)) -> [param]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported"*)
-       | _ -> [r.V0.rebuilder_parameter x])
-    | x::xs -> (r.V0.rebuilder_parameter x)::(plist r same_dots xs) in
-
-  let rec slist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaStmtList(name,pure) ->
-           (match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsStmtTag(stm)) ->
-               (match same_dots stm with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.StmtTag(stm)) -> [stm]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported")
-       | _ -> [r.V0.rebuilder_statement x])
-    | x::xs -> (r.V0.rebuilder_statement x)::(slist r same_dots xs) in
-
-  let same_dots d =
-    match Ast0.unwrap d with Ast0.DOTS(l) -> Some l |_ -> None in
-  let same_circles d =
-    match Ast0.unwrap d with Ast0.CIRCLES(l) -> Some l |_ -> None in
-  let same_stars d =
-    match Ast0.unwrap d with Ast0.STARS(l) -> Some l |_ -> None in
-
-  let dots list_fn r k d =
-    Ast0.rewrap d
-      (match Ast0.unwrap d with
-       Ast0.DOTS(l) -> Ast0.DOTS(list_fn r same_dots l)
-      | Ast0.CIRCLES(l) -> Ast0.CIRCLES(list_fn r same_circles l)
-      | Ast0.STARS(l) -> Ast0.STARS(list_fn r same_stars l)) in
-
-  let exprfn r k old_e = (* need to keep the original code for ! optim *)
-    let e = k old_e in
-    let e1 =
-    match Ast0.unwrap e with
-      Ast0.MetaExpr(name,constraints,x,form,pure) ->
-       (rebuild_mcode None).V0.rebuilder_expression
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.ExprTag(exp)) -> exp
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             let new_types =
-               match x with
-                 None -> None
-               | Some types ->
-                   let rec renamer = function
-                       Type_cocci.MetaType(name,keep,inherited) ->
-                         (match
-                           lookup (name,(),(),(),None) bindings mv_bindings
-                         with
-                           Common.Left(Ast0.TypeCTag(t)) ->
-                             Ast0.ast0_type_to_type t
-                         | Common.Left(_) ->
-                             failwith "iso pattern: unexpected type"
-                         | Common.Right(new_mv) ->
-                             Type_cocci.MetaType(new_mv,keep,inherited))
-                     | Type_cocci.ConstVol(cv,ty) ->
-                         Type_cocci.ConstVol(cv,renamer ty)
-                     | Type_cocci.Pointer(ty) ->
-                         Type_cocci.Pointer(renamer ty)
-                     | Type_cocci.FunctionPointer(ty) ->
-                         Type_cocci.FunctionPointer(renamer ty)
-                     | Type_cocci.Array(ty) ->
-                         Type_cocci.Array(renamer ty)
-                     | t -> t in
-                   Some(List.map renamer types) in
-             Ast0.rewrap e
-               (Ast0.MetaExpr
-                  (Ast0.set_mcode_data new_mv name,constraints,
-                   new_types,form,pure)))
-    | Ast0.MetaErr(namea,_,pure) -> failwith "metaerr not supported"
-    | Ast0.MetaExprList(namea,lenname,pure) ->
-       failwith "metaexprlist not supported"
-    | Ast0.Unary(exp,unop) ->
-       (match Ast0.unwrap_mcode unop with
-         Ast.Not ->
-           let was_meta =
-             (* k e doesn't change the outer structure of the term,
-                only the metavars *)
-             match Ast0.unwrap old_e with
-               Ast0.Unary(exp,_) ->
-                 (match Ast0.unwrap exp with
-                   Ast0.MetaExpr(name,constraints,x,form,pure) -> true
-                 | _ -> false)
-             | _ -> failwith "not possible" in
-           let nomodif e =
-             let mc = Ast0.get_mcodekind exp in
-             match mc with
-               Ast0.MINUS(x) ->
-                 (match !x with
-                   ([],_) -> true
-                 | _ -> false)
-             | Ast0.CONTEXT(x) | Ast0.MIXED(x) ->
-                 (match !x with
-                   (Ast.NOTHING,_,_) -> true
-                 | _ -> false)
-             | _ -> failwith "plus not possible" in
-           if was_meta && nomodif exp && nomodif e
-           then
-             let rec negate e (*for rewrapping*) res (*code to process*) =
-               match Ast0.unwrap res with
-                 Ast0.Unary(e1,op) when Ast0.unwrap_mcode op = Ast.Not ->
-                   Ast0.rewrap e (Ast0.unwrap e1)
-               | Ast0.Edots(_,_) -> Ast0.rewrap e (Ast0.unwrap res)
-               | Ast0.Paren(lp,e,rp) ->
-                   Ast0.rewrap res (Ast0.Paren(lp,negate e e,rp))
-               | Ast0.Binary(e1,op,e2) ->
-                   let reb nop = Ast0.rewrap_mcode op (Ast.Logical(nop)) in
-                   let invop =
-                     match Ast0.unwrap_mcode op with
-                       Ast.Logical(Ast.Inf) ->
-                         Ast0.Binary(e1,reb Ast.SupEq,e2)
-                     | Ast.Logical(Ast.Sup) ->
-                         Ast0.Binary(e1,reb Ast.InfEq,e2)
-                     | Ast.Logical(Ast.InfEq) ->
-                         Ast0.Binary(e1,reb Ast.Sup,e2)
-                     | Ast.Logical(Ast.SupEq) ->
-                         Ast0.Binary(e1,reb Ast.Inf,e2)
-                     | Ast.Logical(Ast.Eq) ->
-                         Ast0.Binary(e1,reb Ast.NotEq,e2)
-                     | Ast.Logical(Ast.NotEq) ->
-                         Ast0.Binary(e1,reb Ast.Eq,e2)
-                     | Ast.Logical(Ast.AndLog) ->
-                         Ast0.Binary(negate e1 e1,reb Ast.OrLog,
-                                     negate e2 e2)
-                     | Ast.Logical(Ast.OrLog) ->
-                         Ast0.Binary(negate e1 e1,reb Ast.AndLog,
-                                     negate e2 e2)
-                     | _ -> Ast0.Unary(res,Ast0.rewrap_mcode op Ast.Not) in
-                   Ast0.rewrap e invop
-               | Ast0.DisjExpr(lp,exps,mids,rp) ->
-                     (* use res because it is the transformed argument *)
-                   let exps = List.map (function e -> negate e e) exps in
-                   Ast0.rewrap res (Ast0.DisjExpr(lp,exps,mids,rp))
-               | _ ->
-                     (*use e, because this might be the toplevel expression*)
-                   Ast0.rewrap e
-                     (Ast0.Unary(res,Ast0.rewrap_mcode unop Ast.Not)) in
-             negate e exp
-           else e
-       | _ -> e)
-    | Ast0.Edots(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Edots(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | Ast0.Ecircles(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Ecircles(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | Ast0.Estars(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Estars(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | _ -> e in
-    if Ast0.get_test_exp old_e then Ast0.set_test_exp e1 else e1 in
-
-  let tyfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaType(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_typeC
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.TypeCTag(ty)) -> ty
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaType(Ast0.set_mcode_data new_mv name,pure)))
-    | _ -> e in
-
-  let declfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.Ddots(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.DeclTag(exp) -> Ast0.rewrap e (Ast0.Ddots(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | _ -> e in
-
-  let paramfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaParam(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_parameter
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.ParamTag(param)) -> param
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaParam(Ast0.set_mcode_data new_mv name, pure)))
-    | Ast0.MetaParamList(name,lenname,pure) ->
-       failwith "metaparamlist not supported"
-    | _ -> e in
-
-  let stmtfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-    Ast0.MetaStmt(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_statement
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.StmtTag(stm)) -> stm
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaStmt(Ast0.set_mcode_data new_mv name,pure)))
-    | Ast0.MetaStmtList(name,pure) -> failwith "metastmtlist not supported"
-    | Ast0.Dots(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Dots
-            (d,
-             List.map
-               (function (_,v) ->
-                 match v with
-                   Ast0.DotsStmtTag(stms) -> Ast0.WhenNot stms
-                 | Ast0.StmtTag(stm) -> Ast0.WhenAlways stm
-                 | Ast0.IsoWhenTag(x) -> Ast0.WhenModifier(x)
-                 | _ -> failwith "unexpected binding")
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | Ast0.Circles(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Circles
-            (d,
-             List.map
-               (function (_,v) ->
-                 match v with
-                   Ast0.DotsStmtTag(stms) -> Ast0.WhenNot stms
-                 | Ast0.StmtTag(stm) -> Ast0.WhenAlways stm
-                 | Ast0.IsoWhenTag(x) -> Ast0.WhenModifier(x)
-                 | _ -> failwith "unexpected binding")
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | Ast0.Stars(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Stars
-            (d,
-             List.map
-               (function (_,v) ->
-                 match v with
-                   Ast0.DotsStmtTag(stms) -> Ast0.WhenNot stms
-                 | Ast0.StmtTag(stm) -> Ast0.WhenAlways stm
-                 | Ast0.IsoWhenTag(x) -> Ast0.WhenModifier(x)
-                 | _ -> failwith "unexpected binding")
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | _ -> e in
-
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    (dots elist) donothing (dots plist) (dots slist) donothing donothing
-    identfn exprfn tyfn donothing paramfn declfn stmtfn donothing donothing
-
-(* --------------------------------------------------------------------- *)
-
-let is_minus e =
-  match Ast0.get_mcodekind e with Ast0.MINUS(cell) -> true | _ -> false
-
-let context_required e = not(is_minus e) && not !Flag.sgrep_mode2
-
-let disj_fail bindings e =
-  match bindings with
-    Some x -> Printf.fprintf stderr "no disj available at this type"; e
-  | None -> e
-
-(* isomorphism code is by default CONTEXT *)
-let merge_plus model_mcode e_mcode =
-  match model_mcode with
-    Ast0.MINUS(mc) ->
-      (* add the replacement information at the root *)
-      (match e_mcode with
-       Ast0.MINUS(emc) ->
-         emc :=
-           (match (!mc,!emc) with
-             (([],_),(x,t)) | ((x,_),([],t)) -> (x,t)
-           | _ -> failwith "how can we combine minuses?")
-      |        _ -> failwith "not possible 6")
-  | Ast0.CONTEXT(mc) ->
-      (match e_mcode with
-       Ast0.CONTEXT(emc) ->
-         (* keep the logical line info as in the model *)
-         let (mba,tb,ta) = !mc in
-         let (eba,_,_) = !emc in
-         (* merging may be required when a term is replaced by a subterm *)
-         let merged =
-           match (mba,eba) with
-             (x,Ast.NOTHING) | (Ast.NOTHING,x) -> x
-           | (Ast.BEFORE(b1),Ast.BEFORE(b2)) -> Ast.BEFORE(b1@b2)
-           | (Ast.BEFORE(b),Ast.AFTER(a)) -> Ast.BEFOREAFTER(b,a)
-           | (Ast.BEFORE(b1),Ast.BEFOREAFTER(b2,a)) ->
-               Ast.BEFOREAFTER(b1@b2,a)
-           | (Ast.AFTER(a),Ast.BEFORE(b)) -> Ast.BEFOREAFTER(b,a)
-           | (Ast.AFTER(a1),Ast.AFTER(a2)) ->Ast.AFTER(a2@a1)
-           | (Ast.AFTER(a1),Ast.BEFOREAFTER(b,a2)) -> Ast.BEFOREAFTER(b,a2@a1)
-           | (Ast.BEFOREAFTER(b1,a),Ast.BEFORE(b2)) ->
-               Ast.BEFOREAFTER(b1@b2,a)
-           | (Ast.BEFOREAFTER(b,a1),Ast.AFTER(a2)) ->
-               Ast.BEFOREAFTER(b,a2@a1)
-           | (Ast.BEFOREAFTER(b1,a1),Ast.BEFOREAFTER(b2,a2)) ->
-                Ast.BEFOREAFTER(b1@b2,a2@a1) in
-         emc := (merged,tb,ta)
-      |        Ast0.MINUS(emc) ->
-         let (anything_bef_aft,_,_) = !mc in
-         let (anythings,t) = !emc in
-         emc :=
-           (match anything_bef_aft with
-             Ast.BEFORE(b) -> (b@anythings,t)
-           | Ast.AFTER(a) -> (anythings@a,t)
-           | Ast.BEFOREAFTER(b,a) -> (b@anythings@a,t)
-           | Ast.NOTHING -> (anythings,t))
-      |        _ -> failwith "not possible 7")
-  | Ast0.MIXED(_) -> failwith "not possible 8"
-  | Ast0.PLUS -> failwith "not possible 9"
-
-let copy_plus printer minusify model e =
-  if !Flag.sgrep_mode2
-  then e (* no plus code, can cause a "not possible" error, so just avoid it *)
-  else
-    let e =
-      match Ast0.get_mcodekind model with
-       Ast0.MINUS(mc) -> minusify e
-      | Ast0.CONTEXT(mc) -> e
-      | _ -> failwith "not possible: copy_plus\n" in
-    merge_plus (Ast0.get_mcodekind model) (Ast0.get_mcodekind e);
-    e
-
-let copy_minus printer minusify model e =
-  match Ast0.get_mcodekind model with
-    Ast0.MINUS(mc) -> minusify e
-  | Ast0.CONTEXT(mc) -> e
-  | Ast0.MIXED(_) ->
-      if !Flag.sgrep_mode2
-      then e
-      else failwith "not possible 8"
-  | Ast0.PLUS -> failwith "not possible 9"
-
-let whencode_allowed prev_ecount prev_icount prev_dcount
-    ecount icount dcount rest =
-  (* actually, if ecount or dcount is 0, the flag doesn't matter, because it
-     won't be tested *)
-  let other_ecount = (* number of edots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> ec + rest)
-      prev_ecount rest in
-  let other_icount = (* number of dots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> ic + rest)
-      prev_icount rest in
-  let other_dcount = (* number of dots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> dc + rest)
-      prev_dcount rest in
-  (ecount = 0 or other_ecount = 0, icount = 0 or other_icount = 0,
-   dcount = 0 or other_dcount = 0)
-
-(* copy the befores and afters to the instantiated code *)
-let extra_copy_stmt_plus model e =
-  (if not !Flag.sgrep_mode2 (* sgrep has no plus code, so nothing to do *)
-  then
-    (match Ast0.unwrap model with
-      Ast0.FunDecl((info,bef),_,_,_,_,_,_,_,_)
-    | Ast0.Decl((info,bef),_) ->
-       (match Ast0.unwrap e with
-         Ast0.FunDecl((info,bef1),_,_,_,_,_,_,_,_)
-       | Ast0.Decl((info,bef1),_) ->
-           merge_plus bef bef1
-       | _ ->  merge_plus bef (Ast0.get_mcodekind e))
-    | Ast0.IfThen(_,_,_,_,_,(info,aft))
-    | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft))
-    | Ast0.While(_,_,_,_,_,(info,aft))
-    | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft))
-    | Ast0.Iterator(_,_,_,_,_,(info,aft)) ->
-       (match Ast0.unwrap e with
-         Ast0.IfThen(_,_,_,_,_,(info,aft1))
-       | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft1))
-       | Ast0.While(_,_,_,_,_,(info,aft1))
-       | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft1))
-       | Ast0.Iterator(_,_,_,_,_,(info,aft1)) ->
-           merge_plus aft aft1
-       | _ -> merge_plus aft (Ast0.get_mcodekind e))
-    | _ -> ()));
-  e
-
-let extra_copy_other_plus model e = e
-
-(* --------------------------------------------------------------------- *)
-
-let mv_count = ref 0
-let new_mv (_,s) =
-  let ct = !mv_count in
-  mv_count := !mv_count + 1;
-  "_"^s^"_"^(string_of_int ct)
-
-let get_name = function
-    Ast.MetaIdDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaIdDecl(ar,nm))
-  | Ast.MetaFreshIdDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaFreshIdDecl(ar,nm))
-  | Ast.MetaTypeDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaTypeDecl(ar,nm))
-  | Ast.MetaListlenDecl(nm) ->
-      failwith "should not be rebuilt"
-  | Ast.MetaParamDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaParamDecl(ar,nm))
-  | Ast.MetaParamListDecl(ar,nm,nm1) ->
-      (nm,function nm -> Ast.MetaParamListDecl(ar,nm,nm1))
-  | Ast.MetaConstDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaConstDecl(ar,nm,ty))
-  | Ast.MetaErrDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaErrDecl(ar,nm))
-  | Ast.MetaExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaExpDecl(ar,nm,ty))
-  | Ast.MetaIdExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaIdExpDecl(ar,nm,ty))
-  | Ast.MetaLocalIdExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaLocalIdExpDecl(ar,nm,ty))
-  | Ast.MetaExpListDecl(ar,nm,nm1) ->
-      (nm,function nm -> Ast.MetaExpListDecl(ar,nm,nm1))
-  | Ast.MetaStmDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaStmDecl(ar,nm))
-  | Ast.MetaStmListDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaStmListDecl(ar,nm))
-  | Ast.MetaFuncDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaFuncDecl(ar,nm))
-  | Ast.MetaLocalFuncDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaLocalFuncDecl(ar,nm))
-  | Ast.MetaPosDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaPosDecl(ar,nm))
-  | Ast.MetaDeclarerDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaDeclarerDecl(ar,nm))
-  | Ast.MetaIteratorDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaIteratorDecl(ar,nm))
-
-let make_new_metavars metavars bindings =
-  let new_metavars =
-    List.filter
-      (function mv ->
-       let (s,_) = get_name mv in
-       try let _ = List.assoc s bindings in false with Not_found -> true)
-      metavars in
-  List.split
-    (List.map
-       (function mv ->
-        let (s,rebuild) = get_name mv in
-        let new_s = (!current_rule,new_mv s) in
-        (rebuild new_s, (s,new_s)))
-       new_metavars)
-
-(* --------------------------------------------------------------------- *)
-
-let do_nothing x = x
-
-let mkdisj matcher metavars alts e instantiater mkiso disj_maker minusify
-    rebuild_mcodes name printer extra_plus update_others =
-  let call_instantiate bindings mv_bindings alts =
-    List.concat
-      (List.map
-        (function (a,_,_,_) ->
-          nub
-          (* no need to create duplicates when the bindings have no effect *)
-            (List.map
-               (function bindings ->
-                 Ast0.set_iso
-                   (copy_plus printer minusify e
-                      (extra_plus e
-                         (instantiater bindings mv_bindings
-                            (rebuild_mcodes a))))
-                   (Common.union_set [(name,mkiso a)] (Ast0.get_iso e)))
-               bindings))
-        alts) in
-  let rec inner_loop all_alts prev_ecount prev_icount prev_dcount = function
-      [] -> Common.Left (prev_ecount, prev_icount, prev_dcount)
-    | ((pattern,ecount,icount,dcount)::rest) ->
-       let wc =
-         whencode_allowed prev_ecount prev_icount prev_dcount
-           ecount dcount icount rest in
-       (match matcher true (context_required e) wc pattern e init_env with
-         Fail(reason) ->
-           if reason = NonMatch || not !Flag_parsing_cocci.show_iso_failures
-           then ()
-           else
-             (match matcher false false wc pattern e init_env with
-               OK _ ->
-                 interpret_reason name (Ast0.get_line e) reason
-                   (function () -> printer e)
-             | _ -> ());
-           inner_loop all_alts (prev_ecount + ecount) (prev_icount + icount)
-             (prev_dcount + dcount) rest
-       | OK (bindings : (((string * string) * 'a) list list)) ->
-           let all_alts =
-             (* apply update_others to all patterns other than the matched
-                one.  This is used to desigate the others as test
-                expressions in the TestExpression case *)
-             (List.map
-                (function (x,e,i,d) as all ->
-                  if x = pattern
-                  then all
-                  else (update_others x,e,i,d))
-                (List.hd all_alts)) ::
-             (List.map
-                (List.map (function (x,e,i,d) -> (update_others x,e,i,d)))
-                (List.tl all_alts)) in
-           (match List.concat all_alts with
-             [x] -> Common.Left (prev_ecount, prev_icount, prev_dcount)
-           | all_alts ->
-               let (new_metavars,mv_bindings) =
-                 make_new_metavars metavars (nub(List.concat bindings)) in
-               Common.Right
-                 (new_metavars,
-                  call_instantiate bindings mv_bindings all_alts))) in
-  let rec outer_loop prev_ecount prev_icount prev_dcount = function
-      [] | [[_]] (*only one alternative*)  -> ([],e) (* nothing matched *)
-    | (alts::rest) as all_alts ->
-       match inner_loop all_alts prev_ecount prev_icount prev_dcount alts with
-         Common.Left(prev_ecount, prev_icount, prev_dcount) ->
-           outer_loop prev_ecount prev_icount prev_dcount rest
-       | Common.Right (new_metavars,res) ->
-           (new_metavars,
-            copy_minus printer minusify e (disj_maker res)) in
-  outer_loop 0 0 0 alts
-
-(* no one should ever look at the information stored in these mcodes *)
-let disj_starter lst =
-  let old_info = Ast0.get_info(List.hd lst) in
-  let info =
-    { old_info with
-      Ast0.line_end = old_info.Ast0.line_start;
-      Ast0.logical_end = old_info.Ast0.logical_start;
-      Ast0.attachable_start = false; Ast0.attachable_end = false;
-      Ast0.mcode_start = []; Ast0.mcode_end = [];
-      Ast0.strings_before = []; Ast0.strings_after = [] } in
-  Ast0.make_mcode_info "(" info
-
-let disj_ender lst =
-  let old_info = Ast0.get_info(List.hd lst) in
-  let info =
-    { old_info with
-      Ast0.line_start = old_info.Ast0.line_end;
-      Ast0.logical_start = old_info.Ast0.logical_end;
-      Ast0.attachable_start = false; Ast0.attachable_end = false;
-      Ast0.mcode_start = []; Ast0.mcode_end = [];
-      Ast0.strings_before = []; Ast0.strings_after = [] } in
-  Ast0.make_mcode_info ")" info
-
-let disj_mid _ = Ast0.make_mcode "|"
-
-let make_disj_type tl =
-  let mids =
-    match tl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.DisjType(disj_starter tl,tl,mids,disj_ender tl))
-let make_disj_stmt_list tl =
-  let mids =
-    match tl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.Disj(disj_starter tl,tl,mids,disj_ender tl))
-let make_disj_expr model el =
-  let mids =
-    match el with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  let update_arg x =
-    if Ast0.get_arg_exp model then Ast0.set_arg_exp x else x in
-  let update_test x =
-    let x = if Ast0.get_test_pos model then Ast0.set_test_pos x else x in
-    if Ast0.get_test_exp model then Ast0.set_test_exp x else x in
-  let el = List.map update_arg (List.map update_test el) in
-  Ast0.context_wrap (Ast0.DisjExpr(disj_starter el,el,mids,disj_ender el))
-let make_disj_decl dl =
-  let mids =
-    match dl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.DisjDecl(disj_starter dl,dl,mids,disj_ender dl))
-let make_disj_stmt sl =
-  let dotify x = Ast0.context_wrap (Ast0.DOTS[x]) in
-  let mids =
-    match sl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap
-    (Ast0.Disj(disj_starter sl,List.map dotify sl,mids,disj_ender sl))
-
-let transform_type (metavars,alts,name) e =
-  match alts with
-    (Ast0.TypeCTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.TypeCTag(p) ->
-                  (p,count_edots.V0.combiner_typeC p,
-                   count_idots.V0.combiner_typeC p,
-                   count_dots.V0.combiner_typeC p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_typeC metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_typeC)
-       (function t -> Ast0.TypeCTag t)
-       make_disj_type make_minus.V0.rebuilder_typeC
-       (rebuild_mcode start_line).V0.rebuilder_typeC
-       name Unparse_ast0.typeC extra_copy_other_plus do_nothing
-  | _ -> ([],e)
-
-
-let transform_expr (metavars,alts,name) e =
-  let process update_others =
-      (* start line is given to any leaves in the iso code *)
-    let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-    let alts =
-      List.map
-       (List.map
-          (function
-              Ast0.ExprTag(p) | Ast0.ArgExprTag(p) | Ast0.TestExprTag(p) ->
-                (p,count_edots.V0.combiner_expression p,
-                 count_idots.V0.combiner_expression p,
-                 count_dots.V0.combiner_expression p)
-            | _ -> failwith "invalid alt"))
-       alts in
-    mkdisj match_expr metavars alts e
-      (function b -> function mv_b ->
-       (instantiate b mv_b).V0.rebuilder_expression)
-      (function e -> Ast0.ExprTag e)
-      (make_disj_expr e) make_minus.V0.rebuilder_expression
-      (rebuild_mcode start_line).V0.rebuilder_expression
-      name Unparse_ast0.expression extra_copy_other_plus update_others in
-  match alts with
-    (Ast0.ExprTag(_)::_)::_ -> process do_nothing
-  | (Ast0.ArgExprTag(_)::_)::_ when Ast0.get_arg_exp e -> process do_nothing
-  | (Ast0.TestExprTag(_)::_)::_ when Ast0.get_test_pos e ->
-      process Ast0.set_test_exp
-  | _ -> ([],e)
-
-let transform_decl (metavars,alts,name) e =
-  match alts with
-    (Ast0.DeclTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some (Ast0.get_info e).Ast0.line_start in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.DeclTag(p) ->
-                  (p,count_edots.V0.combiner_declaration p,
-                   count_idots.V0.combiner_declaration p,
-                   count_dots.V0.combiner_declaration p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_decl metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_declaration)
-       (function d -> Ast0.DeclTag d)
-       make_disj_decl
-       make_minus.V0.rebuilder_declaration
-       (rebuild_mcode start_line).V0.rebuilder_declaration
-       name Unparse_ast0.declaration extra_copy_other_plus do_nothing
-  | _ -> ([],e)
-
-let transform_stmt (metavars,alts,name) e =
-  match alts with
-    (Ast0.StmtTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some (Ast0.get_info e).Ast0.line_start in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.StmtTag(p) ->
-                  (p,count_edots.V0.combiner_statement p,
-                   count_idots.V0.combiner_statement p,
-                   count_dots.V0.combiner_statement p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_statement metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_statement)
-       (function s -> Ast0.StmtTag s)
-       make_disj_stmt make_minus.V0.rebuilder_statement
-       (rebuild_mcode start_line).V0.rebuilder_statement
-       name (Unparse_ast0.statement "") extra_copy_stmt_plus do_nothing
-  | _ -> ([],e)
-
-(* sort of a hack, because there is no disj at top level *)
-let transform_top (metavars,alts,name) e =
-  match Ast0.unwrap e with
-    Ast0.DECL(declstm) ->
-      (try
-       let strip alts =
-         List.map
-           (List.map
-              (function
-                  Ast0.DotsStmtTag(d) ->
-                    (match Ast0.unwrap d with
-                      Ast0.DOTS([s]) -> Ast0.StmtTag(s)
-                    | _ -> raise (Failure ""))
-                | _ -> raise (Failure "")))
-           alts in
-       let (mv,s) = transform_stmt (metavars,strip alts,name) declstm in
-       (mv,Ast0.rewrap e (Ast0.DECL(s)))
-      with Failure _ -> ([],e))
-  | Ast0.CODE(stmts) ->
-      let (mv,res) =
-       match alts with
-         (Ast0.DotsStmtTag(_)::_)::_ ->
-              (* start line is given to any leaves in the iso code *)
-           let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-           let alts =
-             List.map
-               (List.map
-                  (function
-                      Ast0.DotsStmtTag(p) ->
-                        (p,count_edots.V0.combiner_statement_dots p,
-                         count_idots.V0.combiner_statement_dots p,
-                         count_dots.V0.combiner_statement_dots p)
-                    | _ -> failwith "invalid alt"))
-               alts in
-           mkdisj match_statement_dots metavars alts stmts
-             (function b -> function mv_b ->
-               (instantiate b mv_b).V0.rebuilder_statement_dots)
-             (function s -> Ast0.DotsStmtTag s)
-             (function x ->
-               Ast0.rewrap e (Ast0.DOTS([make_disj_stmt_list x])))
-             make_minus.V0.rebuilder_statement_dots
-             (rebuild_mcode start_line).V0.rebuilder_statement_dots
-             name Unparse_ast0.statement_dots extra_copy_other_plus do_nothing
-       | _ -> ([],stmts) in
-      (mv,Ast0.rewrap e (Ast0.CODE res))
-  | _ -> ([],e)
-
-(* --------------------------------------------------------------------- *)
-
-let transform (alts : isomorphism) t =
-  (* the following ugliness is because rebuilder only returns a new term *)
-  let extra_meta_decls = ref ([] : Ast_cocci.metavar list) in
-  let mcode x = x in
-  let donothing r k e = k e in
-  let exprfn r k e =
-    let (extra_meta,exp) = transform_expr alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    exp in
-
-  let declfn r k e =
-    let (extra_meta,dec) = transform_decl alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    dec in
-
-  let stmtfn r k e =
-    let (extra_meta,stm) = transform_stmt alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    stm in
-  
-  let typefn r k e =
-    let (extra_meta,ty) = transform_type alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    ty in
-  
-  let topfn r k e =
-    let (extra_meta,ty) = transform_top alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    ty in
-  
-  let res =
-    V0.rebuilder
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing exprfn typefn donothing donothing declfn stmtfn
-      donothing topfn in
-  let res = res.V0.rebuilder_top_level t in
-  (!extra_meta_decls,res)
-
-(* --------------------------------------------------------------------- *)
-
-(* should be done by functorizing the parser to use wrap or context_wrap *)
-let rewrap =
-  let mcode (x,a,i,mc,pos) = (x,a,i,Ast0.context_befaft(),pos) in
-  let donothing r k e = Ast0.context_wrap(Ast0.unwrap(k e)) in
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing
-
-let rewrap_anything = function
-    Ast0.DotsExprTag(d) ->
-      Ast0.DotsExprTag(rewrap.V0.rebuilder_expression_dots d)
-  | Ast0.DotsInitTag(d) ->
-      Ast0.DotsInitTag(rewrap.V0.rebuilder_initialiser_list d)
-  | Ast0.DotsParamTag(d) ->
-      Ast0.DotsParamTag(rewrap.V0.rebuilder_parameter_list d)
-  | Ast0.DotsStmtTag(d) ->
-      Ast0.DotsStmtTag(rewrap.V0.rebuilder_statement_dots d)
-  | Ast0.DotsDeclTag(d) ->
-      Ast0.DotsDeclTag(rewrap.V0.rebuilder_declaration_dots d)
-  | Ast0.DotsCaseTag(d) ->
-      Ast0.DotsCaseTag(rewrap.V0.rebuilder_case_line_dots d)
-  | Ast0.IdentTag(d) -> Ast0.IdentTag(rewrap.V0.rebuilder_ident d)
-  | Ast0.ExprTag(d) -> Ast0.ExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.ArgExprTag(d) -> Ast0.ArgExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.TestExprTag(d) -> Ast0.TestExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.TypeCTag(d) -> Ast0.TypeCTag(rewrap.V0.rebuilder_typeC d)
-  | Ast0.InitTag(d) -> Ast0.InitTag(rewrap.V0.rebuilder_initialiser d)
-  | Ast0.ParamTag(d) -> Ast0.ParamTag(rewrap.V0.rebuilder_parameter d)
-  | Ast0.DeclTag(d) -> Ast0.DeclTag(rewrap.V0.rebuilder_declaration d)
-  | Ast0.StmtTag(d) -> Ast0.StmtTag(rewrap.V0.rebuilder_statement d)
-  | Ast0.CaseLineTag(d) -> Ast0.CaseLineTag(rewrap.V0.rebuilder_case_line d)
-  | Ast0.TopTag(d) -> Ast0.TopTag(rewrap.V0.rebuilder_top_level d)
-  | Ast0.IsoWhenTag(_) -> failwith "only for isos within iso phase"
-  | Ast0.MetaPosTag(p) -> Ast0.MetaPosTag(p)
-
-(* --------------------------------------------------------------------- *)
-
-let apply_isos isos rule rule_name =
-  if isos = []
-  then ([],rule)
-  else
-    begin
-      current_rule := rule_name;
-      let isos =
-       List.map
-         (function (metavars,iso,name) ->
-           (metavars,List.map (List.map rewrap_anything) iso,name))
-         isos in
-      let (extra_meta,rule) =
-       List.split
-         (List.map
-            (function t ->
-              List.fold_left
-                (function (extra_meta,t) -> function iso ->
-                  let (new_extra_meta,t) = transform iso t in
-                  (new_extra_meta@extra_meta,t))
-                ([],t) isos)
-            rule) in
-      (List.concat extra_meta, Compute_lines.compute_lines rule)
-    end
diff --git a/parsing_cocci/.#iso_pattern.ml.1.137 b/parsing_cocci/.#iso_pattern.ml.1.137
deleted file mode 100644 (file)
index e8abab4..0000000
+++ /dev/null
@@ -1,2310 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Potential problem: offset of mcode is not updated when an iso is
-instantiated, implying that a term may end up with many mcodes with the
-same offset.  On the other hand, at the moment offset only seems to be used
-before this phase.  Furthermore add_dot_binding relies on the offset to
-remain the same between matching an iso and instantiating it with bindings. *)
-
-(* --------------------------------------------------------------------- *)
-(* match a SmPL expression against a SmPL abstract syntax tree,
-either - or + *)
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-
-let current_rule = ref ""
-
-(* --------------------------------------------------------------------- *)
-
-type isomorphism =
-    Ast_cocci.metavar list * Ast0_cocci.anything list list * string (* name *)
-
-let strip_info =
-  let mcode (term,_,_,_,_) =
-    (term,Ast0.NONE,Ast0.default_info(),Ast0.PLUS,ref Ast0.NoMetaPos) in
-  let donothing r k e =
-    let x = k e in
-    {(Ast0.wrap (Ast0.unwrap x)) with
-      Ast0.mcodekind = ref Ast0.PLUS;
-      Ast0.true_if_test = x.Ast0.true_if_test} in
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing
-
-let anything_equal = function
-    (Ast0.DotsExprTag(d1),Ast0.DotsExprTag(d2)) ->
-      failwith "not a possible variable binding" (*not sure why these are pbs*)
-  | (Ast0.DotsInitTag(d1),Ast0.DotsInitTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsParamTag(d1),Ast0.DotsParamTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsStmtTag(d1),Ast0.DotsStmtTag(d2)) ->
-      (strip_info.V0.rebuilder_statement_dots d1) =
-      (strip_info.V0.rebuilder_statement_dots d2)
-  | (Ast0.DotsDeclTag(d1),Ast0.DotsDeclTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsCaseTag(d1),Ast0.DotsCaseTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.IdentTag(d1),Ast0.IdentTag(d2)) ->
-      (strip_info.V0.rebuilder_ident d1) = (strip_info.V0.rebuilder_ident d2)
-  | (Ast0.ExprTag(d1),Ast0.ExprTag(d2)) ->
-      (strip_info.V0.rebuilder_expression d1) =
-      (strip_info.V0.rebuilder_expression d2)
-  | (Ast0.ArgExprTag(_),_) | (_,Ast0.ArgExprTag(_)) ->
-      failwith "not possible - only in isos1"
-  | (Ast0.TestExprTag(_),_) | (_,Ast0.TestExprTag(_)) ->
-      failwith "not possible - only in isos1"
-  | (Ast0.TypeCTag(d1),Ast0.TypeCTag(d2)) ->
-      (strip_info.V0.rebuilder_typeC d1) =
-      (strip_info.V0.rebuilder_typeC d2)
-  | (Ast0.InitTag(d1),Ast0.InitTag(d2)) ->
-      (strip_info.V0.rebuilder_initialiser d1) =
-      (strip_info.V0.rebuilder_initialiser d2)
-  | (Ast0.ParamTag(d1),Ast0.ParamTag(d2)) ->
-      (strip_info.V0.rebuilder_parameter d1) =
-      (strip_info.V0.rebuilder_parameter d2)
-  | (Ast0.DeclTag(d1),Ast0.DeclTag(d2)) ->
-      (strip_info.V0.rebuilder_declaration d1) =
-      (strip_info.V0.rebuilder_declaration d2)
-  | (Ast0.StmtTag(d1),Ast0.StmtTag(d2)) ->
-      (strip_info.V0.rebuilder_statement d1) =
-      (strip_info.V0.rebuilder_statement d2)
-  | (Ast0.CaseLineTag(d1),Ast0.CaseLineTag(d2)) ->
-      (strip_info.V0.rebuilder_case_line d1) =
-      (strip_info.V0.rebuilder_case_line d2)
-  | (Ast0.TopTag(d1),Ast0.TopTag(d2)) ->
-      (strip_info.V0.rebuilder_top_level d1) =
-      (strip_info.V0.rebuilder_top_level d2)
-  | (Ast0.IsoWhenTTag(_),_) | (_,Ast0.IsoWhenTTag(_)) ->
-      failwith "only for isos within iso phase"
-  | (Ast0.IsoWhenFTag(_),_) | (_,Ast0.IsoWhenFTag(_)) ->
-      failwith "only for isos within iso phase"
-  | (Ast0.IsoWhenTag(_),_) | (_,Ast0.IsoWhenTag(_)) ->
-      failwith "only for isos within iso phase"
-  | _ -> false
-
-let term (var1,_,_,_,_) = var1
-let dot_term (var1,_,info,_,_) = ("", var1 ^ (string_of_int info.Ast0.offset))
-
-
-type reason =
-    NotPure of Ast0.pure * (string * string) * Ast0.anything
-  | NotPureLength of (string * string)
-  | ContextRequired of Ast0.anything
-  | NonMatch
-  | Braces of Ast0.statement
-  | Position of string * string
-
-let interpret_reason name line reason printer =
-  Printf.printf
-    "warning: iso %s does not match the code below on line %d\n" name line;
-  printer(); Format.print_newline();
-  match reason with
-    NotPure(Ast0.Pure,(_,var),nonpure) ->
-      Printf.printf
-       "pure metavariable %s is matched against the following nonpure code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPure(Ast0.Context,(_,var),nonpure) ->
-      Printf.printf
-       "context metavariable %s is matched against the following\nnoncontext code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPure(Ast0.PureContext,(_,var),nonpure) ->
-      Printf.printf
-       "pure context metavariable %s is matched against the following\nnonpure or noncontext code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPureLength((_,var)) ->
-      Printf.printf
-       "pure metavariable %s is matched against too much or too little code\n"
-       var;
-  | ContextRequired(term) ->
-      Printf.printf
-       "the following code matched is not uniformly minus or context,\nor contains a disjunction:\n";
-      Unparse_ast0.unparse_anything term
-  | Braces(s) ->
-      Printf.printf "braces must be all minus (plus code allowed) or all\ncontext (plus code not allowed in the body) to match:\n";
-      Unparse_ast0.statement "" s;
-      Format.print_newline()
-  | Position(rule,name) ->
-      Printf.printf "position variable %s.%s conflicts with an isomorphism\n"
-       rule name;
-  | _ -> failwith "not possible"
-
-type 'a either = OK of 'a | Fail of reason
-
-let add_binding var exp bindings =
-  let var = term var in
-  let attempt bindings =
-    try
-      let cur = List.assoc var bindings in
-      if anything_equal(exp,cur) then [bindings] else []
-    with Not_found -> [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-let add_dot_binding var exp bindings =
-  let var = dot_term var in
-  let attempt bindings =
-    try
-      let cur = List.assoc var bindings in
-      if anything_equal(exp,cur) then [bindings] else []
-    with Not_found -> [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-(* multi-valued *)
-let add_multi_dot_binding var exp bindings =
-  let var = dot_term var in
-  let attempt bindings = [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-let rec nub ls =
-  match ls with
-    [] -> []
-  | (x::xs) when (List.mem x xs) -> nub xs
-  | (x::xs) -> x::(nub xs)
-
-(* --------------------------------------------------------------------- *)
-
-let init_env = [[]]
-
-let debug str m binding =
-  let res = m binding in
-  (match res with
-    None -> Printf.printf "%s: failed\n" str
-  | Some binding ->
-      List.iter
-       (function binding ->
-         Printf.printf "%s: %s\n" str
-           (String.concat " " (List.map (function (x,_) -> x) binding)))
-       binding);
-  res
-
-let conjunct_bindings
-    (m1 : 'binding -> 'binding either)
-    (m2 : 'binding -> 'binding either)
-    (binding : 'binding) : 'binding either =
-  match m1 binding with Fail(reason) -> Fail(reason) | OK binding -> m2 binding
-
-let rec conjunct_many_bindings = function
-    [] -> failwith "not possible"
-  | [x] -> x
-  | x::xs -> conjunct_bindings x (conjunct_many_bindings xs)
-
-let mcode_equal (x,_,_,_,_) (y,_,_,_,_) = x = y
-
-let return b binding = if b then OK binding else Fail NonMatch
-let return_false reason binding = Fail reason
-
-let match_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> return true
-  | _ -> return false
-
-let bool_match_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> true
-  | _ -> false
-
-(* context_required is for the example
-   if (
-+      (int * )
-       x == NULL)
-  where we can't change x == NULL to eg NULL == x.  So there can either be
-  nothing attached to the root or the term has to be all removed.
-  if would be nice if we knew more about the relationship between the - and +
-  code, because in the case where the + code is a separate statement in a
-  sequence, this is not a problem.  Perhaps something could be done in
-  insert_plus
-
-   The example seems strange.  Why isn't the cast attached to x?
- *)
-let is_context e =
-  !Flag.sgrep_mode2 or (* everything is context for sgrep *)
-  (match Ast0.get_mcodekind e with
-    Ast0.CONTEXT(cell) -> true
-  | _ -> false)
-
-(* needs a special case when there is a Disj or an empty DOTS
-   the following stops at the statement level, and gives true if one
-   statement is replaced by another *)
-let rec is_pure_context s =
-  !Flag.sgrep_mode2 or (* everything is context for sgrep *)
-  (match Ast0.unwrap s with
-    Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-      List.for_all
-       (function x ->
-         match Ast0.undots x with
-           [s] -> is_pure_context s
-         | _ -> false (* could we do better? *))
-       statement_dots_list
-  | _ ->
-      (match Ast0.get_mcodekind s with
-       Ast0.CONTEXT(mc) ->
-         (match !mc with
-           (Ast.NOTHING,_,_) -> true
-         | _ -> false)
-      | Ast0.MINUS(mc) ->
-         (match !mc with
-       (* do better for the common case of replacing a stmt by another one *)
-           ([[Ast.StatementTag(s)]],_) ->
-             (match Ast.unwrap s with
-               Ast.IfThen(_,_,_) -> false (* potentially dangerous *)
-             | _ -> true)
-         |     (_,_) -> false)
-      | _ -> false))
-
-let is_minus e =
-  match Ast0.get_mcodekind e with Ast0.MINUS(cell) -> true | _ -> false
-
-let match_list matcher is_list_matcher do_list_match la lb =
-  let rec loop = function
-      ([],[]) -> return true
-    | ([x],lb) when is_list_matcher x -> do_list_match x lb
-    | (x::xs,y::ys) -> conjunct_bindings (matcher x y) (loop (xs,ys))
-    | _ -> return false in
-  loop (la,lb)
-
-let match_maker checks_needed context_required whencode_allowed =
-
-  let check_mcode pmc cmc binding =
-    if checks_needed
-    then
-      match Ast0.get_pos cmc with
-       (Ast0.MetaPos (name,_,_)) as x ->
-         (match Ast0.get_pos pmc with
-           Ast0.MetaPos (name1,_,_) ->
-             add_binding name1 (Ast0.MetaPosTag x) binding
-         | Ast0.NoMetaPos ->
-             let (rule,name) = Ast0.unwrap_mcode name in
-             Fail (Position(rule,name)))
-      | Ast0.NoMetaPos -> OK binding
-    else OK binding in
-
-  let match_dots matcher is_list_matcher do_list_match d1 d2 =
-    match (Ast0.unwrap d1, Ast0.unwrap d2) with
-      (Ast0.DOTS(la),Ast0.DOTS(lb))
-    | (Ast0.CIRCLES(la),Ast0.CIRCLES(lb))
-    | (Ast0.STARS(la),Ast0.STARS(lb)) ->
-       match_list matcher is_list_matcher (do_list_match d2) la lb
-    | _ -> return false in
-
-  let is_elist_matcher el =
-    match Ast0.unwrap el with Ast0.MetaExprList(_,_,_) -> true | _ -> false in
-
-  let is_plist_matcher pl =
-    match Ast0.unwrap pl with Ast0.MetaParamList(_,_,_) -> true | _ -> false in
-
-  let is_slist_matcher pl =
-    match Ast0.unwrap pl with Ast0.MetaStmtList(_,_) -> true | _ -> false in
-
-  let no_list _ = false in
-
-  let build_dots pattern data =
-    match Ast0.unwrap pattern with
-      Ast0.DOTS(_) -> Ast0.rewrap pattern (Ast0.DOTS(data))
-    | Ast0.CIRCLES(_) -> Ast0.rewrap pattern (Ast0.CIRCLES(data))
-    | Ast0.STARS(_) -> Ast0.rewrap pattern (Ast0.STARS(data)) in
-
-  let pure_sp_code =
-    let bind = Ast0.lub_pure in
-    let option_default = Ast0.Context in
-    let pure_mcodekind = function
-       Ast0.CONTEXT(mc) ->
-         (match !mc with
-           (Ast.NOTHING,_,_) -> Ast0.PureContext
-         | _ -> Ast0.Context)
-      | Ast0.MINUS(mc) ->
-         (match !mc with ([],_) -> Ast0.Pure | _ ->  Ast0.Impure)
-      | _ -> Ast0.Impure in
-    let donothing r k e =
-      bind (pure_mcodekind (Ast0.get_mcodekind e)) (k e) in
-
-    let mcode m = pure_mcodekind (Ast0.get_mcode_mcodekind m) in
-
-    (* a case for everything that has a metavariable *)
-    (* pure is supposed to match only unitary metavars, not anything that
-       contains only unitary metavars *)
-    let ident r k i =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind i)) (k i))
-       (match Ast0.unwrap i with
-         Ast0.MetaId(name,_,pure) | Ast0.MetaFunc(name,_,pure)
-       | Ast0.MetaLocalFunc(name,_,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let expression r k e =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind e)) (k e))
-       (match Ast0.unwrap e with
-         Ast0.MetaErr(name,_,pure)
-       | Ast0.MetaExpr(name,_,_,_,pure) | Ast0.MetaExprList(name,_,pure) ->
-           pure
-       | _ -> Ast0.Impure) in
-
-    let typeC r k t =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind t)) (k t))
-       (match Ast0.unwrap t with
-         Ast0.MetaType(name,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let param r k p =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind p)) (k p))
-       (match Ast0.unwrap p with
-         Ast0.MetaParam(name,pure) | Ast0.MetaParamList(name,_,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let stmt r k s =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind s)) (k s))
-       (match Ast0.unwrap s with
-         Ast0.MetaStmt(name,pure) | Ast0.MetaStmtList(name,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    V0.combiner bind option_default 
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      ident expression typeC donothing param donothing stmt donothing
-      donothing in
-
-  let add_pure_list_binding name pure is_pure builder1 builder2 lst =
-    match (checks_needed,pure) with
-      (true,Ast0.Pure) | (true,Ast0.Context) | (true,Ast0.PureContext) ->
-       (match lst with
-         [x] ->
-           if (Ast0.lub_pure (is_pure x) pure) = pure
-           then add_binding name (builder1 lst)
-           else return_false (NotPure (pure,term name,builder1 lst))
-       | _ -> return_false (NotPureLength (term name)))
-    | (false,_) | (_,Ast0.Impure) -> add_binding name (builder2 lst) in
-
-  let add_pure_binding name pure is_pure builder x =
-    match (checks_needed,pure) with
-      (true,Ast0.Pure) | (true,Ast0.Context) | (true,Ast0.PureContext) ->
-       if (Ast0.lub_pure (is_pure x) pure) = pure
-       then add_binding name (builder x)
-       else return_false (NotPure (pure,term name, builder x))
-    | (false,_) | (_,Ast0.Impure) ->  add_binding name (builder x) in
-
-  let do_elist_match builder el lst =
-    match Ast0.unwrap el with
-      Ast0.MetaExprList(name,lenname,pure) ->
-        (*how to handle lenname? should it be an option type and always None?*)
-       failwith "expr list pattern not supported in iso"
-       (*add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_expression
-         (function lst -> Ast0.ExprTag(List.hd lst))
-         (function lst -> Ast0.DotsExprTag(build_dots builder lst))
-         lst*)
-    | _ -> failwith "not possible" in
-
-  let do_plist_match builder pl lst =
-    match Ast0.unwrap pl with
-      Ast0.MetaParamList(name,lename,pure) ->
-       failwith "param list pattern not supported in iso"
-       (*add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_parameter
-         (function lst -> Ast0.ParamTag(List.hd lst))
-         (function lst -> Ast0.DotsParamTag(build_dots builder lst))
-         lst*)
-    | _ -> failwith "not possible" in
-
-  let do_slist_match builder sl lst =
-    match Ast0.unwrap sl with
-      Ast0.MetaStmtList(name,pure) ->
-       add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_statement
-         (function lst -> Ast0.StmtTag(List.hd lst))
-         (function lst -> Ast0.DotsStmtTag(build_dots builder lst))
-         lst
-    | _ -> failwith "not possible" in
-
-  let do_nolist_match _ _ = failwith "not possible" in
-
-  let rec match_ident pattern id =
-    match Ast0.unwrap pattern with
-      Ast0.MetaId(name,_,pure) ->
-       (add_pure_binding name pure pure_sp_code.V0.combiner_ident
-         (function id -> Ast0.IdentTag id) id)
-    | Ast0.MetaFunc(name,_,pure) -> failwith "metafunc not supported"
-    | Ast0.MetaLocalFunc(name,_,pure) -> failwith "metalocalfunc not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context id
-       then
-         match (up,Ast0.unwrap id) with
-           (Ast0.Id(namea),Ast0.Id(nameb)) ->
-             if mcode_equal namea nameb
-             then check_mcode namea nameb
-             else return false
-         | (Ast0.OptIdent(ida),Ast0.OptIdent(idb))
-         | (Ast0.UniqueIdent(ida),Ast0.UniqueIdent(idb)) ->
-             match_ident ida idb
-         | (_,Ast0.OptIdent(idb))
-         | (_,Ast0.UniqueIdent(idb)) -> match_ident pattern idb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.IdentTag id)) in
-
-  (* should we do something about matching metavars against ...? *)
-  let rec match_expr pattern expr =
-    match Ast0.unwrap pattern with
-      Ast0.MetaExpr(name,_,ty,form,pure) ->
-       let form_ok =
-         match (form,expr) with
-           (Ast.ANY,_) -> true
-         | (Ast.CONST,e) ->
-             let rec matches e =
-               match Ast0.unwrap e with
-                 Ast0.Constant(c) -> true
-               | Ast0.Cast(lp,ty,rp,e) -> matches e
-               | Ast0.SizeOfExpr(se,exp) -> true
-               | Ast0.SizeOfType(se,lp,ty,rp) -> true
-               | Ast0.MetaExpr(nm,_,_,Ast.CONST,p) ->
-                   (Ast0.lub_pure p pure) = pure
-               | _ -> false in
-             matches e
-         | (Ast.ID,e) | (Ast.LocalID,e) ->
-             let rec matches e =
-               match Ast0.unwrap e with
-                 Ast0.Ident(c) -> true
-               | Ast0.Cast(lp,ty,rp,e) -> matches e
-               | Ast0.MetaExpr(nm,_,_,Ast.ID,p) ->
-                   (Ast0.lub_pure p pure) = pure
-               | _ -> false in
-             matches e in
-       if form_ok
-       then
-         match ty with
-           Some ts ->
-             if List.exists
-                 (function Type_cocci.MetaType(_,_,_) -> true | _ -> false)
-                 ts
-             then
-               (match ts with
-                 [Type_cocci.MetaType(tyname,_,_)] ->
-                   let expty =
-                     match (Ast0.unwrap expr,Ast0.get_type expr) with
-                 (* easier than updating type inferencer to manage multiple
-                    types *)
-                       (Ast0.MetaExpr(_,_,Some tts,_,_),_) -> Some tts
-                     | (_,Some ty) -> Some [ty]
-                     | _ -> None in
-                   (match expty with
-                     Some expty ->
-                       let tyname = Ast0.rewrap_mcode name tyname in
-                       (function bindings ->
-                         let attempts =
-                           List.map
-                             (function expty ->
-                               (try
-                                 conjunct_bindings
-                                   (add_pure_binding tyname Ast0.Impure
-                                      (function _ -> Ast0.Impure)
-                                      (function ty -> Ast0.TypeCTag ty)
-                                      (Ast0.rewrap expr
-                                         (Ast0.reverse_type expty)))
-                                   (add_pure_binding name pure
-                                      pure_sp_code.V0.combiner_expression
-                                      (function expr -> Ast0.ExprTag expr)
-                                      expr)
-                                   bindings
-                               with Ast0.TyConv ->
-                                 Printf.printf "warning: unconvertible type";
-                                 return false bindings))
-                             expty in
-                         match
-                           List.concat
-                             (List.map (function Fail _ -> [] | OK x -> x)
-                                attempts)
-                         with
-                           [] -> Fail NonMatch
-                         | x -> OK x)
-                   |   _ ->
-                 (*Printf.printf
-                    "warning: type metavar can only match one type";*)
-                       return false)
-               | _ ->
-                   failwith
-                     "mixture of metatype and other types not supported")
-             else
-               let expty = Ast0.get_type expr in
-               if List.exists (function t -> Type_cocci.compatible t expty) ts
-               then
-                 add_pure_binding name pure
-                   pure_sp_code.V0.combiner_expression
-                   (function expr -> Ast0.ExprTag expr)
-                   expr
-               else return false
-         | None ->
-             add_pure_binding name pure pure_sp_code.V0.combiner_expression
-               (function expr -> Ast0.ExprTag expr)
-               expr
-       else return false
-    | Ast0.MetaErr(namea,_,pure) -> failwith "metaerr not supported"
-    | Ast0.MetaExprList(_,_,_) -> failwith "metaexprlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context expr
-       then
-         match (up,Ast0.unwrap expr) with
-           (Ast0.Ident(ida),Ast0.Ident(idb)) ->
-             match_ident ida idb
-         | (Ast0.Constant(consta),Ast0.Constant(constb)) ->
-             if mcode_equal consta constb
-             then check_mcode consta constb
-             else return false
-         | (Ast0.FunCall(fna,lp1,argsa,rp1),Ast0.FunCall(fnb,lp,argsb,rp)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp; match_expr fna fnb;
-                 match_dots match_expr is_elist_matcher do_elist_match
-                   argsa argsb]
-         | (Ast0.Assignment(lefta,opa,righta,_),
-            Ast0.Assignment(leftb,opb,rightb,_)) ->
-              if mcode_equal opa opb
-              then
-                conjunct_many_bindings
-                  [check_mcode opa opb; match_expr lefta leftb;
-                    match_expr righta rightb]
-              else return false
-         | (Ast0.CondExpr(exp1a,lp1,exp2a,rp1,exp3a),
-            Ast0.CondExpr(exp1b,lp,exp2b,rp,exp3b)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  match_expr exp1a exp1b; match_option match_expr exp2a exp2b;
-                  match_expr exp3a exp3b]
-         | (Ast0.Postfix(expa,opa),Ast0.Postfix(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Infix(expa,opa),Ast0.Infix(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Unary(expa,opa),Ast0.Unary(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Binary(lefta,opa,righta),Ast0.Binary(leftb,opb,rightb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_many_bindings
-                 [check_mcode opa opb; match_expr lefta leftb;
-                   match_expr righta rightb]
-             else return false
-         | (Ast0.Paren(lp1,expa,rp1),Ast0.Paren(lp,expb,rp)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp; match_expr expa expb]
-         | (Ast0.ArrayAccess(exp1a,lb1,exp2a,rb1),
-            Ast0.ArrayAccess(exp1b,lb,exp2b,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_expr exp1a exp1b; match_expr exp2a exp2b]
-         | (Ast0.RecordAccess(expa,opa,fielda),
-            Ast0.RecordAccess(expb,op,fieldb))
-         | (Ast0.RecordPtAccess(expa,opa,fielda),
-            Ast0.RecordPtAccess(expb,op,fieldb)) ->
-              conjunct_many_bindings
-                [check_mcode opa op; match_expr expa expb;
-                  match_ident fielda fieldb]
-         | (Ast0.Cast(lp1,tya,rp1,expa),Ast0.Cast(lp,tyb,rp,expb)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp;
-                 match_typeC tya tyb; match_expr expa expb]
-         | (Ast0.SizeOfExpr(szf1,expa),Ast0.SizeOfExpr(szf,expb)) ->
-             conjunct_bindings (check_mcode szf1 szf) (match_expr expa expb)
-         | (Ast0.SizeOfType(szf1,lp1,tya,rp1),
-            Ast0.SizeOfType(szf,lp,tyb,rp)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode szf1 szf; match_typeC tya tyb]
-         | (Ast0.TypeExp(tya),Ast0.TypeExp(tyb)) ->
-             match_typeC tya tyb
-         | (Ast0.EComma(cm1),Ast0.EComma(cm)) -> check_mcode cm1 cm
-         | (Ast0.DisjExpr(_,expsa,_,_),_) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.NestExpr(_,exp_dotsa,_,_,_),_) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.Edots(d,None),Ast0.Edots(d1,None))
-         | (Ast0.Ecircles(d,None),Ast0.Ecircles(d1,None))
-         | (Ast0.Estars(d,None),Ast0.Estars(d1,None)) -> check_mcode d d1
-         | (Ast0.Edots(ed,None),Ast0.Edots(ed1,Some wc))
-         | (Ast0.Ecircles(ed,None),Ast0.Ecircles(ed1,Some wc))
-         | (Ast0.Estars(ed,None),Ast0.Estars(ed1,Some wc)) ->
-           (* hope that mcode of edots is unique somehow *)
-             conjunct_bindings (check_mcode ed ed1)
-               (let (edots_whencode_allowed,_,_) = whencode_allowed in
-               if edots_whencode_allowed
-               then add_dot_binding ed (Ast0.ExprTag wc)
-               else
-                 (Printf.printf
-                    "warning: not applying iso because of whencode";
-                  return false))
-         | (Ast0.Edots(_,Some _),_) | (Ast0.Ecircles(_,Some _),_)
-         | (Ast0.Estars(_,Some _),_) ->
-             failwith "whencode not allowed in a pattern1"
-         | (Ast0.OptExp(expa),Ast0.OptExp(expb))
-         | (Ast0.UniqueExp(expa),Ast0.UniqueExp(expb)) -> match_expr expa expb
-         | (_,Ast0.OptExp(expb))
-         | (_,Ast0.UniqueExp(expb)) -> match_expr pattern expb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.ExprTag expr))
-           
-(* the special case for function types prevents the eg T X; -> T X = E; iso
-   from applying, which doesn't seem very relevant, but it also avoids a
-   mysterious bug that is obtained with eg int attach(...); *)
-  and match_typeC pattern t =
-    match Ast0.unwrap pattern with
-      Ast0.MetaType(name,pure) ->
-       (match Ast0.unwrap t with
-         Ast0.FunctionType(tya,lp1a,paramsa,rp1a) -> return false
-       | _ ->
-           add_pure_binding name pure pure_sp_code.V0.combiner_typeC
-             (function ty -> Ast0.TypeCTag ty)
-             t)
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context t
-       then
-         match (up,Ast0.unwrap t) with
-           (Ast0.ConstVol(cva,tya),Ast0.ConstVol(cvb,tyb)) ->
-             if mcode_equal cva cvb
-             then
-               conjunct_bindings (check_mcode cva cvb) (match_typeC tya tyb)
-             else return false
-         | (Ast0.BaseType(tya,signa),Ast0.BaseType(tyb,signb)) ->
-             if (mcode_equal tya tyb &&
-                 bool_match_option mcode_equal signa signb)
-             then
-               conjunct_bindings (check_mcode tya tyb)
-                 (match_option check_mcode signa signb)
-             else return false
-         | (Ast0.ImplicitInt(signa),Ast0.ImplicitInt(signb)) ->
-             if mcode_equal signa signb
-             then check_mcode signa signb
-             else return false
-         | (Ast0.Pointer(tya,star1),Ast0.Pointer(tyb,star)) ->
-             conjunct_bindings (check_mcode star1 star) (match_typeC tya tyb)
-         | (Ast0.FunctionPointer(tya,lp1a,stara,rp1a,lp2a,paramsa,rp2a),
-            Ast0.FunctionPointer(tyb,lp1b,starb,rp1b,lp2b,paramsb,rp2b)) ->
-              conjunct_many_bindings
-                [check_mcode stara starb; check_mcode lp1a lp1b;
-                  check_mcode rp1a rp1b; check_mcode lp2a lp2b;
-                  check_mcode rp2a rp2b; match_typeC tya tyb;
-                  match_dots match_param is_plist_matcher
-                    do_plist_match paramsa paramsb]
-         | (Ast0.FunctionType(tya,lp1a,paramsa,rp1a),
-            Ast0.FunctionType(tyb,lp1b,paramsb,rp1b)) ->
-              conjunct_many_bindings
-                [check_mcode lp1a lp1b; check_mcode rp1a rp1b;
-                  match_option match_typeC tya tyb;
-                  match_dots match_param is_plist_matcher do_plist_match
-                    paramsa paramsb]
-         | (Ast0.Array(tya,lb1,sizea,rb1),Ast0.Array(tyb,lb,sizeb,rb)) ->
-             conjunct_many_bindings
-               [check_mcode lb1 lb; check_mcode rb1 rb;
-                 match_typeC tya tyb; match_option match_expr sizea sizeb]
-         | (Ast0.StructUnionName(kinda,Some namea),
-            Ast0.StructUnionName(kindb,Some nameb)) ->
-              if mcode_equal kinda kindb
-              then
-                conjunct_bindings (check_mcode kinda kindb)
-                  (match_ident namea nameb)
-              else return false
-         | (Ast0.StructUnionDef(tya,lb1,declsa,rb1),
-            Ast0.StructUnionDef(tyb,lb,declsb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_typeC tya tyb;
-                  match_dots match_decl no_list do_nolist_match declsa declsb]
-         | (Ast0.TypeName(namea),Ast0.TypeName(nameb)) ->
-             if mcode_equal namea nameb
-             then check_mcode namea nameb
-             else return false
-         | (Ast0.DisjType(_,typesa,_,_),Ast0.DisjType(_,typesb,_,_)) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.OptType(tya),Ast0.OptType(tyb))
-         | (Ast0.UniqueType(tya),Ast0.UniqueType(tyb)) -> match_typeC tya tyb
-         | (_,Ast0.OptType(tyb))
-         | (_,Ast0.UniqueType(tyb)) -> match_typeC pattern tyb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.TypeCTag t))
-           
-  and match_decl pattern d =
-    if not(checks_needed) or not(context_required) or is_context d
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap d) with
-       (Ast0.Init(stga,tya,ida,eq1,inia,sc1),
-        Ast0.Init(stgb,tyb,idb,eq,inib,sc)) ->
-         if bool_match_option mcode_equal stga stgb
-         then
-           conjunct_many_bindings
-             [check_mcode eq1 eq; check_mcode sc1 sc;
-               match_option check_mcode stga stgb;
-               match_typeC tya tyb; match_ident ida idb;
-               match_init inia inib]
-         else return false
-      | (Ast0.UnInit(stga,tya,ida,sc1),Ast0.UnInit(stgb,tyb,idb,sc)) ->
-         if bool_match_option mcode_equal stga stgb
-         then
-           conjunct_many_bindings
-             [check_mcode sc1 sc; match_option check_mcode stga stgb;
-               match_typeC tya tyb; match_ident ida idb]
-         else return false
-      | (Ast0.MacroDecl(namea,lp1,argsa,rp1,sc1),
-        Ast0.MacroDecl(nameb,lp,argsb,rp,sc)) ->
-          conjunct_many_bindings
-            [match_ident namea nameb;
-              check_mcode lp1 lp; check_mcode rp1 rp;
-              check_mcode sc1 sc;
-              match_dots match_expr is_elist_matcher do_elist_match
-                argsa argsb]
-      | (Ast0.TyDecl(tya,sc1),Ast0.TyDecl(tyb,sc)) ->
-         conjunct_bindings (check_mcode sc1 sc) (match_typeC tya tyb)
-      | (Ast0.Typedef(stga,tya,ida,sc1),Ast0.Typedef(stgb,tyb,idb,sc)) ->
-         conjunct_bindings (check_mcode sc1 sc)
-           (conjunct_bindings (match_typeC tya tyb) (match_typeC ida idb))
-      | (Ast0.DisjDecl(_,declsa,_,_),Ast0.DisjDecl(_,declsb,_,_)) ->
-         failwith "not allowed in the pattern of an isomorphism"
-      | (Ast0.Ddots(d1,None),Ast0.Ddots(d,None)) -> check_mcode d1 d
-      |        (Ast0.Ddots(dd,None),Ast0.Ddots(d,Some wc)) ->
-         conjunct_bindings (check_mcode dd d)
-           (* hope that mcode of ddots is unique somehow *)
-           (let (ddots_whencode_allowed,_,_) = whencode_allowed in
-           if ddots_whencode_allowed
-           then add_dot_binding dd (Ast0.DeclTag wc)
-           else
-             (Printf.printf "warning: not applying iso because of whencode";
-              return false))
-      | (Ast0.Ddots(_,Some _),_) ->
-         failwith "whencode not allowed in a pattern1"
-           
-      | (Ast0.OptDecl(decla),Ast0.OptDecl(declb))
-      | (Ast0.UniqueDecl(decla),Ast0.UniqueDecl(declb)) ->
-         match_decl decla declb
-      | (_,Ast0.OptDecl(declb))
-      | (_,Ast0.UniqueDecl(declb)) ->
-         match_decl pattern declb
-      | _ -> return false
-    else return_false (ContextRequired (Ast0.DeclTag d))
-       
-  and match_init pattern i =
-    if not(checks_needed) or not(context_required) or is_context i
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap i) with
-       (Ast0.InitExpr(expa),Ast0.InitExpr(expb)) ->
-         match_expr expa expb
-      | (Ast0.InitList(lb1,initlista,rb1),Ast0.InitList(lb,initlistb,rb)) ->
-         conjunct_many_bindings
-           [check_mcode lb1 lb; check_mcode rb1 rb;
-             match_dots match_init no_list do_nolist_match
-               initlista initlistb]
-      | (Ast0.InitGccDotName(d1,namea,e1,inia),
-        Ast0.InitGccDotName(d,nameb,e,inib)) ->
-          conjunct_many_bindings
-            [check_mcode d1 d; check_mcode e1 e;
-              match_ident namea nameb; match_init inia inib]
-      | (Ast0.InitGccName(namea,c1,inia),Ast0.InitGccName(nameb,c,inib)) ->
-         conjunct_many_bindings
-           [check_mcode c1 c; match_ident namea nameb;
-             match_init inia inib]
-      | (Ast0.InitGccIndex(lb1,expa,rb1,e1,inia),
-        Ast0.InitGccIndex(lb2,expb,rb2,e2,inib)) ->
-         conjunct_many_bindings
-            [check_mcode lb1 lb2; check_mcode rb1 rb2; check_mcode e1 e2;
-              match_expr expa expb; match_init inia inib]
-      | (Ast0.InitGccRange(lb1,exp1a,d1,exp2a,rb1,e1,inia),
-        Ast0.InitGccRange(lb2,exp1b,d2,exp2b,rb2,e2,inib)) ->
-         conjunct_many_bindings
-            [check_mcode lb1 lb2; check_mcode d1 d2;
-              check_mcode rb1 rb2; check_mcode e1 e2;
-              match_expr exp1a exp1b; match_expr exp2a exp2b;
-              match_init inia inib]
-      | (Ast0.IComma(c1),Ast0.IComma(c)) -> check_mcode c1 c
-      | (Ast0.Idots(d1,None),Ast0.Idots(d,None)) -> check_mcode d1 d
-      | (Ast0.Idots(id,None),Ast0.Idots(d,Some wc)) ->
-         conjunct_bindings (check_mcode id d)
-         (* hope that mcode of edots is unique somehow *)
-           (let (_,idots_whencode_allowed,_) = whencode_allowed in
-           if idots_whencode_allowed
-           then add_dot_binding id (Ast0.InitTag wc)
-           else
-             (Printf.printf "warning: not applying iso because of whencode";
-              return false))
-      | (Ast0.Idots(_,Some _),_) ->
-         failwith "whencode not allowed in a pattern2"
-      | (Ast0.OptIni(ia),Ast0.OptIni(ib))
-      | (Ast0.UniqueIni(ia),Ast0.UniqueIni(ib)) -> match_init ia ib
-      | (_,Ast0.OptIni(ib))
-      | (_,Ast0.UniqueIni(ib)) -> match_init pattern ib
-      | _ -> return false
-    else return_false (ContextRequired (Ast0.InitTag i))
-       
-  and match_param pattern p =
-    match Ast0.unwrap pattern with
-      Ast0.MetaParam(name,pure) ->
-       add_pure_binding name pure pure_sp_code.V0.combiner_parameter
-         (function p -> Ast0.ParamTag p)
-         p
-    | Ast0.MetaParamList(name,_,pure) -> failwith "metaparamlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context p
-       then
-         match (up,Ast0.unwrap p) with
-           (Ast0.VoidParam(tya),Ast0.VoidParam(tyb)) -> match_typeC tya tyb
-         | (Ast0.Param(tya,ida),Ast0.Param(tyb,idb)) ->
-             conjunct_bindings (match_typeC tya tyb)
-               (match_option match_ident ida idb)
-         | (Ast0.PComma(c1),Ast0.PComma(c)) -> check_mcode c1 c
-         | (Ast0.Pdots(d1),Ast0.Pdots(d))
-         | (Ast0.Pcircles(d1),Ast0.Pcircles(d)) -> check_mcode d1 d
-         | (Ast0.OptParam(parama),Ast0.OptParam(paramb))
-         | (Ast0.UniqueParam(parama),Ast0.UniqueParam(paramb)) ->
-             match_param parama paramb
-         | (_,Ast0.OptParam(paramb))
-         | (_,Ast0.UniqueParam(paramb)) -> match_param pattern paramb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.ParamTag p))
-           
-  and match_statement pattern s =
-    match Ast0.unwrap pattern with
-      Ast0.MetaStmt(name,pure) ->
-       (match Ast0.unwrap s with
-         Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) ->
-           return false (* ... is not a single statement *)
-       | _ ->
-           add_pure_binding name pure pure_sp_code.V0.combiner_statement
-             (function ty -> Ast0.StmtTag ty)
-             s)
-    | Ast0.MetaStmtList(name,pure) -> failwith "metastmtlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context s
-       then
-         match (up,Ast0.unwrap s) with
-           (Ast0.FunDecl(_,fninfoa,namea,lp1,paramsa,rp1,lb1,bodya,rb1),
-            Ast0.FunDecl(_,fninfob,nameb,lp,paramsb,rp,lb,bodyb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_fninfo fninfoa fninfob; match_ident namea nameb;
-                  match_dots match_param is_plist_matcher do_plist_match
-                    paramsa paramsb;
-                  match_dots match_statement is_slist_matcher do_slist_match
-                    bodya bodyb]
-         | (Ast0.Decl(_,decla),Ast0.Decl(_,declb)) ->
-             match_decl decla declb
-         | (Ast0.Seq(lb1,bodya,rb1),Ast0.Seq(lb,bodyb,rb)) ->
-             (* seqs can only match if they are all minus (plus code
-                allowed) or all context (plus code not allowed in the body).
-                we could be more permissive if the expansions of the isos are
-                also all seqs, but this would be hard to check except at top
-                level, and perhaps not worth checking even in that case.
-                Overall, the issue is that braces are used where single
-                statements are required, and something not satisfying these
-                conditions can cause a single statement to become a
-                non-single statement after the transformation.
-
-                example: if { ... -foo(); ... }
-                if we let the sequence convert to just -foo();
-                then we produce invalid code.  For some reason,
-                single_statement can't deal with this case, perhaps because
-                it starts introducing too many braces?  don't remember the
-                exact problem...
-             *)
-             conjunct_bindings (check_mcode lb1 lb)
-               (conjunct_bindings (check_mcode rb1 rb)
-                  (if not(checks_needed) or is_minus s or
-                    (is_context s &&
-                     List.for_all is_pure_context (Ast0.undots bodyb))
-                  then
-                    match_dots match_statement is_slist_matcher do_slist_match
-                      bodya bodyb
-                  else return_false (Braces(s))))
-         | (Ast0.ExprStatement(expa,sc1),Ast0.ExprStatement(expb,sc)) ->
-             conjunct_bindings (check_mcode sc1 sc) (match_expr expa expb)
-         | (Ast0.IfThen(if1,lp1,expa,rp1,branch1a,_),
-            Ast0.IfThen(if2,lp2,expb,rp2,branch1b,_)) ->
-              conjunct_many_bindings
-                [check_mcode if1 if2; check_mcode lp1 lp2;
-                  check_mcode rp1 rp2;
-                  match_expr expa expb;
-                  match_statement branch1a branch1b]
-         | (Ast0.IfThenElse(if1,lp1,expa,rp1,branch1a,e1,branch2a,_),
-            Ast0.IfThenElse(if2,lp2,expb,rp2,branch1b,e2,branch2b,_)) ->
-              conjunct_many_bindings
-                [check_mcode if1 if2; check_mcode lp1 lp2;
-                  check_mcode rp1 rp2; check_mcode e1 e2;
-                  match_expr expa expb;
-                  match_statement branch1a branch1b;
-                  match_statement branch2a branch2b]
-         | (Ast0.While(w1,lp1,expa,rp1,bodya,_),
-            Ast0.While(w,lp,expb,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [check_mcode w1 w; check_mcode lp1 lp;
-                  check_mcode rp1 rp; match_expr expa expb;
-                  match_statement bodya bodyb]
-         | (Ast0.Do(d1,bodya,w1,lp1,expa,rp1,_),
-            Ast0.Do(d,bodyb,w,lp,expb,rp,_)) ->
-              conjunct_many_bindings
-                [check_mcode d1 d; check_mcode w1 w; check_mcode lp1 lp;
-                  check_mcode rp1 rp; match_statement bodya bodyb;
-                  match_expr expa expb]
-         | (Ast0.For(f1,lp1,e1a,sc1a,e2a,sc2a,e3a,rp1,bodya,_),
-            Ast0.For(f,lp,e1b,sc1b,e2b,sc2b,e3b,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [check_mcode f1 f; check_mcode lp1 lp; check_mcode sc1a sc1b;
-                  check_mcode sc2a sc2b; check_mcode rp1 rp;
-                  match_option match_expr e1a e1b;
-                  match_option match_expr e2a e2b;
-                  match_option match_expr e3a e3b;
-                  match_statement bodya bodyb]
-         | (Ast0.Iterator(nma,lp1,argsa,rp1,bodya,_),
-            Ast0.Iterator(nmb,lp,argsb,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [match_ident nma nmb;
-                  check_mcode lp1 lp; check_mcode rp1 rp;
-                  match_dots match_expr is_elist_matcher do_elist_match
-                    argsa argsb;
-                  match_statement bodya bodyb]
-         | (Ast0.Switch(s1,lp1,expa,rp1,lb1,casesa,rb1),
-            Ast0.Switch(s,lp,expb,rp,lb,casesb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode s1 s; check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_expr expa expb;
-                  match_dots match_case_line no_list do_nolist_match
-                    casesa casesb]
-         | (Ast0.Break(b1,sc1),Ast0.Break(b,sc))
-         | (Ast0.Continue(b1,sc1),Ast0.Continue(b,sc)) ->
-             conjunct_bindings (check_mcode b1 b) (check_mcode sc1 sc)
-         | (Ast0.Label(l1,c1),Ast0.Label(l2,c)) ->
-             conjunct_bindings (match_ident l1 l2) (check_mcode c1 c)
-         | (Ast0.Goto(g1,l1,sc1),Ast0.Goto(g,l2,sc)) ->
-             conjunct_many_bindings
-               [check_mcode g1 g; check_mcode sc1 sc; match_ident l1 l2]
-         | (Ast0.Return(r1,sc1),Ast0.Return(r,sc)) ->
-             conjunct_bindings (check_mcode r1 r) (check_mcode sc1 sc)
-         | (Ast0.ReturnExpr(r1,expa,sc1),Ast0.ReturnExpr(r,expb,sc)) ->
-             conjunct_many_bindings
-               [check_mcode r1 r; check_mcode sc1 sc; match_expr expa expb]
-         | (Ast0.Disj(_,statement_dots_lista,_,_),_) ->
-             failwith "disj not supported in patterns"
-         | (Ast0.Nest(_,stmt_dotsa,_,_,_),_) ->
-             failwith "nest not supported in patterns"
-         | (Ast0.Exp(expa),Ast0.Exp(expb)) -> match_expr expa expb
-         | (Ast0.TopExp(expa),Ast0.TopExp(expb)) -> match_expr expa expb
-         | (Ast0.Exp(expa),Ast0.TopExp(expb)) -> match_expr expa expb
-         | (Ast0.Ty(tya),Ast0.Ty(tyb)) -> match_typeC tya tyb
-         | (Ast0.Dots(d,[]),Ast0.Dots(d1,wc))
-         | (Ast0.Circles(d,[]),Ast0.Circles(d1,wc))
-         | (Ast0.Stars(d,[]),Ast0.Stars(d1,wc)) ->
-             (match wc with
-               [] -> check_mcode d d1
-             | _ ->
-                 let (_,_,dots_whencode_allowed) = whencode_allowed in
-                 if dots_whencode_allowed
-                 then
-                   conjunct_bindings (check_mcode d d1)
-                     (List.fold_left
-                        (function prev ->
-                          function
-                            | Ast0.WhenNot wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.DotsStmtTag wc))
-                            | Ast0.WhenAlways wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d (Ast0.StmtTag wc))
-                            | Ast0.WhenNotTrue wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.IsoWhenTTag wc))
-                            | Ast0.WhenNotFalse wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.IsoWhenFTag wc))
-                            | Ast0.WhenModifier(x) ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.IsoWhenTag x)))
-                        (return true) wc)
-                 else
-                   (Printf.printf
-                      "warning: not applying iso because of whencode";
-                    return false))
-         | (Ast0.Dots(_,_::_),_) | (Ast0.Circles(_,_::_),_)
-         | (Ast0.Stars(_,_::_),_) ->
-             failwith "whencode not allowed in a pattern3"
-         | (Ast0.OptStm(rea),Ast0.OptStm(reb))
-         | (Ast0.UniqueStm(rea),Ast0.UniqueStm(reb)) ->
-             match_statement rea reb
-         | (_,Ast0.OptStm(reb))
-         | (_,Ast0.UniqueStm(reb)) -> match_statement pattern reb
-         |     _ -> return false
-       else return_false (ContextRequired (Ast0.StmtTag s))
-           
-  (* first should provide a subset of the information in the second *)
-  and match_fninfo patterninfo cinfo =
-    let patterninfo = List.sort compare patterninfo in
-    let cinfo = List.sort compare cinfo in
-    let rec loop = function
-       (Ast0.FStorage(sta)::resta,Ast0.FStorage(stb)::restb) ->
-         if mcode_equal sta stb
-         then conjunct_bindings (check_mcode sta stb) (loop (resta,restb))
-         else return false
-      |        (Ast0.FType(tya)::resta,Ast0.FType(tyb)::restb) ->
-         conjunct_bindings (match_typeC tya tyb) (loop (resta,restb))
-      |        (Ast0.FInline(ia)::resta,Ast0.FInline(ib)::restb) ->
-         if mcode_equal ia ib
-         then conjunct_bindings (check_mcode ia ib) (loop (resta,restb))
-         else return false
-      |        (Ast0.FAttr(ia)::resta,Ast0.FAttr(ib)::restb) ->
-         if mcode_equal ia ib
-         then conjunct_bindings (check_mcode ia ib) (loop (resta,restb))
-         else return false
-      |        (x::resta,((y::_) as restb)) ->
-         (match compare x y with
-           -1 -> return false
-         | 1 -> loop (resta,restb)
-         | _ -> failwith "not possible")
-      |        _ -> return false in
-    loop (patterninfo,cinfo)
-      
-  and match_case_line pattern c =
-    if not(checks_needed) or not(context_required) or is_context c
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap c) with
-       (Ast0.Default(d1,c1,codea),Ast0.Default(d,c,codeb)) ->
-         conjunct_many_bindings
-           [check_mcode d1 d; check_mcode c1 c;
-             match_dots match_statement is_slist_matcher do_slist_match
-               codea codeb]
-      | (Ast0.Case(ca1,expa,c1,codea),Ast0.Case(ca,expb,c,codeb)) ->
-         conjunct_many_bindings
-           [check_mcode ca1 ca; check_mcode c1 c; match_expr expa expb;
-             match_dots match_statement is_slist_matcher do_slist_match
-               codea codeb]
-      |        (Ast0.OptCase(ca),Ast0.OptCase(cb)) -> match_case_line ca cb
-      |        (_,Ast0.OptCase(cb)) -> match_case_line pattern cb
-      |        _ -> return false
-    else return_false (ContextRequired (Ast0.CaseLineTag c)) in
-  
-  let match_statement_dots x y =
-    match_dots match_statement is_slist_matcher do_slist_match x y in
-  
-  (match_expr, match_decl, match_statement, match_typeC,
-   match_statement_dots)
-    
-let match_expr dochecks context_required whencode_allowed =
-  let (fn,_,_,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_decl dochecks context_required whencode_allowed =
-  let (_,fn,_,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_statement dochecks context_required whencode_allowed =
-  let (_,_,fn,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_typeC dochecks context_required whencode_allowed =
-  let (_,_,_,fn,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_statement_dots dochecks context_required whencode_allowed =
-  let (_,_,_,_,fn) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-(* --------------------------------------------------------------------- *)
-(* make an entire tree MINUS *)
-    
-let make_minus =
-  let mcode (term,arity,info,mcodekind,pos) =
-    let new_mcodekind =
-     match mcodekind with
-       Ast0.CONTEXT(mc) ->
-        (match !mc with
-          (Ast.NOTHING,_,_) -> Ast0.MINUS(ref([],Ast0.default_token_info))
-        | _ -> failwith "make_minus: unexpected befaft")
-     | Ast0.MINUS(mc) -> mcodekind (* in the part copied from the src term *)
-     | _ -> failwith "make_minus mcode: unexpected mcodekind" in
-    (term,arity,info,new_mcodekind,pos) in
-  
-  let update_mc mcodekind e =
-    match !mcodekind with
-      Ast0.CONTEXT(mc) ->
-       (match !mc with
-         (Ast.NOTHING,_,_) ->
-           mcodekind := Ast0.MINUS(ref([],Ast0.default_token_info))
-       | _ -> failwith "make_minus: unexpected befaft")
-    | Ast0.MINUS(_mc) -> () (* in the part copied from the src term *)
-    | Ast0.PLUS -> failwith "make_minus donothing: unexpected plus mcodekind"
-    | _ -> failwith "make_minus donothing: unexpected mcodekind" in
-  
-  let donothing r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    let e = k e in update_mc mcodekind e; e in
-  
-  (* special case for whencode, because it isn't processed by contextneg,
-     since it doesn't appear in the + code *)
-  (* cases for dots and nests *)
-  let expression r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Edots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Edots(mcode d,whencode))
-    | Ast0.Ecircles(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Ecircles(mcode d,whencode))
-    | Ast0.Estars(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Estars(mcode d,whencode))
-    | Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-       update_mc mcodekind e;
-       Ast0.rewrap e
-         (Ast0.NestExpr(mcode starter,
-                        r.V0.rebuilder_expression_dots expr_dots,
-                        mcode ender,whencode,multi))
-    | _ -> donothing r k e in
-  
-  let declaration r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Ddots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Ddots(mcode d,whencode))
-    | _ -> donothing r k e in
-  
-  let statement r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Dots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Dots(mcode d,whencode))
-    | Ast0.Circles(d,whencode) ->
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Circles(mcode d,whencode))
-    | Ast0.Stars(d,whencode) ->
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Stars(mcode d,whencode))
-    | Ast0.Nest(starter,stmt_dots,ender,whencode,multi) ->
-       update_mc mcodekind e;
-       Ast0.rewrap e
-         (Ast0.Nest(mcode starter,r.V0.rebuilder_statement_dots stmt_dots,
-                    mcode ender,whencode,multi))
-    | _ -> donothing r k e in
-  
-  let initialiser r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Idots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Idots(mcode d,whencode))
-    | _ -> donothing r k e in
-  
-  let dots r k e =
-    let info = Ast0.get_info e in
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.DOTS([]) ->
-       (* if context is - this should be - as well.  There are no tokens
-          here though, so the bottom-up minusifier in context_neg leaves it
-          as mixed.  It would be better to fix context_neg, but that would
-          require a special case for each term with a dots subterm. *)
-       (match !mcodekind with
-         Ast0.MIXED(mc) ->
-           (match !mc with
-             (Ast.NOTHING,_,_) ->
-               mcodekind := Ast0.MINUS(ref([],Ast0.default_token_info));
-               e
-           | _ -> failwith "make_minus: unexpected befaft")
-         (* code already processed by an enclosing iso *)
-       | Ast0.MINUS(mc) -> e
-       | _ ->
-           failwith
-             (Printf.sprintf
-                "%d: make_minus donothingxxx: unexpected mcodekind"
-                info.Ast0.line_start))
-    | _ -> donothing r k e in
-  
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    dots dots dots dots dots dots
-    donothing expression donothing initialiser donothing declaration
-    statement donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-(* rebuild mcode cells in an instantiated alt *)
-    
-(* mcodes will be side effected later with plus code, so we have to copy
-   them on instantiating an isomorphism.  One could wonder whether it would
-   be better not to use side-effects, but they are convenient for insert_plus
-   where is it useful to manipulate a list of the mcodes but side-effect a
-   tree *)
-(* hmm... Insert_plus is called before Iso_pattern... *)
-let rebuild_mcode start_line =
-  let copy_mcodekind = function
-      Ast0.CONTEXT(mc) -> Ast0.CONTEXT(ref (!mc))
-    | Ast0.MINUS(mc) -> Ast0.MINUS(ref (!mc))
-    | Ast0.MIXED(mc) -> Ast0.MIXED(ref (!mc))
-    | Ast0.PLUS ->
-       (* this function is used elsewhere where we need to rebuild the
-          indices, and so we allow PLUS code as well *)
-        Ast0.PLUS in
-  
-  let mcode (term,arity,info,mcodekind,pos) =
-    let info =
-      match start_line with
-       Some x -> {info with Ast0.line_start = x; Ast0.line_end = x}
-      |        None -> info in
-    (term,arity,info,copy_mcodekind mcodekind,pos) in
-  
-  let copy_one x =
-    let old_info = Ast0.get_info x in
-    let info =
-      match start_line with
-       Some x -> {old_info with Ast0.line_start = x; Ast0.line_end = x}
-      |        None -> old_info in
-    {x with Ast0.info = info; Ast0.index = ref(Ast0.get_index x);
-      Ast0.mcodekind = ref (copy_mcodekind (Ast0.get_mcodekind x))} in
-  
-  let donothing r k e = copy_one (k e) in
-  
-  (* case for control operators (if, etc) *)
-  let statement r k e =
-    let s = k e in
-    let res =
-      copy_one
-       (Ast0.rewrap s
-          (match Ast0.unwrap s with
-            Ast0.Decl((info,mc),decl) ->
-              Ast0.Decl((info,copy_mcodekind mc),decl)
-          | Ast0.IfThen(iff,lp,tst,rp,branch,(info,mc)) ->
-              Ast0.IfThen(iff,lp,tst,rp,branch,(info,copy_mcodekind mc))
-          | Ast0.IfThenElse(iff,lp,tst,rp,branch1,els,branch2,(info,mc)) ->
-              Ast0.IfThenElse(iff,lp,tst,rp,branch1,els,branch2,
-                (info,copy_mcodekind mc))
-          | Ast0.While(whl,lp,exp,rp,body,(info,mc)) ->
-              Ast0.While(whl,lp,exp,rp,body,(info,copy_mcodekind mc))
-          | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,(info,mc)) ->
-              Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,
-                       (info,copy_mcodekind mc))
-          | Ast0.Iterator(nm,lp,args,rp,body,(info,mc)) ->
-              Ast0.Iterator(nm,lp,args,rp,body,(info,copy_mcodekind mc))
-          | Ast0.FunDecl
-              ((info,mc),fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-                Ast0.FunDecl
-                  ((info,copy_mcodekind mc),
-                   fninfo,name,lp,params,rp,lbrace,body,rbrace)
-          | s -> s)) in
-    Ast0.set_dots_bef_aft res
-      (match Ast0.get_dots_bef_aft res with
-       Ast0.NoDots -> Ast0.NoDots
-      | Ast0.AddingBetweenDots s ->
-         Ast0.AddingBetweenDots(r.V0.rebuilder_statement s)
-      | Ast0.DroppingBetweenDots s ->
-         Ast0.DroppingBetweenDots(r.V0.rebuilder_statement s)) in
-  
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing
-    donothing statement donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-(* The problem of whencode.  If an isomorphism contains dots in multiple
-   rules, then the code that is matched cannot contain whencode, because we
-   won't know which dots it goes with. Should worry about nests, but they
-   aren't allowed in isomorphisms for the moment. *)
-    
-let count_edots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let exprfn r k e =
-    match Ast0.unwrap e with
-      Ast0.Edots(_,_) | Ast0.Ecircles(_,_) | Ast0.Estars(_,_) -> 1
-    | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing exprfn donothing donothing donothing donothing donothing
-    donothing donothing
-    
-let count_idots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let initfn r k e =
-    match Ast0.unwrap e with Ast0.Idots(_,_) -> 1 | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing initfn donothing donothing donothing
-    donothing donothing
-    
-let count_dots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let stmtfn r k e =
-    match Ast0.unwrap e with
-      Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) -> 1
-    | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing stmtfn
-    donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-    
-let lookup name bindings mv_bindings =
-  try Common.Left (List.assoc (term name) bindings)
-  with
-    Not_found ->
-      (* failure is not possible anymore *)
-      Common.Right (List.assoc (term name) mv_bindings)
-
-(* mv_bindings is for the fresh metavariables that are introduced by the
-isomorphism *)
-let instantiate bindings mv_bindings =
-  let mcode x =
-    match Ast0.get_pos x with
-      Ast0.MetaPos(name,_,_) ->
-       (try
-         match lookup name bindings mv_bindings with
-           Common.Left(Ast0.MetaPosTag(id)) -> Ast0.set_pos id x
-         | _ -> failwith "not possible"
-       with Not_found -> Ast0.set_pos Ast0.NoMetaPos x)
-    | _ -> x in
-  let donothing r k e = k e in
-
-  (* cases where metavariables can occur *)
-  let identfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaId(name,constraints,pure) ->
-       (rebuild_mcode None).V0.rebuilder_ident
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.IdentTag(id)) -> id
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaId
-                  (Ast0.set_mcode_data new_mv name,constraints,pure)))
-    | Ast0.MetaFunc(name,_,pure) -> failwith "metafunc not supported"
-    | Ast0.MetaLocalFunc(name,_,pure) -> failwith "metalocalfunc not supported"
-    | _ -> e in
-
-  (* case for list metavariables *)
-  let rec elist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaExprList(name,lenname,pure) ->
-           failwith "meta_expr_list in iso not supported"
-           (*match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsExprTag(exp)) ->
-               (match same_dots exp with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.ExprTag(exp)) -> [exp]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported"*)
-       | _ -> [r.V0.rebuilder_expression x])
-    | x::xs -> (r.V0.rebuilder_expression x)::(elist r same_dots xs) in
-
-  let rec plist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaParamList(name,lenname,pure) ->
-           failwith "meta_param_list in iso not supported"
-           (*match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsParamTag(param)) ->
-               (match same_dots param with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.ParamTag(param)) -> [param]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported"*)
-       | _ -> [r.V0.rebuilder_parameter x])
-    | x::xs -> (r.V0.rebuilder_parameter x)::(plist r same_dots xs) in
-
-  let rec slist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaStmtList(name,pure) ->
-           (match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsStmtTag(stm)) ->
-               (match same_dots stm with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.StmtTag(stm)) -> [stm]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported")
-       | _ -> [r.V0.rebuilder_statement x])
-    | x::xs -> (r.V0.rebuilder_statement x)::(slist r same_dots xs) in
-
-  let same_dots d =
-    match Ast0.unwrap d with Ast0.DOTS(l) -> Some l |_ -> None in
-  let same_circles d =
-    match Ast0.unwrap d with Ast0.CIRCLES(l) -> Some l |_ -> None in
-  let same_stars d =
-    match Ast0.unwrap d with Ast0.STARS(l) -> Some l |_ -> None in
-
-  let dots list_fn r k d =
-    Ast0.rewrap d
-      (match Ast0.unwrap d with
-       Ast0.DOTS(l) -> Ast0.DOTS(list_fn r same_dots l)
-      | Ast0.CIRCLES(l) -> Ast0.CIRCLES(list_fn r same_circles l)
-      | Ast0.STARS(l) -> Ast0.STARS(list_fn r same_stars l)) in
-
-  let exprfn r k old_e = (* need to keep the original code for ! optim *)
-    let e = k old_e in
-    let e1 =
-    match Ast0.unwrap e with
-      Ast0.MetaExpr(name,constraints,x,form,pure) ->
-       (rebuild_mcode None).V0.rebuilder_expression
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.ExprTag(exp)) -> exp
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             let new_types =
-               match x with
-                 None -> None
-               | Some types ->
-                   let rec renamer = function
-                       Type_cocci.MetaType(name,keep,inherited) ->
-                         (match
-                           lookup (name,(),(),(),None) bindings mv_bindings
-                         with
-                           Common.Left(Ast0.TypeCTag(t)) ->
-                             Ast0.ast0_type_to_type t
-                         | Common.Left(_) ->
-                             failwith "iso pattern: unexpected type"
-                         | Common.Right(new_mv) ->
-                             Type_cocci.MetaType(new_mv,keep,inherited))
-                     | Type_cocci.ConstVol(cv,ty) ->
-                         Type_cocci.ConstVol(cv,renamer ty)
-                     | Type_cocci.Pointer(ty) ->
-                         Type_cocci.Pointer(renamer ty)
-                     | Type_cocci.FunctionPointer(ty) ->
-                         Type_cocci.FunctionPointer(renamer ty)
-                     | Type_cocci.Array(ty) ->
-                         Type_cocci.Array(renamer ty)
-                     | t -> t in
-                   Some(List.map renamer types) in
-             Ast0.rewrap e
-               (Ast0.MetaExpr
-                  (Ast0.set_mcode_data new_mv name,constraints,
-                   new_types,form,pure)))
-    | Ast0.MetaErr(namea,_,pure) -> failwith "metaerr not supported"
-    | Ast0.MetaExprList(namea,lenname,pure) ->
-       failwith "metaexprlist not supported"
-    | Ast0.Unary(exp,unop) ->
-       (match Ast0.unwrap_mcode unop with
-         Ast.Not ->
-           let was_meta =
-             (* k e doesn't change the outer structure of the term,
-                only the metavars *)
-             match Ast0.unwrap old_e with
-               Ast0.Unary(exp,_) ->
-                 (match Ast0.unwrap exp with
-                   Ast0.MetaExpr(name,constraints,x,form,pure) -> true
-                 | _ -> false)
-             | _ -> failwith "not possible" in
-           let nomodif e =
-             let mc = Ast0.get_mcodekind exp in
-             match mc with
-               Ast0.MINUS(x) ->
-                 (match !x with
-                   ([],_) -> true
-                 | _ -> false)
-             | Ast0.CONTEXT(x) | Ast0.MIXED(x) ->
-                 (match !x with
-                   (Ast.NOTHING,_,_) -> true
-                 | _ -> false)
-             | _ -> failwith "plus not possible" in
-           if was_meta && nomodif exp && nomodif e
-           then
-             let rec negate e (*for rewrapping*) res (*code to process*) =
-               match Ast0.unwrap res with
-                 Ast0.Unary(e1,op) when Ast0.unwrap_mcode op = Ast.Not ->
-                   Ast0.rewrap e (Ast0.unwrap e1)
-               | Ast0.Edots(_,_) -> Ast0.rewrap e (Ast0.unwrap res)
-               | Ast0.Paren(lp,e,rp) ->
-                   Ast0.rewrap res (Ast0.Paren(lp,negate e e,rp))
-               | Ast0.Binary(e1,op,e2) ->
-                   let reb nop = Ast0.rewrap_mcode op (Ast.Logical(nop)) in
-                   let invop =
-                     match Ast0.unwrap_mcode op with
-                       Ast.Logical(Ast.Inf) ->
-                         Ast0.Binary(e1,reb Ast.SupEq,e2)
-                     | Ast.Logical(Ast.Sup) ->
-                         Ast0.Binary(e1,reb Ast.InfEq,e2)
-                     | Ast.Logical(Ast.InfEq) ->
-                         Ast0.Binary(e1,reb Ast.Sup,e2)
-                     | Ast.Logical(Ast.SupEq) ->
-                         Ast0.Binary(e1,reb Ast.Inf,e2)
-                     | Ast.Logical(Ast.Eq) ->
-                         Ast0.Binary(e1,reb Ast.NotEq,e2)
-                     | Ast.Logical(Ast.NotEq) ->
-                         Ast0.Binary(e1,reb Ast.Eq,e2)
-                     | Ast.Logical(Ast.AndLog) ->
-                         Ast0.Binary(negate e1 e1,reb Ast.OrLog,
-                                     negate e2 e2)
-                     | Ast.Logical(Ast.OrLog) ->
-                         Ast0.Binary(negate e1 e1,reb Ast.AndLog,
-                                     negate e2 e2)
-                     | _ -> Ast0.Unary(res,Ast0.rewrap_mcode op Ast.Not) in
-                   Ast0.rewrap e invop
-               | Ast0.DisjExpr(lp,exps,mids,rp) ->
-                     (* use res because it is the transformed argument *)
-                   let exps = List.map (function e -> negate e e) exps in
-                   Ast0.rewrap res (Ast0.DisjExpr(lp,exps,mids,rp))
-               | _ ->
-                     (*use e, because this might be the toplevel expression*)
-                   Ast0.rewrap e
-                     (Ast0.Unary(res,Ast0.rewrap_mcode unop Ast.Not)) in
-             negate e exp
-           else e
-       | _ -> e)
-    | Ast0.Edots(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Edots(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | Ast0.Ecircles(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Ecircles(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | Ast0.Estars(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Estars(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | _ -> e in
-    if Ast0.get_test_exp old_e then Ast0.set_test_exp e1 else e1 in
-
-  let tyfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaType(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_typeC
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.TypeCTag(ty)) -> ty
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaType(Ast0.set_mcode_data new_mv name,pure)))
-    | _ -> e in
-
-  let declfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.Ddots(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.DeclTag(exp) -> Ast0.rewrap e (Ast0.Ddots(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | _ -> e in
-
-  let paramfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaParam(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_parameter
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.ParamTag(param)) -> param
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaParam(Ast0.set_mcode_data new_mv name, pure)))
-    | Ast0.MetaParamList(name,lenname,pure) ->
-       failwith "metaparamlist not supported"
-    | _ -> e in
-
-  let whenfn (_,v) =
-    match v with
-      Ast0.DotsStmtTag(stms) -> Ast0.WhenNot stms
-    | Ast0.StmtTag(stm) -> Ast0.WhenAlways stm
-    | Ast0.IsoWhenTTag(stm) -> Ast0.WhenNotTrue stm
-    | Ast0.IsoWhenFTag(stm) -> Ast0.WhenNotFalse stm
-    | Ast0.IsoWhenTag(x) -> Ast0.WhenModifier(x)
-    | _ -> failwith "unexpected binding" in
-
-  let stmtfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-    Ast0.MetaStmt(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_statement
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.StmtTag(stm)) -> stm
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaStmt(Ast0.set_mcode_data new_mv name,pure)))
-    | Ast0.MetaStmtList(name,pure) -> failwith "metastmtlist not supported"
-    | Ast0.Dots(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Dots
-            (d,
-             List.map whenfn
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | Ast0.Circles(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Circles
-            (d,
-             List.map whenfn
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | Ast0.Stars(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Stars
-            (d,
-             List.map whenfn
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | _ -> e in
-
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    (dots elist) donothing (dots plist) (dots slist) donothing donothing
-    identfn exprfn tyfn donothing paramfn declfn stmtfn donothing donothing
-
-(* --------------------------------------------------------------------- *)
-
-let is_minus e =
-  match Ast0.get_mcodekind e with Ast0.MINUS(cell) -> true | _ -> false
-
-let context_required e = not(is_minus e) && not !Flag.sgrep_mode2
-
-let disj_fail bindings e =
-  match bindings with
-    Some x -> Printf.fprintf stderr "no disj available at this type"; e
-  | None -> e
-
-(* isomorphism code is by default CONTEXT *)
-let merge_plus model_mcode e_mcode =
-  match model_mcode with
-    Ast0.MINUS(mc) ->
-      (* add the replacement information at the root *)
-      (match e_mcode with
-       Ast0.MINUS(emc) ->
-         emc :=
-           (match (!mc,!emc) with
-             (([],_),(x,t)) | ((x,_),([],t)) -> (x,t)
-           | _ -> failwith "how can we combine minuses?")
-      |        _ -> failwith "not possible 6")
-  | Ast0.CONTEXT(mc) ->
-      (match e_mcode with
-       Ast0.CONTEXT(emc) ->
-         (* keep the logical line info as in the model *)
-         let (mba,tb,ta) = !mc in
-         let (eba,_,_) = !emc in
-         (* merging may be required when a term is replaced by a subterm *)
-         let merged =
-           match (mba,eba) with
-             (x,Ast.NOTHING) | (Ast.NOTHING,x) -> x
-           | (Ast.BEFORE(b1),Ast.BEFORE(b2)) -> Ast.BEFORE(b1@b2)
-           | (Ast.BEFORE(b),Ast.AFTER(a)) -> Ast.BEFOREAFTER(b,a)
-           | (Ast.BEFORE(b1),Ast.BEFOREAFTER(b2,a)) ->
-               Ast.BEFOREAFTER(b1@b2,a)
-           | (Ast.AFTER(a),Ast.BEFORE(b)) -> Ast.BEFOREAFTER(b,a)
-           | (Ast.AFTER(a1),Ast.AFTER(a2)) ->Ast.AFTER(a2@a1)
-           | (Ast.AFTER(a1),Ast.BEFOREAFTER(b,a2)) -> Ast.BEFOREAFTER(b,a2@a1)
-           | (Ast.BEFOREAFTER(b1,a),Ast.BEFORE(b2)) ->
-               Ast.BEFOREAFTER(b1@b2,a)
-           | (Ast.BEFOREAFTER(b,a1),Ast.AFTER(a2)) ->
-               Ast.BEFOREAFTER(b,a2@a1)
-           | (Ast.BEFOREAFTER(b1,a1),Ast.BEFOREAFTER(b2,a2)) ->
-                Ast.BEFOREAFTER(b1@b2,a2@a1) in
-         emc := (merged,tb,ta)
-      |        Ast0.MINUS(emc) ->
-         let (anything_bef_aft,_,_) = !mc in
-         let (anythings,t) = !emc in
-         emc :=
-           (match anything_bef_aft with
-             Ast.BEFORE(b) -> (b@anythings,t)
-           | Ast.AFTER(a) -> (anythings@a,t)
-           | Ast.BEFOREAFTER(b,a) -> (b@anythings@a,t)
-           | Ast.NOTHING -> (anythings,t))
-      |        _ -> failwith "not possible 7")
-  | Ast0.MIXED(_) -> failwith "not possible 8"
-  | Ast0.PLUS -> failwith "not possible 9"
-
-let copy_plus printer minusify model e =
-  if !Flag.sgrep_mode2
-  then e (* no plus code, can cause a "not possible" error, so just avoid it *)
-  else
-    let e =
-      match Ast0.get_mcodekind model with
-       Ast0.MINUS(mc) -> minusify e
-      | Ast0.CONTEXT(mc) -> e
-      | _ -> failwith "not possible: copy_plus\n" in
-    merge_plus (Ast0.get_mcodekind model) (Ast0.get_mcodekind e);
-    e
-
-let copy_minus printer minusify model e =
-  match Ast0.get_mcodekind model with
-    Ast0.MINUS(mc) -> minusify e
-  | Ast0.CONTEXT(mc) -> e
-  | Ast0.MIXED(_) ->
-      if !Flag.sgrep_mode2
-      then e
-      else failwith "not possible 8"
-  | Ast0.PLUS -> failwith "not possible 9"
-
-let whencode_allowed prev_ecount prev_icount prev_dcount
-    ecount icount dcount rest =
-  (* actually, if ecount or dcount is 0, the flag doesn't matter, because it
-     won't be tested *)
-  let other_ecount = (* number of edots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> ec + rest)
-      prev_ecount rest in
-  let other_icount = (* number of dots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> ic + rest)
-      prev_icount rest in
-  let other_dcount = (* number of dots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> dc + rest)
-      prev_dcount rest in
-  (ecount = 0 or other_ecount = 0, icount = 0 or other_icount = 0,
-   dcount = 0 or other_dcount = 0)
-
-(* copy the befores and afters to the instantiated code *)
-let extra_copy_stmt_plus model e =
-  (if not !Flag.sgrep_mode2 (* sgrep has no plus code, so nothing to do *)
-  then
-    (match Ast0.unwrap model with
-      Ast0.FunDecl((info,bef),_,_,_,_,_,_,_,_)
-    | Ast0.Decl((info,bef),_) ->
-       (match Ast0.unwrap e with
-         Ast0.FunDecl((info,bef1),_,_,_,_,_,_,_,_)
-       | Ast0.Decl((info,bef1),_) ->
-           merge_plus bef bef1
-       | _ ->  merge_plus bef (Ast0.get_mcodekind e))
-    | Ast0.IfThen(_,_,_,_,_,(info,aft))
-    | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft))
-    | Ast0.While(_,_,_,_,_,(info,aft))
-    | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft))
-    | Ast0.Iterator(_,_,_,_,_,(info,aft)) ->
-       (match Ast0.unwrap e with
-         Ast0.IfThen(_,_,_,_,_,(info,aft1))
-       | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft1))
-       | Ast0.While(_,_,_,_,_,(info,aft1))
-       | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft1))
-       | Ast0.Iterator(_,_,_,_,_,(info,aft1)) ->
-           merge_plus aft aft1
-       | _ -> merge_plus aft (Ast0.get_mcodekind e))
-    | _ -> ()));
-  e
-
-let extra_copy_other_plus model e = e
-
-(* --------------------------------------------------------------------- *)
-
-let mv_count = ref 0
-let new_mv (_,s) =
-  let ct = !mv_count in
-  mv_count := !mv_count + 1;
-  "_"^s^"_"^(string_of_int ct)
-
-let get_name = function
-    Ast.MetaIdDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaIdDecl(ar,nm))
-  | Ast.MetaFreshIdDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaFreshIdDecl(ar,nm))
-  | Ast.MetaTypeDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaTypeDecl(ar,nm))
-  | Ast.MetaListlenDecl(nm) ->
-      failwith "should not be rebuilt"
-  | Ast.MetaParamDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaParamDecl(ar,nm))
-  | Ast.MetaParamListDecl(ar,nm,nm1) ->
-      (nm,function nm -> Ast.MetaParamListDecl(ar,nm,nm1))
-  | Ast.MetaConstDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaConstDecl(ar,nm,ty))
-  | Ast.MetaErrDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaErrDecl(ar,nm))
-  | Ast.MetaExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaExpDecl(ar,nm,ty))
-  | Ast.MetaIdExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaIdExpDecl(ar,nm,ty))
-  | Ast.MetaLocalIdExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaLocalIdExpDecl(ar,nm,ty))
-  | Ast.MetaExpListDecl(ar,nm,nm1) ->
-      (nm,function nm -> Ast.MetaExpListDecl(ar,nm,nm1))
-  | Ast.MetaStmDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaStmDecl(ar,nm))
-  | Ast.MetaStmListDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaStmListDecl(ar,nm))
-  | Ast.MetaFuncDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaFuncDecl(ar,nm))
-  | Ast.MetaLocalFuncDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaLocalFuncDecl(ar,nm))
-  | Ast.MetaPosDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaPosDecl(ar,nm))
-  | Ast.MetaDeclarerDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaDeclarerDecl(ar,nm))
-  | Ast.MetaIteratorDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaIteratorDecl(ar,nm))
-
-let make_new_metavars metavars bindings =
-  let new_metavars =
-    List.filter
-      (function mv ->
-       let (s,_) = get_name mv in
-       try let _ = List.assoc s bindings in false with Not_found -> true)
-      metavars in
-  List.split
-    (List.map
-       (function mv ->
-        let (s,rebuild) = get_name mv in
-        let new_s = (!current_rule,new_mv s) in
-        (rebuild new_s, (s,new_s)))
-       new_metavars)
-
-(* --------------------------------------------------------------------- *)
-
-let do_nothing x = x
-
-let mkdisj matcher metavars alts e instantiater mkiso disj_maker minusify
-    rebuild_mcodes name printer extra_plus update_others =
-  let call_instantiate bindings mv_bindings alts =
-    List.concat
-      (List.map
-        (function (a,_,_,_) ->
-          nub
-          (* no need to create duplicates when the bindings have no effect *)
-            (List.map
-               (function bindings ->
-                 Ast0.set_iso
-                   (copy_plus printer minusify e
-                      (extra_plus e
-                         (instantiater bindings mv_bindings
-                            (rebuild_mcodes a))))
-                   (Common.union_set [(name,mkiso a)] (Ast0.get_iso e)))
-               bindings))
-        alts) in
-  let rec inner_loop all_alts prev_ecount prev_icount prev_dcount = function
-      [] -> Common.Left (prev_ecount, prev_icount, prev_dcount)
-    | ((pattern,ecount,icount,dcount)::rest) ->
-       let wc =
-         whencode_allowed prev_ecount prev_icount prev_dcount
-           ecount dcount icount rest in
-       (match matcher true (context_required e) wc pattern e init_env with
-         Fail(reason) ->
-           if reason = NonMatch || not !Flag_parsing_cocci.show_iso_failures
-           then ()
-           else
-             (match matcher false false wc pattern e init_env with
-               OK _ ->
-                 interpret_reason name (Ast0.get_line e) reason
-                   (function () -> printer e)
-             | _ -> ());
-           inner_loop all_alts (prev_ecount + ecount) (prev_icount + icount)
-             (prev_dcount + dcount) rest
-       | OK (bindings : (((string * string) * 'a) list list)) ->
-           let all_alts =
-             (* apply update_others to all patterns other than the matched
-                one.  This is used to desigate the others as test
-                expressions in the TestExpression case *)
-             (List.map
-                (function (x,e,i,d) as all ->
-                  if x = pattern
-                  then all
-                  else (update_others x,e,i,d))
-                (List.hd all_alts)) ::
-             (List.map
-                (List.map (function (x,e,i,d) -> (update_others x,e,i,d)))
-                (List.tl all_alts)) in
-           (match List.concat all_alts with
-             [x] -> Common.Left (prev_ecount, prev_icount, prev_dcount)
-           | all_alts ->
-               let (new_metavars,mv_bindings) =
-                 make_new_metavars metavars (nub(List.concat bindings)) in
-               Common.Right
-                 (new_metavars,
-                  call_instantiate bindings mv_bindings all_alts))) in
-  let rec outer_loop prev_ecount prev_icount prev_dcount = function
-      [] | [[_]] (*only one alternative*)  -> ([],e) (* nothing matched *)
-    | (alts::rest) as all_alts ->
-       match inner_loop all_alts prev_ecount prev_icount prev_dcount alts with
-         Common.Left(prev_ecount, prev_icount, prev_dcount) ->
-           outer_loop prev_ecount prev_icount prev_dcount rest
-       | Common.Right (new_metavars,res) ->
-           (new_metavars,
-            copy_minus printer minusify e (disj_maker res)) in
-  outer_loop 0 0 0 alts
-
-(* no one should ever look at the information stored in these mcodes *)
-let disj_starter lst =
-  let old_info = Ast0.get_info(List.hd lst) in
-  let info =
-    { old_info with
-      Ast0.line_end = old_info.Ast0.line_start;
-      Ast0.logical_end = old_info.Ast0.logical_start;
-      Ast0.attachable_start = false; Ast0.attachable_end = false;
-      Ast0.mcode_start = []; Ast0.mcode_end = [];
-      Ast0.strings_before = []; Ast0.strings_after = [] } in
-  Ast0.make_mcode_info "(" info
-
-let disj_ender lst =
-  let old_info = Ast0.get_info(List.hd lst) in
-  let info =
-    { old_info with
-      Ast0.line_start = old_info.Ast0.line_end;
-      Ast0.logical_start = old_info.Ast0.logical_end;
-      Ast0.attachable_start = false; Ast0.attachable_end = false;
-      Ast0.mcode_start = []; Ast0.mcode_end = [];
-      Ast0.strings_before = []; Ast0.strings_after = [] } in
-  Ast0.make_mcode_info ")" info
-
-let disj_mid _ = Ast0.make_mcode "|"
-
-let make_disj_type tl =
-  let mids =
-    match tl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.DisjType(disj_starter tl,tl,mids,disj_ender tl))
-let make_disj_stmt_list tl =
-  let mids =
-    match tl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.Disj(disj_starter tl,tl,mids,disj_ender tl))
-let make_disj_expr model el =
-  let mids =
-    match el with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  let update_arg x =
-    if Ast0.get_arg_exp model then Ast0.set_arg_exp x else x in
-  let update_test x =
-    let x = if Ast0.get_test_pos model then Ast0.set_test_pos x else x in
-    if Ast0.get_test_exp model then Ast0.set_test_exp x else x in
-  let el = List.map update_arg (List.map update_test el) in
-  Ast0.context_wrap (Ast0.DisjExpr(disj_starter el,el,mids,disj_ender el))
-let make_disj_decl dl =
-  let mids =
-    match dl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.DisjDecl(disj_starter dl,dl,mids,disj_ender dl))
-let make_disj_stmt sl =
-  let dotify x = Ast0.context_wrap (Ast0.DOTS[x]) in
-  let mids =
-    match sl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap
-    (Ast0.Disj(disj_starter sl,List.map dotify sl,mids,disj_ender sl))
-
-let transform_type (metavars,alts,name) e =
-  match alts with
-    (Ast0.TypeCTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.TypeCTag(p) ->
-                  (p,count_edots.V0.combiner_typeC p,
-                   count_idots.V0.combiner_typeC p,
-                   count_dots.V0.combiner_typeC p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_typeC metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_typeC)
-       (function t -> Ast0.TypeCTag t)
-       make_disj_type make_minus.V0.rebuilder_typeC
-       (rebuild_mcode start_line).V0.rebuilder_typeC
-       name Unparse_ast0.typeC extra_copy_other_plus do_nothing
-  | _ -> ([],e)
-
-
-let transform_expr (metavars,alts,name) e =
-  let process update_others =
-      (* start line is given to any leaves in the iso code *)
-    let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-    let alts =
-      List.map
-       (List.map
-          (function
-              Ast0.ExprTag(p) | Ast0.ArgExprTag(p) | Ast0.TestExprTag(p) ->
-                (p,count_edots.V0.combiner_expression p,
-                 count_idots.V0.combiner_expression p,
-                 count_dots.V0.combiner_expression p)
-            | _ -> failwith "invalid alt"))
-       alts in
-    mkdisj match_expr metavars alts e
-      (function b -> function mv_b ->
-       (instantiate b mv_b).V0.rebuilder_expression)
-      (function e -> Ast0.ExprTag e)
-      (make_disj_expr e) make_minus.V0.rebuilder_expression
-      (rebuild_mcode start_line).V0.rebuilder_expression
-      name Unparse_ast0.expression extra_copy_other_plus update_others in
-  match alts with
-    (Ast0.ExprTag(_)::_)::_ -> process do_nothing
-  | (Ast0.ArgExprTag(_)::_)::_ when Ast0.get_arg_exp e -> process do_nothing
-  | (Ast0.TestExprTag(_)::_)::_ when Ast0.get_test_pos e ->
-      process Ast0.set_test_exp
-  | _ -> ([],e)
-
-let transform_decl (metavars,alts,name) e =
-  match alts with
-    (Ast0.DeclTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some (Ast0.get_info e).Ast0.line_start in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.DeclTag(p) ->
-                  (p,count_edots.V0.combiner_declaration p,
-                   count_idots.V0.combiner_declaration p,
-                   count_dots.V0.combiner_declaration p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_decl metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_declaration)
-       (function d -> Ast0.DeclTag d)
-       make_disj_decl
-       make_minus.V0.rebuilder_declaration
-       (rebuild_mcode start_line).V0.rebuilder_declaration
-       name Unparse_ast0.declaration extra_copy_other_plus do_nothing
-  | _ -> ([],e)
-
-let transform_stmt (metavars,alts,name) e =
-  match alts with
-    (Ast0.StmtTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some (Ast0.get_info e).Ast0.line_start in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.StmtTag(p) ->
-                  (p,count_edots.V0.combiner_statement p,
-                   count_idots.V0.combiner_statement p,
-                   count_dots.V0.combiner_statement p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_statement metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_statement)
-       (function s -> Ast0.StmtTag s)
-       make_disj_stmt make_minus.V0.rebuilder_statement
-       (rebuild_mcode start_line).V0.rebuilder_statement
-       name (Unparse_ast0.statement "") extra_copy_stmt_plus do_nothing
-  | _ -> ([],e)
-
-(* sort of a hack, because there is no disj at top level *)
-let transform_top (metavars,alts,name) e =
-  match Ast0.unwrap e with
-    Ast0.DECL(declstm) ->
-      (try
-       let strip alts =
-         List.map
-           (List.map
-              (function
-                  Ast0.DotsStmtTag(d) ->
-                    (match Ast0.unwrap d with
-                      Ast0.DOTS([s]) -> Ast0.StmtTag(s)
-                    | _ -> raise (Failure ""))
-                | _ -> raise (Failure "")))
-           alts in
-       let (mv,s) = transform_stmt (metavars,strip alts,name) declstm in
-       (mv,Ast0.rewrap e (Ast0.DECL(s)))
-      with Failure _ -> ([],e))
-  | Ast0.CODE(stmts) ->
-      let (mv,res) =
-       match alts with
-         (Ast0.DotsStmtTag(_)::_)::_ ->
-              (* start line is given to any leaves in the iso code *)
-           let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-           let alts =
-             List.map
-               (List.map
-                  (function
-                      Ast0.DotsStmtTag(p) ->
-                        (p,count_edots.V0.combiner_statement_dots p,
-                         count_idots.V0.combiner_statement_dots p,
-                         count_dots.V0.combiner_statement_dots p)
-                    | _ -> failwith "invalid alt"))
-               alts in
-           mkdisj match_statement_dots metavars alts stmts
-             (function b -> function mv_b ->
-               (instantiate b mv_b).V0.rebuilder_statement_dots)
-             (function s -> Ast0.DotsStmtTag s)
-             (function x ->
-               Ast0.rewrap e (Ast0.DOTS([make_disj_stmt_list x])))
-             make_minus.V0.rebuilder_statement_dots
-             (rebuild_mcode start_line).V0.rebuilder_statement_dots
-             name Unparse_ast0.statement_dots extra_copy_other_plus do_nothing
-       | _ -> ([],stmts) in
-      (mv,Ast0.rewrap e (Ast0.CODE res))
-  | _ -> ([],e)
-
-(* --------------------------------------------------------------------- *)
-
-let transform (alts : isomorphism) t =
-  (* the following ugliness is because rebuilder only returns a new term *)
-  let extra_meta_decls = ref ([] : Ast_cocci.metavar list) in
-  let mcode x = x in
-  let donothing r k e = k e in
-  let exprfn r k e =
-    let (extra_meta,exp) = transform_expr alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    exp in
-
-  let declfn r k e =
-    let (extra_meta,dec) = transform_decl alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    dec in
-
-  let stmtfn r k e =
-    let (extra_meta,stm) = transform_stmt alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    stm in
-  
-  let typefn r k e =
-    let (extra_meta,ty) = transform_type alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    ty in
-  
-  let topfn r k e =
-    let (extra_meta,ty) = transform_top alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    ty in
-  
-  let res =
-    V0.rebuilder
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing exprfn typefn donothing donothing declfn stmtfn
-      donothing topfn in
-  let res = res.V0.rebuilder_top_level t in
-  (!extra_meta_decls,res)
-
-(* --------------------------------------------------------------------- *)
-
-(* should be done by functorizing the parser to use wrap or context_wrap *)
-let rewrap =
-  let mcode (x,a,i,mc,pos) = (x,a,i,Ast0.context_befaft(),pos) in
-  let donothing r k e = Ast0.context_wrap(Ast0.unwrap(k e)) in
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing
-
-let rewrap_anything = function
-    Ast0.DotsExprTag(d) ->
-      Ast0.DotsExprTag(rewrap.V0.rebuilder_expression_dots d)
-  | Ast0.DotsInitTag(d) ->
-      Ast0.DotsInitTag(rewrap.V0.rebuilder_initialiser_list d)
-  | Ast0.DotsParamTag(d) ->
-      Ast0.DotsParamTag(rewrap.V0.rebuilder_parameter_list d)
-  | Ast0.DotsStmtTag(d) ->
-      Ast0.DotsStmtTag(rewrap.V0.rebuilder_statement_dots d)
-  | Ast0.DotsDeclTag(d) ->
-      Ast0.DotsDeclTag(rewrap.V0.rebuilder_declaration_dots d)
-  | Ast0.DotsCaseTag(d) ->
-      Ast0.DotsCaseTag(rewrap.V0.rebuilder_case_line_dots d)
-  | Ast0.IdentTag(d) -> Ast0.IdentTag(rewrap.V0.rebuilder_ident d)
-  | Ast0.ExprTag(d) -> Ast0.ExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.ArgExprTag(d) -> Ast0.ArgExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.TestExprTag(d) -> Ast0.TestExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.TypeCTag(d) -> Ast0.TypeCTag(rewrap.V0.rebuilder_typeC d)
-  | Ast0.InitTag(d) -> Ast0.InitTag(rewrap.V0.rebuilder_initialiser d)
-  | Ast0.ParamTag(d) -> Ast0.ParamTag(rewrap.V0.rebuilder_parameter d)
-  | Ast0.DeclTag(d) -> Ast0.DeclTag(rewrap.V0.rebuilder_declaration d)
-  | Ast0.StmtTag(d) -> Ast0.StmtTag(rewrap.V0.rebuilder_statement d)
-  | Ast0.CaseLineTag(d) -> Ast0.CaseLineTag(rewrap.V0.rebuilder_case_line d)
-  | Ast0.TopTag(d) -> Ast0.TopTag(rewrap.V0.rebuilder_top_level d)
-  | Ast0.IsoWhenTag(_) | Ast0.IsoWhenTTag(_) | Ast0.IsoWhenFTag(_) ->
-      failwith "only for isos within iso phase"
-  | Ast0.MetaPosTag(p) -> Ast0.MetaPosTag(p)
-
-(* --------------------------------------------------------------------- *)
-
-let apply_isos isos rule rule_name =
-  if isos = []
-  then ([],rule)
-  else
-    begin
-      current_rule := rule_name;
-      let isos =
-       List.map
-         (function (metavars,iso,name) ->
-           (metavars,List.map (List.map rewrap_anything) iso,name))
-         isos in
-      let (extra_meta,rule) =
-       List.split
-         (List.map
-            (function t ->
-              List.fold_left
-                (function (extra_meta,t) -> function iso ->
-                  let (new_extra_meta,t) = transform iso t in
-                  (new_extra_meta@extra_meta,t))
-                ([],t) isos)
-            rule) in
-      (List.concat extra_meta, Compute_lines.compute_lines rule)
-    end
diff --git a/parsing_cocci/.#iso_pattern.ml.1.138 b/parsing_cocci/.#iso_pattern.ml.1.138
deleted file mode 100644 (file)
index f7975b8..0000000
+++ /dev/null
@@ -1,2311 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Potential problem: offset of mcode is not updated when an iso is
-instantiated, implying that a term may end up with many mcodes with the
-same offset.  On the other hand, at the moment offset only seems to be used
-before this phase.  Furthermore add_dot_binding relies on the offset to
-remain the same between matching an iso and instantiating it with bindings. *)
-
-(* --------------------------------------------------------------------- *)
-(* match a SmPL expression against a SmPL abstract syntax tree,
-either - or + *)
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-
-let current_rule = ref ""
-
-(* --------------------------------------------------------------------- *)
-
-type isomorphism =
-    Ast_cocci.metavar list * Ast0_cocci.anything list list * string (* name *)
-
-let strip_info =
-  let mcode (term,_,_,_,_) =
-    (term,Ast0.NONE,Ast0.default_info(),Ast0.PLUS,ref Ast0.NoMetaPos) in
-  let donothing r k e =
-    let x = k e in
-    {(Ast0.wrap (Ast0.unwrap x)) with
-      Ast0.mcodekind = ref Ast0.PLUS;
-      Ast0.true_if_test = x.Ast0.true_if_test} in
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing
-
-let anything_equal = function
-    (Ast0.DotsExprTag(d1),Ast0.DotsExprTag(d2)) ->
-      failwith "not a possible variable binding" (*not sure why these are pbs*)
-  | (Ast0.DotsInitTag(d1),Ast0.DotsInitTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsParamTag(d1),Ast0.DotsParamTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsStmtTag(d1),Ast0.DotsStmtTag(d2)) ->
-      (strip_info.V0.rebuilder_statement_dots d1) =
-      (strip_info.V0.rebuilder_statement_dots d2)
-  | (Ast0.DotsDeclTag(d1),Ast0.DotsDeclTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsCaseTag(d1),Ast0.DotsCaseTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.IdentTag(d1),Ast0.IdentTag(d2)) ->
-      (strip_info.V0.rebuilder_ident d1) = (strip_info.V0.rebuilder_ident d2)
-  | (Ast0.ExprTag(d1),Ast0.ExprTag(d2)) ->
-      (strip_info.V0.rebuilder_expression d1) =
-      (strip_info.V0.rebuilder_expression d2)
-  | (Ast0.ArgExprTag(_),_) | (_,Ast0.ArgExprTag(_)) ->
-      failwith "not possible - only in isos1"
-  | (Ast0.TestExprTag(_),_) | (_,Ast0.TestExprTag(_)) ->
-      failwith "not possible - only in isos1"
-  | (Ast0.TypeCTag(d1),Ast0.TypeCTag(d2)) ->
-      (strip_info.V0.rebuilder_typeC d1) =
-      (strip_info.V0.rebuilder_typeC d2)
-  | (Ast0.InitTag(d1),Ast0.InitTag(d2)) ->
-      (strip_info.V0.rebuilder_initialiser d1) =
-      (strip_info.V0.rebuilder_initialiser d2)
-  | (Ast0.ParamTag(d1),Ast0.ParamTag(d2)) ->
-      (strip_info.V0.rebuilder_parameter d1) =
-      (strip_info.V0.rebuilder_parameter d2)
-  | (Ast0.DeclTag(d1),Ast0.DeclTag(d2)) ->
-      (strip_info.V0.rebuilder_declaration d1) =
-      (strip_info.V0.rebuilder_declaration d2)
-  | (Ast0.StmtTag(d1),Ast0.StmtTag(d2)) ->
-      (strip_info.V0.rebuilder_statement d1) =
-      (strip_info.V0.rebuilder_statement d2)
-  | (Ast0.CaseLineTag(d1),Ast0.CaseLineTag(d2)) ->
-      (strip_info.V0.rebuilder_case_line d1) =
-      (strip_info.V0.rebuilder_case_line d2)
-  | (Ast0.TopTag(d1),Ast0.TopTag(d2)) ->
-      (strip_info.V0.rebuilder_top_level d1) =
-      (strip_info.V0.rebuilder_top_level d2)
-  | (Ast0.IsoWhenTTag(_),_) | (_,Ast0.IsoWhenTTag(_)) ->
-      failwith "only for isos within iso phase"
-  | (Ast0.IsoWhenFTag(_),_) | (_,Ast0.IsoWhenFTag(_)) ->
-      failwith "only for isos within iso phase"
-  | (Ast0.IsoWhenTag(_),_) | (_,Ast0.IsoWhenTag(_)) ->
-      failwith "only for isos within iso phase"
-  | _ -> false
-
-let term (var1,_,_,_,_) = var1
-let dot_term (var1,_,info,_,_) = ("", var1 ^ (string_of_int info.Ast0.offset))
-
-
-type reason =
-    NotPure of Ast0.pure * (string * string) * Ast0.anything
-  | NotPureLength of (string * string)
-  | ContextRequired of Ast0.anything
-  | NonMatch
-  | Braces of Ast0.statement
-  | Position of string * string
-
-let interpret_reason name line reason printer =
-  Printf.printf
-    "warning: iso %s does not match the code below on line %d\n" name line;
-  printer(); Format.print_newline();
-  match reason with
-    NotPure(Ast0.Pure,(_,var),nonpure) ->
-      Printf.printf
-       "pure metavariable %s is matched against the following nonpure code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPure(Ast0.Context,(_,var),nonpure) ->
-      Printf.printf
-       "context metavariable %s is matched against the following\nnoncontext code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPure(Ast0.PureContext,(_,var),nonpure) ->
-      Printf.printf
-       "pure context metavariable %s is matched against the following\nnonpure or noncontext code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPureLength((_,var)) ->
-      Printf.printf
-       "pure metavariable %s is matched against too much or too little code\n"
-       var;
-  | ContextRequired(term) ->
-      Printf.printf
-       "the following code matched is not uniformly minus or context,\nor contains a disjunction:\n";
-      Unparse_ast0.unparse_anything term
-  | Braces(s) ->
-      Printf.printf "braces must be all minus (plus code allowed) or all\ncontext (plus code not allowed in the body) to match:\n";
-      Unparse_ast0.statement "" s;
-      Format.print_newline()
-  | Position(rule,name) ->
-      Printf.printf "position variable %s.%s conflicts with an isomorphism\n"
-       rule name;
-  | _ -> failwith "not possible"
-
-type 'a either = OK of 'a | Fail of reason
-
-let add_binding var exp bindings =
-  let var = term var in
-  let attempt bindings =
-    try
-      let cur = List.assoc var bindings in
-      if anything_equal(exp,cur) then [bindings] else []
-    with Not_found -> [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-let add_dot_binding var exp bindings =
-  let var = dot_term var in
-  let attempt bindings =
-    try
-      let cur = List.assoc var bindings in
-      if anything_equal(exp,cur) then [bindings] else []
-    with Not_found -> [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-(* multi-valued *)
-let add_multi_dot_binding var exp bindings =
-  let var = dot_term var in
-  let attempt bindings = [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-let rec nub ls =
-  match ls with
-    [] -> []
-  | (x::xs) when (List.mem x xs) -> nub xs
-  | (x::xs) -> x::(nub xs)
-
-(* --------------------------------------------------------------------- *)
-
-let init_env = [[]]
-
-let debug str m binding =
-  let res = m binding in
-  (match res with
-    None -> Printf.printf "%s: failed\n" str
-  | Some binding ->
-      List.iter
-       (function binding ->
-         Printf.printf "%s: %s\n" str
-           (String.concat " " (List.map (function (x,_) -> x) binding)))
-       binding);
-  res
-
-let conjunct_bindings
-    (m1 : 'binding -> 'binding either)
-    (m2 : 'binding -> 'binding either)
-    (binding : 'binding) : 'binding either =
-  match m1 binding with Fail(reason) -> Fail(reason) | OK binding -> m2 binding
-
-let rec conjunct_many_bindings = function
-    [] -> failwith "not possible"
-  | [x] -> x
-  | x::xs -> conjunct_bindings x (conjunct_many_bindings xs)
-
-let mcode_equal (x,_,_,_,_) (y,_,_,_,_) = x = y
-
-let return b binding = if b then OK binding else Fail NonMatch
-let return_false reason binding = Fail reason
-
-let match_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> return true
-  | _ -> return false
-
-let bool_match_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> true
-  | _ -> false
-
-(* context_required is for the example
-   if (
-+      (int * )
-       x == NULL)
-  where we can't change x == NULL to eg NULL == x.  So there can either be
-  nothing attached to the root or the term has to be all removed.
-  if would be nice if we knew more about the relationship between the - and +
-  code, because in the case where the + code is a separate statement in a
-  sequence, this is not a problem.  Perhaps something could be done in
-  insert_plus
-
-   The example seems strange.  Why isn't the cast attached to x?
- *)
-let is_context e =
-  !Flag.sgrep_mode2 or (* everything is context for sgrep *)
-  (match Ast0.get_mcodekind e with
-    Ast0.CONTEXT(cell) -> true
-  | _ -> false)
-
-(* needs a special case when there is a Disj or an empty DOTS
-   the following stops at the statement level, and gives true if one
-   statement is replaced by another *)
-let rec is_pure_context s =
-  !Flag.sgrep_mode2 or (* everything is context for sgrep *)
-  (match Ast0.unwrap s with
-    Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-      List.for_all
-       (function x ->
-         match Ast0.undots x with
-           [s] -> is_pure_context s
-         | _ -> false (* could we do better? *))
-       statement_dots_list
-  | _ ->
-      (match Ast0.get_mcodekind s with
-       Ast0.CONTEXT(mc) ->
-         (match !mc with
-           (Ast.NOTHING,_,_) -> true
-         | _ -> false)
-      | Ast0.MINUS(mc) ->
-         (match !mc with
-       (* do better for the common case of replacing a stmt by another one *)
-           ([[Ast.StatementTag(s)]],_) ->
-             (match Ast.unwrap s with
-               Ast.IfThen(_,_,_) -> false (* potentially dangerous *)
-             | _ -> true)
-         |     (_,_) -> false)
-      | _ -> false))
-
-let is_minus e =
-  match Ast0.get_mcodekind e with Ast0.MINUS(cell) -> true | _ -> false
-
-let match_list matcher is_list_matcher do_list_match la lb =
-  let rec loop = function
-      ([],[]) -> return true
-    | ([x],lb) when is_list_matcher x -> do_list_match x lb
-    | (x::xs,y::ys) -> conjunct_bindings (matcher x y) (loop (xs,ys))
-    | _ -> return false in
-  loop (la,lb)
-
-let match_maker checks_needed context_required whencode_allowed =
-
-  let check_mcode pmc cmc binding =
-    if checks_needed
-    then
-      match Ast0.get_pos cmc with
-       (Ast0.MetaPos (name,_,_)) as x ->
-         (match Ast0.get_pos pmc with
-           Ast0.MetaPos (name1,_,_) ->
-             add_binding name1 (Ast0.MetaPosTag x) binding
-         | Ast0.NoMetaPos ->
-             let (rule,name) = Ast0.unwrap_mcode name in
-             Fail (Position(rule,name)))
-      | Ast0.NoMetaPos -> OK binding
-    else OK binding in
-
-  let match_dots matcher is_list_matcher do_list_match d1 d2 =
-    match (Ast0.unwrap d1, Ast0.unwrap d2) with
-      (Ast0.DOTS(la),Ast0.DOTS(lb))
-    | (Ast0.CIRCLES(la),Ast0.CIRCLES(lb))
-    | (Ast0.STARS(la),Ast0.STARS(lb)) ->
-       match_list matcher is_list_matcher (do_list_match d2) la lb
-    | _ -> return false in
-
-  let is_elist_matcher el =
-    match Ast0.unwrap el with Ast0.MetaExprList(_,_,_) -> true | _ -> false in
-
-  let is_plist_matcher pl =
-    match Ast0.unwrap pl with Ast0.MetaParamList(_,_,_) -> true | _ -> false in
-
-  let is_slist_matcher pl =
-    match Ast0.unwrap pl with Ast0.MetaStmtList(_,_) -> true | _ -> false in
-
-  let no_list _ = false in
-
-  let build_dots pattern data =
-    match Ast0.unwrap pattern with
-      Ast0.DOTS(_) -> Ast0.rewrap pattern (Ast0.DOTS(data))
-    | Ast0.CIRCLES(_) -> Ast0.rewrap pattern (Ast0.CIRCLES(data))
-    | Ast0.STARS(_) -> Ast0.rewrap pattern (Ast0.STARS(data)) in
-
-  let pure_sp_code =
-    let bind = Ast0.lub_pure in
-    let option_default = Ast0.Context in
-    let pure_mcodekind = function
-       Ast0.CONTEXT(mc) ->
-         (match !mc with
-           (Ast.NOTHING,_,_) -> Ast0.PureContext
-         | _ -> Ast0.Context)
-      | Ast0.MINUS(mc) ->
-         (match !mc with ([],_) -> Ast0.Pure | _ ->  Ast0.Impure)
-      | _ -> Ast0.Impure in
-    let donothing r k e =
-      bind (pure_mcodekind (Ast0.get_mcodekind e)) (k e) in
-
-    let mcode m = pure_mcodekind (Ast0.get_mcode_mcodekind m) in
-
-    (* a case for everything that has a metavariable *)
-    (* pure is supposed to match only unitary metavars, not anything that
-       contains only unitary metavars *)
-    let ident r k i =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind i)) (k i))
-       (match Ast0.unwrap i with
-         Ast0.MetaId(name,_,pure) | Ast0.MetaFunc(name,_,pure)
-       | Ast0.MetaLocalFunc(name,_,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let expression r k e =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind e)) (k e))
-       (match Ast0.unwrap e with
-         Ast0.MetaErr(name,_,pure)
-       | Ast0.MetaExpr(name,_,_,_,pure) | Ast0.MetaExprList(name,_,pure) ->
-           pure
-       | _ -> Ast0.Impure) in
-
-    let typeC r k t =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind t)) (k t))
-       (match Ast0.unwrap t with
-         Ast0.MetaType(name,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let param r k p =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind p)) (k p))
-       (match Ast0.unwrap p with
-         Ast0.MetaParam(name,pure) | Ast0.MetaParamList(name,_,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let stmt r k s =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind s)) (k s))
-       (match Ast0.unwrap s with
-         Ast0.MetaStmt(name,pure) | Ast0.MetaStmtList(name,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    V0.combiner bind option_default 
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      ident expression typeC donothing param donothing stmt donothing
-      donothing in
-
-  let add_pure_list_binding name pure is_pure builder1 builder2 lst =
-    match (checks_needed,pure) with
-      (true,Ast0.Pure) | (true,Ast0.Context) | (true,Ast0.PureContext) ->
-       (match lst with
-         [x] ->
-           if (Ast0.lub_pure (is_pure x) pure) = pure
-           then add_binding name (builder1 lst)
-           else return_false (NotPure (pure,term name,builder1 lst))
-       | _ -> return_false (NotPureLength (term name)))
-    | (false,_) | (_,Ast0.Impure) -> add_binding name (builder2 lst) in
-
-  let add_pure_binding name pure is_pure builder x =
-    match (checks_needed,pure) with
-      (true,Ast0.Pure) | (true,Ast0.Context) | (true,Ast0.PureContext) ->
-       if (Ast0.lub_pure (is_pure x) pure) = pure
-       then add_binding name (builder x)
-       else return_false (NotPure (pure,term name, builder x))
-    | (false,_) | (_,Ast0.Impure) ->  add_binding name (builder x) in
-
-  let do_elist_match builder el lst =
-    match Ast0.unwrap el with
-      Ast0.MetaExprList(name,lenname,pure) ->
-        (*how to handle lenname? should it be an option type and always None?*)
-       failwith "expr list pattern not supported in iso"
-       (*add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_expression
-         (function lst -> Ast0.ExprTag(List.hd lst))
-         (function lst -> Ast0.DotsExprTag(build_dots builder lst))
-         lst*)
-    | _ -> failwith "not possible" in
-
-  let do_plist_match builder pl lst =
-    match Ast0.unwrap pl with
-      Ast0.MetaParamList(name,lename,pure) ->
-       failwith "param list pattern not supported in iso"
-       (*add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_parameter
-         (function lst -> Ast0.ParamTag(List.hd lst))
-         (function lst -> Ast0.DotsParamTag(build_dots builder lst))
-         lst*)
-    | _ -> failwith "not possible" in
-
-  let do_slist_match builder sl lst =
-    match Ast0.unwrap sl with
-      Ast0.MetaStmtList(name,pure) ->
-       add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_statement
-         (function lst -> Ast0.StmtTag(List.hd lst))
-         (function lst -> Ast0.DotsStmtTag(build_dots builder lst))
-         lst
-    | _ -> failwith "not possible" in
-
-  let do_nolist_match _ _ = failwith "not possible" in
-
-  let rec match_ident pattern id =
-    match Ast0.unwrap pattern with
-      Ast0.MetaId(name,_,pure) ->
-       (add_pure_binding name pure pure_sp_code.V0.combiner_ident
-         (function id -> Ast0.IdentTag id) id)
-    | Ast0.MetaFunc(name,_,pure) -> failwith "metafunc not supported"
-    | Ast0.MetaLocalFunc(name,_,pure) -> failwith "metalocalfunc not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context id
-       then
-         match (up,Ast0.unwrap id) with
-           (Ast0.Id(namea),Ast0.Id(nameb)) ->
-             if mcode_equal namea nameb
-             then check_mcode namea nameb
-             else return false
-         | (Ast0.OptIdent(ida),Ast0.OptIdent(idb))
-         | (Ast0.UniqueIdent(ida),Ast0.UniqueIdent(idb)) ->
-             match_ident ida idb
-         | (_,Ast0.OptIdent(idb))
-         | (_,Ast0.UniqueIdent(idb)) -> match_ident pattern idb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.IdentTag id)) in
-
-  (* should we do something about matching metavars against ...? *)
-  let rec match_expr pattern expr =
-    match Ast0.unwrap pattern with
-      Ast0.MetaExpr(name,_,ty,form,pure) ->
-       let form_ok =
-         match (form,expr) with
-           (Ast.ANY,_) -> true
-         | (Ast.CONST,e) ->
-             let rec matches e =
-               match Ast0.unwrap e with
-                 Ast0.Constant(c) -> true
-               | Ast0.Cast(lp,ty,rp,e) -> matches e
-               | Ast0.SizeOfExpr(se,exp) -> true
-               | Ast0.SizeOfType(se,lp,ty,rp) -> true
-               | Ast0.MetaExpr(nm,_,_,Ast.CONST,p) ->
-                   (Ast0.lub_pure p pure) = pure
-               | _ -> false in
-             matches e
-         | (Ast.ID,e) | (Ast.LocalID,e) ->
-             let rec matches e =
-               match Ast0.unwrap e with
-                 Ast0.Ident(c) -> true
-               | Ast0.Cast(lp,ty,rp,e) -> matches e
-               | Ast0.MetaExpr(nm,_,_,Ast.ID,p) ->
-                   (Ast0.lub_pure p pure) = pure
-               | _ -> false in
-             matches e in
-       if form_ok
-       then
-         match ty with
-           Some ts ->
-             if List.exists
-                 (function Type_cocci.MetaType(_,_,_) -> true | _ -> false)
-                 ts
-             then
-               (match ts with
-                 [Type_cocci.MetaType(tyname,_,_)] ->
-                   let expty =
-                     match (Ast0.unwrap expr,Ast0.get_type expr) with
-                 (* easier than updating type inferencer to manage multiple
-                    types *)
-                       (Ast0.MetaExpr(_,_,Some tts,_,_),_) -> Some tts
-                     | (_,Some ty) -> Some [ty]
-                     | _ -> None in
-                   (match expty with
-                     Some expty ->
-                       let tyname = Ast0.rewrap_mcode name tyname in
-                       (function bindings ->
-                         let attempts =
-                           List.map
-                             (function expty ->
-                               (try
-                                 conjunct_bindings
-                                   (add_pure_binding tyname Ast0.Impure
-                                      (function _ -> Ast0.Impure)
-                                      (function ty -> Ast0.TypeCTag ty)
-                                      (Ast0.rewrap expr
-                                         (Ast0.reverse_type expty)))
-                                   (add_pure_binding name pure
-                                      pure_sp_code.V0.combiner_expression
-                                      (function expr -> Ast0.ExprTag expr)
-                                      expr)
-                                   bindings
-                               with Ast0.TyConv ->
-                                 Printf.printf "warning: unconvertible type";
-                                 return false bindings))
-                             expty in
-                         match
-                           List.concat
-                             (List.map (function Fail _ -> [] | OK x -> x)
-                                attempts)
-                         with
-                           [] -> Fail NonMatch
-                         | x -> OK x)
-                   |   _ ->
-                 (*Printf.printf
-                    "warning: type metavar can only match one type";*)
-                       return false)
-               | _ ->
-                   failwith
-                     "mixture of metatype and other types not supported")
-             else
-               let expty = Ast0.get_type expr in
-               if List.exists (function t -> Type_cocci.compatible t expty) ts
-               then
-                 add_pure_binding name pure
-                   pure_sp_code.V0.combiner_expression
-                   (function expr -> Ast0.ExprTag expr)
-                   expr
-               else return false
-         | None ->
-             add_pure_binding name pure pure_sp_code.V0.combiner_expression
-               (function expr -> Ast0.ExprTag expr)
-               expr
-       else return false
-    | Ast0.MetaErr(namea,_,pure) -> failwith "metaerr not supported"
-    | Ast0.MetaExprList(_,_,_) -> failwith "metaexprlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context expr
-       then
-         match (up,Ast0.unwrap expr) with
-           (Ast0.Ident(ida),Ast0.Ident(idb)) ->
-             match_ident ida idb
-         | (Ast0.Constant(consta),Ast0.Constant(constb)) ->
-             if mcode_equal consta constb
-             then check_mcode consta constb
-             else return false
-         | (Ast0.FunCall(fna,lp1,argsa,rp1),Ast0.FunCall(fnb,lp,argsb,rp)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp; match_expr fna fnb;
-                 match_dots match_expr is_elist_matcher do_elist_match
-                   argsa argsb]
-         | (Ast0.Assignment(lefta,opa,righta,_),
-            Ast0.Assignment(leftb,opb,rightb,_)) ->
-              if mcode_equal opa opb
-              then
-                conjunct_many_bindings
-                  [check_mcode opa opb; match_expr lefta leftb;
-                    match_expr righta rightb]
-              else return false
-         | (Ast0.CondExpr(exp1a,lp1,exp2a,rp1,exp3a),
-            Ast0.CondExpr(exp1b,lp,exp2b,rp,exp3b)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  match_expr exp1a exp1b; match_option match_expr exp2a exp2b;
-                  match_expr exp3a exp3b]
-         | (Ast0.Postfix(expa,opa),Ast0.Postfix(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Infix(expa,opa),Ast0.Infix(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Unary(expa,opa),Ast0.Unary(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Binary(lefta,opa,righta),Ast0.Binary(leftb,opb,rightb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_many_bindings
-                 [check_mcode opa opb; match_expr lefta leftb;
-                   match_expr righta rightb]
-             else return false
-         | (Ast0.Paren(lp1,expa,rp1),Ast0.Paren(lp,expb,rp)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp; match_expr expa expb]
-         | (Ast0.ArrayAccess(exp1a,lb1,exp2a,rb1),
-            Ast0.ArrayAccess(exp1b,lb,exp2b,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_expr exp1a exp1b; match_expr exp2a exp2b]
-         | (Ast0.RecordAccess(expa,opa,fielda),
-            Ast0.RecordAccess(expb,op,fieldb))
-         | (Ast0.RecordPtAccess(expa,opa,fielda),
-            Ast0.RecordPtAccess(expb,op,fieldb)) ->
-              conjunct_many_bindings
-                [check_mcode opa op; match_expr expa expb;
-                  match_ident fielda fieldb]
-         | (Ast0.Cast(lp1,tya,rp1,expa),Ast0.Cast(lp,tyb,rp,expb)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp;
-                 match_typeC tya tyb; match_expr expa expb]
-         | (Ast0.SizeOfExpr(szf1,expa),Ast0.SizeOfExpr(szf,expb)) ->
-             conjunct_bindings (check_mcode szf1 szf) (match_expr expa expb)
-         | (Ast0.SizeOfType(szf1,lp1,tya,rp1),
-            Ast0.SizeOfType(szf,lp,tyb,rp)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode szf1 szf; match_typeC tya tyb]
-         | (Ast0.TypeExp(tya),Ast0.TypeExp(tyb)) ->
-             match_typeC tya tyb
-         | (Ast0.EComma(cm1),Ast0.EComma(cm)) -> check_mcode cm1 cm
-         | (Ast0.DisjExpr(_,expsa,_,_),_) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.NestExpr(_,exp_dotsa,_,_,_),_) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.Edots(d,None),Ast0.Edots(d1,None))
-         | (Ast0.Ecircles(d,None),Ast0.Ecircles(d1,None))
-         | (Ast0.Estars(d,None),Ast0.Estars(d1,None)) -> check_mcode d d1
-         | (Ast0.Edots(ed,None),Ast0.Edots(ed1,Some wc))
-         | (Ast0.Ecircles(ed,None),Ast0.Ecircles(ed1,Some wc))
-         | (Ast0.Estars(ed,None),Ast0.Estars(ed1,Some wc)) ->
-           (* hope that mcode of edots is unique somehow *)
-             conjunct_bindings (check_mcode ed ed1)
-               (let (edots_whencode_allowed,_,_) = whencode_allowed in
-               if edots_whencode_allowed
-               then add_dot_binding ed (Ast0.ExprTag wc)
-               else
-                 (Printf.printf
-                    "warning: not applying iso because of whencode";
-                  return false))
-         | (Ast0.Edots(_,Some _),_) | (Ast0.Ecircles(_,Some _),_)
-         | (Ast0.Estars(_,Some _),_) ->
-             failwith "whencode not allowed in a pattern1"
-         | (Ast0.OptExp(expa),Ast0.OptExp(expb))
-         | (Ast0.UniqueExp(expa),Ast0.UniqueExp(expb)) -> match_expr expa expb
-         | (_,Ast0.OptExp(expb))
-         | (_,Ast0.UniqueExp(expb)) -> match_expr pattern expb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.ExprTag expr))
-           
-(* the special case for function types prevents the eg T X; -> T X = E; iso
-   from applying, which doesn't seem very relevant, but it also avoids a
-   mysterious bug that is obtained with eg int attach(...); *)
-  and match_typeC pattern t =
-    match Ast0.unwrap pattern with
-      Ast0.MetaType(name,pure) ->
-       (match Ast0.unwrap t with
-         Ast0.FunctionType(tya,lp1a,paramsa,rp1a) -> return false
-       | _ ->
-           add_pure_binding name pure pure_sp_code.V0.combiner_typeC
-             (function ty -> Ast0.TypeCTag ty)
-             t)
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context t
-       then
-         match (up,Ast0.unwrap t) with
-           (Ast0.ConstVol(cva,tya),Ast0.ConstVol(cvb,tyb)) ->
-             if mcode_equal cva cvb
-             then
-               conjunct_bindings (check_mcode cva cvb) (match_typeC tya tyb)
-             else return false
-         | (Ast0.BaseType(tya,signa),Ast0.BaseType(tyb,signb)) ->
-             if (mcode_equal tya tyb &&
-                 bool_match_option mcode_equal signa signb)
-             then
-               conjunct_bindings (check_mcode tya tyb)
-                 (match_option check_mcode signa signb)
-             else return false
-         | (Ast0.ImplicitInt(signa),Ast0.ImplicitInt(signb)) ->
-             if mcode_equal signa signb
-             then check_mcode signa signb
-             else return false
-         | (Ast0.Pointer(tya,star1),Ast0.Pointer(tyb,star)) ->
-             conjunct_bindings (check_mcode star1 star) (match_typeC tya tyb)
-         | (Ast0.FunctionPointer(tya,lp1a,stara,rp1a,lp2a,paramsa,rp2a),
-            Ast0.FunctionPointer(tyb,lp1b,starb,rp1b,lp2b,paramsb,rp2b)) ->
-              conjunct_many_bindings
-                [check_mcode stara starb; check_mcode lp1a lp1b;
-                  check_mcode rp1a rp1b; check_mcode lp2a lp2b;
-                  check_mcode rp2a rp2b; match_typeC tya tyb;
-                  match_dots match_param is_plist_matcher
-                    do_plist_match paramsa paramsb]
-         | (Ast0.FunctionType(tya,lp1a,paramsa,rp1a),
-            Ast0.FunctionType(tyb,lp1b,paramsb,rp1b)) ->
-              conjunct_many_bindings
-                [check_mcode lp1a lp1b; check_mcode rp1a rp1b;
-                  match_option match_typeC tya tyb;
-                  match_dots match_param is_plist_matcher do_plist_match
-                    paramsa paramsb]
-         | (Ast0.Array(tya,lb1,sizea,rb1),Ast0.Array(tyb,lb,sizeb,rb)) ->
-             conjunct_many_bindings
-               [check_mcode lb1 lb; check_mcode rb1 rb;
-                 match_typeC tya tyb; match_option match_expr sizea sizeb]
-         | (Ast0.StructUnionName(kinda,Some namea),
-            Ast0.StructUnionName(kindb,Some nameb)) ->
-              if mcode_equal kinda kindb
-              then
-                conjunct_bindings (check_mcode kinda kindb)
-                  (match_ident namea nameb)
-              else return false
-         | (Ast0.StructUnionDef(tya,lb1,declsa,rb1),
-            Ast0.StructUnionDef(tyb,lb,declsb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_typeC tya tyb;
-                  match_dots match_decl no_list do_nolist_match declsa declsb]
-         | (Ast0.TypeName(namea),Ast0.TypeName(nameb)) ->
-             if mcode_equal namea nameb
-             then check_mcode namea nameb
-             else return false
-         | (Ast0.DisjType(_,typesa,_,_),Ast0.DisjType(_,typesb,_,_)) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.OptType(tya),Ast0.OptType(tyb))
-         | (Ast0.UniqueType(tya),Ast0.UniqueType(tyb)) -> match_typeC tya tyb
-         | (_,Ast0.OptType(tyb))
-         | (_,Ast0.UniqueType(tyb)) -> match_typeC pattern tyb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.TypeCTag t))
-           
-  and match_decl pattern d =
-    if not(checks_needed) or not(context_required) or is_context d
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap d) with
-       (Ast0.Init(stga,tya,ida,eq1,inia,sc1),
-        Ast0.Init(stgb,tyb,idb,eq,inib,sc)) ->
-         if bool_match_option mcode_equal stga stgb
-         then
-           conjunct_many_bindings
-             [check_mcode eq1 eq; check_mcode sc1 sc;
-               match_option check_mcode stga stgb;
-               match_typeC tya tyb; match_ident ida idb;
-               match_init inia inib]
-         else return false
-      | (Ast0.UnInit(stga,tya,ida,sc1),Ast0.UnInit(stgb,tyb,idb,sc)) ->
-         if bool_match_option mcode_equal stga stgb
-         then
-           conjunct_many_bindings
-             [check_mcode sc1 sc; match_option check_mcode stga stgb;
-               match_typeC tya tyb; match_ident ida idb]
-         else return false
-      | (Ast0.MacroDecl(namea,lp1,argsa,rp1,sc1),
-        Ast0.MacroDecl(nameb,lp,argsb,rp,sc)) ->
-          conjunct_many_bindings
-            [match_ident namea nameb;
-              check_mcode lp1 lp; check_mcode rp1 rp;
-              check_mcode sc1 sc;
-              match_dots match_expr is_elist_matcher do_elist_match
-                argsa argsb]
-      | (Ast0.TyDecl(tya,sc1),Ast0.TyDecl(tyb,sc)) ->
-         conjunct_bindings (check_mcode sc1 sc) (match_typeC tya tyb)
-      | (Ast0.Typedef(stga,tya,ida,sc1),Ast0.Typedef(stgb,tyb,idb,sc)) ->
-         conjunct_bindings (check_mcode sc1 sc)
-           (conjunct_bindings (match_typeC tya tyb) (match_typeC ida idb))
-      | (Ast0.DisjDecl(_,declsa,_,_),Ast0.DisjDecl(_,declsb,_,_)) ->
-         failwith "not allowed in the pattern of an isomorphism"
-      | (Ast0.Ddots(d1,None),Ast0.Ddots(d,None)) -> check_mcode d1 d
-      |        (Ast0.Ddots(dd,None),Ast0.Ddots(d,Some wc)) ->
-         conjunct_bindings (check_mcode dd d)
-           (* hope that mcode of ddots is unique somehow *)
-           (let (ddots_whencode_allowed,_,_) = whencode_allowed in
-           if ddots_whencode_allowed
-           then add_dot_binding dd (Ast0.DeclTag wc)
-           else
-             (Printf.printf "warning: not applying iso because of whencode";
-              return false))
-      | (Ast0.Ddots(_,Some _),_) ->
-         failwith "whencode not allowed in a pattern1"
-           
-      | (Ast0.OptDecl(decla),Ast0.OptDecl(declb))
-      | (Ast0.UniqueDecl(decla),Ast0.UniqueDecl(declb)) ->
-         match_decl decla declb
-      | (_,Ast0.OptDecl(declb))
-      | (_,Ast0.UniqueDecl(declb)) ->
-         match_decl pattern declb
-      | _ -> return false
-    else return_false (ContextRequired (Ast0.DeclTag d))
-       
-  and match_init pattern i =
-    if not(checks_needed) or not(context_required) or is_context i
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap i) with
-       (Ast0.InitExpr(expa),Ast0.InitExpr(expb)) ->
-         match_expr expa expb
-      | (Ast0.InitList(lb1,initlista,rb1),Ast0.InitList(lb,initlistb,rb)) ->
-         conjunct_many_bindings
-           [check_mcode lb1 lb; check_mcode rb1 rb;
-             match_dots match_init no_list do_nolist_match
-               initlista initlistb]
-      | (Ast0.InitGccDotName(d1,namea,e1,inia),
-        Ast0.InitGccDotName(d,nameb,e,inib)) ->
-          conjunct_many_bindings
-            [check_mcode d1 d; check_mcode e1 e;
-              match_ident namea nameb; match_init inia inib]
-      | (Ast0.InitGccName(namea,c1,inia),Ast0.InitGccName(nameb,c,inib)) ->
-         conjunct_many_bindings
-           [check_mcode c1 c; match_ident namea nameb;
-             match_init inia inib]
-      | (Ast0.InitGccIndex(lb1,expa,rb1,e1,inia),
-        Ast0.InitGccIndex(lb2,expb,rb2,e2,inib)) ->
-         conjunct_many_bindings
-            [check_mcode lb1 lb2; check_mcode rb1 rb2; check_mcode e1 e2;
-              match_expr expa expb; match_init inia inib]
-      | (Ast0.InitGccRange(lb1,exp1a,d1,exp2a,rb1,e1,inia),
-        Ast0.InitGccRange(lb2,exp1b,d2,exp2b,rb2,e2,inib)) ->
-         conjunct_many_bindings
-            [check_mcode lb1 lb2; check_mcode d1 d2;
-              check_mcode rb1 rb2; check_mcode e1 e2;
-              match_expr exp1a exp1b; match_expr exp2a exp2b;
-              match_init inia inib]
-      | (Ast0.IComma(c1),Ast0.IComma(c)) -> check_mcode c1 c
-      | (Ast0.Idots(d1,None),Ast0.Idots(d,None)) -> check_mcode d1 d
-      | (Ast0.Idots(id,None),Ast0.Idots(d,Some wc)) ->
-         conjunct_bindings (check_mcode id d)
-         (* hope that mcode of edots is unique somehow *)
-           (let (_,idots_whencode_allowed,_) = whencode_allowed in
-           if idots_whencode_allowed
-           then add_dot_binding id (Ast0.InitTag wc)
-           else
-             (Printf.printf "warning: not applying iso because of whencode";
-              return false))
-      | (Ast0.Idots(_,Some _),_) ->
-         failwith "whencode not allowed in a pattern2"
-      | (Ast0.OptIni(ia),Ast0.OptIni(ib))
-      | (Ast0.UniqueIni(ia),Ast0.UniqueIni(ib)) -> match_init ia ib
-      | (_,Ast0.OptIni(ib))
-      | (_,Ast0.UniqueIni(ib)) -> match_init pattern ib
-      | _ -> return false
-    else return_false (ContextRequired (Ast0.InitTag i))
-       
-  and match_param pattern p =
-    match Ast0.unwrap pattern with
-      Ast0.MetaParam(name,pure) ->
-       add_pure_binding name pure pure_sp_code.V0.combiner_parameter
-         (function p -> Ast0.ParamTag p)
-         p
-    | Ast0.MetaParamList(name,_,pure) -> failwith "metaparamlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context p
-       then
-         match (up,Ast0.unwrap p) with
-           (Ast0.VoidParam(tya),Ast0.VoidParam(tyb)) -> match_typeC tya tyb
-         | (Ast0.Param(tya,ida),Ast0.Param(tyb,idb)) ->
-             conjunct_bindings (match_typeC tya tyb)
-               (match_option match_ident ida idb)
-         | (Ast0.PComma(c1),Ast0.PComma(c)) -> check_mcode c1 c
-         | (Ast0.Pdots(d1),Ast0.Pdots(d))
-         | (Ast0.Pcircles(d1),Ast0.Pcircles(d)) -> check_mcode d1 d
-         | (Ast0.OptParam(parama),Ast0.OptParam(paramb))
-         | (Ast0.UniqueParam(parama),Ast0.UniqueParam(paramb)) ->
-             match_param parama paramb
-         | (_,Ast0.OptParam(paramb))
-         | (_,Ast0.UniqueParam(paramb)) -> match_param pattern paramb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.ParamTag p))
-           
-  and match_statement pattern s =
-    match Ast0.unwrap pattern with
-      Ast0.MetaStmt(name,pure) ->
-       (match Ast0.unwrap s with
-         Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) ->
-           return false (* ... is not a single statement *)
-       | _ ->
-           add_pure_binding name pure pure_sp_code.V0.combiner_statement
-             (function ty -> Ast0.StmtTag ty)
-             s)
-    | Ast0.MetaStmtList(name,pure) -> failwith "metastmtlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context s
-       then
-         match (up,Ast0.unwrap s) with
-           (Ast0.FunDecl(_,fninfoa,namea,lp1,paramsa,rp1,lb1,bodya,rb1),
-            Ast0.FunDecl(_,fninfob,nameb,lp,paramsb,rp,lb,bodyb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_fninfo fninfoa fninfob; match_ident namea nameb;
-                  match_dots match_param is_plist_matcher do_plist_match
-                    paramsa paramsb;
-                  match_dots match_statement is_slist_matcher do_slist_match
-                    bodya bodyb]
-         | (Ast0.Decl(_,decla),Ast0.Decl(_,declb)) ->
-             match_decl decla declb
-         | (Ast0.Seq(lb1,bodya,rb1),Ast0.Seq(lb,bodyb,rb)) ->
-             (* seqs can only match if they are all minus (plus code
-                allowed) or all context (plus code not allowed in the body).
-                we could be more permissive if the expansions of the isos are
-                also all seqs, but this would be hard to check except at top
-                level, and perhaps not worth checking even in that case.
-                Overall, the issue is that braces are used where single
-                statements are required, and something not satisfying these
-                conditions can cause a single statement to become a
-                non-single statement after the transformation.
-
-                example: if { ... -foo(); ... }
-                if we let the sequence convert to just -foo();
-                then we produce invalid code.  For some reason,
-                single_statement can't deal with this case, perhaps because
-                it starts introducing too many braces?  don't remember the
-                exact problem...
-             *)
-             conjunct_bindings (check_mcode lb1 lb)
-               (conjunct_bindings (check_mcode rb1 rb)
-                  (if not(checks_needed) or is_minus s or
-                    (is_context s &&
-                     List.for_all is_pure_context (Ast0.undots bodyb))
-                  then
-                    match_dots match_statement is_slist_matcher do_slist_match
-                      bodya bodyb
-                  else return_false (Braces(s))))
-         | (Ast0.ExprStatement(expa,sc1),Ast0.ExprStatement(expb,sc)) ->
-             conjunct_bindings (check_mcode sc1 sc) (match_expr expa expb)
-         | (Ast0.IfThen(if1,lp1,expa,rp1,branch1a,_),
-            Ast0.IfThen(if2,lp2,expb,rp2,branch1b,_)) ->
-              conjunct_many_bindings
-                [check_mcode if1 if2; check_mcode lp1 lp2;
-                  check_mcode rp1 rp2;
-                  match_expr expa expb;
-                  match_statement branch1a branch1b]
-         | (Ast0.IfThenElse(if1,lp1,expa,rp1,branch1a,e1,branch2a,_),
-            Ast0.IfThenElse(if2,lp2,expb,rp2,branch1b,e2,branch2b,_)) ->
-              conjunct_many_bindings
-                [check_mcode if1 if2; check_mcode lp1 lp2;
-                  check_mcode rp1 rp2; check_mcode e1 e2;
-                  match_expr expa expb;
-                  match_statement branch1a branch1b;
-                  match_statement branch2a branch2b]
-         | (Ast0.While(w1,lp1,expa,rp1,bodya,_),
-            Ast0.While(w,lp,expb,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [check_mcode w1 w; check_mcode lp1 lp;
-                  check_mcode rp1 rp; match_expr expa expb;
-                  match_statement bodya bodyb]
-         | (Ast0.Do(d1,bodya,w1,lp1,expa,rp1,_),
-            Ast0.Do(d,bodyb,w,lp,expb,rp,_)) ->
-              conjunct_many_bindings
-                [check_mcode d1 d; check_mcode w1 w; check_mcode lp1 lp;
-                  check_mcode rp1 rp; match_statement bodya bodyb;
-                  match_expr expa expb]
-         | (Ast0.For(f1,lp1,e1a,sc1a,e2a,sc2a,e3a,rp1,bodya,_),
-            Ast0.For(f,lp,e1b,sc1b,e2b,sc2b,e3b,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [check_mcode f1 f; check_mcode lp1 lp; check_mcode sc1a sc1b;
-                  check_mcode sc2a sc2b; check_mcode rp1 rp;
-                  match_option match_expr e1a e1b;
-                  match_option match_expr e2a e2b;
-                  match_option match_expr e3a e3b;
-                  match_statement bodya bodyb]
-         | (Ast0.Iterator(nma,lp1,argsa,rp1,bodya,_),
-            Ast0.Iterator(nmb,lp,argsb,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [match_ident nma nmb;
-                  check_mcode lp1 lp; check_mcode rp1 rp;
-                  match_dots match_expr is_elist_matcher do_elist_match
-                    argsa argsb;
-                  match_statement bodya bodyb]
-         | (Ast0.Switch(s1,lp1,expa,rp1,lb1,casesa,rb1),
-            Ast0.Switch(s,lp,expb,rp,lb,casesb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode s1 s; check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_expr expa expb;
-                  match_dots match_case_line no_list do_nolist_match
-                    casesa casesb]
-         | (Ast0.Break(b1,sc1),Ast0.Break(b,sc))
-         | (Ast0.Continue(b1,sc1),Ast0.Continue(b,sc)) ->
-             conjunct_bindings (check_mcode b1 b) (check_mcode sc1 sc)
-         | (Ast0.Label(l1,c1),Ast0.Label(l2,c)) ->
-             conjunct_bindings (match_ident l1 l2) (check_mcode c1 c)
-         | (Ast0.Goto(g1,l1,sc1),Ast0.Goto(g,l2,sc)) ->
-             conjunct_many_bindings
-               [check_mcode g1 g; check_mcode sc1 sc; match_ident l1 l2]
-         | (Ast0.Return(r1,sc1),Ast0.Return(r,sc)) ->
-             conjunct_bindings (check_mcode r1 r) (check_mcode sc1 sc)
-         | (Ast0.ReturnExpr(r1,expa,sc1),Ast0.ReturnExpr(r,expb,sc)) ->
-             conjunct_many_bindings
-               [check_mcode r1 r; check_mcode sc1 sc; match_expr expa expb]
-         | (Ast0.Disj(_,statement_dots_lista,_,_),_) ->
-             failwith "disj not supported in patterns"
-         | (Ast0.Nest(_,stmt_dotsa,_,_,_),_) ->
-             failwith "nest not supported in patterns"
-         | (Ast0.Exp(expa),Ast0.Exp(expb)) -> match_expr expa expb
-         | (Ast0.TopExp(expa),Ast0.TopExp(expb)) -> match_expr expa expb
-         | (Ast0.Exp(expa),Ast0.TopExp(expb)) -> match_expr expa expb
-         | (Ast0.TopInit(inita),Ast0.TopInit(initb)) -> match_init inita initb
-         | (Ast0.Ty(tya),Ast0.Ty(tyb)) -> match_typeC tya tyb
-         | (Ast0.Dots(d,[]),Ast0.Dots(d1,wc))
-         | (Ast0.Circles(d,[]),Ast0.Circles(d1,wc))
-         | (Ast0.Stars(d,[]),Ast0.Stars(d1,wc)) ->
-             (match wc with
-               [] -> check_mcode d d1
-             | _ ->
-                 let (_,_,dots_whencode_allowed) = whencode_allowed in
-                 if dots_whencode_allowed
-                 then
-                   conjunct_bindings (check_mcode d d1)
-                     (List.fold_left
-                        (function prev ->
-                          function
-                            | Ast0.WhenNot wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.DotsStmtTag wc))
-                            | Ast0.WhenAlways wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d (Ast0.StmtTag wc))
-                            | Ast0.WhenNotTrue wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.IsoWhenTTag wc))
-                            | Ast0.WhenNotFalse wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.IsoWhenFTag wc))
-                            | Ast0.WhenModifier(x) ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.IsoWhenTag x)))
-                        (return true) wc)
-                 else
-                   (Printf.printf
-                      "warning: not applying iso because of whencode";
-                    return false))
-         | (Ast0.Dots(_,_::_),_) | (Ast0.Circles(_,_::_),_)
-         | (Ast0.Stars(_,_::_),_) ->
-             failwith "whencode not allowed in a pattern3"
-         | (Ast0.OptStm(rea),Ast0.OptStm(reb))
-         | (Ast0.UniqueStm(rea),Ast0.UniqueStm(reb)) ->
-             match_statement rea reb
-         | (_,Ast0.OptStm(reb))
-         | (_,Ast0.UniqueStm(reb)) -> match_statement pattern reb
-         |     _ -> return false
-       else return_false (ContextRequired (Ast0.StmtTag s))
-           
-  (* first should provide a subset of the information in the second *)
-  and match_fninfo patterninfo cinfo =
-    let patterninfo = List.sort compare patterninfo in
-    let cinfo = List.sort compare cinfo in
-    let rec loop = function
-       (Ast0.FStorage(sta)::resta,Ast0.FStorage(stb)::restb) ->
-         if mcode_equal sta stb
-         then conjunct_bindings (check_mcode sta stb) (loop (resta,restb))
-         else return false
-      |        (Ast0.FType(tya)::resta,Ast0.FType(tyb)::restb) ->
-         conjunct_bindings (match_typeC tya tyb) (loop (resta,restb))
-      |        (Ast0.FInline(ia)::resta,Ast0.FInline(ib)::restb) ->
-         if mcode_equal ia ib
-         then conjunct_bindings (check_mcode ia ib) (loop (resta,restb))
-         else return false
-      |        (Ast0.FAttr(ia)::resta,Ast0.FAttr(ib)::restb) ->
-         if mcode_equal ia ib
-         then conjunct_bindings (check_mcode ia ib) (loop (resta,restb))
-         else return false
-      |        (x::resta,((y::_) as restb)) ->
-         (match compare x y with
-           -1 -> return false
-         | 1 -> loop (resta,restb)
-         | _ -> failwith "not possible")
-      |        _ -> return false in
-    loop (patterninfo,cinfo)
-      
-  and match_case_line pattern c =
-    if not(checks_needed) or not(context_required) or is_context c
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap c) with
-       (Ast0.Default(d1,c1,codea),Ast0.Default(d,c,codeb)) ->
-         conjunct_many_bindings
-           [check_mcode d1 d; check_mcode c1 c;
-             match_dots match_statement is_slist_matcher do_slist_match
-               codea codeb]
-      | (Ast0.Case(ca1,expa,c1,codea),Ast0.Case(ca,expb,c,codeb)) ->
-         conjunct_many_bindings
-           [check_mcode ca1 ca; check_mcode c1 c; match_expr expa expb;
-             match_dots match_statement is_slist_matcher do_slist_match
-               codea codeb]
-      |        (Ast0.OptCase(ca),Ast0.OptCase(cb)) -> match_case_line ca cb
-      |        (_,Ast0.OptCase(cb)) -> match_case_line pattern cb
-      |        _ -> return false
-    else return_false (ContextRequired (Ast0.CaseLineTag c)) in
-  
-  let match_statement_dots x y =
-    match_dots match_statement is_slist_matcher do_slist_match x y in
-  
-  (match_expr, match_decl, match_statement, match_typeC,
-   match_statement_dots)
-    
-let match_expr dochecks context_required whencode_allowed =
-  let (fn,_,_,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_decl dochecks context_required whencode_allowed =
-  let (_,fn,_,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_statement dochecks context_required whencode_allowed =
-  let (_,_,fn,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_typeC dochecks context_required whencode_allowed =
-  let (_,_,_,fn,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_statement_dots dochecks context_required whencode_allowed =
-  let (_,_,_,_,fn) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-(* --------------------------------------------------------------------- *)
-(* make an entire tree MINUS *)
-    
-let make_minus =
-  let mcode (term,arity,info,mcodekind,pos) =
-    let new_mcodekind =
-     match mcodekind with
-       Ast0.CONTEXT(mc) ->
-        (match !mc with
-          (Ast.NOTHING,_,_) -> Ast0.MINUS(ref([],Ast0.default_token_info))
-        | _ -> failwith "make_minus: unexpected befaft")
-     | Ast0.MINUS(mc) -> mcodekind (* in the part copied from the src term *)
-     | _ -> failwith "make_minus mcode: unexpected mcodekind" in
-    (term,arity,info,new_mcodekind,pos) in
-  
-  let update_mc mcodekind e =
-    match !mcodekind with
-      Ast0.CONTEXT(mc) ->
-       (match !mc with
-         (Ast.NOTHING,_,_) ->
-           mcodekind := Ast0.MINUS(ref([],Ast0.default_token_info))
-       | _ -> failwith "make_minus: unexpected befaft")
-    | Ast0.MINUS(_mc) -> () (* in the part copied from the src term *)
-    | Ast0.PLUS -> failwith "make_minus donothing: unexpected plus mcodekind"
-    | _ -> failwith "make_minus donothing: unexpected mcodekind" in
-  
-  let donothing r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    let e = k e in update_mc mcodekind e; e in
-  
-  (* special case for whencode, because it isn't processed by contextneg,
-     since it doesn't appear in the + code *)
-  (* cases for dots and nests *)
-  let expression r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Edots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Edots(mcode d,whencode))
-    | Ast0.Ecircles(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Ecircles(mcode d,whencode))
-    | Ast0.Estars(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Estars(mcode d,whencode))
-    | Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-       update_mc mcodekind e;
-       Ast0.rewrap e
-         (Ast0.NestExpr(mcode starter,
-                        r.V0.rebuilder_expression_dots expr_dots,
-                        mcode ender,whencode,multi))
-    | _ -> donothing r k e in
-  
-  let declaration r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Ddots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Ddots(mcode d,whencode))
-    | _ -> donothing r k e in
-  
-  let statement r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Dots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Dots(mcode d,whencode))
-    | Ast0.Circles(d,whencode) ->
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Circles(mcode d,whencode))
-    | Ast0.Stars(d,whencode) ->
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Stars(mcode d,whencode))
-    | Ast0.Nest(starter,stmt_dots,ender,whencode,multi) ->
-       update_mc mcodekind e;
-       Ast0.rewrap e
-         (Ast0.Nest(mcode starter,r.V0.rebuilder_statement_dots stmt_dots,
-                    mcode ender,whencode,multi))
-    | _ -> donothing r k e in
-  
-  let initialiser r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Idots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Idots(mcode d,whencode))
-    | _ -> donothing r k e in
-  
-  let dots r k e =
-    let info = Ast0.get_info e in
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.DOTS([]) ->
-       (* if context is - this should be - as well.  There are no tokens
-          here though, so the bottom-up minusifier in context_neg leaves it
-          as mixed.  It would be better to fix context_neg, but that would
-          require a special case for each term with a dots subterm. *)
-       (match !mcodekind with
-         Ast0.MIXED(mc) ->
-           (match !mc with
-             (Ast.NOTHING,_,_) ->
-               mcodekind := Ast0.MINUS(ref([],Ast0.default_token_info));
-               e
-           | _ -> failwith "make_minus: unexpected befaft")
-         (* code already processed by an enclosing iso *)
-       | Ast0.MINUS(mc) -> e
-       | _ ->
-           failwith
-             (Printf.sprintf
-                "%d: make_minus donothingxxx: unexpected mcodekind"
-                info.Ast0.line_start))
-    | _ -> donothing r k e in
-  
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    dots dots dots dots dots dots
-    donothing expression donothing initialiser donothing declaration
-    statement donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-(* rebuild mcode cells in an instantiated alt *)
-    
-(* mcodes will be side effected later with plus code, so we have to copy
-   them on instantiating an isomorphism.  One could wonder whether it would
-   be better not to use side-effects, but they are convenient for insert_plus
-   where is it useful to manipulate a list of the mcodes but side-effect a
-   tree *)
-(* hmm... Insert_plus is called before Iso_pattern... *)
-let rebuild_mcode start_line =
-  let copy_mcodekind = function
-      Ast0.CONTEXT(mc) -> Ast0.CONTEXT(ref (!mc))
-    | Ast0.MINUS(mc) -> Ast0.MINUS(ref (!mc))
-    | Ast0.MIXED(mc) -> Ast0.MIXED(ref (!mc))
-    | Ast0.PLUS ->
-       (* this function is used elsewhere where we need to rebuild the
-          indices, and so we allow PLUS code as well *)
-        Ast0.PLUS in
-  
-  let mcode (term,arity,info,mcodekind,pos) =
-    let info =
-      match start_line with
-       Some x -> {info with Ast0.line_start = x; Ast0.line_end = x}
-      |        None -> info in
-    (term,arity,info,copy_mcodekind mcodekind,pos) in
-  
-  let copy_one x =
-    let old_info = Ast0.get_info x in
-    let info =
-      match start_line with
-       Some x -> {old_info with Ast0.line_start = x; Ast0.line_end = x}
-      |        None -> old_info in
-    {x with Ast0.info = info; Ast0.index = ref(Ast0.get_index x);
-      Ast0.mcodekind = ref (copy_mcodekind (Ast0.get_mcodekind x))} in
-  
-  let donothing r k e = copy_one (k e) in
-  
-  (* case for control operators (if, etc) *)
-  let statement r k e =
-    let s = k e in
-    let res =
-      copy_one
-       (Ast0.rewrap s
-          (match Ast0.unwrap s with
-            Ast0.Decl((info,mc),decl) ->
-              Ast0.Decl((info,copy_mcodekind mc),decl)
-          | Ast0.IfThen(iff,lp,tst,rp,branch,(info,mc)) ->
-              Ast0.IfThen(iff,lp,tst,rp,branch,(info,copy_mcodekind mc))
-          | Ast0.IfThenElse(iff,lp,tst,rp,branch1,els,branch2,(info,mc)) ->
-              Ast0.IfThenElse(iff,lp,tst,rp,branch1,els,branch2,
-                (info,copy_mcodekind mc))
-          | Ast0.While(whl,lp,exp,rp,body,(info,mc)) ->
-              Ast0.While(whl,lp,exp,rp,body,(info,copy_mcodekind mc))
-          | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,(info,mc)) ->
-              Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,
-                       (info,copy_mcodekind mc))
-          | Ast0.Iterator(nm,lp,args,rp,body,(info,mc)) ->
-              Ast0.Iterator(nm,lp,args,rp,body,(info,copy_mcodekind mc))
-          | Ast0.FunDecl
-              ((info,mc),fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-                Ast0.FunDecl
-                  ((info,copy_mcodekind mc),
-                   fninfo,name,lp,params,rp,lbrace,body,rbrace)
-          | s -> s)) in
-    Ast0.set_dots_bef_aft res
-      (match Ast0.get_dots_bef_aft res with
-       Ast0.NoDots -> Ast0.NoDots
-      | Ast0.AddingBetweenDots s ->
-         Ast0.AddingBetweenDots(r.V0.rebuilder_statement s)
-      | Ast0.DroppingBetweenDots s ->
-         Ast0.DroppingBetweenDots(r.V0.rebuilder_statement s)) in
-  
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing
-    donothing statement donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-(* The problem of whencode.  If an isomorphism contains dots in multiple
-   rules, then the code that is matched cannot contain whencode, because we
-   won't know which dots it goes with. Should worry about nests, but they
-   aren't allowed in isomorphisms for the moment. *)
-    
-let count_edots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let exprfn r k e =
-    match Ast0.unwrap e with
-      Ast0.Edots(_,_) | Ast0.Ecircles(_,_) | Ast0.Estars(_,_) -> 1
-    | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing exprfn donothing donothing donothing donothing donothing
-    donothing donothing
-    
-let count_idots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let initfn r k e =
-    match Ast0.unwrap e with Ast0.Idots(_,_) -> 1 | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing initfn donothing donothing donothing
-    donothing donothing
-    
-let count_dots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let stmtfn r k e =
-    match Ast0.unwrap e with
-      Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) -> 1
-    | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing stmtfn
-    donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-    
-let lookup name bindings mv_bindings =
-  try Common.Left (List.assoc (term name) bindings)
-  with
-    Not_found ->
-      (* failure is not possible anymore *)
-      Common.Right (List.assoc (term name) mv_bindings)
-
-(* mv_bindings is for the fresh metavariables that are introduced by the
-isomorphism *)
-let instantiate bindings mv_bindings =
-  let mcode x =
-    match Ast0.get_pos x with
-      Ast0.MetaPos(name,_,_) ->
-       (try
-         match lookup name bindings mv_bindings with
-           Common.Left(Ast0.MetaPosTag(id)) -> Ast0.set_pos id x
-         | _ -> failwith "not possible"
-       with Not_found -> Ast0.set_pos Ast0.NoMetaPos x)
-    | _ -> x in
-  let donothing r k e = k e in
-
-  (* cases where metavariables can occur *)
-  let identfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaId(name,constraints,pure) ->
-       (rebuild_mcode None).V0.rebuilder_ident
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.IdentTag(id)) -> id
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaId
-                  (Ast0.set_mcode_data new_mv name,constraints,pure)))
-    | Ast0.MetaFunc(name,_,pure) -> failwith "metafunc not supported"
-    | Ast0.MetaLocalFunc(name,_,pure) -> failwith "metalocalfunc not supported"
-    | _ -> e in
-
-  (* case for list metavariables *)
-  let rec elist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaExprList(name,lenname,pure) ->
-           failwith "meta_expr_list in iso not supported"
-           (*match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsExprTag(exp)) ->
-               (match same_dots exp with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.ExprTag(exp)) -> [exp]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported"*)
-       | _ -> [r.V0.rebuilder_expression x])
-    | x::xs -> (r.V0.rebuilder_expression x)::(elist r same_dots xs) in
-
-  let rec plist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaParamList(name,lenname,pure) ->
-           failwith "meta_param_list in iso not supported"
-           (*match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsParamTag(param)) ->
-               (match same_dots param with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.ParamTag(param)) -> [param]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported"*)
-       | _ -> [r.V0.rebuilder_parameter x])
-    | x::xs -> (r.V0.rebuilder_parameter x)::(plist r same_dots xs) in
-
-  let rec slist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaStmtList(name,pure) ->
-           (match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsStmtTag(stm)) ->
-               (match same_dots stm with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.StmtTag(stm)) -> [stm]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported")
-       | _ -> [r.V0.rebuilder_statement x])
-    | x::xs -> (r.V0.rebuilder_statement x)::(slist r same_dots xs) in
-
-  let same_dots d =
-    match Ast0.unwrap d with Ast0.DOTS(l) -> Some l |_ -> None in
-  let same_circles d =
-    match Ast0.unwrap d with Ast0.CIRCLES(l) -> Some l |_ -> None in
-  let same_stars d =
-    match Ast0.unwrap d with Ast0.STARS(l) -> Some l |_ -> None in
-
-  let dots list_fn r k d =
-    Ast0.rewrap d
-      (match Ast0.unwrap d with
-       Ast0.DOTS(l) -> Ast0.DOTS(list_fn r same_dots l)
-      | Ast0.CIRCLES(l) -> Ast0.CIRCLES(list_fn r same_circles l)
-      | Ast0.STARS(l) -> Ast0.STARS(list_fn r same_stars l)) in
-
-  let exprfn r k old_e = (* need to keep the original code for ! optim *)
-    let e = k old_e in
-    let e1 =
-    match Ast0.unwrap e with
-      Ast0.MetaExpr(name,constraints,x,form,pure) ->
-       (rebuild_mcode None).V0.rebuilder_expression
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.ExprTag(exp)) -> exp
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             let new_types =
-               match x with
-                 None -> None
-               | Some types ->
-                   let rec renamer = function
-                       Type_cocci.MetaType(name,keep,inherited) ->
-                         (match
-                           lookup (name,(),(),(),None) bindings mv_bindings
-                         with
-                           Common.Left(Ast0.TypeCTag(t)) ->
-                             Ast0.ast0_type_to_type t
-                         | Common.Left(_) ->
-                             failwith "iso pattern: unexpected type"
-                         | Common.Right(new_mv) ->
-                             Type_cocci.MetaType(new_mv,keep,inherited))
-                     | Type_cocci.ConstVol(cv,ty) ->
-                         Type_cocci.ConstVol(cv,renamer ty)
-                     | Type_cocci.Pointer(ty) ->
-                         Type_cocci.Pointer(renamer ty)
-                     | Type_cocci.FunctionPointer(ty) ->
-                         Type_cocci.FunctionPointer(renamer ty)
-                     | Type_cocci.Array(ty) ->
-                         Type_cocci.Array(renamer ty)
-                     | t -> t in
-                   Some(List.map renamer types) in
-             Ast0.rewrap e
-               (Ast0.MetaExpr
-                  (Ast0.set_mcode_data new_mv name,constraints,
-                   new_types,form,pure)))
-    | Ast0.MetaErr(namea,_,pure) -> failwith "metaerr not supported"
-    | Ast0.MetaExprList(namea,lenname,pure) ->
-       failwith "metaexprlist not supported"
-    | Ast0.Unary(exp,unop) ->
-       (match Ast0.unwrap_mcode unop with
-         Ast.Not ->
-           let was_meta =
-             (* k e doesn't change the outer structure of the term,
-                only the metavars *)
-             match Ast0.unwrap old_e with
-               Ast0.Unary(exp,_) ->
-                 (match Ast0.unwrap exp with
-                   Ast0.MetaExpr(name,constraints,x,form,pure) -> true
-                 | _ -> false)
-             | _ -> failwith "not possible" in
-           let nomodif e =
-             let mc = Ast0.get_mcodekind exp in
-             match mc with
-               Ast0.MINUS(x) ->
-                 (match !x with
-                   ([],_) -> true
-                 | _ -> false)
-             | Ast0.CONTEXT(x) | Ast0.MIXED(x) ->
-                 (match !x with
-                   (Ast.NOTHING,_,_) -> true
-                 | _ -> false)
-             | _ -> failwith "plus not possible" in
-           if was_meta && nomodif exp && nomodif e
-           then
-             let rec negate e (*for rewrapping*) res (*code to process*) =
-               match Ast0.unwrap res with
-                 Ast0.Unary(e1,op) when Ast0.unwrap_mcode op = Ast.Not ->
-                   Ast0.rewrap e (Ast0.unwrap e1)
-               | Ast0.Edots(_,_) -> Ast0.rewrap e (Ast0.unwrap res)
-               | Ast0.Paren(lp,e,rp) ->
-                   Ast0.rewrap res (Ast0.Paren(lp,negate e e,rp))
-               | Ast0.Binary(e1,op,e2) ->
-                   let reb nop = Ast0.rewrap_mcode op (Ast.Logical(nop)) in
-                   let invop =
-                     match Ast0.unwrap_mcode op with
-                       Ast.Logical(Ast.Inf) ->
-                         Ast0.Binary(e1,reb Ast.SupEq,e2)
-                     | Ast.Logical(Ast.Sup) ->
-                         Ast0.Binary(e1,reb Ast.InfEq,e2)
-                     | Ast.Logical(Ast.InfEq) ->
-                         Ast0.Binary(e1,reb Ast.Sup,e2)
-                     | Ast.Logical(Ast.SupEq) ->
-                         Ast0.Binary(e1,reb Ast.Inf,e2)
-                     | Ast.Logical(Ast.Eq) ->
-                         Ast0.Binary(e1,reb Ast.NotEq,e2)
-                     | Ast.Logical(Ast.NotEq) ->
-                         Ast0.Binary(e1,reb Ast.Eq,e2)
-                     | Ast.Logical(Ast.AndLog) ->
-                         Ast0.Binary(negate e1 e1,reb Ast.OrLog,
-                                     negate e2 e2)
-                     | Ast.Logical(Ast.OrLog) ->
-                         Ast0.Binary(negate e1 e1,reb Ast.AndLog,
-                                     negate e2 e2)
-                     | _ -> Ast0.Unary(res,Ast0.rewrap_mcode op Ast.Not) in
-                   Ast0.rewrap e invop
-               | Ast0.DisjExpr(lp,exps,mids,rp) ->
-                     (* use res because it is the transformed argument *)
-                   let exps = List.map (function e -> negate e e) exps in
-                   Ast0.rewrap res (Ast0.DisjExpr(lp,exps,mids,rp))
-               | _ ->
-                     (*use e, because this might be the toplevel expression*)
-                   Ast0.rewrap e
-                     (Ast0.Unary(res,Ast0.rewrap_mcode unop Ast.Not)) in
-             negate e exp
-           else e
-       | _ -> e)
-    | Ast0.Edots(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Edots(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | Ast0.Ecircles(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Ecircles(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | Ast0.Estars(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Estars(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | _ -> e in
-    if Ast0.get_test_exp old_e then Ast0.set_test_exp e1 else e1 in
-
-  let tyfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaType(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_typeC
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.TypeCTag(ty)) -> ty
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaType(Ast0.set_mcode_data new_mv name,pure)))
-    | _ -> e in
-
-  let declfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.Ddots(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.DeclTag(exp) -> Ast0.rewrap e (Ast0.Ddots(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | _ -> e in
-
-  let paramfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaParam(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_parameter
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.ParamTag(param)) -> param
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaParam(Ast0.set_mcode_data new_mv name, pure)))
-    | Ast0.MetaParamList(name,lenname,pure) ->
-       failwith "metaparamlist not supported"
-    | _ -> e in
-
-  let whenfn (_,v) =
-    match v with
-      Ast0.DotsStmtTag(stms) -> Ast0.WhenNot stms
-    | Ast0.StmtTag(stm) -> Ast0.WhenAlways stm
-    | Ast0.IsoWhenTTag(stm) -> Ast0.WhenNotTrue stm
-    | Ast0.IsoWhenFTag(stm) -> Ast0.WhenNotFalse stm
-    | Ast0.IsoWhenTag(x) -> Ast0.WhenModifier(x)
-    | _ -> failwith "unexpected binding" in
-
-  let stmtfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-    Ast0.MetaStmt(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_statement
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.StmtTag(stm)) -> stm
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaStmt(Ast0.set_mcode_data new_mv name,pure)))
-    | Ast0.MetaStmtList(name,pure) -> failwith "metastmtlist not supported"
-    | Ast0.Dots(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Dots
-            (d,
-             List.map whenfn
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | Ast0.Circles(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Circles
-            (d,
-             List.map whenfn
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | Ast0.Stars(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Stars
-            (d,
-             List.map whenfn
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | _ -> e in
-
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    (dots elist) donothing (dots plist) (dots slist) donothing donothing
-    identfn exprfn tyfn donothing paramfn declfn stmtfn donothing donothing
-
-(* --------------------------------------------------------------------- *)
-
-let is_minus e =
-  match Ast0.get_mcodekind e with Ast0.MINUS(cell) -> true | _ -> false
-
-let context_required e = not(is_minus e) && not !Flag.sgrep_mode2
-
-let disj_fail bindings e =
-  match bindings with
-    Some x -> Printf.fprintf stderr "no disj available at this type"; e
-  | None -> e
-
-(* isomorphism code is by default CONTEXT *)
-let merge_plus model_mcode e_mcode =
-  match model_mcode with
-    Ast0.MINUS(mc) ->
-      (* add the replacement information at the root *)
-      (match e_mcode with
-       Ast0.MINUS(emc) ->
-         emc :=
-           (match (!mc,!emc) with
-             (([],_),(x,t)) | ((x,_),([],t)) -> (x,t)
-           | _ -> failwith "how can we combine minuses?")
-      |        _ -> failwith "not possible 6")
-  | Ast0.CONTEXT(mc) ->
-      (match e_mcode with
-       Ast0.CONTEXT(emc) ->
-         (* keep the logical line info as in the model *)
-         let (mba,tb,ta) = !mc in
-         let (eba,_,_) = !emc in
-         (* merging may be required when a term is replaced by a subterm *)
-         let merged =
-           match (mba,eba) with
-             (x,Ast.NOTHING) | (Ast.NOTHING,x) -> x
-           | (Ast.BEFORE(b1),Ast.BEFORE(b2)) -> Ast.BEFORE(b1@b2)
-           | (Ast.BEFORE(b),Ast.AFTER(a)) -> Ast.BEFOREAFTER(b,a)
-           | (Ast.BEFORE(b1),Ast.BEFOREAFTER(b2,a)) ->
-               Ast.BEFOREAFTER(b1@b2,a)
-           | (Ast.AFTER(a),Ast.BEFORE(b)) -> Ast.BEFOREAFTER(b,a)
-           | (Ast.AFTER(a1),Ast.AFTER(a2)) ->Ast.AFTER(a2@a1)
-           | (Ast.AFTER(a1),Ast.BEFOREAFTER(b,a2)) -> Ast.BEFOREAFTER(b,a2@a1)
-           | (Ast.BEFOREAFTER(b1,a),Ast.BEFORE(b2)) ->
-               Ast.BEFOREAFTER(b1@b2,a)
-           | (Ast.BEFOREAFTER(b,a1),Ast.AFTER(a2)) ->
-               Ast.BEFOREAFTER(b,a2@a1)
-           | (Ast.BEFOREAFTER(b1,a1),Ast.BEFOREAFTER(b2,a2)) ->
-                Ast.BEFOREAFTER(b1@b2,a2@a1) in
-         emc := (merged,tb,ta)
-      |        Ast0.MINUS(emc) ->
-         let (anything_bef_aft,_,_) = !mc in
-         let (anythings,t) = !emc in
-         emc :=
-           (match anything_bef_aft with
-             Ast.BEFORE(b) -> (b@anythings,t)
-           | Ast.AFTER(a) -> (anythings@a,t)
-           | Ast.BEFOREAFTER(b,a) -> (b@anythings@a,t)
-           | Ast.NOTHING -> (anythings,t))
-      |        _ -> failwith "not possible 7")
-  | Ast0.MIXED(_) -> failwith "not possible 8"
-  | Ast0.PLUS -> failwith "not possible 9"
-
-let copy_plus printer minusify model e =
-  if !Flag.sgrep_mode2
-  then e (* no plus code, can cause a "not possible" error, so just avoid it *)
-  else
-    let e =
-      match Ast0.get_mcodekind model with
-       Ast0.MINUS(mc) -> minusify e
-      | Ast0.CONTEXT(mc) -> e
-      | _ -> failwith "not possible: copy_plus\n" in
-    merge_plus (Ast0.get_mcodekind model) (Ast0.get_mcodekind e);
-    e
-
-let copy_minus printer minusify model e =
-  match Ast0.get_mcodekind model with
-    Ast0.MINUS(mc) -> minusify e
-  | Ast0.CONTEXT(mc) -> e
-  | Ast0.MIXED(_) ->
-      if !Flag.sgrep_mode2
-      then e
-      else failwith "not possible 8"
-  | Ast0.PLUS -> failwith "not possible 9"
-
-let whencode_allowed prev_ecount prev_icount prev_dcount
-    ecount icount dcount rest =
-  (* actually, if ecount or dcount is 0, the flag doesn't matter, because it
-     won't be tested *)
-  let other_ecount = (* number of edots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> ec + rest)
-      prev_ecount rest in
-  let other_icount = (* number of dots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> ic + rest)
-      prev_icount rest in
-  let other_dcount = (* number of dots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> dc + rest)
-      prev_dcount rest in
-  (ecount = 0 or other_ecount = 0, icount = 0 or other_icount = 0,
-   dcount = 0 or other_dcount = 0)
-
-(* copy the befores and afters to the instantiated code *)
-let extra_copy_stmt_plus model e =
-  (if not !Flag.sgrep_mode2 (* sgrep has no plus code, so nothing to do *)
-  then
-    (match Ast0.unwrap model with
-      Ast0.FunDecl((info,bef),_,_,_,_,_,_,_,_)
-    | Ast0.Decl((info,bef),_) ->
-       (match Ast0.unwrap e with
-         Ast0.FunDecl((info,bef1),_,_,_,_,_,_,_,_)
-       | Ast0.Decl((info,bef1),_) ->
-           merge_plus bef bef1
-       | _ ->  merge_plus bef (Ast0.get_mcodekind e))
-    | Ast0.IfThen(_,_,_,_,_,(info,aft))
-    | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft))
-    | Ast0.While(_,_,_,_,_,(info,aft))
-    | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft))
-    | Ast0.Iterator(_,_,_,_,_,(info,aft)) ->
-       (match Ast0.unwrap e with
-         Ast0.IfThen(_,_,_,_,_,(info,aft1))
-       | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft1))
-       | Ast0.While(_,_,_,_,_,(info,aft1))
-       | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft1))
-       | Ast0.Iterator(_,_,_,_,_,(info,aft1)) ->
-           merge_plus aft aft1
-       | _ -> merge_plus aft (Ast0.get_mcodekind e))
-    | _ -> ()));
-  e
-
-let extra_copy_other_plus model e = e
-
-(* --------------------------------------------------------------------- *)
-
-let mv_count = ref 0
-let new_mv (_,s) =
-  let ct = !mv_count in
-  mv_count := !mv_count + 1;
-  "_"^s^"_"^(string_of_int ct)
-
-let get_name = function
-    Ast.MetaIdDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaIdDecl(ar,nm))
-  | Ast.MetaFreshIdDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaFreshIdDecl(ar,nm))
-  | Ast.MetaTypeDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaTypeDecl(ar,nm))
-  | Ast.MetaListlenDecl(nm) ->
-      failwith "should not be rebuilt"
-  | Ast.MetaParamDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaParamDecl(ar,nm))
-  | Ast.MetaParamListDecl(ar,nm,nm1) ->
-      (nm,function nm -> Ast.MetaParamListDecl(ar,nm,nm1))
-  | Ast.MetaConstDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaConstDecl(ar,nm,ty))
-  | Ast.MetaErrDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaErrDecl(ar,nm))
-  | Ast.MetaExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaExpDecl(ar,nm,ty))
-  | Ast.MetaIdExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaIdExpDecl(ar,nm,ty))
-  | Ast.MetaLocalIdExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaLocalIdExpDecl(ar,nm,ty))
-  | Ast.MetaExpListDecl(ar,nm,nm1) ->
-      (nm,function nm -> Ast.MetaExpListDecl(ar,nm,nm1))
-  | Ast.MetaStmDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaStmDecl(ar,nm))
-  | Ast.MetaStmListDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaStmListDecl(ar,nm))
-  | Ast.MetaFuncDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaFuncDecl(ar,nm))
-  | Ast.MetaLocalFuncDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaLocalFuncDecl(ar,nm))
-  | Ast.MetaPosDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaPosDecl(ar,nm))
-  | Ast.MetaDeclarerDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaDeclarerDecl(ar,nm))
-  | Ast.MetaIteratorDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaIteratorDecl(ar,nm))
-
-let make_new_metavars metavars bindings =
-  let new_metavars =
-    List.filter
-      (function mv ->
-       let (s,_) = get_name mv in
-       try let _ = List.assoc s bindings in false with Not_found -> true)
-      metavars in
-  List.split
-    (List.map
-       (function mv ->
-        let (s,rebuild) = get_name mv in
-        let new_s = (!current_rule,new_mv s) in
-        (rebuild new_s, (s,new_s)))
-       new_metavars)
-
-(* --------------------------------------------------------------------- *)
-
-let do_nothing x = x
-
-let mkdisj matcher metavars alts e instantiater mkiso disj_maker minusify
-    rebuild_mcodes name printer extra_plus update_others =
-  let call_instantiate bindings mv_bindings alts =
-    List.concat
-      (List.map
-        (function (a,_,_,_) ->
-          nub
-          (* no need to create duplicates when the bindings have no effect *)
-            (List.map
-               (function bindings ->
-                 Ast0.set_iso
-                   (copy_plus printer minusify e
-                      (extra_plus e
-                         (instantiater bindings mv_bindings
-                            (rebuild_mcodes a))))
-                   (Common.union_set [(name,mkiso a)] (Ast0.get_iso e)))
-               bindings))
-        alts) in
-  let rec inner_loop all_alts prev_ecount prev_icount prev_dcount = function
-      [] -> Common.Left (prev_ecount, prev_icount, prev_dcount)
-    | ((pattern,ecount,icount,dcount)::rest) ->
-       let wc =
-         whencode_allowed prev_ecount prev_icount prev_dcount
-           ecount dcount icount rest in
-       (match matcher true (context_required e) wc pattern e init_env with
-         Fail(reason) ->
-           if reason = NonMatch || not !Flag_parsing_cocci.show_iso_failures
-           then ()
-           else
-             (match matcher false false wc pattern e init_env with
-               OK _ ->
-                 interpret_reason name (Ast0.get_line e) reason
-                   (function () -> printer e)
-             | _ -> ());
-           inner_loop all_alts (prev_ecount + ecount) (prev_icount + icount)
-             (prev_dcount + dcount) rest
-       | OK (bindings : (((string * string) * 'a) list list)) ->
-           let all_alts =
-             (* apply update_others to all patterns other than the matched
-                one.  This is used to desigate the others as test
-                expressions in the TestExpression case *)
-             (List.map
-                (function (x,e,i,d) as all ->
-                  if x = pattern
-                  then all
-                  else (update_others x,e,i,d))
-                (List.hd all_alts)) ::
-             (List.map
-                (List.map (function (x,e,i,d) -> (update_others x,e,i,d)))
-                (List.tl all_alts)) in
-           (match List.concat all_alts with
-             [x] -> Common.Left (prev_ecount, prev_icount, prev_dcount)
-           | all_alts ->
-               let (new_metavars,mv_bindings) =
-                 make_new_metavars metavars (nub(List.concat bindings)) in
-               Common.Right
-                 (new_metavars,
-                  call_instantiate bindings mv_bindings all_alts))) in
-  let rec outer_loop prev_ecount prev_icount prev_dcount = function
-      [] | [[_]] (*only one alternative*)  -> ([],e) (* nothing matched *)
-    | (alts::rest) as all_alts ->
-       match inner_loop all_alts prev_ecount prev_icount prev_dcount alts with
-         Common.Left(prev_ecount, prev_icount, prev_dcount) ->
-           outer_loop prev_ecount prev_icount prev_dcount rest
-       | Common.Right (new_metavars,res) ->
-           (new_metavars,
-            copy_minus printer minusify e (disj_maker res)) in
-  outer_loop 0 0 0 alts
-
-(* no one should ever look at the information stored in these mcodes *)
-let disj_starter lst =
-  let old_info = Ast0.get_info(List.hd lst) in
-  let info =
-    { old_info with
-      Ast0.line_end = old_info.Ast0.line_start;
-      Ast0.logical_end = old_info.Ast0.logical_start;
-      Ast0.attachable_start = false; Ast0.attachable_end = false;
-      Ast0.mcode_start = []; Ast0.mcode_end = [];
-      Ast0.strings_before = []; Ast0.strings_after = [] } in
-  Ast0.make_mcode_info "(" info
-
-let disj_ender lst =
-  let old_info = Ast0.get_info(List.hd lst) in
-  let info =
-    { old_info with
-      Ast0.line_start = old_info.Ast0.line_end;
-      Ast0.logical_start = old_info.Ast0.logical_end;
-      Ast0.attachable_start = false; Ast0.attachable_end = false;
-      Ast0.mcode_start = []; Ast0.mcode_end = [];
-      Ast0.strings_before = []; Ast0.strings_after = [] } in
-  Ast0.make_mcode_info ")" info
-
-let disj_mid _ = Ast0.make_mcode "|"
-
-let make_disj_type tl =
-  let mids =
-    match tl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.DisjType(disj_starter tl,tl,mids,disj_ender tl))
-let make_disj_stmt_list tl =
-  let mids =
-    match tl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.Disj(disj_starter tl,tl,mids,disj_ender tl))
-let make_disj_expr model el =
-  let mids =
-    match el with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  let update_arg x =
-    if Ast0.get_arg_exp model then Ast0.set_arg_exp x else x in
-  let update_test x =
-    let x = if Ast0.get_test_pos model then Ast0.set_test_pos x else x in
-    if Ast0.get_test_exp model then Ast0.set_test_exp x else x in
-  let el = List.map update_arg (List.map update_test el) in
-  Ast0.context_wrap (Ast0.DisjExpr(disj_starter el,el,mids,disj_ender el))
-let make_disj_decl dl =
-  let mids =
-    match dl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.DisjDecl(disj_starter dl,dl,mids,disj_ender dl))
-let make_disj_stmt sl =
-  let dotify x = Ast0.context_wrap (Ast0.DOTS[x]) in
-  let mids =
-    match sl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap
-    (Ast0.Disj(disj_starter sl,List.map dotify sl,mids,disj_ender sl))
-
-let transform_type (metavars,alts,name) e =
-  match alts with
-    (Ast0.TypeCTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.TypeCTag(p) ->
-                  (p,count_edots.V0.combiner_typeC p,
-                   count_idots.V0.combiner_typeC p,
-                   count_dots.V0.combiner_typeC p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_typeC metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_typeC)
-       (function t -> Ast0.TypeCTag t)
-       make_disj_type make_minus.V0.rebuilder_typeC
-       (rebuild_mcode start_line).V0.rebuilder_typeC
-       name Unparse_ast0.typeC extra_copy_other_plus do_nothing
-  | _ -> ([],e)
-
-
-let transform_expr (metavars,alts,name) e =
-  let process update_others =
-      (* start line is given to any leaves in the iso code *)
-    let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-    let alts =
-      List.map
-       (List.map
-          (function
-              Ast0.ExprTag(p) | Ast0.ArgExprTag(p) | Ast0.TestExprTag(p) ->
-                (p,count_edots.V0.combiner_expression p,
-                 count_idots.V0.combiner_expression p,
-                 count_dots.V0.combiner_expression p)
-            | _ -> failwith "invalid alt"))
-       alts in
-    mkdisj match_expr metavars alts e
-      (function b -> function mv_b ->
-       (instantiate b mv_b).V0.rebuilder_expression)
-      (function e -> Ast0.ExprTag e)
-      (make_disj_expr e) make_minus.V0.rebuilder_expression
-      (rebuild_mcode start_line).V0.rebuilder_expression
-      name Unparse_ast0.expression extra_copy_other_plus update_others in
-  match alts with
-    (Ast0.ExprTag(_)::_)::_ -> process do_nothing
-  | (Ast0.ArgExprTag(_)::_)::_ when Ast0.get_arg_exp e -> process do_nothing
-  | (Ast0.TestExprTag(_)::_)::_ when Ast0.get_test_pos e ->
-      process Ast0.set_test_exp
-  | _ -> ([],e)
-
-let transform_decl (metavars,alts,name) e =
-  match alts with
-    (Ast0.DeclTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some (Ast0.get_info e).Ast0.line_start in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.DeclTag(p) ->
-                  (p,count_edots.V0.combiner_declaration p,
-                   count_idots.V0.combiner_declaration p,
-                   count_dots.V0.combiner_declaration p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_decl metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_declaration)
-       (function d -> Ast0.DeclTag d)
-       make_disj_decl
-       make_minus.V0.rebuilder_declaration
-       (rebuild_mcode start_line).V0.rebuilder_declaration
-       name Unparse_ast0.declaration extra_copy_other_plus do_nothing
-  | _ -> ([],e)
-
-let transform_stmt (metavars,alts,name) e =
-  match alts with
-    (Ast0.StmtTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some (Ast0.get_info e).Ast0.line_start in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.StmtTag(p) ->
-                  (p,count_edots.V0.combiner_statement p,
-                   count_idots.V0.combiner_statement p,
-                   count_dots.V0.combiner_statement p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_statement metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_statement)
-       (function s -> Ast0.StmtTag s)
-       make_disj_stmt make_minus.V0.rebuilder_statement
-       (rebuild_mcode start_line).V0.rebuilder_statement
-       name (Unparse_ast0.statement "") extra_copy_stmt_plus do_nothing
-  | _ -> ([],e)
-
-(* sort of a hack, because there is no disj at top level *)
-let transform_top (metavars,alts,name) e =
-  match Ast0.unwrap e with
-    Ast0.DECL(declstm) ->
-      (try
-       let strip alts =
-         List.map
-           (List.map
-              (function
-                  Ast0.DotsStmtTag(d) ->
-                    (match Ast0.unwrap d with
-                      Ast0.DOTS([s]) -> Ast0.StmtTag(s)
-                    | _ -> raise (Failure ""))
-                | _ -> raise (Failure "")))
-           alts in
-       let (mv,s) = transform_stmt (metavars,strip alts,name) declstm in
-       (mv,Ast0.rewrap e (Ast0.DECL(s)))
-      with Failure _ -> ([],e))
-  | Ast0.CODE(stmts) ->
-      let (mv,res) =
-       match alts with
-         (Ast0.DotsStmtTag(_)::_)::_ ->
-              (* start line is given to any leaves in the iso code *)
-           let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-           let alts =
-             List.map
-               (List.map
-                  (function
-                      Ast0.DotsStmtTag(p) ->
-                        (p,count_edots.V0.combiner_statement_dots p,
-                         count_idots.V0.combiner_statement_dots p,
-                         count_dots.V0.combiner_statement_dots p)
-                    | _ -> failwith "invalid alt"))
-               alts in
-           mkdisj match_statement_dots metavars alts stmts
-             (function b -> function mv_b ->
-               (instantiate b mv_b).V0.rebuilder_statement_dots)
-             (function s -> Ast0.DotsStmtTag s)
-             (function x ->
-               Ast0.rewrap e (Ast0.DOTS([make_disj_stmt_list x])))
-             make_minus.V0.rebuilder_statement_dots
-             (rebuild_mcode start_line).V0.rebuilder_statement_dots
-             name Unparse_ast0.statement_dots extra_copy_other_plus do_nothing
-       | _ -> ([],stmts) in
-      (mv,Ast0.rewrap e (Ast0.CODE res))
-  | _ -> ([],e)
-
-(* --------------------------------------------------------------------- *)
-
-let transform (alts : isomorphism) t =
-  (* the following ugliness is because rebuilder only returns a new term *)
-  let extra_meta_decls = ref ([] : Ast_cocci.metavar list) in
-  let mcode x = x in
-  let donothing r k e = k e in
-  let exprfn r k e =
-    let (extra_meta,exp) = transform_expr alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    exp in
-
-  let declfn r k e =
-    let (extra_meta,dec) = transform_decl alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    dec in
-
-  let stmtfn r k e =
-    let (extra_meta,stm) = transform_stmt alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    stm in
-  
-  let typefn r k e =
-    let (extra_meta,ty) = transform_type alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    ty in
-  
-  let topfn r k e =
-    let (extra_meta,ty) = transform_top alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    ty in
-  
-  let res =
-    V0.rebuilder
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing exprfn typefn donothing donothing declfn stmtfn
-      donothing topfn in
-  let res = res.V0.rebuilder_top_level t in
-  (!extra_meta_decls,res)
-
-(* --------------------------------------------------------------------- *)
-
-(* should be done by functorizing the parser to use wrap or context_wrap *)
-let rewrap =
-  let mcode (x,a,i,mc,pos) = (x,a,i,Ast0.context_befaft(),pos) in
-  let donothing r k e = Ast0.context_wrap(Ast0.unwrap(k e)) in
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing
-
-let rewrap_anything = function
-    Ast0.DotsExprTag(d) ->
-      Ast0.DotsExprTag(rewrap.V0.rebuilder_expression_dots d)
-  | Ast0.DotsInitTag(d) ->
-      Ast0.DotsInitTag(rewrap.V0.rebuilder_initialiser_list d)
-  | Ast0.DotsParamTag(d) ->
-      Ast0.DotsParamTag(rewrap.V0.rebuilder_parameter_list d)
-  | Ast0.DotsStmtTag(d) ->
-      Ast0.DotsStmtTag(rewrap.V0.rebuilder_statement_dots d)
-  | Ast0.DotsDeclTag(d) ->
-      Ast0.DotsDeclTag(rewrap.V0.rebuilder_declaration_dots d)
-  | Ast0.DotsCaseTag(d) ->
-      Ast0.DotsCaseTag(rewrap.V0.rebuilder_case_line_dots d)
-  | Ast0.IdentTag(d) -> Ast0.IdentTag(rewrap.V0.rebuilder_ident d)
-  | Ast0.ExprTag(d) -> Ast0.ExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.ArgExprTag(d) -> Ast0.ArgExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.TestExprTag(d) -> Ast0.TestExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.TypeCTag(d) -> Ast0.TypeCTag(rewrap.V0.rebuilder_typeC d)
-  | Ast0.InitTag(d) -> Ast0.InitTag(rewrap.V0.rebuilder_initialiser d)
-  | Ast0.ParamTag(d) -> Ast0.ParamTag(rewrap.V0.rebuilder_parameter d)
-  | Ast0.DeclTag(d) -> Ast0.DeclTag(rewrap.V0.rebuilder_declaration d)
-  | Ast0.StmtTag(d) -> Ast0.StmtTag(rewrap.V0.rebuilder_statement d)
-  | Ast0.CaseLineTag(d) -> Ast0.CaseLineTag(rewrap.V0.rebuilder_case_line d)
-  | Ast0.TopTag(d) -> Ast0.TopTag(rewrap.V0.rebuilder_top_level d)
-  | Ast0.IsoWhenTag(_) | Ast0.IsoWhenTTag(_) | Ast0.IsoWhenFTag(_) ->
-      failwith "only for isos within iso phase"
-  | Ast0.MetaPosTag(p) -> Ast0.MetaPosTag(p)
-
-(* --------------------------------------------------------------------- *)
-
-let apply_isos isos rule rule_name =
-  if isos = []
-  then ([],rule)
-  else
-    begin
-      current_rule := rule_name;
-      let isos =
-       List.map
-         (function (metavars,iso,name) ->
-           (metavars,List.map (List.map rewrap_anything) iso,name))
-         isos in
-      let (extra_meta,rule) =
-       List.split
-         (List.map
-            (function t ->
-              List.fold_left
-                (function (extra_meta,t) -> function iso ->
-                  let (new_extra_meta,t) = transform iso t in
-                  (new_extra_meta@extra_meta,t))
-                ([],t) isos)
-            rule) in
-      (List.concat extra_meta, Compute_lines.compute_lines rule)
-    end
diff --git a/parsing_cocci/.#iso_pattern.ml.1.144 b/parsing_cocci/.#iso_pattern.ml.1.144
deleted file mode 100644 (file)
index 6b6875d..0000000
+++ /dev/null
@@ -1,2334 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* Potential problem: offset of mcode is not updated when an iso is
-instantiated, implying that a term may end up with many mcodes with the
-same offset.  On the other hand, at the moment offset only seems to be used
-before this phase.  Furthermore add_dot_binding relies on the offset to
-remain the same between matching an iso and instantiating it with bindings. *)
-
-(* --------------------------------------------------------------------- *)
-(* match a SmPL expression against a SmPL abstract syntax tree,
-either - or + *)
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-
-let current_rule = ref ""
-
-(* --------------------------------------------------------------------- *)
-
-type isomorphism =
-    Ast_cocci.metavar list * Ast0_cocci.anything list list * string (* name *)
-
-let strip_info =
-  let mcode (term,_,_,_,_) =
-    (term,Ast0.NONE,Ast0.default_info(),Ast0.PLUS,ref Ast0.NoMetaPos) in
-  let donothing r k e =
-    let x = k e in
-    {(Ast0.wrap (Ast0.unwrap x)) with
-      Ast0.mcodekind = ref Ast0.PLUS;
-      Ast0.true_if_test = x.Ast0.true_if_test} in
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing
-
-let anything_equal = function
-    (Ast0.DotsExprTag(d1),Ast0.DotsExprTag(d2)) ->
-      failwith "not a possible variable binding" (*not sure why these are pbs*)
-  | (Ast0.DotsInitTag(d1),Ast0.DotsInitTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsParamTag(d1),Ast0.DotsParamTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsStmtTag(d1),Ast0.DotsStmtTag(d2)) ->
-      (strip_info.V0.rebuilder_statement_dots d1) =
-      (strip_info.V0.rebuilder_statement_dots d2)
-  | (Ast0.DotsDeclTag(d1),Ast0.DotsDeclTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.DotsCaseTag(d1),Ast0.DotsCaseTag(d2)) ->
-      failwith "not a possible variable binding"
-  | (Ast0.IdentTag(d1),Ast0.IdentTag(d2)) ->
-      (strip_info.V0.rebuilder_ident d1) = (strip_info.V0.rebuilder_ident d2)
-  | (Ast0.ExprTag(d1),Ast0.ExprTag(d2)) ->
-      (strip_info.V0.rebuilder_expression d1) =
-      (strip_info.V0.rebuilder_expression d2)
-  | (Ast0.ArgExprTag(_),_) | (_,Ast0.ArgExprTag(_)) ->
-      failwith "not possible - only in isos1"
-  | (Ast0.TestExprTag(_),_) | (_,Ast0.TestExprTag(_)) ->
-      failwith "not possible - only in isos1"
-  | (Ast0.TypeCTag(d1),Ast0.TypeCTag(d2)) ->
-      (strip_info.V0.rebuilder_typeC d1) =
-      (strip_info.V0.rebuilder_typeC d2)
-  | (Ast0.InitTag(d1),Ast0.InitTag(d2)) ->
-      (strip_info.V0.rebuilder_initialiser d1) =
-      (strip_info.V0.rebuilder_initialiser d2)
-  | (Ast0.ParamTag(d1),Ast0.ParamTag(d2)) ->
-      (strip_info.V0.rebuilder_parameter d1) =
-      (strip_info.V0.rebuilder_parameter d2)
-  | (Ast0.DeclTag(d1),Ast0.DeclTag(d2)) ->
-      (strip_info.V0.rebuilder_declaration d1) =
-      (strip_info.V0.rebuilder_declaration d2)
-  | (Ast0.StmtTag(d1),Ast0.StmtTag(d2)) ->
-      (strip_info.V0.rebuilder_statement d1) =
-      (strip_info.V0.rebuilder_statement d2)
-  | (Ast0.CaseLineTag(d1),Ast0.CaseLineTag(d2)) ->
-      (strip_info.V0.rebuilder_case_line d1) =
-      (strip_info.V0.rebuilder_case_line d2)
-  | (Ast0.TopTag(d1),Ast0.TopTag(d2)) ->
-      (strip_info.V0.rebuilder_top_level d1) =
-      (strip_info.V0.rebuilder_top_level d2)
-  | (Ast0.IsoWhenTTag(_),_) | (_,Ast0.IsoWhenTTag(_)) ->
-      failwith "only for isos within iso phase"
-  | (Ast0.IsoWhenFTag(_),_) | (_,Ast0.IsoWhenFTag(_)) ->
-      failwith "only for isos within iso phase"
-  | (Ast0.IsoWhenTag(_),_) | (_,Ast0.IsoWhenTag(_)) ->
-      failwith "only for isos within iso phase"
-  | _ -> false
-
-let term (var1,_,_,_,_) = var1
-let dot_term (var1,_,info,_,_) = ("", var1 ^ (string_of_int info.Ast0.offset))
-
-
-type reason =
-    NotPure of Ast0.pure * (string * string) * Ast0.anything
-  | NotPureLength of (string * string)
-  | ContextRequired of Ast0.anything
-  | NonMatch
-  | Braces of Ast0.statement
-  | Position of string * string
-  | TypeMatch of reason list
-
-let rec interpret_reason name line reason printer =
-  Printf.printf
-    "warning: iso %s does not match the code below on line %d\n" name line;
-  printer(); Format.print_newline();
-  match reason with
-    NotPure(Ast0.Pure,(_,var),nonpure) ->
-      Printf.printf
-       "pure metavariable %s is matched against the following nonpure code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPure(Ast0.Context,(_,var),nonpure) ->
-      Printf.printf
-       "context metavariable %s is matched against the following\nnoncontext code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPure(Ast0.PureContext,(_,var),nonpure) ->
-      Printf.printf
-       "pure context metavariable %s is matched against the following\nnonpure or noncontext code:\n"
-       var;
-      Unparse_ast0.unparse_anything nonpure
-  | NotPureLength((_,var)) ->
-      Printf.printf
-       "pure metavariable %s is matched against too much or too little code\n"
-       var;
-  | ContextRequired(term) ->
-      Printf.printf
-       "the following code matched is not uniformly minus or context,\nor contains a disjunction:\n";
-      Unparse_ast0.unparse_anything term
-  | Braces(s) ->
-      Printf.printf "braces must be all minus (plus code allowed) or all\ncontext (plus code not allowed in the body) to match:\n";
-      Unparse_ast0.statement "" s;
-      Format.print_newline()
-  | Position(rule,name) ->
-      Printf.printf "position variable %s.%s conflicts with an isomorphism\n"
-       rule name;
-  | TypeMatch reason_list ->
-      List.iter (function r -> interpret_reason name line r printer)
-       reason_list
-  | _ -> failwith "not possible"
-
-type 'a either = OK of 'a | Fail of reason
-
-let add_binding var exp bindings =
-  let var = term var in
-  let attempt bindings =
-    try
-      let cur = List.assoc var bindings in
-      if anything_equal(exp,cur) then [bindings] else []
-    with Not_found -> [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-let add_dot_binding var exp bindings =
-  let var = dot_term var in
-  let attempt bindings =
-    try
-      let cur = List.assoc var bindings in
-      if anything_equal(exp,cur) then [bindings] else []
-    with Not_found -> [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-(* multi-valued *)
-let add_multi_dot_binding var exp bindings =
-  let var = dot_term var in
-  let attempt bindings = [((var,exp)::bindings)] in
-  match List.concat(List.map attempt bindings) with
-    [] -> Fail NonMatch
-  | x -> OK x
-
-let rec nub ls =
-  match ls with
-    [] -> []
-  | (x::xs) when (List.mem x xs) -> nub xs
-  | (x::xs) -> x::(nub xs)
-
-(* --------------------------------------------------------------------- *)
-
-let init_env = [[]]
-
-let debug str m binding =
-  let res = m binding in
-  (match res with
-    None -> Printf.printf "%s: failed\n" str
-  | Some binding ->
-      List.iter
-       (function binding ->
-         Printf.printf "%s: %s\n" str
-           (String.concat " " (List.map (function (x,_) -> x) binding)))
-       binding);
-  res
-
-let conjunct_bindings
-    (m1 : 'binding -> 'binding either)
-    (m2 : 'binding -> 'binding either)
-    (binding : 'binding) : 'binding either =
-  match m1 binding with Fail(reason) -> Fail(reason) | OK binding -> m2 binding
-
-let rec conjunct_many_bindings = function
-    [] -> failwith "not possible"
-  | [x] -> x
-  | x::xs -> conjunct_bindings x (conjunct_many_bindings xs)
-
-let mcode_equal (x,_,_,_,_) (y,_,_,_,_) = x = y
-
-let return b binding = if b then OK binding else Fail NonMatch
-let return_false reason binding = Fail reason
-
-let match_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> return true
-  | _ -> return false
-
-let bool_match_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> true
-  | _ -> false
-
-(* context_required is for the example
-   if (
-+      (int * )
-       x == NULL)
-  where we can't change x == NULL to eg NULL == x.  So there can either be
-  nothing attached to the root or the term has to be all removed.
-  if would be nice if we knew more about the relationship between the - and +
-  code, because in the case where the + code is a separate statement in a
-  sequence, this is not a problem.  Perhaps something could be done in
-  insert_plus
-
-   The example seems strange.  Why isn't the cast attached to x?
- *)
-let is_context e =
-  !Flag.sgrep_mode2 or (* everything is context for sgrep *)
-  (match Ast0.get_mcodekind e with
-    Ast0.CONTEXT(cell) -> true
-  | _ -> false)
-
-(* needs a special case when there is a Disj or an empty DOTS
-   the following stops at the statement level, and gives true if one
-   statement is replaced by another *)
-let rec is_pure_context s =
-  !Flag.sgrep_mode2 or (* everything is context for sgrep *)
-  (match Ast0.unwrap s with
-    Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-      List.for_all
-       (function x ->
-         match Ast0.undots x with
-           [s] -> is_pure_context s
-         | _ -> false (* could we do better? *))
-       statement_dots_list
-  | _ ->
-      (match Ast0.get_mcodekind s with
-       Ast0.CONTEXT(mc) ->
-         (match !mc with
-           (Ast.NOTHING,_,_) -> true
-         | _ -> false)
-      | Ast0.MINUS(mc) ->
-         (match !mc with
-       (* do better for the common case of replacing a stmt by another one *)
-           ([[Ast.StatementTag(s)]],_) ->
-             (match Ast.unwrap s with
-               Ast.IfThen(_,_,_) -> false (* potentially dangerous *)
-             | _ -> true)
-         |     (_,_) -> false)
-      | _ -> false))
-
-let is_minus e =
-  match Ast0.get_mcodekind e with Ast0.MINUS(cell) -> true | _ -> false
-
-let match_list matcher is_list_matcher do_list_match la lb =
-  let rec loop = function
-      ([],[]) -> return true
-    | ([x],lb) when is_list_matcher x -> do_list_match x lb
-    | (x::xs,y::ys) -> conjunct_bindings (matcher x y) (loop (xs,ys))
-    | _ -> return false in
-  loop (la,lb)
-
-let match_maker checks_needed context_required whencode_allowed =
-
-  let check_mcode pmc cmc binding =
-    if checks_needed
-    then
-      match Ast0.get_pos cmc with
-       (Ast0.MetaPos (name,_,_)) as x ->
-         (match Ast0.get_pos pmc with
-           Ast0.MetaPos (name1,_,_) ->
-             add_binding name1 (Ast0.MetaPosTag x) binding
-         | Ast0.NoMetaPos ->
-             let (rule,name) = Ast0.unwrap_mcode name in
-             Fail (Position(rule,name)))
-      | Ast0.NoMetaPos -> OK binding
-    else OK binding in
-
-  let match_dots matcher is_list_matcher do_list_match d1 d2 =
-    match (Ast0.unwrap d1, Ast0.unwrap d2) with
-      (Ast0.DOTS(la),Ast0.DOTS(lb))
-    | (Ast0.CIRCLES(la),Ast0.CIRCLES(lb))
-    | (Ast0.STARS(la),Ast0.STARS(lb)) ->
-       match_list matcher is_list_matcher (do_list_match d2) la lb
-    | _ -> return false in
-
-  let is_elist_matcher el =
-    match Ast0.unwrap el with Ast0.MetaExprList(_,_,_) -> true | _ -> false in
-
-  let is_plist_matcher pl =
-    match Ast0.unwrap pl with Ast0.MetaParamList(_,_,_) -> true | _ -> false in
-
-  let is_slist_matcher pl =
-    match Ast0.unwrap pl with Ast0.MetaStmtList(_,_) -> true | _ -> false in
-
-  let no_list _ = false in
-
-  let build_dots pattern data =
-    match Ast0.unwrap pattern with
-      Ast0.DOTS(_) -> Ast0.rewrap pattern (Ast0.DOTS(data))
-    | Ast0.CIRCLES(_) -> Ast0.rewrap pattern (Ast0.CIRCLES(data))
-    | Ast0.STARS(_) -> Ast0.rewrap pattern (Ast0.STARS(data)) in
-
-  let pure_sp_code =
-    let bind = Ast0.lub_pure in
-    let option_default = Ast0.Context in
-    let pure_mcodekind mc =
-      if !Flag.sgrep_mode2
-      then Ast0.PureContext
-      else
-       match mc with
-         Ast0.CONTEXT(mc) ->
-           (match !mc with
-             (Ast.NOTHING,_,_) -> Ast0.PureContext
-           | _ -> Ast0.Context)
-       | Ast0.MINUS(mc) ->
-           (match !mc with ([],_) -> Ast0.Pure | _ ->  Ast0.Impure)
-       | _ -> Ast0.Impure in
-    let donothing r k e =
-      bind (pure_mcodekind (Ast0.get_mcodekind e)) (k e) in
-
-    let mcode m = pure_mcodekind (Ast0.get_mcode_mcodekind m) in
-
-    (* a case for everything that has a metavariable *)
-    (* pure is supposed to match only unitary metavars, not anything that
-       contains only unitary metavars *)
-    let ident r k i =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind i)) (k i))
-       (match Ast0.unwrap i with
-         Ast0.MetaId(name,_,pure) | Ast0.MetaFunc(name,_,pure)
-       | Ast0.MetaLocalFunc(name,_,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let expression r k e =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind e)) (k e))
-       (match Ast0.unwrap e with
-         Ast0.MetaErr(name,_,pure)
-       | Ast0.MetaExpr(name,_,_,_,pure) | Ast0.MetaExprList(name,_,pure) ->
-           pure
-       | _ -> Ast0.Impure) in
-
-    let typeC r k t =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind t)) (k t))
-       (match Ast0.unwrap t with
-         Ast0.MetaType(name,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let param r k p =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind p)) (k p))
-       (match Ast0.unwrap p with
-         Ast0.MetaParam(name,pure) | Ast0.MetaParamList(name,_,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    let stmt r k s =
-      bind (bind (pure_mcodekind (Ast0.get_mcodekind s)) (k s))
-       (match Ast0.unwrap s with
-         Ast0.MetaStmt(name,pure) | Ast0.MetaStmtList(name,pure) -> pure
-       | _ -> Ast0.Impure) in
-
-    V0.combiner bind option_default 
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      ident expression typeC donothing param donothing stmt donothing
-      donothing in
-
-  let add_pure_list_binding name pure is_pure builder1 builder2 lst =
-    match (checks_needed,pure) with
-      (true,Ast0.Pure) | (true,Ast0.Context) | (true,Ast0.PureContext) ->
-       (match lst with
-         [x] ->
-           if (Ast0.lub_pure (is_pure x) pure) = pure
-           then add_binding name (builder1 lst)
-           else return_false (NotPure (pure,term name,builder1 lst))
-       | _ -> return_false (NotPureLength (term name)))
-    | (false,_) | (_,Ast0.Impure) -> add_binding name (builder2 lst) in
-
-  let add_pure_binding name pure is_pure builder x =
-    match (checks_needed,pure) with
-      (true,Ast0.Pure) | (true,Ast0.Context) | (true,Ast0.PureContext) ->
-       if (Ast0.lub_pure (is_pure x) pure) = pure
-       then add_binding name (builder x)
-       else return_false (NotPure (pure,term name, builder x))
-    | (false,_) | (_,Ast0.Impure) ->  add_binding name (builder x) in
-
-  let do_elist_match builder el lst =
-    match Ast0.unwrap el with
-      Ast0.MetaExprList(name,lenname,pure) ->
-        (*how to handle lenname? should it be an option type and always None?*)
-       failwith "expr list pattern not supported in iso"
-       (*add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_expression
-         (function lst -> Ast0.ExprTag(List.hd lst))
-         (function lst -> Ast0.DotsExprTag(build_dots builder lst))
-         lst*)
-    | _ -> failwith "not possible" in
-
-  let do_plist_match builder pl lst =
-    match Ast0.unwrap pl with
-      Ast0.MetaParamList(name,lename,pure) ->
-       failwith "param list pattern not supported in iso"
-       (*add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_parameter
-         (function lst -> Ast0.ParamTag(List.hd lst))
-         (function lst -> Ast0.DotsParamTag(build_dots builder lst))
-         lst*)
-    | _ -> failwith "not possible" in
-
-  let do_slist_match builder sl lst =
-    match Ast0.unwrap sl with
-      Ast0.MetaStmtList(name,pure) ->
-       add_pure_list_binding name pure
-         pure_sp_code.V0.combiner_statement
-         (function lst -> Ast0.StmtTag(List.hd lst))
-         (function lst -> Ast0.DotsStmtTag(build_dots builder lst))
-         lst
-    | _ -> failwith "not possible" in
-
-  let do_nolist_match _ _ = failwith "not possible" in
-
-  let rec match_ident pattern id =
-    match Ast0.unwrap pattern with
-      Ast0.MetaId(name,_,pure) ->
-       (add_pure_binding name pure pure_sp_code.V0.combiner_ident
-         (function id -> Ast0.IdentTag id) id)
-    | Ast0.MetaFunc(name,_,pure) -> failwith "metafunc not supported"
-    | Ast0.MetaLocalFunc(name,_,pure) -> failwith "metalocalfunc not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context id
-       then
-         match (up,Ast0.unwrap id) with
-           (Ast0.Id(namea),Ast0.Id(nameb)) ->
-             if mcode_equal namea nameb
-             then check_mcode namea nameb
-             else return false
-         | (Ast0.OptIdent(ida),Ast0.OptIdent(idb))
-         | (Ast0.UniqueIdent(ida),Ast0.UniqueIdent(idb)) ->
-             match_ident ida idb
-         | (_,Ast0.OptIdent(idb))
-         | (_,Ast0.UniqueIdent(idb)) -> match_ident pattern idb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.IdentTag id)) in
-
-  (* should we do something about matching metavars against ...? *)
-  let rec match_expr pattern expr =
-    match Ast0.unwrap pattern with
-      Ast0.MetaExpr(name,_,ty,form,pure) ->
-       let form_ok =
-         match (form,expr) with
-           (Ast.ANY,_) -> true
-         | (Ast.CONST,e) ->
-             let rec matches e =
-               match Ast0.unwrap e with
-                 Ast0.Constant(c) -> true
-               | Ast0.Cast(lp,ty,rp,e) -> matches e
-               | Ast0.SizeOfExpr(se,exp) -> true
-               | Ast0.SizeOfType(se,lp,ty,rp) -> true
-               | Ast0.MetaExpr(nm,_,_,Ast.CONST,p) ->
-                   (Ast0.lub_pure p pure) = pure
-               | _ -> false in
-             matches e
-         | (Ast.ID,e) | (Ast.LocalID,e) ->
-             let rec matches e =
-               match Ast0.unwrap e with
-                 Ast0.Ident(c) -> true
-               | Ast0.Cast(lp,ty,rp,e) -> matches e
-               | Ast0.MetaExpr(nm,_,_,Ast.ID,p) ->
-                   (Ast0.lub_pure p pure) = pure
-               | _ -> false in
-             matches e in
-       if form_ok
-       then
-         match ty with
-           Some ts ->
-             if List.exists
-                 (function Type_cocci.MetaType(_,_,_) -> true | _ -> false)
-                 ts
-             then
-               (match ts with
-                 [Type_cocci.MetaType(tyname,_,_)] ->
-                   let expty =
-                     match (Ast0.unwrap expr,Ast0.get_type expr) with
-                 (* easier than updating type inferencer to manage multiple
-                    types *)
-                       (Ast0.MetaExpr(_,_,Some tts,_,_),_) -> Some tts
-                     | (_,Some ty) -> Some [ty]
-                     | _ -> None in
-                   (match expty with
-                     Some expty ->
-                       let tyname = Ast0.rewrap_mcode name tyname in
-                       conjunct_bindings
-                         (add_pure_binding name pure
-                            pure_sp_code.V0.combiner_expression
-                            (function expr -> Ast0.ExprTag expr)
-                            expr)
-                         (function bindings ->
-                           let attempts =
-                             List.map
-                               (function expty ->
-                                 (try
-                                   add_pure_binding tyname Ast0.Impure
-                                     (function _ -> Ast0.Impure)
-                                     (function ty -> Ast0.TypeCTag ty)
-                                     (Ast0.rewrap expr
-                                        (Ast0.reverse_type expty))
-                                     bindings
-                                 with Ast0.TyConv ->
-                                   Printf.printf
-                                     "warning: unconvertible type";
-                                   return false bindings))
-                               expty in
-                           if List.exists
-                               (function Fail _ -> false | OK x -> true)
-                               attempts
-                           then
-                               (* not sure why this is ok. can there be more
-                                than one OK? *)
-                             OK (List.concat
-                                   (List.map
-                                      (function Fail _ -> [] | OK x -> x)
-                                      attempts))
-                           else
-                             Fail
-                               (TypeMatch
-                                  (List.map
-                                     (function
-                                         Fail r -> r
-                                       | OK x -> failwith "not possible")
-                                     attempts)))
-                   | _ ->
-                 (*Printf.printf
-                    "warning: type metavar can only match one type";*)
-                       return false)
-               | _ ->
-                   failwith
-                     "mixture of metatype and other types not supported")
-             else
-               let expty = Ast0.get_type expr in
-               if List.exists (function t -> Type_cocci.compatible t expty) ts
-               then
-                 add_pure_binding name pure
-                   pure_sp_code.V0.combiner_expression
-                   (function expr -> Ast0.ExprTag expr)
-                   expr
-               else return false
-         | None ->
-             add_pure_binding name pure pure_sp_code.V0.combiner_expression
-               (function expr -> Ast0.ExprTag expr)
-               expr
-       else return false
-    | Ast0.MetaErr(namea,_,pure) -> failwith "metaerr not supported"
-    | Ast0.MetaExprList(_,_,_) -> failwith "metaexprlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context expr
-       then
-         match (up,Ast0.unwrap expr) with
-           (Ast0.Ident(ida),Ast0.Ident(idb)) ->
-             match_ident ida idb
-         | (Ast0.Constant(consta),Ast0.Constant(constb)) ->
-             if mcode_equal consta constb
-             then check_mcode consta constb
-             else return false
-         | (Ast0.FunCall(fna,lp1,argsa,rp1),Ast0.FunCall(fnb,lp,argsb,rp)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp; match_expr fna fnb;
-                 match_dots match_expr is_elist_matcher do_elist_match
-                   argsa argsb]
-         | (Ast0.Assignment(lefta,opa,righta,_),
-            Ast0.Assignment(leftb,opb,rightb,_)) ->
-              if mcode_equal opa opb
-              then
-                conjunct_many_bindings
-                  [check_mcode opa opb; match_expr lefta leftb;
-                    match_expr righta rightb]
-              else return false
-         | (Ast0.CondExpr(exp1a,lp1,exp2a,rp1,exp3a),
-            Ast0.CondExpr(exp1b,lp,exp2b,rp,exp3b)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  match_expr exp1a exp1b; match_option match_expr exp2a exp2b;
-                  match_expr exp3a exp3b]
-         | (Ast0.Postfix(expa,opa),Ast0.Postfix(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Infix(expa,opa),Ast0.Infix(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Unary(expa,opa),Ast0.Unary(expb,opb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_bindings (check_mcode opa opb) (match_expr expa expb)
-             else return false
-         | (Ast0.Binary(lefta,opa,righta),Ast0.Binary(leftb,opb,rightb)) ->
-             if mcode_equal opa opb
-             then
-               conjunct_many_bindings
-                 [check_mcode opa opb; match_expr lefta leftb;
-                   match_expr righta rightb]
-             else return false
-         | (Ast0.Paren(lp1,expa,rp1),Ast0.Paren(lp,expb,rp)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp; match_expr expa expb]
-         | (Ast0.ArrayAccess(exp1a,lb1,exp2a,rb1),
-            Ast0.ArrayAccess(exp1b,lb,exp2b,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_expr exp1a exp1b; match_expr exp2a exp2b]
-         | (Ast0.RecordAccess(expa,opa,fielda),
-            Ast0.RecordAccess(expb,op,fieldb))
-         | (Ast0.RecordPtAccess(expa,opa,fielda),
-            Ast0.RecordPtAccess(expb,op,fieldb)) ->
-              conjunct_many_bindings
-                [check_mcode opa op; match_expr expa expb;
-                  match_ident fielda fieldb]
-         | (Ast0.Cast(lp1,tya,rp1,expa),Ast0.Cast(lp,tyb,rp,expb)) ->
-             conjunct_many_bindings
-               [check_mcode lp1 lp; check_mcode rp1 rp;
-                 match_typeC tya tyb; match_expr expa expb]
-         | (Ast0.SizeOfExpr(szf1,expa),Ast0.SizeOfExpr(szf,expb)) ->
-             conjunct_bindings (check_mcode szf1 szf) (match_expr expa expb)
-         | (Ast0.SizeOfType(szf1,lp1,tya,rp1),
-            Ast0.SizeOfType(szf,lp,tyb,rp)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode szf1 szf; match_typeC tya tyb]
-         | (Ast0.TypeExp(tya),Ast0.TypeExp(tyb)) ->
-             match_typeC tya tyb
-         | (Ast0.EComma(cm1),Ast0.EComma(cm)) -> check_mcode cm1 cm
-         | (Ast0.DisjExpr(_,expsa,_,_),_) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.NestExpr(_,exp_dotsa,_,_,_),_) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.Edots(d,None),Ast0.Edots(d1,None))
-         | (Ast0.Ecircles(d,None),Ast0.Ecircles(d1,None))
-         | (Ast0.Estars(d,None),Ast0.Estars(d1,None)) -> check_mcode d d1
-         | (Ast0.Edots(ed,None),Ast0.Edots(ed1,Some wc))
-         | (Ast0.Ecircles(ed,None),Ast0.Ecircles(ed1,Some wc))
-         | (Ast0.Estars(ed,None),Ast0.Estars(ed1,Some wc)) ->
-           (* hope that mcode of edots is unique somehow *)
-             conjunct_bindings (check_mcode ed ed1)
-               (let (edots_whencode_allowed,_,_) = whencode_allowed in
-               if edots_whencode_allowed
-               then add_dot_binding ed (Ast0.ExprTag wc)
-               else
-                 (Printf.printf
-                    "warning: not applying iso because of whencode";
-                  return false))
-         | (Ast0.Edots(_,Some _),_) | (Ast0.Ecircles(_,Some _),_)
-         | (Ast0.Estars(_,Some _),_) ->
-             failwith "whencode not allowed in a pattern1"
-         | (Ast0.OptExp(expa),Ast0.OptExp(expb))
-         | (Ast0.UniqueExp(expa),Ast0.UniqueExp(expb)) -> match_expr expa expb
-         | (_,Ast0.OptExp(expb))
-         | (_,Ast0.UniqueExp(expb)) -> match_expr pattern expb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.ExprTag expr))
-           
-(* the special case for function types prevents the eg T X; -> T X = E; iso
-   from applying, which doesn't seem very relevant, but it also avoids a
-   mysterious bug that is obtained with eg int attach(...); *)
-  and match_typeC pattern t =
-    match Ast0.unwrap pattern with
-      Ast0.MetaType(name,pure) ->
-       (match Ast0.unwrap t with
-         Ast0.FunctionType(tya,lp1a,paramsa,rp1a) -> return false
-       | _ ->
-           add_pure_binding name pure pure_sp_code.V0.combiner_typeC
-             (function ty -> Ast0.TypeCTag ty)
-             t)
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context t
-       then
-         match (up,Ast0.unwrap t) with
-           (Ast0.ConstVol(cva,tya),Ast0.ConstVol(cvb,tyb)) ->
-             if mcode_equal cva cvb
-             then
-               conjunct_bindings (check_mcode cva cvb) (match_typeC tya tyb)
-             else return false
-         | (Ast0.BaseType(tya,signa),Ast0.BaseType(tyb,signb)) ->
-             if (mcode_equal tya tyb &&
-                 bool_match_option mcode_equal signa signb)
-             then
-               conjunct_bindings (check_mcode tya tyb)
-                 (match_option check_mcode signa signb)
-             else return false
-         | (Ast0.ImplicitInt(signa),Ast0.ImplicitInt(signb)) ->
-             if mcode_equal signa signb
-             then check_mcode signa signb
-             else return false
-         | (Ast0.Pointer(tya,star1),Ast0.Pointer(tyb,star)) ->
-             conjunct_bindings (check_mcode star1 star) (match_typeC tya tyb)
-         | (Ast0.FunctionPointer(tya,lp1a,stara,rp1a,lp2a,paramsa,rp2a),
-            Ast0.FunctionPointer(tyb,lp1b,starb,rp1b,lp2b,paramsb,rp2b)) ->
-              conjunct_many_bindings
-                [check_mcode stara starb; check_mcode lp1a lp1b;
-                  check_mcode rp1a rp1b; check_mcode lp2a lp2b;
-                  check_mcode rp2a rp2b; match_typeC tya tyb;
-                  match_dots match_param is_plist_matcher
-                    do_plist_match paramsa paramsb]
-         | (Ast0.FunctionType(tya,lp1a,paramsa,rp1a),
-            Ast0.FunctionType(tyb,lp1b,paramsb,rp1b)) ->
-              conjunct_many_bindings
-                [check_mcode lp1a lp1b; check_mcode rp1a rp1b;
-                  match_option match_typeC tya tyb;
-                  match_dots match_param is_plist_matcher do_plist_match
-                    paramsa paramsb]
-         | (Ast0.Array(tya,lb1,sizea,rb1),Ast0.Array(tyb,lb,sizeb,rb)) ->
-             conjunct_many_bindings
-               [check_mcode lb1 lb; check_mcode rb1 rb;
-                 match_typeC tya tyb; match_option match_expr sizea sizeb]
-         | (Ast0.StructUnionName(kinda,Some namea),
-            Ast0.StructUnionName(kindb,Some nameb)) ->
-              if mcode_equal kinda kindb
-              then
-                conjunct_bindings (check_mcode kinda kindb)
-                  (match_ident namea nameb)
-              else return false
-         | (Ast0.StructUnionDef(tya,lb1,declsa,rb1),
-            Ast0.StructUnionDef(tyb,lb,declsb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_typeC tya tyb;
-                  match_dots match_decl no_list do_nolist_match declsa declsb]
-         | (Ast0.TypeName(namea),Ast0.TypeName(nameb)) ->
-             if mcode_equal namea nameb
-             then check_mcode namea nameb
-             else return false
-         | (Ast0.DisjType(_,typesa,_,_),Ast0.DisjType(_,typesb,_,_)) ->
-             failwith "not allowed in the pattern of an isomorphism"
-         | (Ast0.OptType(tya),Ast0.OptType(tyb))
-         | (Ast0.UniqueType(tya),Ast0.UniqueType(tyb)) -> match_typeC tya tyb
-         | (_,Ast0.OptType(tyb))
-         | (_,Ast0.UniqueType(tyb)) -> match_typeC pattern tyb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.TypeCTag t))
-           
-  and match_decl pattern d =
-    if not(checks_needed) or not(context_required) or is_context d
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap d) with
-       (Ast0.Init(stga,tya,ida,eq1,inia,sc1),
-        Ast0.Init(stgb,tyb,idb,eq,inib,sc)) ->
-         if bool_match_option mcode_equal stga stgb
-         then
-           conjunct_many_bindings
-             [check_mcode eq1 eq; check_mcode sc1 sc;
-               match_option check_mcode stga stgb;
-               match_typeC tya tyb; match_ident ida idb;
-               match_init inia inib]
-         else return false
-      | (Ast0.UnInit(stga,tya,ida,sc1),Ast0.UnInit(stgb,tyb,idb,sc)) ->
-         if bool_match_option mcode_equal stga stgb
-         then
-           conjunct_many_bindings
-             [check_mcode sc1 sc; match_option check_mcode stga stgb;
-               match_typeC tya tyb; match_ident ida idb]
-         else return false
-      | (Ast0.MacroDecl(namea,lp1,argsa,rp1,sc1),
-        Ast0.MacroDecl(nameb,lp,argsb,rp,sc)) ->
-          conjunct_many_bindings
-            [match_ident namea nameb;
-              check_mcode lp1 lp; check_mcode rp1 rp;
-              check_mcode sc1 sc;
-              match_dots match_expr is_elist_matcher do_elist_match
-                argsa argsb]
-      | (Ast0.TyDecl(tya,sc1),Ast0.TyDecl(tyb,sc)) ->
-         conjunct_bindings (check_mcode sc1 sc) (match_typeC tya tyb)
-      | (Ast0.Typedef(stga,tya,ida,sc1),Ast0.Typedef(stgb,tyb,idb,sc)) ->
-         conjunct_bindings (check_mcode sc1 sc)
-           (conjunct_bindings (match_typeC tya tyb) (match_typeC ida idb))
-      | (Ast0.DisjDecl(_,declsa,_,_),Ast0.DisjDecl(_,declsb,_,_)) ->
-         failwith "not allowed in the pattern of an isomorphism"
-      | (Ast0.Ddots(d1,None),Ast0.Ddots(d,None)) -> check_mcode d1 d
-      |        (Ast0.Ddots(dd,None),Ast0.Ddots(d,Some wc)) ->
-         conjunct_bindings (check_mcode dd d)
-           (* hope that mcode of ddots is unique somehow *)
-           (let (ddots_whencode_allowed,_,_) = whencode_allowed in
-           if ddots_whencode_allowed
-           then add_dot_binding dd (Ast0.DeclTag wc)
-           else
-             (Printf.printf "warning: not applying iso because of whencode";
-              return false))
-      | (Ast0.Ddots(_,Some _),_) ->
-         failwith "whencode not allowed in a pattern1"
-           
-      | (Ast0.OptDecl(decla),Ast0.OptDecl(declb))
-      | (Ast0.UniqueDecl(decla),Ast0.UniqueDecl(declb)) ->
-         match_decl decla declb
-      | (_,Ast0.OptDecl(declb))
-      | (_,Ast0.UniqueDecl(declb)) ->
-         match_decl pattern declb
-      | _ -> return false
-    else return_false (ContextRequired (Ast0.DeclTag d))
-       
-  and match_init pattern i =
-    if not(checks_needed) or not(context_required) or is_context i
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap i) with
-       (Ast0.InitExpr(expa),Ast0.InitExpr(expb)) ->
-         match_expr expa expb
-      | (Ast0.InitList(lb1,initlista,rb1),Ast0.InitList(lb,initlistb,rb)) ->
-         conjunct_many_bindings
-           [check_mcode lb1 lb; check_mcode rb1 rb;
-             match_dots match_init no_list do_nolist_match
-               initlista initlistb]
-      | (Ast0.InitGccDotName(d1,namea,e1,inia),
-        Ast0.InitGccDotName(d,nameb,e,inib)) ->
-          conjunct_many_bindings
-            [check_mcode d1 d; check_mcode e1 e;
-              match_ident namea nameb; match_init inia inib]
-      | (Ast0.InitGccName(namea,c1,inia),Ast0.InitGccName(nameb,c,inib)) ->
-         conjunct_many_bindings
-           [check_mcode c1 c; match_ident namea nameb;
-             match_init inia inib]
-      | (Ast0.InitGccIndex(lb1,expa,rb1,e1,inia),
-        Ast0.InitGccIndex(lb2,expb,rb2,e2,inib)) ->
-         conjunct_many_bindings
-            [check_mcode lb1 lb2; check_mcode rb1 rb2; check_mcode e1 e2;
-              match_expr expa expb; match_init inia inib]
-      | (Ast0.InitGccRange(lb1,exp1a,d1,exp2a,rb1,e1,inia),
-        Ast0.InitGccRange(lb2,exp1b,d2,exp2b,rb2,e2,inib)) ->
-         conjunct_many_bindings
-            [check_mcode lb1 lb2; check_mcode d1 d2;
-              check_mcode rb1 rb2; check_mcode e1 e2;
-              match_expr exp1a exp1b; match_expr exp2a exp2b;
-              match_init inia inib]
-      | (Ast0.IComma(c1),Ast0.IComma(c)) -> check_mcode c1 c
-      | (Ast0.Idots(d1,None),Ast0.Idots(d,None)) -> check_mcode d1 d
-      | (Ast0.Idots(id,None),Ast0.Idots(d,Some wc)) ->
-         conjunct_bindings (check_mcode id d)
-         (* hope that mcode of edots is unique somehow *)
-           (let (_,idots_whencode_allowed,_) = whencode_allowed in
-           if idots_whencode_allowed
-           then add_dot_binding id (Ast0.InitTag wc)
-           else
-             (Printf.printf "warning: not applying iso because of whencode";
-              return false))
-      | (Ast0.Idots(_,Some _),_) ->
-         failwith "whencode not allowed in a pattern2"
-      | (Ast0.OptIni(ia),Ast0.OptIni(ib))
-      | (Ast0.UniqueIni(ia),Ast0.UniqueIni(ib)) -> match_init ia ib
-      | (_,Ast0.OptIni(ib))
-      | (_,Ast0.UniqueIni(ib)) -> match_init pattern ib
-      | _ -> return false
-    else return_false (ContextRequired (Ast0.InitTag i))
-       
-  and match_param pattern p =
-    match Ast0.unwrap pattern with
-      Ast0.MetaParam(name,pure) ->
-       add_pure_binding name pure pure_sp_code.V0.combiner_parameter
-         (function p -> Ast0.ParamTag p)
-         p
-    | Ast0.MetaParamList(name,_,pure) -> failwith "metaparamlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context p
-       then
-         match (up,Ast0.unwrap p) with
-           (Ast0.VoidParam(tya),Ast0.VoidParam(tyb)) -> match_typeC tya tyb
-         | (Ast0.Param(tya,ida),Ast0.Param(tyb,idb)) ->
-             conjunct_bindings (match_typeC tya tyb)
-               (match_option match_ident ida idb)
-         | (Ast0.PComma(c1),Ast0.PComma(c)) -> check_mcode c1 c
-         | (Ast0.Pdots(d1),Ast0.Pdots(d))
-         | (Ast0.Pcircles(d1),Ast0.Pcircles(d)) -> check_mcode d1 d
-         | (Ast0.OptParam(parama),Ast0.OptParam(paramb))
-         | (Ast0.UniqueParam(parama),Ast0.UniqueParam(paramb)) ->
-             match_param parama paramb
-         | (_,Ast0.OptParam(paramb))
-         | (_,Ast0.UniqueParam(paramb)) -> match_param pattern paramb
-         | _ -> return false
-       else return_false (ContextRequired (Ast0.ParamTag p))
-           
-  and match_statement pattern s =
-    match Ast0.unwrap pattern with
-      Ast0.MetaStmt(name,pure) ->
-       (match Ast0.unwrap s with
-         Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) ->
-           return false (* ... is not a single statement *)
-       | _ ->
-           add_pure_binding name pure pure_sp_code.V0.combiner_statement
-             (function ty -> Ast0.StmtTag ty)
-             s)
-    | Ast0.MetaStmtList(name,pure) -> failwith "metastmtlist not supported"
-    | up ->
-       if not(checks_needed) or not(context_required) or is_context s
-       then
-         match (up,Ast0.unwrap s) with
-           (Ast0.FunDecl(_,fninfoa,namea,lp1,paramsa,rp1,lb1,bodya,rb1),
-            Ast0.FunDecl(_,fninfob,nameb,lp,paramsb,rp,lb,bodyb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_fninfo fninfoa fninfob; match_ident namea nameb;
-                  match_dots match_param is_plist_matcher do_plist_match
-                    paramsa paramsb;
-                  match_dots match_statement is_slist_matcher do_slist_match
-                    bodya bodyb]
-         | (Ast0.Decl(_,decla),Ast0.Decl(_,declb)) ->
-             match_decl decla declb
-         | (Ast0.Seq(lb1,bodya,rb1),Ast0.Seq(lb,bodyb,rb)) ->
-             (* seqs can only match if they are all minus (plus code
-                allowed) or all context (plus code not allowed in the body).
-                we could be more permissive if the expansions of the isos are
-                also all seqs, but this would be hard to check except at top
-                level, and perhaps not worth checking even in that case.
-                Overall, the issue is that braces are used where single
-                statements are required, and something not satisfying these
-                conditions can cause a single statement to become a
-                non-single statement after the transformation.
-
-                example: if { ... -foo(); ... }
-                if we let the sequence convert to just -foo();
-                then we produce invalid code.  For some reason,
-                single_statement can't deal with this case, perhaps because
-                it starts introducing too many braces?  don't remember the
-                exact problem...
-             *)
-             conjunct_bindings (check_mcode lb1 lb)
-               (conjunct_bindings (check_mcode rb1 rb)
-                  (if not(checks_needed) or is_minus s or
-                    (is_context s &&
-                     List.for_all is_pure_context (Ast0.undots bodyb))
-                  then
-                    match_dots match_statement is_slist_matcher do_slist_match
-                      bodya bodyb
-                  else return_false (Braces(s))))
-         | (Ast0.ExprStatement(expa,sc1),Ast0.ExprStatement(expb,sc)) ->
-             conjunct_bindings (check_mcode sc1 sc) (match_expr expa expb)
-         | (Ast0.IfThen(if1,lp1,expa,rp1,branch1a,_),
-            Ast0.IfThen(if2,lp2,expb,rp2,branch1b,_)) ->
-              conjunct_many_bindings
-                [check_mcode if1 if2; check_mcode lp1 lp2;
-                  check_mcode rp1 rp2;
-                  match_expr expa expb;
-                  match_statement branch1a branch1b]
-         | (Ast0.IfThenElse(if1,lp1,expa,rp1,branch1a,e1,branch2a,_),
-            Ast0.IfThenElse(if2,lp2,expb,rp2,branch1b,e2,branch2b,_)) ->
-              conjunct_many_bindings
-                [check_mcode if1 if2; check_mcode lp1 lp2;
-                  check_mcode rp1 rp2; check_mcode e1 e2;
-                  match_expr expa expb;
-                  match_statement branch1a branch1b;
-                  match_statement branch2a branch2b]
-         | (Ast0.While(w1,lp1,expa,rp1,bodya,_),
-            Ast0.While(w,lp,expb,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [check_mcode w1 w; check_mcode lp1 lp;
-                  check_mcode rp1 rp; match_expr expa expb;
-                  match_statement bodya bodyb]
-         | (Ast0.Do(d1,bodya,w1,lp1,expa,rp1,_),
-            Ast0.Do(d,bodyb,w,lp,expb,rp,_)) ->
-              conjunct_many_bindings
-                [check_mcode d1 d; check_mcode w1 w; check_mcode lp1 lp;
-                  check_mcode rp1 rp; match_statement bodya bodyb;
-                  match_expr expa expb]
-         | (Ast0.For(f1,lp1,e1a,sc1a,e2a,sc2a,e3a,rp1,bodya,_),
-            Ast0.For(f,lp,e1b,sc1b,e2b,sc2b,e3b,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [check_mcode f1 f; check_mcode lp1 lp; check_mcode sc1a sc1b;
-                  check_mcode sc2a sc2b; check_mcode rp1 rp;
-                  match_option match_expr e1a e1b;
-                  match_option match_expr e2a e2b;
-                  match_option match_expr e3a e3b;
-                  match_statement bodya bodyb]
-         | (Ast0.Iterator(nma,lp1,argsa,rp1,bodya,_),
-            Ast0.Iterator(nmb,lp,argsb,rp,bodyb,_)) ->
-              conjunct_many_bindings
-                [match_ident nma nmb;
-                  check_mcode lp1 lp; check_mcode rp1 rp;
-                  match_dots match_expr is_elist_matcher do_elist_match
-                    argsa argsb;
-                  match_statement bodya bodyb]
-         | (Ast0.Switch(s1,lp1,expa,rp1,lb1,casesa,rb1),
-            Ast0.Switch(s,lp,expb,rp,lb,casesb,rb)) ->
-              conjunct_many_bindings
-                [check_mcode s1 s; check_mcode lp1 lp; check_mcode rp1 rp;
-                  check_mcode lb1 lb; check_mcode rb1 rb;
-                  match_expr expa expb;
-                  match_dots match_case_line no_list do_nolist_match
-                    casesa casesb]
-         | (Ast0.Break(b1,sc1),Ast0.Break(b,sc))
-         | (Ast0.Continue(b1,sc1),Ast0.Continue(b,sc)) ->
-             conjunct_bindings (check_mcode b1 b) (check_mcode sc1 sc)
-         | (Ast0.Label(l1,c1),Ast0.Label(l2,c)) ->
-             conjunct_bindings (match_ident l1 l2) (check_mcode c1 c)
-         | (Ast0.Goto(g1,l1,sc1),Ast0.Goto(g,l2,sc)) ->
-             conjunct_many_bindings
-               [check_mcode g1 g; check_mcode sc1 sc; match_ident l1 l2]
-         | (Ast0.Return(r1,sc1),Ast0.Return(r,sc)) ->
-             conjunct_bindings (check_mcode r1 r) (check_mcode sc1 sc)
-         | (Ast0.ReturnExpr(r1,expa,sc1),Ast0.ReturnExpr(r,expb,sc)) ->
-             conjunct_many_bindings
-               [check_mcode r1 r; check_mcode sc1 sc; match_expr expa expb]
-         | (Ast0.Disj(_,statement_dots_lista,_,_),_) ->
-             failwith "disj not supported in patterns"
-         | (Ast0.Nest(_,stmt_dotsa,_,_,_),_) ->
-             failwith "nest not supported in patterns"
-         | (Ast0.Exp(expa),Ast0.Exp(expb)) -> match_expr expa expb
-         | (Ast0.TopExp(expa),Ast0.TopExp(expb)) -> match_expr expa expb
-         | (Ast0.Exp(expa),Ast0.TopExp(expb)) -> match_expr expa expb
-         | (Ast0.TopInit(inita),Ast0.TopInit(initb)) -> match_init inita initb
-         | (Ast0.Ty(tya),Ast0.Ty(tyb)) -> match_typeC tya tyb
-         | (Ast0.Dots(d,[]),Ast0.Dots(d1,wc))
-         | (Ast0.Circles(d,[]),Ast0.Circles(d1,wc))
-         | (Ast0.Stars(d,[]),Ast0.Stars(d1,wc)) ->
-             (match wc with
-               [] -> check_mcode d d1
-             | _ ->
-                 let (_,_,dots_whencode_allowed) = whencode_allowed in
-                 if dots_whencode_allowed
-                 then
-                   conjunct_bindings (check_mcode d d1)
-                     (List.fold_left
-                        (function prev ->
-                          function
-                            | Ast0.WhenNot wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.DotsStmtTag wc))
-                            | Ast0.WhenAlways wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d (Ast0.StmtTag wc))
-                            | Ast0.WhenNotTrue wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.IsoWhenTTag wc))
-                            | Ast0.WhenNotFalse wc ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.IsoWhenFTag wc))
-                            | Ast0.WhenModifier(x) ->
-                                conjunct_bindings prev
-                                  (add_multi_dot_binding d
-                                     (Ast0.IsoWhenTag x)))
-                        (return true) wc)
-                 else
-                   (Printf.printf
-                      "warning: not applying iso because of whencode";
-                    return false))
-         | (Ast0.Dots(_,_::_),_) | (Ast0.Circles(_,_::_),_)
-         | (Ast0.Stars(_,_::_),_) ->
-             failwith "whencode not allowed in a pattern3"
-         | (Ast0.OptStm(rea),Ast0.OptStm(reb))
-         | (Ast0.UniqueStm(rea),Ast0.UniqueStm(reb)) ->
-             match_statement rea reb
-         | (_,Ast0.OptStm(reb))
-         | (_,Ast0.UniqueStm(reb)) -> match_statement pattern reb
-         |     _ -> return false
-       else return_false (ContextRequired (Ast0.StmtTag s))
-           
-  (* first should provide a subset of the information in the second *)
-  and match_fninfo patterninfo cinfo =
-    let patterninfo = List.sort compare patterninfo in
-    let cinfo = List.sort compare cinfo in
-    let rec loop = function
-       (Ast0.FStorage(sta)::resta,Ast0.FStorage(stb)::restb) ->
-         if mcode_equal sta stb
-         then conjunct_bindings (check_mcode sta stb) (loop (resta,restb))
-         else return false
-      |        (Ast0.FType(tya)::resta,Ast0.FType(tyb)::restb) ->
-         conjunct_bindings (match_typeC tya tyb) (loop (resta,restb))
-      |        (Ast0.FInline(ia)::resta,Ast0.FInline(ib)::restb) ->
-         if mcode_equal ia ib
-         then conjunct_bindings (check_mcode ia ib) (loop (resta,restb))
-         else return false
-      |        (Ast0.FAttr(ia)::resta,Ast0.FAttr(ib)::restb) ->
-         if mcode_equal ia ib
-         then conjunct_bindings (check_mcode ia ib) (loop (resta,restb))
-         else return false
-      |        (x::resta,((y::_) as restb)) ->
-         (match compare x y with
-           -1 -> return false
-         | 1 -> loop (resta,restb)
-         | _ -> failwith "not possible")
-      |        _ -> return false in
-    loop (patterninfo,cinfo)
-      
-  and match_case_line pattern c =
-    if not(checks_needed) or not(context_required) or is_context c
-    then
-      match (Ast0.unwrap pattern,Ast0.unwrap c) with
-       (Ast0.Default(d1,c1,codea),Ast0.Default(d,c,codeb)) ->
-         conjunct_many_bindings
-           [check_mcode d1 d; check_mcode c1 c;
-             match_dots match_statement is_slist_matcher do_slist_match
-               codea codeb]
-      | (Ast0.Case(ca1,expa,c1,codea),Ast0.Case(ca,expb,c,codeb)) ->
-         conjunct_many_bindings
-           [check_mcode ca1 ca; check_mcode c1 c; match_expr expa expb;
-             match_dots match_statement is_slist_matcher do_slist_match
-               codea codeb]
-      |        (Ast0.OptCase(ca),Ast0.OptCase(cb)) -> match_case_line ca cb
-      |        (_,Ast0.OptCase(cb)) -> match_case_line pattern cb
-      |        _ -> return false
-    else return_false (ContextRequired (Ast0.CaseLineTag c)) in
-  
-  let match_statement_dots x y =
-    match_dots match_statement is_slist_matcher do_slist_match x y in
-  
-  (match_expr, match_decl, match_statement, match_typeC,
-   match_statement_dots)
-    
-let match_expr dochecks context_required whencode_allowed =
-  let (fn,_,_,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_decl dochecks context_required whencode_allowed =
-  let (_,fn,_,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_statement dochecks context_required whencode_allowed =
-  let (_,_,fn,_,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_typeC dochecks context_required whencode_allowed =
-  let (_,_,_,fn,_) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-let match_statement_dots dochecks context_required whencode_allowed =
-  let (_,_,_,_,fn) = match_maker dochecks context_required whencode_allowed in
-  fn
-    
-(* --------------------------------------------------------------------- *)
-(* make an entire tree MINUS *)
-    
-let make_minus =
-  let mcode (term,arity,info,mcodekind,pos) =
-    let new_mcodekind =
-     match mcodekind with
-       Ast0.CONTEXT(mc) ->
-        (match !mc with
-          (Ast.NOTHING,_,_) -> Ast0.MINUS(ref([],Ast0.default_token_info))
-        | _ -> failwith "make_minus: unexpected befaft")
-     | Ast0.MINUS(mc) -> mcodekind (* in the part copied from the src term *)
-     | _ -> failwith "make_minus mcode: unexpected mcodekind" in
-    (term,arity,info,new_mcodekind,pos) in
-  
-  let update_mc mcodekind e =
-    match !mcodekind with
-      Ast0.CONTEXT(mc) ->
-       (match !mc with
-         (Ast.NOTHING,_,_) ->
-           mcodekind := Ast0.MINUS(ref([],Ast0.default_token_info))
-       | _ -> failwith "make_minus: unexpected befaft")
-    | Ast0.MINUS(_mc) -> () (* in the part copied from the src term *)
-    | Ast0.PLUS -> failwith "make_minus donothing: unexpected plus mcodekind"
-    | _ -> failwith "make_minus donothing: unexpected mcodekind" in
-  
-  let donothing r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    let e = k e in update_mc mcodekind e; e in
-  
-  (* special case for whencode, because it isn't processed by contextneg,
-     since it doesn't appear in the + code *)
-  (* cases for dots and nests *)
-  let expression r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Edots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Edots(mcode d,whencode))
-    | Ast0.Ecircles(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Ecircles(mcode d,whencode))
-    | Ast0.Estars(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Estars(mcode d,whencode))
-    | Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-       update_mc mcodekind e;
-       Ast0.rewrap e
-         (Ast0.NestExpr(mcode starter,
-                        r.V0.rebuilder_expression_dots expr_dots,
-                        mcode ender,whencode,multi))
-    | _ -> donothing r k e in
-  
-  let declaration r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Ddots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Ddots(mcode d,whencode))
-    | _ -> donothing r k e in
-  
-  let statement r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Dots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Dots(mcode d,whencode))
-    | Ast0.Circles(d,whencode) ->
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Circles(mcode d,whencode))
-    | Ast0.Stars(d,whencode) ->
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Stars(mcode d,whencode))
-    | Ast0.Nest(starter,stmt_dots,ender,whencode,multi) ->
-       update_mc mcodekind e;
-       Ast0.rewrap e
-         (Ast0.Nest(mcode starter,r.V0.rebuilder_statement_dots stmt_dots,
-                    mcode ender,whencode,multi))
-    | _ -> donothing r k e in
-  
-  let initialiser r k e =
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.Idots(d,whencode) ->
-       (*don't recurse because whencode hasn't been processed by context_neg*)
-       update_mc mcodekind e; Ast0.rewrap e (Ast0.Idots(mcode d,whencode))
-    | _ -> donothing r k e in
-  
-  let dots r k e =
-    let info = Ast0.get_info e in
-    let mcodekind = Ast0.get_mcodekind_ref e in
-    match Ast0.unwrap e with
-      Ast0.DOTS([]) ->
-       (* if context is - this should be - as well.  There are no tokens
-          here though, so the bottom-up minusifier in context_neg leaves it
-          as mixed (or context for sgrep2).  It would be better to fix
-          context_neg, but that would
-          require a special case for each term with a dots subterm. *)
-       (match !mcodekind with
-         Ast0.MIXED(mc) | Ast0.CONTEXT(mc) ->
-           (match !mc with
-             (Ast.NOTHING,_,_) ->
-               mcodekind := Ast0.MINUS(ref([],Ast0.default_token_info));
-               e
-           | _ -> failwith "make_minus: unexpected befaft")
-         (* code already processed by an enclosing iso *)
-       | Ast0.MINUS(mc) -> e
-       | _ ->
-           failwith
-             (Printf.sprintf
-                "%d: make_minus donothingxxx: unexpected mcodekind: %s"
-                info.Ast0.line_start (Dumper.dump e)))
-    | _ -> donothing r k e in
-  
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    dots dots dots dots dots dots
-    donothing expression donothing initialiser donothing declaration
-    statement donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-(* rebuild mcode cells in an instantiated alt *)
-    
-(* mcodes will be side effected later with plus code, so we have to copy
-   them on instantiating an isomorphism.  One could wonder whether it would
-   be better not to use side-effects, but they are convenient for insert_plus
-   where is it useful to manipulate a list of the mcodes but side-effect a
-   tree *)
-(* hmm... Insert_plus is called before Iso_pattern... *)
-let rebuild_mcode start_line =
-  let copy_mcodekind = function
-      Ast0.CONTEXT(mc) -> Ast0.CONTEXT(ref (!mc))
-    | Ast0.MINUS(mc) -> Ast0.MINUS(ref (!mc))
-    | Ast0.MIXED(mc) -> Ast0.MIXED(ref (!mc))
-    | Ast0.PLUS ->
-       (* this function is used elsewhere where we need to rebuild the
-          indices, and so we allow PLUS code as well *)
-        Ast0.PLUS in
-  
-  let mcode (term,arity,info,mcodekind,pos) =
-    let info =
-      match start_line with
-       Some x -> {info with Ast0.line_start = x; Ast0.line_end = x}
-      |        None -> info in
-    (term,arity,info,copy_mcodekind mcodekind,pos) in
-  
-  let copy_one x =
-    let old_info = Ast0.get_info x in
-    let info =
-      match start_line with
-       Some x -> {old_info with Ast0.line_start = x; Ast0.line_end = x}
-      |        None -> old_info in
-    {x with Ast0.info = info; Ast0.index = ref(Ast0.get_index x);
-      Ast0.mcodekind = ref (copy_mcodekind (Ast0.get_mcodekind x))} in
-  
-  let donothing r k e = copy_one (k e) in
-  
-  (* case for control operators (if, etc) *)
-  let statement r k e =
-    let s = k e in
-    let res =
-      copy_one
-       (Ast0.rewrap s
-          (match Ast0.unwrap s with
-            Ast0.Decl((info,mc),decl) ->
-              Ast0.Decl((info,copy_mcodekind mc),decl)
-          | Ast0.IfThen(iff,lp,tst,rp,branch,(info,mc)) ->
-              Ast0.IfThen(iff,lp,tst,rp,branch,(info,copy_mcodekind mc))
-          | Ast0.IfThenElse(iff,lp,tst,rp,branch1,els,branch2,(info,mc)) ->
-              Ast0.IfThenElse(iff,lp,tst,rp,branch1,els,branch2,
-                (info,copy_mcodekind mc))
-          | Ast0.While(whl,lp,exp,rp,body,(info,mc)) ->
-              Ast0.While(whl,lp,exp,rp,body,(info,copy_mcodekind mc))
-          | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,(info,mc)) ->
-              Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,
-                       (info,copy_mcodekind mc))
-          | Ast0.Iterator(nm,lp,args,rp,body,(info,mc)) ->
-              Ast0.Iterator(nm,lp,args,rp,body,(info,copy_mcodekind mc))
-          | Ast0.FunDecl
-              ((info,mc),fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-                Ast0.FunDecl
-                  ((info,copy_mcodekind mc),
-                   fninfo,name,lp,params,rp,lbrace,body,rbrace)
-          | s -> s)) in
-    Ast0.set_dots_bef_aft res
-      (match Ast0.get_dots_bef_aft res with
-       Ast0.NoDots -> Ast0.NoDots
-      | Ast0.AddingBetweenDots s ->
-         Ast0.AddingBetweenDots(r.V0.rebuilder_statement s)
-      | Ast0.DroppingBetweenDots s ->
-         Ast0.DroppingBetweenDots(r.V0.rebuilder_statement s)) in
-  
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing
-    donothing statement donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-(* The problem of whencode.  If an isomorphism contains dots in multiple
-   rules, then the code that is matched cannot contain whencode, because we
-   won't know which dots it goes with. Should worry about nests, but they
-   aren't allowed in isomorphisms for the moment. *)
-    
-let count_edots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let exprfn r k e =
-    match Ast0.unwrap e with
-      Ast0.Edots(_,_) | Ast0.Ecircles(_,_) | Ast0.Estars(_,_) -> 1
-    | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing exprfn donothing donothing donothing donothing donothing
-    donothing donothing
-    
-let count_idots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let initfn r k e =
-    match Ast0.unwrap e with Ast0.Idots(_,_) -> 1 | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing initfn donothing donothing donothing
-    donothing donothing
-    
-let count_dots =
-  let mcode x = 0 in
-  let option_default = 0 in
-  let bind x y = x + y in
-  let donothing r k e = k e in
-  let stmtfn r k e =
-    match Ast0.unwrap e with
-      Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) -> 1
-    | _ -> 0 in
-  
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing stmtfn
-    donothing donothing
-    
-(* --------------------------------------------------------------------- *)
-    
-let lookup name bindings mv_bindings =
-  try Common.Left (List.assoc (term name) bindings)
-  with
-    Not_found ->
-      (* failure is not possible anymore *)
-      Common.Right (List.assoc (term name) mv_bindings)
-
-(* mv_bindings is for the fresh metavariables that are introduced by the
-isomorphism *)
-let instantiate bindings mv_bindings =
-  let mcode x =
-    match Ast0.get_pos x with
-      Ast0.MetaPos(name,_,_) ->
-       (try
-         match lookup name bindings mv_bindings with
-           Common.Left(Ast0.MetaPosTag(id)) -> Ast0.set_pos id x
-         | _ -> failwith "not possible"
-       with Not_found -> Ast0.set_pos Ast0.NoMetaPos x)
-    | _ -> x in
-  let donothing r k e = k e in
-
-  (* cases where metavariables can occur *)
-  let identfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaId(name,constraints,pure) ->
-       (rebuild_mcode None).V0.rebuilder_ident
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.IdentTag(id)) -> id
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaId
-                  (Ast0.set_mcode_data new_mv name,constraints,pure)))
-    | Ast0.MetaFunc(name,_,pure) -> failwith "metafunc not supported"
-    | Ast0.MetaLocalFunc(name,_,pure) -> failwith "metalocalfunc not supported"
-    | _ -> e in
-
-  (* case for list metavariables *)
-  let rec elist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaExprList(name,lenname,pure) ->
-           failwith "meta_expr_list in iso not supported"
-           (*match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsExprTag(exp)) ->
-               (match same_dots exp with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.ExprTag(exp)) -> [exp]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported"*)
-       | _ -> [r.V0.rebuilder_expression x])
-    | x::xs -> (r.V0.rebuilder_expression x)::(elist r same_dots xs) in
-
-  let rec plist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaParamList(name,lenname,pure) ->
-           failwith "meta_param_list in iso not supported"
-           (*match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsParamTag(param)) ->
-               (match same_dots param with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.ParamTag(param)) -> [param]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported"*)
-       | _ -> [r.V0.rebuilder_parameter x])
-    | x::xs -> (r.V0.rebuilder_parameter x)::(plist r same_dots xs) in
-
-  let rec slist r same_dots = function
-      [] -> []
-    | [x] ->
-       (match Ast0.unwrap x with
-         Ast0.MetaStmtList(name,pure) ->
-           (match lookup name bindings mv_bindings with
-             Common.Left(Ast0.DotsStmtTag(stm)) ->
-               (match same_dots stm with
-                 Some l -> l
-               | None -> failwith "dots put in incompatible context")
-           | Common.Left(Ast0.StmtTag(stm)) -> [stm]
-           | Common.Left(_) -> failwith "not possible 1"
-           | Common.Right(new_mv) ->
-               failwith "MetaExprList in SP not supported")
-       | _ -> [r.V0.rebuilder_statement x])
-    | x::xs -> (r.V0.rebuilder_statement x)::(slist r same_dots xs) in
-
-  let same_dots d =
-    match Ast0.unwrap d with Ast0.DOTS(l) -> Some l |_ -> None in
-  let same_circles d =
-    match Ast0.unwrap d with Ast0.CIRCLES(l) -> Some l |_ -> None in
-  let same_stars d =
-    match Ast0.unwrap d with Ast0.STARS(l) -> Some l |_ -> None in
-
-  let dots list_fn r k d =
-    Ast0.rewrap d
-      (match Ast0.unwrap d with
-       Ast0.DOTS(l) -> Ast0.DOTS(list_fn r same_dots l)
-      | Ast0.CIRCLES(l) -> Ast0.CIRCLES(list_fn r same_circles l)
-      | Ast0.STARS(l) -> Ast0.STARS(list_fn r same_stars l)) in
-
-  let exprfn r k old_e = (* need to keep the original code for ! optim *)
-    let e = k old_e in
-    let e1 =
-    match Ast0.unwrap e with
-      Ast0.MetaExpr(name,constraints,x,form,pure) ->
-       (rebuild_mcode None).V0.rebuilder_expression
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.ExprTag(exp)) -> exp
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             let new_types =
-               match x with
-                 None -> None
-               | Some types ->
-                   let rec renamer = function
-                       Type_cocci.MetaType(name,keep,inherited) ->
-                         (match
-                           lookup (name,(),(),(),None) bindings mv_bindings
-                         with
-                           Common.Left(Ast0.TypeCTag(t)) ->
-                             Ast0.ast0_type_to_type t
-                         | Common.Left(_) ->
-                             failwith "iso pattern: unexpected type"
-                         | Common.Right(new_mv) ->
-                             Type_cocci.MetaType(new_mv,keep,inherited))
-                     | Type_cocci.ConstVol(cv,ty) ->
-                         Type_cocci.ConstVol(cv,renamer ty)
-                     | Type_cocci.Pointer(ty) ->
-                         Type_cocci.Pointer(renamer ty)
-                     | Type_cocci.FunctionPointer(ty) ->
-                         Type_cocci.FunctionPointer(renamer ty)
-                     | Type_cocci.Array(ty) ->
-                         Type_cocci.Array(renamer ty)
-                     | t -> t in
-                   Some(List.map renamer types) in
-             Ast0.rewrap e
-               (Ast0.MetaExpr
-                  (Ast0.set_mcode_data new_mv name,constraints,
-                   new_types,form,pure)))
-    | Ast0.MetaErr(namea,_,pure) -> failwith "metaerr not supported"
-    | Ast0.MetaExprList(namea,lenname,pure) ->
-       failwith "metaexprlist not supported"
-    | Ast0.Unary(exp,unop) ->
-       (match Ast0.unwrap_mcode unop with
-         Ast.Not ->
-           let was_meta =
-             (* k e doesn't change the outer structure of the term,
-                only the metavars *)
-             match Ast0.unwrap old_e with
-               Ast0.Unary(exp,_) ->
-                 (match Ast0.unwrap exp with
-                   Ast0.MetaExpr(name,constraints,x,form,pure) -> true
-                 | _ -> false)
-             | _ -> failwith "not possible" in
-           let nomodif e =
-             let mc = Ast0.get_mcodekind exp in
-             match mc with
-               Ast0.MINUS(x) ->
-                 (match !x with
-                   ([],_) -> true
-                 | _ -> false)
-             | Ast0.CONTEXT(x) | Ast0.MIXED(x) ->
-                 (match !x with
-                   (Ast.NOTHING,_,_) -> true
-                 | _ -> false)
-             | _ -> failwith "plus not possible" in
-           if was_meta && nomodif exp && nomodif e
-           then
-             let rec negate e (*for rewrapping*) res (*code to process*) =
-               match Ast0.unwrap res with
-                 Ast0.Unary(e1,op) when Ast0.unwrap_mcode op = Ast.Not ->
-                   Ast0.rewrap e (Ast0.unwrap e1)
-               | Ast0.Edots(_,_) -> Ast0.rewrap e (Ast0.unwrap res)
-               | Ast0.Paren(lp,e,rp) ->
-                   Ast0.rewrap res (Ast0.Paren(lp,negate e e,rp))
-               | Ast0.Binary(e1,op,e2) ->
-                   let reb nop = Ast0.rewrap_mcode op (Ast.Logical(nop)) in
-                   let invop =
-                     match Ast0.unwrap_mcode op with
-                       Ast.Logical(Ast.Inf) ->
-                         Ast0.Binary(e1,reb Ast.SupEq,e2)
-                     | Ast.Logical(Ast.Sup) ->
-                         Ast0.Binary(e1,reb Ast.InfEq,e2)
-                     | Ast.Logical(Ast.InfEq) ->
-                         Ast0.Binary(e1,reb Ast.Sup,e2)
-                     | Ast.Logical(Ast.SupEq) ->
-                         Ast0.Binary(e1,reb Ast.Inf,e2)
-                     | Ast.Logical(Ast.Eq) ->
-                         Ast0.Binary(e1,reb Ast.NotEq,e2)
-                     | Ast.Logical(Ast.NotEq) ->
-                         Ast0.Binary(e1,reb Ast.Eq,e2)
-                     | Ast.Logical(Ast.AndLog) ->
-                         Ast0.Binary(negate e1 e1,reb Ast.OrLog,
-                                     negate e2 e2)
-                     | Ast.Logical(Ast.OrLog) ->
-                         Ast0.Binary(negate e1 e1,reb Ast.AndLog,
-                                     negate e2 e2)
-                     | _ -> Ast0.Unary(res,Ast0.rewrap_mcode op Ast.Not) in
-                   Ast0.rewrap e invop
-               | Ast0.DisjExpr(lp,exps,mids,rp) ->
-                     (* use res because it is the transformed argument *)
-                   let exps = List.map (function e -> negate e e) exps in
-                   Ast0.rewrap res (Ast0.DisjExpr(lp,exps,mids,rp))
-               | _ ->
-                     (*use e, because this might be the toplevel expression*)
-                   Ast0.rewrap e
-                     (Ast0.Unary(res,Ast0.rewrap_mcode unop Ast.Not)) in
-             negate e exp
-           else e
-       | _ -> e)
-    | Ast0.Edots(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Edots(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | Ast0.Ecircles(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Ecircles(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | Ast0.Estars(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.ExprTag(exp) -> Ast0.rewrap e (Ast0.Estars(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | _ -> e in
-    if Ast0.get_test_exp old_e then Ast0.set_test_exp e1 else e1 in
-
-  let tyfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaType(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_typeC
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.TypeCTag(ty)) -> ty
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaType(Ast0.set_mcode_data new_mv name,pure)))
-    | _ -> e in
-
-  let declfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.Ddots(d,_) ->
-       (try
-         (match List.assoc (dot_term d) bindings with
-           Ast0.DeclTag(exp) -> Ast0.rewrap e (Ast0.Ddots(d,Some exp))
-         | _ -> failwith "unexpected binding")
-       with Not_found -> e)
-    | _ -> e in
-
-  let paramfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.MetaParam(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_parameter
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.ParamTag(param)) -> param
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaParam(Ast0.set_mcode_data new_mv name, pure)))
-    | Ast0.MetaParamList(name,lenname,pure) ->
-       failwith "metaparamlist not supported"
-    | _ -> e in
-
-  let whenfn (_,v) =
-    match v with
-      Ast0.DotsStmtTag(stms) -> Ast0.WhenNot stms
-    | Ast0.StmtTag(stm) -> Ast0.WhenAlways stm
-    | Ast0.IsoWhenTTag(stm) -> Ast0.WhenNotTrue stm
-    | Ast0.IsoWhenFTag(stm) -> Ast0.WhenNotFalse stm
-    | Ast0.IsoWhenTag(x) -> Ast0.WhenModifier(x)
-    | _ -> failwith "unexpected binding" in
-
-  let stmtfn r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-    Ast0.MetaStmt(name,pure) ->
-       (rebuild_mcode None).V0.rebuilder_statement
-         (match lookup name bindings mv_bindings with
-           Common.Left(Ast0.StmtTag(stm)) -> stm
-         | Common.Left(_) -> failwith "not possible 1"
-         | Common.Right(new_mv) ->
-             Ast0.rewrap e
-               (Ast0.MetaStmt(Ast0.set_mcode_data new_mv name,pure)))
-    | Ast0.MetaStmtList(name,pure) -> failwith "metastmtlist not supported"
-    | Ast0.Dots(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Dots
-            (d,
-             List.map whenfn
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | Ast0.Circles(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Circles
-            (d,
-             List.map whenfn
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | Ast0.Stars(d,_) ->
-       Ast0.rewrap e
-         (Ast0.Stars
-            (d,
-             List.map whenfn
-               (List.filter (function (x,v) -> x = (dot_term d)) bindings)))
-    | _ -> e in
-
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    (dots elist) donothing (dots plist) (dots slist) donothing donothing
-    identfn exprfn tyfn donothing paramfn declfn stmtfn donothing donothing
-
-(* --------------------------------------------------------------------- *)
-
-let is_minus e =
-  match Ast0.get_mcodekind e with Ast0.MINUS(cell) -> true | _ -> false
-
-let context_required e = not(is_minus e) && not !Flag.sgrep_mode2
-
-let disj_fail bindings e =
-  match bindings with
-    Some x -> Printf.fprintf stderr "no disj available at this type"; e
-  | None -> e
-
-(* isomorphism code is by default CONTEXT *)
-let merge_plus model_mcode e_mcode =
-  match model_mcode with
-    Ast0.MINUS(mc) ->
-      (* add the replacement information at the root *)
-      (match e_mcode with
-       Ast0.MINUS(emc) ->
-         emc :=
-           (match (!mc,!emc) with
-             (([],_),(x,t)) | ((x,_),([],t)) -> (x,t)
-           | _ -> failwith "how can we combine minuses?")
-      |        _ -> failwith "not possible 6")
-  | Ast0.CONTEXT(mc) ->
-      (match e_mcode with
-       Ast0.CONTEXT(emc) ->
-         (* keep the logical line info as in the model *)
-         let (mba,tb,ta) = !mc in
-         let (eba,_,_) = !emc in
-         (* merging may be required when a term is replaced by a subterm *)
-         let merged =
-           match (mba,eba) with
-             (x,Ast.NOTHING) | (Ast.NOTHING,x) -> x
-           | (Ast.BEFORE(b1),Ast.BEFORE(b2)) -> Ast.BEFORE(b1@b2)
-           | (Ast.BEFORE(b),Ast.AFTER(a)) -> Ast.BEFOREAFTER(b,a)
-           | (Ast.BEFORE(b1),Ast.BEFOREAFTER(b2,a)) ->
-               Ast.BEFOREAFTER(b1@b2,a)
-           | (Ast.AFTER(a),Ast.BEFORE(b)) -> Ast.BEFOREAFTER(b,a)
-           | (Ast.AFTER(a1),Ast.AFTER(a2)) ->Ast.AFTER(a2@a1)
-           | (Ast.AFTER(a1),Ast.BEFOREAFTER(b,a2)) -> Ast.BEFOREAFTER(b,a2@a1)
-           | (Ast.BEFOREAFTER(b1,a),Ast.BEFORE(b2)) ->
-               Ast.BEFOREAFTER(b1@b2,a)
-           | (Ast.BEFOREAFTER(b,a1),Ast.AFTER(a2)) ->
-               Ast.BEFOREAFTER(b,a2@a1)
-           | (Ast.BEFOREAFTER(b1,a1),Ast.BEFOREAFTER(b2,a2)) ->
-                Ast.BEFOREAFTER(b1@b2,a2@a1) in
-         emc := (merged,tb,ta)
-      |        Ast0.MINUS(emc) ->
-         let (anything_bef_aft,_,_) = !mc in
-         let (anythings,t) = !emc in
-         emc :=
-           (match anything_bef_aft with
-             Ast.BEFORE(b) -> (b@anythings,t)
-           | Ast.AFTER(a) -> (anythings@a,t)
-           | Ast.BEFOREAFTER(b,a) -> (b@anythings@a,t)
-           | Ast.NOTHING -> (anythings,t))
-      |        _ -> failwith "not possible 7")
-  | Ast0.MIXED(_) -> failwith "not possible 8"
-  | Ast0.PLUS -> failwith "not possible 9"
-
-let copy_plus printer minusify model e =
-  if !Flag.sgrep_mode2
-  then e (* no plus code, can cause a "not possible" error, so just avoid it *)
-  else
-    let e =
-      match Ast0.get_mcodekind model with
-       Ast0.MINUS(mc) -> minusify e
-      | Ast0.CONTEXT(mc) -> e
-      | _ -> failwith "not possible: copy_plus\n" in
-    merge_plus (Ast0.get_mcodekind model) (Ast0.get_mcodekind e);
-    e
-
-let copy_minus printer minusify model e =
-  match Ast0.get_mcodekind model with
-    Ast0.MINUS(mc) -> minusify e
-  | Ast0.CONTEXT(mc) -> e
-  | Ast0.MIXED(_) ->
-      if !Flag.sgrep_mode2
-      then e
-      else failwith "not possible 8"
-  | Ast0.PLUS -> failwith "not possible 9"
-
-let whencode_allowed prev_ecount prev_icount prev_dcount
-    ecount icount dcount rest =
-  (* actually, if ecount or dcount is 0, the flag doesn't matter, because it
-     won't be tested *)
-  let other_ecount = (* number of edots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> ec + rest)
-      prev_ecount rest in
-  let other_icount = (* number of dots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> ic + rest)
-      prev_icount rest in
-  let other_dcount = (* number of dots *)
-    List.fold_left (function rest -> function (_,ec,ic,dc) -> dc + rest)
-      prev_dcount rest in
-  (ecount = 0 or other_ecount = 0, icount = 0 or other_icount = 0,
-   dcount = 0 or other_dcount = 0)
-
-(* copy the befores and afters to the instantiated code *)
-let extra_copy_stmt_plus model e =
-  (if not !Flag.sgrep_mode2 (* sgrep has no plus code, so nothing to do *)
-  then
-    (match Ast0.unwrap model with
-      Ast0.FunDecl((info,bef),_,_,_,_,_,_,_,_)
-    | Ast0.Decl((info,bef),_) ->
-       (match Ast0.unwrap e with
-         Ast0.FunDecl((info,bef1),_,_,_,_,_,_,_,_)
-       | Ast0.Decl((info,bef1),_) ->
-           merge_plus bef bef1
-       | _ ->  merge_plus bef (Ast0.get_mcodekind e))
-    | Ast0.IfThen(_,_,_,_,_,(info,aft))
-    | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft))
-    | Ast0.While(_,_,_,_,_,(info,aft))
-    | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft))
-    | Ast0.Iterator(_,_,_,_,_,(info,aft)) ->
-       (match Ast0.unwrap e with
-         Ast0.IfThen(_,_,_,_,_,(info,aft1))
-       | Ast0.IfThenElse(_,_,_,_,_,_,_,(info,aft1))
-       | Ast0.While(_,_,_,_,_,(info,aft1))
-       | Ast0.For(_,_,_,_,_,_,_,_,_,(info,aft1))
-       | Ast0.Iterator(_,_,_,_,_,(info,aft1)) ->
-           merge_plus aft aft1
-       | _ -> merge_plus aft (Ast0.get_mcodekind e))
-    | _ -> ()));
-  e
-
-let extra_copy_other_plus model e = e
-
-(* --------------------------------------------------------------------- *)
-
-let mv_count = ref 0
-let new_mv (_,s) =
-  let ct = !mv_count in
-  mv_count := !mv_count + 1;
-  "_"^s^"_"^(string_of_int ct)
-
-let get_name = function
-    Ast.MetaIdDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaIdDecl(ar,nm))
-  | Ast.MetaFreshIdDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaFreshIdDecl(ar,nm))
-  | Ast.MetaTypeDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaTypeDecl(ar,nm))
-  | Ast.MetaListlenDecl(nm) ->
-      failwith "should not be rebuilt"
-  | Ast.MetaParamDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaParamDecl(ar,nm))
-  | Ast.MetaParamListDecl(ar,nm,nm1) ->
-      (nm,function nm -> Ast.MetaParamListDecl(ar,nm,nm1))
-  | Ast.MetaConstDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaConstDecl(ar,nm,ty))
-  | Ast.MetaErrDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaErrDecl(ar,nm))
-  | Ast.MetaExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaExpDecl(ar,nm,ty))
-  | Ast.MetaIdExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaIdExpDecl(ar,nm,ty))
-  | Ast.MetaLocalIdExpDecl(ar,nm,ty) ->
-      (nm,function nm -> Ast.MetaLocalIdExpDecl(ar,nm,ty))
-  | Ast.MetaExpListDecl(ar,nm,nm1) ->
-      (nm,function nm -> Ast.MetaExpListDecl(ar,nm,nm1))
-  | Ast.MetaStmDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaStmDecl(ar,nm))
-  | Ast.MetaStmListDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaStmListDecl(ar,nm))
-  | Ast.MetaFuncDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaFuncDecl(ar,nm))
-  | Ast.MetaLocalFuncDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaLocalFuncDecl(ar,nm))
-  | Ast.MetaPosDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaPosDecl(ar,nm))
-  | Ast.MetaDeclarerDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaDeclarerDecl(ar,nm))
-  | Ast.MetaIteratorDecl(ar,nm) ->
-      (nm,function nm -> Ast.MetaIteratorDecl(ar,nm))
-
-let make_new_metavars metavars bindings =
-  let new_metavars =
-    List.filter
-      (function mv ->
-       let (s,_) = get_name mv in
-       try let _ = List.assoc s bindings in false with Not_found -> true)
-      metavars in
-  List.split
-    (List.map
-       (function mv ->
-        let (s,rebuild) = get_name mv in
-        let new_s = (!current_rule,new_mv s) in
-        (rebuild new_s, (s,new_s)))
-       new_metavars)
-
-(* --------------------------------------------------------------------- *)
-
-let do_nothing x = x
-
-let mkdisj matcher metavars alts e instantiater mkiso disj_maker minusify
-    rebuild_mcodes name printer extra_plus update_others =
-  let call_instantiate bindings mv_bindings alts =
-    List.concat
-      (List.map
-        (function (a,_,_,_) ->
-          nub
-          (* no need to create duplicates when the bindings have no effect *)
-            (List.map
-               (function bindings ->
-                 Ast0.set_iso
-                   (copy_plus printer minusify e
-                      (extra_plus e
-                         (instantiater bindings mv_bindings
-                            (rebuild_mcodes a))))
-                   (Common.union_set [(name,mkiso a)] (Ast0.get_iso e)))
-               bindings))
-        alts) in
-  let rec inner_loop all_alts prev_ecount prev_icount prev_dcount = function
-      [] -> Common.Left (prev_ecount, prev_icount, prev_dcount)
-    | ((pattern,ecount,icount,dcount)::rest) ->
-       let wc =
-         whencode_allowed prev_ecount prev_icount prev_dcount
-           ecount dcount icount rest in
-       (match matcher true (context_required e) wc pattern e init_env with
-         Fail(reason) ->
-           if reason = NonMatch || not !Flag_parsing_cocci.show_iso_failures
-           then ()
-           else
-             (match matcher false false wc pattern e init_env with
-               OK _ ->
-                 interpret_reason name (Ast0.get_line e) reason
-                   (function () -> printer e)
-             | _ -> ());
-           inner_loop all_alts (prev_ecount + ecount) (prev_icount + icount)
-             (prev_dcount + dcount) rest
-       | OK (bindings : (((string * string) * 'a) list list)) ->
-           let all_alts =
-             (* apply update_others to all patterns other than the matched
-                one.  This is used to desigate the others as test
-                expressions in the TestExpression case *)
-             (List.map
-                (function (x,e,i,d) as all ->
-                  if x = pattern
-                  then all
-                  else (update_others x,e,i,d))
-                (List.hd all_alts)) ::
-             (List.map
-                (List.map (function (x,e,i,d) -> (update_others x,e,i,d)))
-                (List.tl all_alts)) in
-           (match List.concat all_alts with
-             [x] -> Common.Left (prev_ecount, prev_icount, prev_dcount)
-           | all_alts ->
-               let (new_metavars,mv_bindings) =
-                 make_new_metavars metavars (nub(List.concat bindings)) in
-               Common.Right
-                 (new_metavars,
-                  call_instantiate bindings mv_bindings all_alts))) in
-  let rec outer_loop prev_ecount prev_icount prev_dcount = function
-      [] | [[_]] (*only one alternative*)  -> ([],e) (* nothing matched *)
-    | (alts::rest) as all_alts ->
-       match inner_loop all_alts prev_ecount prev_icount prev_dcount alts with
-         Common.Left(prev_ecount, prev_icount, prev_dcount) ->
-           outer_loop prev_ecount prev_icount prev_dcount rest
-       | Common.Right (new_metavars,res) ->
-           (new_metavars,
-            copy_minus printer minusify e (disj_maker res)) in
-  outer_loop 0 0 0 alts
-
-(* no one should ever look at the information stored in these mcodes *)
-let disj_starter lst =
-  let old_info = Ast0.get_info(List.hd lst) in
-  let info =
-    { old_info with
-      Ast0.line_end = old_info.Ast0.line_start;
-      Ast0.logical_end = old_info.Ast0.logical_start;
-      Ast0.attachable_start = false; Ast0.attachable_end = false;
-      Ast0.mcode_start = []; Ast0.mcode_end = [];
-      Ast0.strings_before = []; Ast0.strings_after = [] } in
-  Ast0.make_mcode_info "(" info
-
-let disj_ender lst =
-  let old_info = Ast0.get_info(List.hd lst) in
-  let info =
-    { old_info with
-      Ast0.line_start = old_info.Ast0.line_end;
-      Ast0.logical_start = old_info.Ast0.logical_end;
-      Ast0.attachable_start = false; Ast0.attachable_end = false;
-      Ast0.mcode_start = []; Ast0.mcode_end = [];
-      Ast0.strings_before = []; Ast0.strings_after = [] } in
-  Ast0.make_mcode_info ")" info
-
-let disj_mid _ = Ast0.make_mcode "|"
-
-let make_disj_type tl =
-  let mids =
-    match tl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.DisjType(disj_starter tl,tl,mids,disj_ender tl))
-let make_disj_stmt_list tl =
-  let mids =
-    match tl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.Disj(disj_starter tl,tl,mids,disj_ender tl))
-let make_disj_expr model el =
-  let mids =
-    match el with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  let update_arg x =
-    if Ast0.get_arg_exp model then Ast0.set_arg_exp x else x in
-  let update_test x =
-    let x = if Ast0.get_test_pos model then Ast0.set_test_pos x else x in
-    if Ast0.get_test_exp model then Ast0.set_test_exp x else x in
-  let el = List.map update_arg (List.map update_test el) in
-  Ast0.context_wrap (Ast0.DisjExpr(disj_starter el,el,mids,disj_ender el))
-let make_disj_decl dl =
-  let mids =
-    match dl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap (Ast0.DisjDecl(disj_starter dl,dl,mids,disj_ender dl))
-let make_disj_stmt sl =
-  let dotify x = Ast0.context_wrap (Ast0.DOTS[x]) in
-  let mids =
-    match sl with
-      [] -> failwith "bad disjunction"
-    | x::xs -> List.map disj_mid xs in
-  Ast0.context_wrap
-    (Ast0.Disj(disj_starter sl,List.map dotify sl,mids,disj_ender sl))
-
-let transform_type (metavars,alts,name) e =
-  match alts with
-    (Ast0.TypeCTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.TypeCTag(p) ->
-                  (p,count_edots.V0.combiner_typeC p,
-                   count_idots.V0.combiner_typeC p,
-                   count_dots.V0.combiner_typeC p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_typeC metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_typeC)
-       (function t -> Ast0.TypeCTag t)
-       make_disj_type make_minus.V0.rebuilder_typeC
-       (rebuild_mcode start_line).V0.rebuilder_typeC
-       name Unparse_ast0.typeC extra_copy_other_plus do_nothing
-  | _ -> ([],e)
-
-
-let transform_expr (metavars,alts,name) e =
-  let process update_others =
-      (* start line is given to any leaves in the iso code *)
-    let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-    let alts =
-      List.map
-       (List.map
-          (function
-              Ast0.ExprTag(p) | Ast0.ArgExprTag(p) | Ast0.TestExprTag(p) ->
-                (p,count_edots.V0.combiner_expression p,
-                 count_idots.V0.combiner_expression p,
-                 count_dots.V0.combiner_expression p)
-            | _ -> failwith "invalid alt"))
-       alts in
-    mkdisj match_expr metavars alts e
-      (function b -> function mv_b ->
-       (instantiate b mv_b).V0.rebuilder_expression)
-      (function e -> Ast0.ExprTag e)
-      (make_disj_expr e)
-      make_minus.V0.rebuilder_expression
-      (rebuild_mcode start_line).V0.rebuilder_expression
-      name Unparse_ast0.expression extra_copy_other_plus update_others in
-  match alts with
-    (Ast0.ExprTag(_)::_)::_ -> process do_nothing
-  | (Ast0.ArgExprTag(_)::_)::_ when Ast0.get_arg_exp e -> process do_nothing
-  | (Ast0.TestExprTag(_)::_)::_ when Ast0.get_test_pos e ->
-      process Ast0.set_test_exp
-  | _ -> ([],e)
-
-let transform_decl (metavars,alts,name) e =
-  match alts with
-    (Ast0.DeclTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some (Ast0.get_info e).Ast0.line_start in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.DeclTag(p) ->
-                  (p,count_edots.V0.combiner_declaration p,
-                   count_idots.V0.combiner_declaration p,
-                   count_dots.V0.combiner_declaration p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_decl metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_declaration)
-       (function d -> Ast0.DeclTag d)
-       make_disj_decl
-       make_minus.V0.rebuilder_declaration
-       (rebuild_mcode start_line).V0.rebuilder_declaration
-       name Unparse_ast0.declaration extra_copy_other_plus do_nothing
-  | _ -> ([],e)
-
-let transform_stmt (metavars,alts,name) e =
-  match alts with
-    (Ast0.StmtTag(_)::_)::_ ->
-      (* start line is given to any leaves in the iso code *)
-      let start_line = Some (Ast0.get_info e).Ast0.line_start in
-      let alts =
-       List.map
-         (List.map
-            (function
-                Ast0.StmtTag(p) ->
-                  (p,count_edots.V0.combiner_statement p,
-                   count_idots.V0.combiner_statement p,
-                   count_dots.V0.combiner_statement p)
-              | _ -> failwith "invalid alt"))
-         alts in
-      mkdisj match_statement metavars alts e
-       (function b -> function mv_b ->
-         (instantiate b mv_b).V0.rebuilder_statement)
-       (function s -> Ast0.StmtTag s)
-       make_disj_stmt make_minus.V0.rebuilder_statement
-       (rebuild_mcode start_line).V0.rebuilder_statement
-       name (Unparse_ast0.statement "") extra_copy_stmt_plus do_nothing
-  | _ -> ([],e)
-
-(* sort of a hack, because there is no disj at top level *)
-let transform_top (metavars,alts,name) e =
-  match Ast0.unwrap e with
-    Ast0.DECL(declstm) ->
-      (try
-       let strip alts =
-         List.map
-           (List.map
-              (function
-                  Ast0.DotsStmtTag(d) ->
-                    (match Ast0.unwrap d with
-                      Ast0.DOTS([s]) -> Ast0.StmtTag(s)
-                    | _ -> raise (Failure ""))
-                | _ -> raise (Failure "")))
-           alts in
-       let (mv,s) = transform_stmt (metavars,strip alts,name) declstm in
-       (mv,Ast0.rewrap e (Ast0.DECL(s)))
-      with Failure _ -> ([],e))
-  | Ast0.CODE(stmts) ->
-      let (mv,res) =
-       match alts with
-         (Ast0.DotsStmtTag(_)::_)::_ ->
-              (* start line is given to any leaves in the iso code *)
-           let start_line = Some ((Ast0.get_info e).Ast0.line_start) in
-           let alts =
-             List.map
-               (List.map
-                  (function
-                      Ast0.DotsStmtTag(p) ->
-                        (p,count_edots.V0.combiner_statement_dots p,
-                         count_idots.V0.combiner_statement_dots p,
-                         count_dots.V0.combiner_statement_dots p)
-                    | _ -> failwith "invalid alt"))
-               alts in
-           mkdisj match_statement_dots metavars alts stmts
-             (function b -> function mv_b ->
-               (instantiate b mv_b).V0.rebuilder_statement_dots)
-             (function s -> Ast0.DotsStmtTag s)
-             (function x ->
-               Ast0.rewrap e (Ast0.DOTS([make_disj_stmt_list x])))
-             (function x ->
-               make_minus.V0.rebuilder_statement_dots x)
-             (rebuild_mcode start_line).V0.rebuilder_statement_dots
-             name Unparse_ast0.statement_dots extra_copy_other_plus do_nothing
-       | _ -> ([],stmts) in
-      (mv,Ast0.rewrap e (Ast0.CODE res))
-  | _ -> ([],e)
-
-(* --------------------------------------------------------------------- *)
-
-let transform (alts : isomorphism) t =
-  (* the following ugliness is because rebuilder only returns a new term *)
-  let extra_meta_decls = ref ([] : Ast_cocci.metavar list) in
-  let mcode x = x in
-  let donothing r k e = k e in
-  let exprfn r k e =
-    let (extra_meta,exp) = transform_expr alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    exp in
-
-  let declfn r k e =
-    let (extra_meta,dec) = transform_decl alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    dec in
-
-  let stmtfn r k e =
-    let (extra_meta,stm) = transform_stmt alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    stm in
-  
-  let typefn r k e =
-    let (extra_meta,ty) = transform_type alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    ty in
-  
-  let topfn r k e =
-    let (extra_meta,ty) = transform_top alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    ty in
-  
-  let res =
-    V0.rebuilder
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing exprfn typefn donothing donothing declfn stmtfn
-      donothing topfn in
-  let res = res.V0.rebuilder_top_level t in
-  (!extra_meta_decls,res)
-
-(* --------------------------------------------------------------------- *)
-
-(* should be done by functorizing the parser to use wrap or context_wrap *)
-let rewrap =
-  let mcode (x,a,i,mc,pos) = (x,a,i,Ast0.context_befaft(),pos) in
-  let donothing r k e = Ast0.context_wrap(Ast0.unwrap(k e)) in
-  V0.rebuilder
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing donothing donothing donothing
-    donothing donothing donothing donothing donothing donothing donothing
-    donothing donothing
-
-let rewrap_anything = function
-    Ast0.DotsExprTag(d) ->
-      Ast0.DotsExprTag(rewrap.V0.rebuilder_expression_dots d)
-  | Ast0.DotsInitTag(d) ->
-      Ast0.DotsInitTag(rewrap.V0.rebuilder_initialiser_list d)
-  | Ast0.DotsParamTag(d) ->
-      Ast0.DotsParamTag(rewrap.V0.rebuilder_parameter_list d)
-  | Ast0.DotsStmtTag(d) ->
-      Ast0.DotsStmtTag(rewrap.V0.rebuilder_statement_dots d)
-  | Ast0.DotsDeclTag(d) ->
-      Ast0.DotsDeclTag(rewrap.V0.rebuilder_declaration_dots d)
-  | Ast0.DotsCaseTag(d) ->
-      Ast0.DotsCaseTag(rewrap.V0.rebuilder_case_line_dots d)
-  | Ast0.IdentTag(d) -> Ast0.IdentTag(rewrap.V0.rebuilder_ident d)
-  | Ast0.ExprTag(d) -> Ast0.ExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.ArgExprTag(d) -> Ast0.ArgExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.TestExprTag(d) -> Ast0.TestExprTag(rewrap.V0.rebuilder_expression d)
-  | Ast0.TypeCTag(d) -> Ast0.TypeCTag(rewrap.V0.rebuilder_typeC d)
-  | Ast0.InitTag(d) -> Ast0.InitTag(rewrap.V0.rebuilder_initialiser d)
-  | Ast0.ParamTag(d) -> Ast0.ParamTag(rewrap.V0.rebuilder_parameter d)
-  | Ast0.DeclTag(d) -> Ast0.DeclTag(rewrap.V0.rebuilder_declaration d)
-  | Ast0.StmtTag(d) -> Ast0.StmtTag(rewrap.V0.rebuilder_statement d)
-  | Ast0.CaseLineTag(d) -> Ast0.CaseLineTag(rewrap.V0.rebuilder_case_line d)
-  | Ast0.TopTag(d) -> Ast0.TopTag(rewrap.V0.rebuilder_top_level d)
-  | Ast0.IsoWhenTag(_) | Ast0.IsoWhenTTag(_) | Ast0.IsoWhenFTag(_) ->
-      failwith "only for isos within iso phase"
-  | Ast0.MetaPosTag(p) -> Ast0.MetaPosTag(p)
-
-(* --------------------------------------------------------------------- *)
-
-let apply_isos isos rule rule_name =
-  if isos = []
-  then ([],rule)
-  else
-    begin
-      current_rule := rule_name;
-      let isos =
-       List.map
-         (function (metavars,iso,name) ->
-           (metavars,List.map (List.map rewrap_anything) iso,name))
-         isos in
-      let (extra_meta,rule) =
-       List.split
-         (List.map
-            (function t ->
-              List.fold_left
-                (function (extra_meta,t) -> function iso ->
-                  let (new_extra_meta,t) = transform iso t in
-                  (new_extra_meta@extra_meta,t))
-                ([],t) isos)
-            rule) in
-      (List.concat extra_meta, Compute_lines.compute_lines rule)
-    end
diff --git a/parsing_cocci/.#lexer_cocci.mll.1.80 b/parsing_cocci/.#lexer_cocci.mll.1.80
deleted file mode 100644 (file)
index c066d1d..0000000
+++ /dev/null
@@ -1,700 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-{
-open Parser_cocci_menhir
-module D = Data
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module P = Parse_aux
-exception Lexical of string
-let tok = Lexing.lexeme
-
-let line = ref 1
-let logical_line = ref 0
-
-(* ---------------------------------------------------------------------- *)
-(* control codes *)
-
-(* Defined in data.ml
-type line_type = MINUS | OPTMINUS | UNIQUEMINUS | PLUS | CONTEXT | UNIQUE | OPT
-*)
-
-let current_line_type = ref (D.CONTEXT,!line,!logical_line)
-
-let prev_plus = ref false
-let line_start = ref 0 (* offset of the beginning of the line *)
-let get_current_line_type lexbuf =
-  let (c,l,ll) = !current_line_type in
-  let lex_start = Lexing.lexeme_start lexbuf in
-  let preceeding_spaces =
-    if !line_start < 0 then 0 else lex_start - !line_start in
-  line_start := -1;
-  prev_plus := (c = D.PLUS);
-  (c,l,ll,lex_start,preceeding_spaces,[],[],Ast0.NoMetaPos)
-let current_line_started = ref false
-let col_zero = ref true
-
-let reset_line lexbuf =
-  line := !line + 1;
-  current_line_type := (D.CONTEXT,!line,!logical_line);
-  current_line_started := false;
-  col_zero := true;
-  line_start := Lexing.lexeme_start lexbuf + 1
-
-let started_line = ref (-1)
-
-let start_line seen_char =
-  current_line_started := true;
-  col_zero := false;
-  (if seen_char && not(!line = !started_line)
-  then
-    begin
-      started_line := !line;
-      logical_line := !logical_line + 1
-    end)
-
-let pass_zero _ = col_zero := false
-
-let lexerr s1 s2 = raise (Lexical (Printf.sprintf "%s%s" s1 s2))
-
-let add_current_line_type x =
-  match (x,!current_line_type) with
-    (D.MINUS,(D.CONTEXT,ln,lln))  ->
-      current_line_type := (D.MINUS,ln,lln)
-  | (D.MINUS,(D.UNIQUE,ln,lln))   ->
-      current_line_type := (D.UNIQUEMINUS,ln,lln)
-  | (D.MINUS,(D.OPT,ln,lln))      ->
-      current_line_type := (D.OPTMINUS,ln,lln)
-  | (D.PLUS,(D.CONTEXT,ln,lln))   ->
-      current_line_type := (D.PLUS,ln,lln)
-  | (D.UNIQUE,(D.CONTEXT,ln,lln)) ->
-      current_line_type := (D.UNIQUE,ln,lln)
-  | (D.OPT,(D.CONTEXT,ln,lln))    ->
-      current_line_type := (D.OPT,ln,lln)
-  | _ -> lexerr "invalid control character combination" ""
-
-let check_minus_context_linetype s =
-  match !current_line_type with
-    (D.PLUS,_,_) -> lexerr "invalid in a + context: " s
-  | _ -> ()
-
-let check_context_linetype s =
-  match !current_line_type with
-    (D.CONTEXT,_,_) -> ()
-  | _ -> lexerr "invalid in a nonempty context: " s
-
-let check_plus_linetype s =
-  match !current_line_type with
-    (D.PLUS,_,_) -> ()
-  | _ -> lexerr "invalid in a non + context: " s
-
-let check_arity_context_linetype s =
-  match !current_line_type with
-    (D.CONTEXT,_,_) | (D.PLUS,_,_) | (D.UNIQUE,_,_) | (D.OPT,_,_) -> ()
-  | _ -> lexerr "invalid in a nonempty context: " s
-
-let process_include start finish str =
-  (match !current_line_type with
-    (D.PLUS,_,_) ->
-      (try
-       let _ = Str.search_forward (Str.regexp "\\.\\.\\.") str start in
-       lexerr "... not allowed in + include" ""
-      with Not_found -> ())
-  | _ -> ());
-  String.sub str (start + 1) (finish - start - 1)
-
-(* ---------------------------------------------------------------------- *)
-type pm = PATCH | MATCH | UNKNOWN
-
-let pm = ref UNKNOWN
-
-let patch_or_match = function
-    PATCH ->
-      (match !pm with
-       MATCH -> lexerr "- or + not allowed in the first column for a match" ""
-      |        PATCH -> ()
-      |        UNKNOWN -> Flag.sgrep_mode2 := false; pm := PATCH)
-  | MATCH ->
-      (match !pm with
-       PATCH -> lexerr "* not allowed in the first column for a patch" ""
-      |        MATCH -> ()
-      |        UNKNOWN -> Flag.sgrep_mode2 := true; pm := MATCH)
-  | _ -> failwith "unexpected argument"
-
-(* ---------------------------------------------------------------------- *)
-(* identifiers, including metavariables *)
-
-let metavariables = (Hashtbl.create(100) : (string, D.clt -> token) Hashtbl.t)
-
-let all_metavariables =
-  (Hashtbl.create(100) : (string,(string * (D.clt -> token)) list) Hashtbl.t)
-
-let type_names = (Hashtbl.create(100) : (string, D.clt -> token) Hashtbl.t)
-
-let declarer_names = (Hashtbl.create(100) : (string, D.clt -> token) Hashtbl.t)
-
-let iterator_names = (Hashtbl.create(100) : (string, D.clt -> token) Hashtbl.t)
-
-let rule_names = (Hashtbl.create(100) : (string, unit) Hashtbl.t)
-
-let check_var s linetype =
-  let fail _ =
-    if (!Data.in_prolog || !Data.in_rule_name) &&
-      Str.string_match (Str.regexp "<.*>") s 0
-    then TPathIsoFile s
-    else
-      try (Hashtbl.find metavariables s) linetype
-      with Not_found ->
-       (try (Hashtbl.find type_names s) linetype
-       with Not_found ->
-         (try (Hashtbl.find declarer_names s) linetype
-         with Not_found -> 
-           (try (Hashtbl.find iterator_names s) linetype
-           with Not_found -> TIdent (s,linetype)))) in
-  if !Data.in_meta or !Data.in_rule_name
-  then (try Hashtbl.find rule_names s; TRuleName s with Not_found -> fail())
-  else fail()
-
-let id_tokens lexbuf =
-  let s = tok lexbuf in
-  let linetype = get_current_line_type lexbuf in
-  let in_rule_name = !Data.in_rule_name in
-  let in_meta = !Data.in_meta in
-  let in_iso = !Data.in_iso in
-  let in_prolog = !Data.in_prolog in
-  match s with
-    "identifier" when in_meta -> check_arity_context_linetype s; TIdentifier
-  | "type" when in_meta ->       check_arity_context_linetype s; TType
-  | "parameter" when in_meta ->  check_arity_context_linetype s; TParameter
-  | "constant"  when in_meta ->  check_arity_context_linetype s; TConstant
-  | "expression" when in_meta || in_rule_name ->
-      check_arity_context_linetype s; TExpression
-  | "idexpression" when in_meta ->
-      check_arity_context_linetype s; TIdExpression
-  | "statement" when in_meta ->  check_arity_context_linetype s; TStatement
-  | "function"  when in_meta ->  check_arity_context_linetype s; TFunction
-  | "local" when in_meta ->      check_arity_context_linetype s; TLocal
-  | "list" when in_meta ->       check_arity_context_linetype s; Tlist
-  | "fresh" when in_meta ->      check_arity_context_linetype s; TFresh
-  | "typedef" when in_meta ->    check_arity_context_linetype s; TTypedef
-  | "declarer" when in_meta ->   check_arity_context_linetype s; TDeclarer
-  | "iterator" when in_meta ->   check_arity_context_linetype s; TIterator
-  | "name" when in_meta ->       check_arity_context_linetype s; TName
-  | "position" when in_meta ->   check_arity_context_linetype s; TPosition
-  | "any" when in_meta ->        check_arity_context_linetype s; TPosAny
-  | "pure" when in_meta && in_iso ->
-      check_arity_context_linetype s; TPure
-  | "context" when in_meta && in_iso ->
-      check_arity_context_linetype s; TContext
-  | "error" when in_meta ->      check_arity_context_linetype s; TError
-  | "words" when in_meta ->      check_context_linetype s; TWords
-
-  | "using" when in_rule_name || in_prolog ->  check_context_linetype s; TUsing
-  | "disable" when in_rule_name ->  check_context_linetype s; TDisable
-  | "extends" when in_rule_name -> check_context_linetype s; TExtends
-  | "depends" when in_rule_name -> check_context_linetype s; TDepends
-  | "on" when in_rule_name      -> check_context_linetype s; TOn
-  | "ever" when in_rule_name    -> check_context_linetype s; TEver
-  | "never" when in_rule_name   -> check_context_linetype s; TNever
-  | "exists" when in_rule_name  -> check_context_linetype s; TExists
-  | "forall" when in_rule_name  -> check_context_linetype s; TForall
-  | "reverse" when in_rule_name -> check_context_linetype s; TReverse
-
-  | "char" ->       Tchar     linetype
-  | "short" ->      Tshort    linetype
-  | "int" ->        Tint      linetype
-  | "double" ->     Tdouble   linetype
-  | "float" ->      Tfloat    linetype
-  | "long" ->       Tlong     linetype
-  | "void" ->       Tvoid     linetype
-  | "struct" ->     Tstruct   linetype
-  | "union" ->      Tunion    linetype
-  | "unsigned" ->   Tunsigned linetype
-  | "signed" ->     Tsigned   linetype
-       
-  | "auto"  ->      Tauto     linetype
-  | "register" ->   Tregister linetype
-  | "extern" ->     Textern   linetype
-  | "static" ->     Tstatic   linetype
-  | "inline" ->     Tinline   linetype
-  | "typedef" ->    Ttypedef  linetype
-
-  | "const" ->      Tconst    linetype
-  | "volatile" ->   Tvolatile linetype
-
-  | "if" ->         TIf       linetype
-  | "else" ->       TElse     linetype
-  | "while" ->      TWhile    linetype
-  | "do" ->         TDo       linetype
-  | "for" ->        TFor      linetype
-  | "switch" ->     TSwitch   linetype
-  | "case" ->       TCase     linetype
-  | "default" ->    TDefault  linetype
-  | "return" ->     TReturn   linetype
-  | "break" ->      TBreak    linetype
-  | "continue" ->   TContinue linetype
-  | "goto" ->       TGoto     linetype
-
-  | "sizeof" ->     TSizeof   linetype
-
-  | "Expression"     -> TIsoExpression
-  | "ArgExpression"  -> TIsoArgExpression
-  | "TestExpression" -> TIsoTestExpression
-  | "Statement"      -> TIsoStatement
-  | "Declaration"    -> TIsoDeclaration
-  | "Type"           -> TIsoType
-  | "TopLevel"       -> TIsoTopLevel
-
-  | s -> check_var s linetype
-
-let mkassign op lexbuf =
-  TAssign (Ast.OpAssign op, (get_current_line_type lexbuf))
-
-let init _ =
-  line := 1;
-  logical_line := 0;
-  prev_plus := false;
-  line_start := 0;
-  current_line_started := false;
-  col_zero := true;
-  pm := UNKNOWN;
-  Data.in_rule_name := false;
-  Data.in_meta := false;
-  Data.in_prolog := false;
-  Data.inheritable_positions := [];
-  Hashtbl.clear all_metavariables;
-  Hashtbl.clear Data.all_metadecls;
-  Hashtbl.clear metavariables;
-  Hashtbl.clear type_names;
-  Hashtbl.clear rule_names;
-  let get_name (_,x) = x in
-  Data.add_id_meta :=
-    (fun name constraints pure ->
-      let fn clt = TMetaId(name,constraints,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_type_meta :=
-    (fun name pure ->
-      let fn clt = TMetaType(name,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_param_meta :=
-    (function name -> function pure ->
-      let fn clt = TMetaParam(name,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_paramlist_meta :=
-    (function name -> function lenname -> function pure ->
-      let fn clt = TMetaParamList(name,lenname,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_const_meta :=
-    (fun tyopt name constraints pure ->
-      let fn clt = TMetaConst(name,constraints,pure,tyopt,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_err_meta :=
-    (fun name constraints pure ->
-      let fn clt = TMetaErr(name,constraints,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_exp_meta :=
-    (fun tyopt name constraints pure ->
-      let fn clt = TMetaExp(name,constraints,pure,tyopt,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_idexp_meta :=
-    (fun tyopt name constraints pure ->
-      let fn clt = TMetaIdExp(name,constraints,pure,tyopt,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_local_idexp_meta :=
-    (fun tyopt name constraints pure ->
-      let fn clt = TMetaLocalIdExp(name,constraints,pure,tyopt,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_explist_meta :=
-    (function name -> function lenname -> function pure ->
-      let fn clt = TMetaExpList(name,lenname,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_stm_meta :=
-    (function name -> function pure ->
-      let fn clt = TMetaStm(name,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_stmlist_meta :=
-    (function name -> function pure ->
-      let fn clt = TMetaStmList(name,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_func_meta :=
-    (fun name constraints pure ->
-      let fn clt = TMetaFunc(name,constraints,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_local_func_meta :=
-    (fun name constraints pure ->
-      let fn clt = TMetaLocalFunc(name,constraints,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_iterator_meta :=
-    (fun name constraints pure ->
-      let fn clt = TMetaIterator(name,constraints,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_declarer_meta :=
-    (fun name constraints pure ->
-      let fn clt = TMetaDeclarer(name,constraints,pure,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_pos_meta :=
-    (fun name constraints any ->
-      let fn ((d,ln,_,_,_,_,_,_) as clt) =
-       (if d = Data.PLUS
-       then
-         failwith
-           (Printf.sprintf "%d: positions only allowed in minus code" ln));
-       TMetaPos(name,constraints,any,clt) in
-      Hashtbl.replace metavariables (get_name name) fn);
-  Data.add_type_name :=
-    (function name ->
-      let fn clt = TTypeId(name,clt) in
-      Hashtbl.replace type_names name fn);
-  Data.add_declarer_name :=
-    (function name ->
-      let fn clt = TDeclarerId(name,clt) in
-      Hashtbl.replace declarer_names name fn);
-  Data.add_iterator_name :=
-    (function name ->
-      let fn clt = TIteratorId(name,clt) in
-      Hashtbl.replace iterator_names name fn);
-  Data.init_rule := (function _ -> Hashtbl.clear metavariables);
-  Data.install_bindings :=
-    (function parent ->
-      List.iter (function (name,fn) -> Hashtbl.add metavariables name fn)
-       (Hashtbl.find all_metavariables parent))
-
-let drop_spaces s =
-  let len = String.length s in
-  let rec loop n =
-    if n = len
-    then n
-    else
-      if List.mem (String.get s n) [' ';'\t']
-      then loop (n+1)
-      else n in
-  let start = loop 0 in
-  String.sub s start (len - start)
-}
-
-(* ---------------------------------------------------------------------- *)
-(* tokens *)
-
-let letter = ['A'-'Z' 'a'-'z' '_']
-let digit  = ['0'-'9']
-
-let dec = ['0'-'9']
-let oct = ['0'-'7']
-let hex = ['0'-'9' 'a'-'f' 'A'-'F']
-
-let decimal = ('0' | (['1'-'9'] dec*))
-let octal   = ['0']        oct+
-let hexa    = ("0x" |"0X") hex+ 
-
-let pent   = dec+
-let pfract = dec+
-let sign = ['-' '+']
-let exp  = ['e''E'] sign? dec+
-let real = pent exp | ((pent? '.' pfract | pent '.' pfract? ) exp?)
-
-
-rule token = parse
-  | [' ' '\t'  ]+             { start_line false; token lexbuf }
-  | ['\n' '\r' '\011' '\012'] { reset_line lexbuf; token lexbuf }
-
-  | "//" [^ '\n']* { start_line false; token lexbuf }
-
-  | "@@" { start_line true; TArobArob }
-  | "@"  { pass_zero();
-          if !Data.in_rule_name or not !current_line_started
-          then (start_line true; TArob)
-          else (check_minus_context_linetype "@"; TPArob) }
-
-  | "WHEN" | "when"
-      { start_line true; check_minus_context_linetype (tok lexbuf);
-       TWhen (get_current_line_type lexbuf) }
-
-  | "..."
-      { start_line true; check_minus_context_linetype (tok lexbuf);
-       TEllipsis (get_current_line_type lexbuf) }
-(*
-  | "ooo"
-      { start_line true; check_minus_context_linetype (tok lexbuf);
-       TCircles (get_current_line_type lexbuf) }
-
-  | "***"
-      { start_line true; check_minus_context_linetype (tok lexbuf);
-       TStars (get_current_line_type lexbuf) }
-*)
-  | "<..." { start_line true; check_context_linetype (tok lexbuf);
-            TOEllipsis (get_current_line_type lexbuf) }
-  | "...>" { start_line true; check_context_linetype (tok lexbuf);
-            TCEllipsis (get_current_line_type lexbuf) }
-  | "<+..." { start_line true; check_context_linetype (tok lexbuf);
-            TPOEllipsis (get_current_line_type lexbuf) }
-  | "...+>" { start_line true; check_context_linetype (tok lexbuf);
-            TPCEllipsis (get_current_line_type lexbuf) }
-(*
-  | "<ooo" { start_line true; check_context_linetype (tok lexbuf);
-            TOCircles (get_current_line_type lexbuf) }
-  | "ooo>" { start_line true; check_context_linetype (tok lexbuf);
-            TCCircles (get_current_line_type lexbuf) }
-
-  | "<***" { start_line true; check_context_linetype (tok lexbuf);
-            TOStars (get_current_line_type lexbuf) }
-  | "***>" { start_line true; check_context_linetype (tok lexbuf);
-            TCStars (get_current_line_type lexbuf) }
-*)
-  | "-" { pass_zero();
-         if !current_line_started
-         then (start_line true; TMinus (get_current_line_type lexbuf))
-          else (patch_or_match PATCH;
-               add_current_line_type D.MINUS; token lexbuf) }
-  | "+" { pass_zero();
-         if !current_line_started
-         then (start_line true; TPlus (get_current_line_type lexbuf))
-          else if !Data.in_meta
-         then TPlus0
-          else (patch_or_match PATCH;
-               add_current_line_type D.PLUS; token lexbuf) }
-  | "?" { pass_zero();
-         if !current_line_started
-         then (start_line true; TWhy (get_current_line_type lexbuf))
-          else if !Data.in_meta
-         then TWhy0
-          else (add_current_line_type D.OPT; token lexbuf) }
-  | "!" { pass_zero();
-         if !current_line_started
-         then (start_line true; TBang (get_current_line_type lexbuf))
-          else if !Data.in_meta
-         then TBang0
-          else (add_current_line_type D.UNIQUE; token lexbuf) }
-  | "(" { if not !col_zero
-         then (start_line true; TOPar (get_current_line_type lexbuf))
-          else
-            (start_line true; check_context_linetype (tok lexbuf);
-            TOPar0 (get_current_line_type lexbuf))}
-  | "\\(" { start_line true; TOPar0 (get_current_line_type lexbuf) }
-  | "|" { if not (!col_zero)
-         then (start_line true; TOr(get_current_line_type lexbuf))
-          else (start_line true;
-               check_context_linetype (tok lexbuf);
-               TMid0 (get_current_line_type lexbuf))}
-  | "\\|" { start_line true; TMid0 (get_current_line_type lexbuf) }
-  | ")" { if not !col_zero
-         then (start_line true; TCPar (get_current_line_type lexbuf))
-          else
-            (start_line true; check_context_linetype (tok lexbuf);
-            TCPar0 (get_current_line_type lexbuf))}
-  | "\\)" { start_line true; TCPar0 (get_current_line_type lexbuf) }
-
-  | '[' { start_line true; TOCro (get_current_line_type lexbuf)   }
-  | ']' { start_line true; TCCro (get_current_line_type lexbuf)   }
-  | '{' { start_line true; TOBrace (get_current_line_type lexbuf) }
-  | '}' { start_line true; TCBrace (get_current_line_type lexbuf) }
-
-  | "->"           { start_line true; TPtrOp (get_current_line_type lexbuf)  }
-  | '.'            { start_line true; TDot (get_current_line_type lexbuf)    }
-  | ','            { start_line true; TComma (get_current_line_type lexbuf)  }
-  | ";"            { start_line true;
-                    if !Data.in_meta
-                    then TMPtVirg (* works better with tokens_all *)
-                    else TPtVirg (get_current_line_type lexbuf) }
-
-  
-  | '*'            { pass_zero();
-                    if !current_line_started
-                    then
-                      (start_line true; TMul (get_current_line_type lexbuf))
-                    else
-                      (patch_or_match MATCH;
-                       add_current_line_type D.MINUS; token lexbuf) }
-  | '/'            { start_line true;
-                    TDmOp (Ast.Div,get_current_line_type lexbuf) } 
-  | '%'            { start_line true;
-                    TDmOp (Ast.Mod,get_current_line_type lexbuf) } 
-  | '~'            { start_line true;  TTilde (get_current_line_type lexbuf) } 
-  
-  | "++"           { start_line true;  TInc (get_current_line_type lexbuf) }
-  | "--"           { start_line true;  TDec (get_current_line_type lexbuf) }
-  
-  | "="            { start_line true; TEq (get_current_line_type lexbuf) } 
-  
-  | "-="           { start_line true; mkassign Ast.Minus lexbuf }
-  | "+="           { start_line true; mkassign Ast.Plus lexbuf }
-  
-  | "*="           { start_line true; mkassign Ast.Mul lexbuf }
-  | "/="           { start_line true; mkassign Ast.Div lexbuf }
-  | "%="           { start_line true; mkassign Ast.Mod lexbuf }
-  
-  | "&="           { start_line true; mkassign Ast.And lexbuf }
-  | "|="           { start_line true; mkassign Ast.Or lexbuf }
-  | "^="           { start_line true; mkassign Ast.Xor lexbuf }
-  
-  | "<<="          { start_line true; mkassign Ast.DecLeft lexbuf }
-  | ">>="          { start_line true; mkassign Ast.DecRight lexbuf }
-
-  | ":"            { start_line true; TDotDot (get_current_line_type lexbuf) }
-  
-  | "=="           { start_line true; TEqEq   (get_current_line_type lexbuf) }
-  | "!="           { start_line true; TNotEq  (get_current_line_type lexbuf) } 
-  | ">="           { start_line true;
-                    TLogOp(Ast.SupEq,get_current_line_type lexbuf) }
-  | "<="           { start_line true;
-                    TLogOp(Ast.InfEq,get_current_line_type lexbuf) }
-  | "<"            { start_line true;
-                    TLogOp(Ast.Inf,get_current_line_type lexbuf) } 
-  | ">"            { start_line true;
-                    TLogOp(Ast.Sup,get_current_line_type lexbuf) }
-  
-  | "&&"           { start_line true; TAndLog (get_current_line_type lexbuf) } 
-  | "||"           { start_line true; TOrLog  (get_current_line_type lexbuf) }
-  
-  | ">>"           { start_line true;
-                    TShOp(Ast.DecRight,get_current_line_type lexbuf) }
-  | "<<"           { start_line true;
-                    TShOp(Ast.DecLeft,get_current_line_type lexbuf) }
-  
-  | "&"            { start_line true; TAnd    (get_current_line_type lexbuf) }
-  | "^"            { start_line true; TXor(get_current_line_type lexbuf) }
-
-  | ( ("#" [' ' '\t']*  "define" [' ' '\t']+))
-    ( (letter (letter |digit)*) as ident) 
-      { start_line true;
-       let (arity,line,lline,offset,col,strbef,straft,pos) as lt =
-         get_current_line_type lexbuf in
-       let off = String.length "#define " in
-       (* -1 in the code below because the ident is not at the line start *)
-       TDefine
-         (lt,
-          check_var ident
-            (arity,line,lline,offset+off,(-1),[],[],Ast0.NoMetaPos)) }
-  | ( ("#" [' ' '\t']*  "define" [' ' '\t']+))
-    ( (letter (letter | digit)*) as ident) 
-    '('
-      { start_line true;
-       let (arity,line,lline,offset,col,strbef,straft,pos) as lt =
-         get_current_line_type lexbuf in
-       let off = String.length "#define " in
-       TDefineParam
-        (lt,
-        check_var ident
-          (* why pos here but not above? *)
-          (arity,line,lline,offset+off,(-1),strbef,straft,pos),
-        offset + off + (String.length ident)) }
-  | "#" [' ' '\t']* "include" [' ' '\t']* '"' [^ '"']+ '"'
-      { TIncludeL
-         (let str = tok lexbuf in
-         let start = String.index str '"' in
-         let finish = String.rindex str '"' in
-         start_line true;
-         (process_include start finish str,get_current_line_type lexbuf)) }
-  | "#" [' ' '\t']* "include" [' ' '\t']* '<' [^ '>']+ '>'
-      { TIncludeNL
-         (let str = tok lexbuf in
-         let start = String.index str '<' in
-         let finish = String.rindex str '>' in
-         start_line true;
-         (process_include start finish str,get_current_line_type lexbuf)) }
-  | "#" [' ' '\t']* "if" [^'\n']*
-  | "#" [' ' '\t']* "ifdef" [^'\n']*
-  | "#" [' ' '\t']* "ifndef" [^'\n']*
-  | "#" [' ' '\t']* "else" [^'\n']*
-  | "#" [' ' '\t']* "elif" [^'\n']*
-  | "#" [' ' '\t']* "endif" [^'\n']*
-  | "#" [' ' '\t']* "error" [^'\n']*
-      { start_line true; check_plus_linetype (tok lexbuf);
-       TPragma (tok lexbuf) }
-  | "---" [^'\n']*
-      { (if !current_line_started
-      then lexerr "--- must be at the beginning of the line" "");
-       start_line true;
-       TMinusFile
-         (let str = tok lexbuf in
-         (drop_spaces(String.sub str 3 (String.length str - 3)),
-          (get_current_line_type lexbuf))) }
-  | "+++" [^'\n']*
-      { (if !current_line_started
-      then lexerr "+++ must be at the beginning of the line" "");
-       start_line true;
-       TPlusFile
-         (let str = tok lexbuf in
-         (drop_spaces(String.sub str 3 (String.length str - 3)),
-          (get_current_line_type lexbuf))) }
-
-  | letter (letter | digit)*
-      { start_line true; id_tokens lexbuf } 
-
-  | "'" { start_line true;
-         TChar(char lexbuf,get_current_line_type lexbuf) }
-  | '"' { start_line true;
-         TString(string lexbuf,(get_current_line_type lexbuf)) }
-  | (real as x)    { start_line true;
-                    TFloat(x,(get_current_line_type lexbuf)) }
-  | ((( decimal | hexa | octal) 
-      ( ['u' 'U'] 
-      | ['l' 'L']  
-      | (['l' 'L'] ['u' 'U'])
-      | (['u' 'U'] ['l' 'L'])
-      | (['u' 'U'] ['l' 'L'] ['l' 'L'])
-      | (['l' 'L'] ['l' 'L'])
-      )?
-    ) as x) { start_line true; TInt(x,(get_current_line_type lexbuf)) }
-
-  | "<=>"          { TIso }
-  | "=>"           { TRightIso }
-
-  | eof            { EOF }
-
-  | _ { lexerr "unrecognised symbol, in token rule: " (tok lexbuf) }
-
-
-and char = parse
-  | (_ as x) "'"                                     { String.make 1 x }
-  | (("\\" (oct | oct oct | oct oct oct)) as x  "'") { x }
-  | (("\\x" (hex | hex hex)) as x  "'")       { x }
-  | (("\\" (_ as v)) as x "'")
-       { (match v with
-            | 'n' -> ()  | 't' -> ()   | 'v' -> ()  | 'b' -> ()
-           | 'r' -> ()  | 'f' -> () | 'a' -> ()
-           | '\\' -> () | '?'  -> () | '\'' -> ()  | '"' -> ()
-            | 'e' -> ()
-           | _ -> lexerr "unrecognised symbol: " (tok lexbuf)
-           );
-          x
-       } 
-  | _ { lexerr "unrecognised symbol: " (tok lexbuf) }
-
-and string  = parse
-  | '"'                                       { "" }
-  | (_ as x)                   { Common.string_of_char x ^ string lexbuf }
-  | ("\\" (oct | oct oct | oct oct oct)) as x { x ^ string lexbuf }
-  | ("\\x" (hex | hex hex)) as x              { x ^ string lexbuf }
-  | ("\\" (_ as v)) as x  
-       { 
-         (match v with
-         | 'n' -> ()  | 't' -> ()   | 'v' -> ()  | 'b' -> () | 'r' -> () 
-        | 'f' -> () | 'a' -> ()
-        | '\\' -> () | '?'  -> () | '\'' -> ()  | '"' -> ()
-         | 'e' -> ()
-         | '\n' -> () 
-         | _ -> lexerr "unrecognised symbol:" (tok lexbuf)
-        );
-          x ^ string lexbuf
-       }
-  | _ { lexerr "unrecognised symbol: " (tok lexbuf) }
diff --git a/parsing_cocci/.#parse_aux.ml.1.23 b/parsing_cocci/.#parse_aux.ml.1.23
deleted file mode 100644 (file)
index fb1ff7d..0000000
+++ /dev/null
@@ -1,467 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* exports everything, used only by parser_cocci_menhir.mly *)
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-
-(* types for metavariable tokens *)
-type info = Ast.meta_name * Ast0.pure * Data.clt
-type idinfo = Ast.meta_name * Data.iconstraints * Ast0.pure * Data.clt
-type expinfo = Ast.meta_name * Data.econstraints * Ast0.pure * Data.clt
-type tyinfo = Ast.meta_name * Ast0.typeC list * Ast0.pure * Data.clt
-type list_info = Ast.meta_name * Ast.meta_name option * Ast0.pure * Data.clt
-type typed_info =
-    Ast.meta_name * Data.econstraints * Ast0.pure *
-      Type_cocci.typeC list option * Data.clt
-type pos_info = Ast.meta_name * Data.pconstraints * Ast.meta_collect * Data.clt
-
-
-let get_option fn = function
-    None -> None
-  | Some x -> Some (fn x)
-
-let make_info line logical_line offset col strbef straft =
-  { Ast0.line_start = line; Ast0.line_end = line;
-    Ast0.logical_start = logical_line; Ast0.logical_end = logical_line;
-    Ast0.attachable_start = true; Ast0.attachable_end = true;
-    Ast0.mcode_start = []; Ast0.mcode_end = [];
-    Ast0.column = col; Ast0.offset = offset;
-    Ast0.strings_before = strbef; Ast0.strings_after = straft; }
-
-let clt2info (_,line,logical_line,offset,col,strbef,straft,pos) =
-  make_info line logical_line offset col strbef straft
-
-let drop_bef (arity,line,lline,offset,col,strbef,straft,pos) =
-  (arity,line,lline,offset,col,[],straft,pos)
-
-let drop_aft (arity,line,lline,offset,col,strbef,straft,pos) =
-  (arity,line,lline,offset,col,strbef,[],pos)
-
-let clt2mcode str = function
-    (Data.MINUS,line,lline,offset,col,strbef,straft,pos)       ->
-      (str,Ast0.NONE,make_info line lline offset col strbef straft,
-       Ast0.MINUS(ref([],Ast0.default_token_info)),ref pos)
-  | (Data.OPTMINUS,line,lline,offset,col,strbef,straft,pos)    ->
-      (str,Ast0.OPT,make_info line lline offset col strbef straft,
-       Ast0.MINUS(ref([],Ast0.default_token_info)),ref pos)
-  | (Data.UNIQUEMINUS,line,lline,offset,col,strbef,straft,pos) ->
-      (str,Ast0.UNIQUE,make_info line lline offset col strbef straft,
-       Ast0.MINUS(ref([],Ast0.default_token_info)),ref pos)
-  | (Data.PLUS,line,lline,offset,col,strbef,straft,pos)        ->
-      (str,Ast0.NONE,make_info line lline offset col strbef straft,Ast0.PLUS,
-       ref pos)
-  | (Data.CONTEXT,line,lline,offset,col,strbef,straft,pos)     ->
-      (str,Ast0.NONE,make_info line lline offset col strbef straft,
-       Ast0.CONTEXT(ref(Ast.NOTHING,
-                       Ast0.default_token_info,Ast0.default_token_info)),
-       ref pos)
-  | (Data.OPT,line,lline,offset,col,strbef,straft,pos)         ->
-      (str,Ast0.OPT,make_info line lline offset col strbef straft,
-       Ast0.CONTEXT(ref(Ast.NOTHING,
-                       Ast0.default_token_info,Ast0.default_token_info)),
-       ref pos)
-  | (Data.UNIQUE,line,lline,offset,col,strbef,straft,pos)      ->
-      (str,Ast0.UNIQUE,make_info line lline offset col strbef straft,
-       Ast0.CONTEXT(ref(Ast.NOTHING,
-                       Ast0.default_token_info,Ast0.default_token_info)),
-       ref pos)
-
-let id2name   (name, clt) = name
-let id2clt    (name, clt) = clt
-let id2mcode  (name, clt) = clt2mcode name clt
-
-let mkdots str (dot,whencode) =
-  match str with
-    "..." -> Ast0.wrap(Ast0.Dots(clt2mcode str dot, whencode))
-  | "ooo" -> Ast0.wrap(Ast0.Circles(clt2mcode str dot, whencode))
-  | "***" -> Ast0.wrap(Ast0.Stars(clt2mcode str dot, whencode))
-  | _ -> failwith "cannot happen"
-
-let mkedots str (dot,whencode) =
-  match str with
-    "..." -> Ast0.wrap(Ast0.Edots(clt2mcode str dot, whencode))
-  | "ooo" -> Ast0.wrap(Ast0.Ecircles(clt2mcode str dot, whencode))
-  | "***" -> Ast0.wrap(Ast0.Estars(clt2mcode str dot, whencode))
-  | _ -> failwith "cannot happen"
-
-let mkdpdots str dot =
-  match str with
-    "..." -> Ast0.wrap(Ast0.DPdots(clt2mcode str dot))
-  | "ooo" -> Ast0.wrap(Ast0.DPcircles(clt2mcode str dot))
-  | _ -> failwith "cannot happen"
-
-let mkidots str (dot,whencode) =
-  match str with
-    "..." -> Ast0.wrap(Ast0.Idots(clt2mcode str dot, whencode))
-  | _ -> failwith "cannot happen"
-
-let mkddots str (dot,whencode) =
-  match (str,whencode) with
-    ("...",None) -> Ast0.wrap(Ast0.Ddots(clt2mcode str dot, None))
-  | ("...",Some [w]) -> Ast0.wrap(Ast0.Ddots(clt2mcode str dot, Some w))
-  | _ -> failwith "cannot happen"
-
-let mkpdots str dot =
-  match str with
-    "..." -> Ast0.wrap(Ast0.Pdots(clt2mcode str dot))
-  | "ooo" -> Ast0.wrap(Ast0.Pcircles(clt2mcode str dot))
-  | _ -> failwith "cannot happen"
-
-let arith_op ast_op left op right =
-  Ast0.wrap
-    (Ast0.Binary(left, clt2mcode (Ast.Arith ast_op) op, right))
-
-let logic_op ast_op left op right =
-  Ast0.wrap
-    (Ast0.Binary(left, clt2mcode (Ast.Logical ast_op) op, right))
-
-let make_cv cv ty =
-  match cv with None -> ty | Some x -> Ast0.wrap (Ast0.ConstVol(x,ty))
-
-let top_dots l =
-  let circle x =
-    match Ast0.unwrap x with Ast0.Circles(_) -> true | _ -> false in
-  let star x =
-    match Ast0.unwrap x with Ast0.Stars(_) -> true | _ -> false in
-  if List.exists circle l
-  then Ast0.wrap(Ast0.CIRCLES(l))
-  else
-    if List.exists star l
-    then Ast0.wrap(Ast0.STARS(l))
-    else Ast0.wrap(Ast0.DOTS(l))
-
-(* here the offset is that of the first in the sequence of *s, not that of
-each * individually *)
-let pointerify ty m =
-  List.fold_left
-    (function inner ->
-      function cur ->
-       Ast0.wrap(Ast0.Pointer(inner,clt2mcode "*" cur)))
-    ty m
-
-let ty_pointerify ty m =
-  List.fold_left
-    (function inner -> function cur -> Type_cocci.Pointer(inner))
-    ty m
-
-(* Left is <=>, Right is =>.  Collect <=>s. *)
-(* The parser should have done this, with precedences.  But whatever... *)
-let iso_adjust fn first rest =
-  let rec loop = function
-      [] -> [[]]
-    | (Common.Left x)::rest ->
-       (match loop rest with
-         front::after -> (fn x::front)::after
-       | _ -> failwith "not possible")
-    | (Common.Right x)::rest ->
-       (match loop rest with
-         front::after -> []::(fn x::front)::after
-       | _ -> failwith "not possible") in
-  match loop rest with
-    front::after -> (fn first::front)::after
-  | _ -> failwith "not possible"
-
-let check_meta tok =
-  let lookup rule name =
-    try
-      let info = Hashtbl.find Data.all_metadecls rule in
-      List.find (function mv -> Ast.get_meta_name mv = (rule,name)) info
-    with
-      Not_found ->
-       raise
-         (Semantic_cocci.Semantic
-            ("bad rule "^rule^" or bad variable "^name)) in
-  match tok with
-    Ast.MetaIdDecl(Ast.NONE,(rule,name)) ->
-      (match lookup rule name with
-       Ast.MetaIdDecl(_,_) | Ast.MetaFreshIdDecl(_,_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaFreshIdDecl(Ast.NONE,(rule,name)) ->
-      raise
-       (Semantic_cocci.Semantic
-          "can't inherit the freshness of an identifier")
-  | Ast.MetaListlenDecl((rule,name)) ->
-      (match lookup rule name with
-       Ast.MetaListlenDecl(_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaTypeDecl(Ast.NONE,(rule,name)) ->
-      (match lookup rule name with
-       Ast.MetaTypeDecl(_,_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaParamDecl(Ast.NONE,(rule,name)) ->
-      (match lookup rule name with
-       Ast.MetaParamDecl(_,_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaParamListDecl(Ast.NONE,(rule,name),len_name) ->
-      (match lookup rule name with
-       Ast.MetaParamListDecl(_,_,_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaErrDecl(Ast.NONE,(rule,name)) ->
-      (match lookup rule name with
-       Ast.MetaErrDecl(_,_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaExpDecl(Ast.NONE,(rule,name),ty) ->
-      (match lookup rule name with
-       Ast.MetaExpDecl(_,_,ty1) when ty = ty1 -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaIdExpDecl(Ast.NONE,(rule,name),ty) ->
-      (match lookup rule name with
-       Ast.MetaIdExpDecl(_,_,ty1) when ty = ty1 -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaLocalIdExpDecl(Ast.NONE,(rule,name),ty) ->
-      (match lookup rule name with
-       Ast.MetaLocalIdExpDecl(_,_,ty1) when ty = ty1 -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaExpListDecl(Ast.NONE,(rule,name),len_name) ->
-      (match lookup rule name with
-       Ast.MetaExpListDecl(_,_,_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaStmDecl(Ast.NONE,(rule,name)) ->
-      (match lookup rule name with
-       Ast.MetaStmDecl(_,_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaStmListDecl(Ast.NONE,(rule,name)) ->
-      (match lookup rule name with
-       Ast.MetaStmListDecl(_,_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaFuncDecl(Ast.NONE,(rule,name)) ->
-      (match lookup rule name with
-       Ast.MetaFuncDecl(_,_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaLocalFuncDecl(Ast.NONE,(rule,name)) ->
-      (match lookup rule name with
-       Ast.MetaLocalFuncDecl(_,_) -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaConstDecl(Ast.NONE,(rule,name),ty) ->
-      (match lookup rule name with
-       Ast.MetaConstDecl(_,_,ty1) when ty = ty1 -> ()
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | Ast.MetaPosDecl(Ast.NONE,(rule,name)) ->
-      (match lookup rule name with
-       Ast.MetaPosDecl(_,_) ->
-         if not (List.mem rule !Data.inheritable_positions)
-         then
-           raise
-             (Semantic_cocci.Semantic
-                ("position cannot be inherited over modifications: "^name))
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              ("incompatible inheritance declaration "^name)))
-  | _ ->
-      raise
-       (Semantic_cocci.Semantic ("arity not allowed on imported declaration"))
-
-let create_metadec ar ispure kindfn ids current_rule =
-  List.concat
-    (List.map
-       (function (rule,nm) ->
-        let (rule,checker) =
-          match rule with
-            None -> ((current_rule,nm),function x -> [Common.Left x])
-          | Some rule ->
-              ((rule,nm),
-               function x -> check_meta x; [Common.Right x]) in
-        kindfn ar rule ispure checker)
-       ids)
-
-let create_metadec_ne ar ispure kindfn ids current_rule =
-  List.concat
-    (List.map
-       (function ((rule,nm),constraints) ->
-        let (rule,checker) =
-          match rule with
-            None -> ((current_rule,nm),function x -> [Common.Left x])
-          | Some rule ->
-              ((rule,nm),
-               function x -> check_meta x; [Common.Right x]) in
-        kindfn ar rule ispure checker constraints)
-       ids)
-
-let create_metadec_ty ar ispure kindfn ids current_rule =
-  List.concat
-    (List.map
-       (function ((rule,nm),constraints) ->
-        let (rule,checker) =
-          match rule with
-            None -> ((current_rule,nm),function x -> [Common.Left x])
-          | Some rule ->
-              ((rule,nm),
-               function x -> check_meta x; [Common.Right x]) in
-        kindfn ar rule ispure checker constraints)
-       ids)
-
-let create_len_metadec ar ispure kindfn lenid ids current_rule =
-  let lendec =
-    create_metadec Ast.NONE Ast0.Impure
-      (fun _ name _ check_meta -> check_meta(Ast.MetaListlenDecl(name)))
-      [lenid] current_rule in
-  let lenname =
-    match lendec with
-      [Common.Left (Ast.MetaListlenDecl(x))] -> x
-    | [Common.Right (Ast.MetaListlenDecl(x))] -> x
-    | _ -> failwith "unexpected length declaration" in
-  lendec@(create_metadec ar ispure (kindfn lenname) ids current_rule)
-
-(* ---------------------------------------------------------------------- *)
-
-let str2inc s =
-  let elements = Str.split (Str.regexp "/") s in
-  List.map (function "..." -> Ast.IncDots | s -> Ast.IncPath s) elements
-
-(* ---------------------------------------------------------------------- *)
-(* statements *)
-
-let meta_stm name =
-  let (nm,pure,clt) = name in
-  Ast0.wrap(Ast0.MetaStmt(clt2mcode nm clt,pure))
-
-let exp_stm exp pv =
-  Ast0.wrap(Ast0.ExprStatement (exp, clt2mcode ";" pv))
-
-let ifthen iff lp tst rp thn =
-  Ast0.wrap(Ast0.IfThen(clt2mcode "if" iff,
-    clt2mcode "(" lp,tst,clt2mcode ")" rp,thn,
-    (Ast0.default_info(),Ast0.context_befaft())))
-
-let ifthenelse iff lp tst rp thn e els =
-  Ast0.wrap(Ast0.IfThenElse(clt2mcode "if" iff,
-    clt2mcode "(" lp,tst,clt2mcode ")" rp,thn,
-    clt2mcode "else" e,els,
-    (Ast0.default_info(),Ast0.context_befaft())))
-
-let forloop fr lp e1 sc1 e2 sc2 e3 rp s =
-  Ast0.wrap(Ast0.For(clt2mcode "for" fr,clt2mcode "(" lp,e1,
-                    clt2mcode ";" sc1,e2,
-                    clt2mcode ";" sc2,e3,clt2mcode ")" rp,s,
-                    (Ast0.default_info(),Ast0.context_befaft())))
-
-let whileloop w lp e rp s =
-  Ast0.wrap(Ast0.While(clt2mcode "while" w,clt2mcode "(" lp,
-                      e,clt2mcode ")" rp,s,
-                      (Ast0.default_info(),Ast0.context_befaft())))
-
-let doloop d s w lp e rp pv =
-  Ast0.wrap(Ast0.Do(clt2mcode "do" d,s,clt2mcode "while" w,
-                   clt2mcode "(" lp,e,clt2mcode ")" rp,
-                   clt2mcode ";" pv))
-
-let iterator i lp e rp s =
-  Ast0.wrap(Ast0.Iterator(i,clt2mcode "(" lp,e,clt2mcode ")" rp,s,
-                         (Ast0.default_info(),Ast0.context_befaft())))
-
-let switch s lp e rp lb c rb =
-  Ast0.wrap(Ast0.Switch(clt2mcode "switch" s,clt2mcode "(" lp,e,
-                       clt2mcode ")" rp,clt2mcode "{" lb,
-                       Ast0.wrap(Ast0.DOTS(c)),clt2mcode "}" rb))
-
-let ret_exp r e pv =
-  Ast0.wrap(Ast0.ReturnExpr(clt2mcode "return" r,e,clt2mcode ";" pv))
-
-let ret r pv =
-  Ast0.wrap(Ast0.Return(clt2mcode "return" r,clt2mcode ";" pv))
-
-let break b pv =
-  Ast0.wrap(Ast0.Break(clt2mcode "break" b,clt2mcode ";" pv))
-
-let cont c pv =
-  Ast0.wrap(Ast0.Continue(clt2mcode "continue" c,clt2mcode ";" pv))
-
-let label i dd =
-  Ast0.wrap(Ast0.Label(i,clt2mcode ":" dd))
-
-let goto g i pv =
-  Ast0.wrap(Ast0.Goto(clt2mcode "goto" g,i,clt2mcode ";" pv))
-
-let seq lb s rb =
-  Ast0.wrap(Ast0.Seq(clt2mcode "{" lb,s,clt2mcode "}" rb))
-
-(* ---------------------------------------------------------------------- *)
-
-let make_iso_rule_name_result n =
-    (try let _ =  Hashtbl.find Data.all_metadecls n in
-    raise (Semantic_cocci.Semantic ("repeated rule name"))
-    with Not_found -> ());
-    Ast.CocciRulename (Some n,Ast.NoDep,[],[],Ast.Undetermined,false (*discarded*))
-
-let make_cocci_rule_name_result nm d i a e ee =
-  match nm with
-    Some nm ->
-      let n = id2name nm in
-      (try let _ =  Hashtbl.find Data.all_metadecls n in
-      raise (Semantic_cocci.Semantic ("repeated rule name"))
-      with Not_found -> ());
-      Ast.CocciRulename (Some n,d,i,a,e,ee)
-  | None -> Ast.CocciRulename (None,d,i,a,e,ee)
-
-let make_script_rule_name_result scr lang deps =
-  let s = id2name scr in
-  let l = id2name lang in
-  if s <> "script" then 
-    raise (Semantic_cocci.Semantic ("malformed script rule"));
-  Ast.ScriptRulename (l,deps)
diff --git a/parsing_cocci/.#parse_cocci.ml.1.162 b/parsing_cocci/.#parse_cocci.ml.1.162
deleted file mode 100644 (file)
index 45938ff..0000000
+++ /dev/null
@@ -1,1512 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* splits the entire file into minus and plus fragments, and parses each
-separately (thus duplicating work for the parsing of the context elements) *)
-
-module D = Data
-module PC = Parser_cocci_menhir
-module V0 = Visitor_ast0
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-let pr = Printf.sprintf
-(*let pr2 s = prerr_string s; prerr_string "\n"; flush stderr*)
-let pr2 s = Printf.printf "%s\n" s
-
-(* for isomorphisms.  all should be at the front!!! *)
-let reserved_names = 
-  ["all";"optional_storage";"optional_qualifier";"value_format";"comm_assoc"]
-
-(* ----------------------------------------------------------------------- *)
-(* Debugging... *)
-
-let line_type (d,_,_,_,_,_,_,_) = d
-
-let line_type2c tok =
-  match line_type tok with
-    D.MINUS | D.OPTMINUS | D.UNIQUEMINUS -> ":-"
-  | D.PLUS -> ":+"
-  | D.CONTEXT | D.UNIQUE | D.OPT -> ""
-
-let token2c (tok,_) =
- match tok with
-    PC.TIdentifier -> "identifier"
-  | PC.TType -> "type"
-  | PC.TParameter -> "parameter"
-  | PC.TConstant -> "constant"
-  | PC.TExpression -> "expression"
-  | PC.TIdExpression -> "idexpression"
-  | PC.TStatement -> "statement"
-  | PC.TPosition -> "position"
-  | PC.TPosAny -> "any"
-  | PC.TFunction -> "function"
-  | PC.TLocal -> "local"
-  | PC.Tlist -> "list"
-  | PC.TFresh -> "fresh"
-  | PC.TPure -> "pure"
-  | PC.TContext -> "context"
-  | PC.TTypedef -> "typedef"
-  | PC.TDeclarer -> "declarer"
-  | PC.TIterator -> "iterator"
-  | PC.TName -> "name"
-  | PC.TRuleName str -> "rule_name-"^str
-  | PC.TUsing -> "using"
-  | PC.TPathIsoFile str -> "path_iso_file-"^str
-  | PC.TDisable -> "disable"
-  | PC.TExtends -> "extends"
-  | PC.TDepends -> "depends"
-  | PC.TOn -> "on"
-  | PC.TEver -> "ever"
-  | PC.TNever -> "never"
-  | PC.TExists -> "exists"
-  | PC.TForall -> "forall"
-  | PC.TReverse -> "reverse"
-  | PC.TError -> "error"
-  | PC.TWords -> "words"
-
-  | PC.TNothing -> "nothing"
-
-  | PC.Tchar(clt) -> "char"^(line_type2c  clt)
-  | PC.Tshort(clt) -> "short"^(line_type2c clt)
-  | PC.Tint(clt) -> "int"^(line_type2c clt)
-  | PC.Tdouble(clt) -> "double"^(line_type2c clt)
-  | PC.Tfloat(clt) -> "float"^(line_type2c clt)
-  | PC.Tlong(clt) -> "long"^(line_type2c clt)
-  | PC.Tvoid(clt) -> "void"^(line_type2c clt)
-  | PC.Tstruct(clt) -> "struct"^(line_type2c clt)
-  | PC.Tunion(clt) -> "union"^(line_type2c clt)
-  | PC.Tunsigned(clt) -> "unsigned"^(line_type2c clt)
-  | PC.Tsigned(clt) -> "signed"^(line_type2c clt)
-  | PC.Tstatic(clt) -> "static"^(line_type2c clt)
-  | PC.Tinline(clt) -> "inline"^(line_type2c clt)
-  | PC.Ttypedef(clt) -> "typedef"^(line_type2c clt)
-  | PC.Tattr(s,clt) -> s^(line_type2c clt)
-  | PC.Tauto(clt) -> "auto"^(line_type2c clt)
-  | PC.Tregister(clt) -> "register"^(line_type2c clt)
-  | PC.Textern(clt) -> "extern"^(line_type2c clt)
-  | PC.Tconst(clt) -> "const"^(line_type2c clt)
-  | PC.Tvolatile(clt) -> "volatile"^(line_type2c clt)
-
-  | PC.TPragma(s) -> s
-  | PC.TIncludeL(s,clt) -> (pr "#include \"%s\"" s)^(line_type2c clt)
-  | PC.TIncludeNL(s,clt) -> (pr "#include <%s>" s)^(line_type2c clt)
-  | PC.TDefine(clt,_) -> "#define"^(line_type2c clt)
-  | PC.TDefineParam(clt,_,_) -> "#define_param"^(line_type2c clt)
-  | PC.TMinusFile(s,clt) -> (pr "--- %s" s)^(line_type2c clt)
-  | PC.TPlusFile(s,clt) -> (pr "+++ %s" s)^(line_type2c clt)
-
-  | PC.TInc(clt) -> "++"^(line_type2c clt)
-  | PC.TDec(clt) -> "--"^(line_type2c clt)
-       
-  | PC.TIf(clt) -> "if"^(line_type2c clt)
-  | PC.TElse(clt) -> "else"^(line_type2c clt)
-  | PC.TWhile(clt) -> "while"^(line_type2c clt)
-  | PC.TFor(clt) -> "for"^(line_type2c clt)
-  | PC.TDo(clt) -> "do"^(line_type2c clt)
-  | PC.TSwitch(clt) -> "switch"^(line_type2c clt)
-  | PC.TCase(clt) -> "case"^(line_type2c clt)
-  | PC.TDefault(clt) -> "default"^(line_type2c clt)
-  | PC.TReturn(clt) -> "return"^(line_type2c clt)
-  | PC.TBreak(clt) -> "break"^(line_type2c clt)
-  | PC.TContinue(clt) -> "continue"^(line_type2c clt)
-  | PC.TGoto(clt) -> "goto"^(line_type2c clt)
-  | PC.TIdent(s,clt) -> (pr "ident-%s" s)^(line_type2c clt)
-  | PC.TTypeId(s,clt) -> (pr "typename-%s" s)^(line_type2c clt)
-  | PC.TDeclarerId(s,clt) -> (pr "declarername-%s" s)^(line_type2c clt)
-  | PC.TIteratorId(s,clt) -> (pr "iteratorname-%s" s)^(line_type2c clt)
-  | PC.TMetaDeclarer(_,_,_,clt) -> "declmeta"^(line_type2c clt)
-  | PC.TMetaIterator(_,_,_,clt) -> "itermeta"^(line_type2c clt)
-
-  | PC.TSizeof(clt) -> "sizeof"^(line_type2c clt)
-
-  | PC.TString(x,clt) -> x^(line_type2c clt)
-  | PC.TChar(x,clt) -> x^(line_type2c clt)
-  | PC.TFloat(x,clt) -> x^(line_type2c clt)
-  | PC.TInt(x,clt) -> x^(line_type2c clt)
-
-  | PC.TOrLog(clt) -> "||"^(line_type2c clt)
-  | PC.TAndLog(clt) -> "&&"^(line_type2c clt)
-  | PC.TOr(clt) -> "|"^(line_type2c clt)
-  | PC.TXor(clt) -> "^"^(line_type2c clt)
-  | PC.TAnd (clt) -> "&"^(line_type2c clt)
-  | PC.TEqEq(clt) -> "=="^(line_type2c clt)
-  | PC.TNotEq(clt) -> "!="^(line_type2c clt)
-  | PC.TLogOp(op,clt) ->
-      (match op with
-       Ast.Inf -> "<"
-      |        Ast.InfEq -> "<="
-      |        Ast.Sup -> ">"
-      |        Ast.SupEq -> ">="
-      |        _ -> failwith "not possible")
-      ^(line_type2c clt)
-  | PC.TShOp(op,clt) ->
-      (match op with
-       Ast.DecLeft -> "<<"
-      |        Ast.DecRight -> ">>"
-      |        _ -> failwith "not possible")
-      ^(line_type2c clt)
-  | PC.TPlus(clt) -> "+"^(line_type2c clt)
-  | PC.TMinus(clt) -> "-"^(line_type2c clt)
-  | PC.TMul(clt) -> "*"^(line_type2c clt)
-  | PC.TDmOp(op,clt) ->
-      (match op with
-       Ast.Div -> "/"
-      |        Ast.Mod -> "%"
-      |        _ -> failwith "not possible")
-      ^(line_type2c clt)
-  | PC.TTilde (clt) -> "~"^(line_type2c clt)
-
-  | PC.TMetaParam(_,_,clt) -> "parammeta"^(line_type2c clt)
-  | PC.TMetaParamList(_,_,_,clt) -> "paramlistmeta"^(line_type2c clt)
-  | PC.TMetaConst(_,_,_,_,clt) -> "constmeta"^(line_type2c clt)
-  | PC.TMetaErr(_,_,_,clt) -> "errmeta"^(line_type2c clt)
-  | PC.TMetaExp(_,_,_,_,clt) -> "expmeta"^(line_type2c clt)
-  | PC.TMetaIdExp(_,_,_,_,clt) -> "idexpmeta"^(line_type2c clt)
-  | PC.TMetaLocalIdExp(_,_,_,_,clt) -> "localidexpmeta"^(line_type2c clt)
-  | PC.TMetaExpList(_,_,_,clt) -> "explistmeta"^(line_type2c clt)
-  | PC.TMetaId(_,_,_,clt)    -> "idmeta"^(line_type2c clt)
-  | PC.TMetaType(_,_,clt)    -> "typemeta"^(line_type2c clt)
-  | PC.TMetaStm(_,_,clt)   -> "stmmeta"^(line_type2c clt)
-  | PC.TMetaStmList(_,_,clt)   -> "stmlistmeta"^(line_type2c clt)
-  | PC.TMetaFunc(_,_,_,clt)  -> "funcmeta"^(line_type2c clt)
-  | PC.TMetaLocalFunc(_,_,_,clt) -> "funcmeta"^(line_type2c clt)
-  | PC.TMetaPos(_,_,_,clt)   -> "posmeta"
-  | PC.TMPtVirg -> ";"
-  | PC.TArobArob -> "@@"
-  | PC.TArob -> "@"
-  | PC.TPArob -> "P@"
-
-  | PC.TWhen(clt) -> "WHEN"^(line_type2c clt)
-  | PC.TAny(clt) -> "ANY"^(line_type2c clt)
-  | PC.TStrict(clt) -> "STRICT"^(line_type2c clt)
-  | PC.TEllipsis(clt) -> "..."^(line_type2c clt)
-(*
-  | PC.TCircles(clt)  -> "ooo"^(line_type2c clt)
-  | PC.TStars(clt)    -> "***"^(line_type2c clt)
-*)
-
-  | PC.TOEllipsis(clt) -> "<..."^(line_type2c clt)
-  | PC.TCEllipsis(clt) -> "...>"^(line_type2c clt)
-  | PC.TPOEllipsis(clt) -> "<+..."^(line_type2c clt)
-  | PC.TPCEllipsis(clt) -> "...+>"^(line_type2c clt)
-(*
-  | PC.TOCircles(clt)  -> "<ooo"^(line_type2c clt)
-  | PC.TCCircles(clt)  -> "ooo>"^(line_type2c clt)
-  | PC.TOStars(clt)    -> "<***"^(line_type2c clt)
-  | PC.TCStars(clt)    -> "***>"^(line_type2c clt)
-*)
-  | PC.TBang0 -> "!"
-  | PC.TPlus0 -> "+"
-  | PC.TWhy0  -> "?"
-
-  | PC.TWhy(clt)   -> "?"^(line_type2c clt)
-  | PC.TDotDot(clt)   -> ":"^(line_type2c clt)
-  | PC.TBang(clt)  -> "!"^(line_type2c clt)
-  | PC.TOPar(clt)  -> "("^(line_type2c clt)
-  | PC.TOPar0(clt) -> "("^(line_type2c clt)
-  | PC.TMid0(clt)  -> "|"^(line_type2c clt)
-  | PC.TCPar(clt)  -> ")"^(line_type2c clt)
-  | PC.TCPar0(clt) -> ")"^(line_type2c clt)
-
-  | PC.TOBrace(clt) -> "{"^(line_type2c clt)
-  | PC.TCBrace(clt) -> "}"^(line_type2c clt)
-  | PC.TOCro(clt) -> "["^(line_type2c clt)
-  | PC.TCCro(clt) -> "]"^(line_type2c clt)
-
-  | PC.TPtrOp(clt) -> "->"^(line_type2c clt)
-
-  | PC.TEq(clt) -> "="^(line_type2c clt)
-  | PC.TAssign(_,clt) -> "=op"^(line_type2c clt)
-  | PC.TDot(clt) -> "."^(line_type2c clt)
-  | PC.TComma(clt) -> ","^(line_type2c clt)
-  | PC.TPtVirg(clt) -> ";"^(line_type2c clt)
-
-  | PC.EOF -> "eof"
-  | PC.TLineEnd(clt) -> "line end"
-  | PC.TInvalid -> "invalid"
-  | PC.TFunDecl(clt) -> "fundecl"
-
-  | PC.TIso -> "<=>"
-  | PC.TRightIso -> "=>"
-  | PC.TIsoTopLevel -> "TopLevel"
-  | PC.TIsoExpression -> "Expression"
-  | PC.TIsoArgExpression -> "ArgExpression"
-  | PC.TIsoTestExpression -> "TestExpression"
-  | PC.TIsoStatement -> "Statement"
-  | PC.TIsoDeclaration -> "Declaration"
-  | PC.TIsoType -> "Type"
-  | PC.TScriptData s -> s
-
-let print_tokens s tokens =
-  Printf.printf "%s\n" s;
-  List.iter (function x -> Printf.printf "%s " (token2c x)) tokens;
-  Printf.printf "\n\n";
-  flush stdout
-
-type plus = PLUS | NOTPLUS | SKIP
-
-let plus_attachable (tok,_) =
-  match tok with
-    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt) | PC.Tstatic(clt)
-  | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt)
-  | PC.Tauto(clt) | PC.Tregister(clt)
-  | PC.Textern(clt) | PC.Tconst(clt) | PC.Tvolatile(clt)
-
-  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt) | PC.TDefine(clt,_)
-  | PC.TDefineParam(clt,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
-
-  | PC.TInc(clt) | PC.TDec(clt)
-       
-  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
-  | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt) | PC.TReturn(clt)
-  | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt) | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-
-  | PC.TSizeof(clt)
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt)
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt)
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt)
-  | PC.TDmOp(_,clt) | PC.TTilde (clt)
-
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt)
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaErr(_,_,_,clt)
-  | PC.TMetaExp(_,_,_,_,clt) | PC.TMetaIdExp(_,_,_,_,clt)
-  | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt)
-  | PC.TMetaId(_,_,_,clt)
-  | PC.TMetaType(_,_,clt) | PC.TMetaStm(_,_,clt)  
-  | PC.TMetaStmList(_,_,clt)  | PC.TMetaFunc(_,_,_,clt) 
-  | PC.TMetaLocalFunc(_,_,_,clt)
-
-  | PC.TWhen(clt) | PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
-  (* | PC.TCircles(clt) | PC.TStars(clt) *)
-
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt) 
-  | PC.TCPar(clt)
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt)
-
-  | PC.TPtrOp(clt)
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
-  | PC.TPtVirg(clt) ->
-      if line_type clt = D.PLUS then PLUS else NOTPLUS
-
-  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar0(clt)
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt) 
-  | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (* | PC.TOCircles(clt)
-  | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *) -> NOTPLUS
-  | PC.TMetaPos(nm,_,_,_) -> NOTPLUS
-
-  | _ -> SKIP
-
-let get_clt (tok,_) =
-  match tok with
-    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt) | PC.Tstatic(clt)
-  | PC.Tinline(clt) | PC.Tattr(_,clt) | PC.Tauto(clt) | PC.Tregister(clt)
-  | PC.Textern(clt) | PC.Tconst(clt) | PC.Tvolatile(clt)
-
-  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt) | PC.TDefine(clt,_)
-  | PC.TDefineParam(clt,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
-
-  | PC.TInc(clt) | PC.TDec(clt)
-       
-  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
-  | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt) | PC.TReturn(clt)
-  | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt) | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-
-  | PC.TSizeof(clt)
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt)
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt)
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt)
-  | PC.TDmOp(_,clt) | PC.TTilde (clt)
-
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt)
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaErr(_,_,_,clt)
-  | PC.TMetaExp(_,_,_,_,clt) | PC.TMetaIdExp(_,_,_,_,clt)
-  | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt)
-  | PC.TMetaId(_,_,_,clt)
-  | PC.TMetaType(_,_,clt) | PC.TMetaStm(_,_,clt)  
-  | PC.TMetaStmList(_,_,clt)  | PC.TMetaFunc(_,_,_,clt) 
-  | PC.TMetaLocalFunc(_,_,_,clt) | PC.TMetaPos(_,_,_,clt)
-
-  | PC.TWhen(clt) | PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
-  (* | PC.TCircles(clt) | PC.TStars(clt) *)
-
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt) 
-  | PC.TCPar(clt)
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt)
-
-  | PC.TPtrOp(clt)
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
-  | PC.TPtVirg(clt)
-
-  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar0(clt)
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt)
-  | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (* | PC.TOCircles(clt)
-  | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *) -> clt
-
-  | _ -> failwith "no clt"
-
-let update_clt (tok,x) clt =
-  match tok with
-    PC.Tchar(_) -> (PC.Tchar(clt),x)
-  | PC.Tshort(_) -> (PC.Tshort(clt),x)
-  | PC.Tint(_) -> (PC.Tint(clt),x)
-  | PC.Tdouble(_) -> (PC.Tdouble(clt),x)
-  | PC.Tfloat(_) -> (PC.Tfloat(clt),x)
-  | PC.Tlong(_) -> (PC.Tlong(clt),x)
-  | PC.Tvoid(_) -> (PC.Tvoid(clt),x)
-  | PC.Tstruct(_) -> (PC.Tstruct(clt),x)
-  | PC.Tunion(_) -> (PC.Tunion(clt),x)
-  | PC.Tunsigned(_) -> (PC.Tunsigned(clt),x)
-  | PC.Tsigned(_) -> (PC.Tsigned(clt),x)
-  | PC.Tstatic(_) -> (PC.Tstatic(clt),x)
-  | PC.Tinline(_) -> (PC.Tinline(clt),x)
-  | PC.Ttypedef(_) -> (PC.Ttypedef(clt),x)
-  | PC.Tattr(s,_) -> (PC.Tattr(s,clt),x)
-  | PC.Tauto(_) -> (PC.Tauto(clt),x)
-  | PC.Tregister(_) -> (PC.Tregister(clt),x)
-  | PC.Textern(_) -> (PC.Textern(clt),x)
-  | PC.Tconst(_) -> (PC.Tconst(clt),x)
-  | PC.Tvolatile(_) -> (PC.Tvolatile(clt),x)
-
-  | PC.TIncludeL(s,_) -> (PC.TIncludeL(s,clt),x)
-  | PC.TIncludeNL(s,_) -> (PC.TIncludeNL(s,clt),x)
-  | PC.TDefine(_,a) -> (PC.TDefine(clt,a),x)
-  | PC.TDefineParam(_,a,b) -> (PC.TDefineParam(clt,a,b),x)
-  | PC.TMinusFile(s,_) -> (PC.TMinusFile(s,clt),x)
-  | PC.TPlusFile(s,_) -> (PC.TPlusFile(s,clt),x)
-
-  | PC.TInc(_) -> (PC.TInc(clt),x)
-  | PC.TDec(_) -> (PC.TDec(clt),x)
-       
-  | PC.TIf(_) -> (PC.TIf(clt),x)
-  | PC.TElse(_) -> (PC.TElse(clt),x)
-  | PC.TWhile(_) -> (PC.TWhile(clt),x)
-  | PC.TFor(_) -> (PC.TFor(clt),x)
-  | PC.TDo(_) -> (PC.TDo(clt),x)
-  | PC.TSwitch(_) -> (PC.TSwitch(clt),x)
-  | PC.TCase(_) -> (PC.TCase(clt),x)
-  | PC.TDefault(_) -> (PC.TDefault(clt),x)
-  | PC.TReturn(_) -> (PC.TReturn(clt),x)
-  | PC.TBreak(_) -> (PC.TBreak(clt),x)
-  | PC.TContinue(_) -> (PC.TContinue(clt),x)
-  | PC.TGoto(_) -> (PC.TGoto(clt),x)
-  | PC.TIdent(s,_) -> (PC.TIdent(s,clt),x)
-  | PC.TTypeId(s,_) -> (PC.TTypeId(s,clt),x)
-  | PC.TDeclarerId(s,_) -> (PC.TDeclarerId(s,clt),x)
-  | PC.TIteratorId(s,_) -> (PC.TIteratorId(s,clt),x)
-
-  | PC.TSizeof(_) -> (PC.TSizeof(clt),x)
-
-  | PC.TString(s,_) -> (PC.TString(s,clt),x)
-  | PC.TChar(s,_) -> (PC.TChar(s,clt),x)
-  | PC.TFloat(s,_) -> (PC.TFloat(s,clt),x)
-  | PC.TInt(s,_) -> (PC.TInt(s,clt),x)
-
-  | PC.TOrLog(_) -> (PC.TOrLog(clt),x)
-  | PC.TAndLog(_) -> (PC.TAndLog(clt),x)
-  | PC.TOr(_) -> (PC.TOr(clt),x)
-  | PC.TXor(_) -> (PC.TXor(clt),x)
-  | PC.TAnd (_) -> (PC.TAnd (clt),x)
-  | PC.TEqEq(_) -> (PC.TEqEq(clt),x)
-  | PC.TNotEq(_) -> (PC.TNotEq(clt),x)
-  | PC.TLogOp(op,_) -> (PC.TLogOp(op,clt),x)
-  | PC.TShOp(op,_) -> (PC.TShOp(op,clt),x)
-  | PC.TPlus(_) -> (PC.TPlus(clt),x)
-  | PC.TMinus(_) -> (PC.TMinus(clt),x)
-  | PC.TMul(_) -> (PC.TMul(clt),x)
-  | PC.TDmOp(op,_) -> (PC.TDmOp(op,clt),x)
-  | PC.TTilde (_) -> (PC.TTilde (clt),x)
-
-  | PC.TMetaParam(a,b,_) -> (PC.TMetaParam(a,b,clt),x)
-  | PC.TMetaParamList(a,b,c,_) -> (PC.TMetaParamList(a,b,c,clt),x)
-  | PC.TMetaConst(a,b,c,d,_) -> (PC.TMetaConst(a,b,c,d,clt),x)
-  | PC.TMetaErr(a,b,c,_) -> (PC.TMetaErr(a,b,c,clt),x)
-  | PC.TMetaExp(a,b,c,d,_) -> (PC.TMetaExp(a,b,c,d,clt),x)
-  | PC.TMetaIdExp(a,b,c,d,_) -> (PC.TMetaIdExp(a,b,c,d,clt),x)
-  | PC.TMetaLocalIdExp(a,b,c,d,_) -> (PC.TMetaLocalIdExp(a,b,c,d,clt),x)
-  | PC.TMetaExpList(a,b,c,_) -> (PC.TMetaExpList(a,b,c,clt),x)
-  | PC.TMetaId(a,b,c,_)    -> (PC.TMetaId(a,b,c,clt),x)
-  | PC.TMetaType(a,b,_)    -> (PC.TMetaType(a,b,clt),x)
-  | PC.TMetaStm(a,b,_)   -> (PC.TMetaStm(a,b,clt),x)
-  | PC.TMetaStmList(a,b,_)   -> (PC.TMetaStmList(a,b,clt),x)
-  | PC.TMetaFunc(a,b,c,_)  -> (PC.TMetaFunc(a,b,c,clt),x)
-  | PC.TMetaLocalFunc(a,b,c,_) -> (PC.TMetaLocalFunc(a,b,c,clt),x)
-
-  | PC.TWhen(_) -> (PC.TWhen(clt),x)
-  | PC.TAny(_) -> (PC.TAny(clt),x)
-  | PC.TStrict(_) -> (PC.TStrict(clt),x)
-  | PC.TEllipsis(_) -> (PC.TEllipsis(clt),x)
-(*
-  | PC.TCircles(_)  -> (PC.TCircles(clt),x)
-  | PC.TStars(_)    -> (PC.TStars(clt),x)
-*)
-
-  | PC.TOEllipsis(_) -> (PC.TOEllipsis(clt),x)
-  | PC.TCEllipsis(_) -> (PC.TCEllipsis(clt),x)
-  | PC.TPOEllipsis(_) -> (PC.TPOEllipsis(clt),x)
-  | PC.TPCEllipsis(_) -> (PC.TPCEllipsis(clt),x)
-(*
-  | PC.TOCircles(_)  -> (PC.TOCircles(clt),x)
-  | PC.TCCircles(_)  -> (PC.TCCircles(clt),x)
-  | PC.TOStars(_)    -> (PC.TOStars(clt),x)
-  | PC.TCStars(_)    -> (PC.TCStars(clt),x)
-*)
-
-  | PC.TWhy(_)   -> (PC.TWhy(clt),x)
-  | PC.TDotDot(_)   -> (PC.TDotDot(clt),x)
-  | PC.TBang(_)  -> (PC.TBang(clt),x)
-  | PC.TOPar(_)  -> (PC.TOPar(clt),x)
-  | PC.TOPar0(_) -> (PC.TOPar0(clt),x)
-  | PC.TMid0(_)  -> (PC.TMid0(clt),x)
-  | PC.TCPar(_)  -> (PC.TCPar(clt),x)
-  | PC.TCPar0(_) -> (PC.TCPar0(clt),x)
-
-  | PC.TOBrace(_) -> (PC.TOBrace(clt),x)
-  | PC.TCBrace(_) -> (PC.TCBrace(clt),x)
-  | PC.TOCro(_) -> (PC.TOCro(clt),x)
-  | PC.TCCro(_) -> (PC.TCCro(clt),x)
-
-  | PC.TPtrOp(_) -> (PC.TPtrOp(clt),x)
-
-  | PC.TEq(_) -> (PC.TEq(clt),x)
-  | PC.TAssign(s,_) -> (PC.TAssign(s,clt),x)
-  | PC.TDot(_) -> (PC.TDot(clt),x)
-  | PC.TComma(_) -> (PC.TComma(clt),x)
-  | PC.TPtVirg(_) -> (PC.TPtVirg(clt),x)
-
-  | PC.TLineEnd(_) -> (PC.TLineEnd(clt),x)
-  | PC.TFunDecl(_) -> (PC.TFunDecl(clt),x)
-
-  | _ -> failwith "no clt"
-
-
-(* ----------------------------------------------------------------------- *)
-
-let make_name prefix ln = Printf.sprintf "%s starting on line %d" prefix ln
-
-(* ----------------------------------------------------------------------- *)
-(* Read tokens *)
-
-let wrap_lexbuf_info lexbuf =
-  (Lexing.lexeme lexbuf, Lexing.lexeme_start lexbuf)    
-
-let tokens_all_full token table file get_ats lexbuf end_markers :
-    (bool * ((PC.token * (string * (int * int) * (int * int))) list)) =
-  try 
-    let rec aux () = 
-      let result = token lexbuf in
-      let info = (Lexing.lexeme lexbuf, 
-                  (table.(Lexing.lexeme_start lexbuf)),
-                  (Lexing.lexeme_start lexbuf, Lexing.lexeme_end lexbuf)) in
-      if result = PC.EOF 
-      then
-       if get_ats
-       then failwith "unexpected end of file in a metavariable declaration"
-       else (false,[(result,info)])
-      else if List.mem result end_markers
-      then (true,[(result,info)])
-      else
-       let (more,rest) = aux() in
-       (more,(result, info)::rest)
-    in aux () 
-  with
-    e -> pr2 (Common.error_message file (wrap_lexbuf_info lexbuf) ); raise e
-
-let tokens_all table file get_ats lexbuf end_markers :
-    (bool * ((PC.token * (string * (int * int) * (int * int))) list)) =
-  tokens_all_full Lexer_cocci.token table file get_ats lexbuf end_markers
-
-let tokens_script_all table file get_ats lexbuf end_markers :
-    (bool * ((PC.token * (string * (int * int) * (int * int))) list)) =
-  tokens_all_full Lexer_script.token table file get_ats lexbuf end_markers
-
-(* ----------------------------------------------------------------------- *)
-(* Split tokens into minus and plus fragments *)
-
-let split t clt =
-  let (d,_,_,_,_,_,_,_) = clt in
-  match d with
-    D.MINUS | D.OPTMINUS | D.UNIQUEMINUS -> ([t],[])
-  | D.PLUS -> ([],[t])
-  | D.CONTEXT | D.UNIQUE | D.OPT -> ([t],[t])
-
-let split_token ((tok,_) as t) =
-  match tok with
-    PC.TIdentifier | PC.TConstant | PC.TExpression | PC.TIdExpression
-  | PC.TStatement | PC.TPosition | PC.TPosAny
-  | PC.TFunction | PC.TTypedef | PC.TDeclarer | PC.TIterator | PC.TName
-  | PC.TType | PC.TParameter | PC.TLocal | PC.Tlist | PC.TFresh | PC.TPure
-  | PC.TContext | PC.TRuleName(_) | PC.TUsing | PC.TDisable | PC.TExtends
-  | PC.TPathIsoFile(_)
-  | PC.TDepends | PC.TOn | PC.TEver | PC.TNever | PC.TExists | PC.TForall
-  | PC.TReverse
-  | PC.TError | PC.TWords | PC.TNothing -> ([t],[t])
-
-  | PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
-  | PC.Tstatic(clt) | PC.Tauto(clt) | PC.Tregister(clt) | PC.Textern(clt)
-  | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt)
-  | PC.Tconst(clt) | PC.Tvolatile(clt) -> split t clt
-
-  | PC.TPragma(s) -> ([],[t]) (* only allowed in + *)
-  | PC.TPlusFile(s,clt) | PC.TMinusFile(s,clt)
-  | PC.TIncludeL(s,clt) | PC.TIncludeNL(s,clt) ->
-      split t clt
-  | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_) -> split t clt
-
-  | PC.TIf(clt) | PC.TElse(clt)  | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
-  | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt)
-  | PC.TSizeof(clt)
-  | PC.TReturn(clt) | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt)
-  | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaExp(_,_,_,_,clt)
-  | PC.TMetaIdExp(_,_,_,_,clt) | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt)
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt)
-  | PC.TMetaId(_,_,_,clt) | PC.TMetaType(_,_,clt)
-  | PC.TMetaStm(_,_,clt) | PC.TMetaStmList(_,_,clt) | PC.TMetaErr(_,_,_,clt)
-  | PC.TMetaFunc(_,_,_,clt) | PC.TMetaLocalFunc(_,_,_,clt)
-  | PC.TMetaDeclarer(_,_,_,clt) | PC.TMetaIterator(_,_,_,clt) -> split t clt
-  | PC.TMPtVirg | PC.TArob | PC.TArobArob -> ([t],[t])
-  | PC.TPArob | PC.TMetaPos(_,_,_,_) -> ([t],[])
-
-  | PC.TFunDecl(clt)
-  | PC.TWhen(clt) | PC.TAny(clt) | PC.TStrict(clt) | PC.TLineEnd(clt)
-  | PC.TEllipsis(clt) (* | PC.TCircles(clt) | PC.TStars(clt) *) -> split t clt
-
-  | PC.TOEllipsis(_) | PC.TCEllipsis(_) (* clt must be context *)
-  | PC.TPOEllipsis(_) | PC.TPCEllipsis(_) (* clt must be context *)
-(*
-  | PC.TOCircles(_) | PC.TCCircles(_)   (* clt must be context *)
-  | PC.TOStars(_) | PC.TCStars(_)       (* clt must be context *)
-*)
-  | PC.TBang0 | PC.TPlus0 | PC.TWhy0 ->
-      ([t],[t])
-
-  | PC.TWhy(clt)  | PC.TDotDot(clt)
-  | PC.TBang(clt) | PC.TOPar(clt) | PC.TOPar0(clt)
-  | PC.TMid0(clt) | PC.TCPar(clt) | PC.TCPar0(clt) -> split t clt
-
-  | PC.TInc(clt) | PC.TDec(clt) -> split t clt
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt) ->
-      split t clt
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt)
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt)
-  | PC.TDmOp(_,clt) | PC.TTilde (clt) -> split t clt
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) -> split t clt
-  | PC.TOCro(clt) | PC.TCCro(clt) -> split t clt
-
-  | PC.TPtrOp(clt) -> split t clt
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
-  | PC.TPtVirg(clt) -> split t clt
-
-  | PC.EOF | PC.TInvalid -> ([t],[t])
-
-  | PC.TIso | PC.TRightIso
-  | PC.TIsoExpression | PC.TIsoStatement | PC.TIsoDeclaration | PC.TIsoType
-  | PC.TIsoTopLevel | PC.TIsoArgExpression | PC.TIsoTestExpression ->
-      failwith "unexpected tokens"
-  | PC.TScriptData s -> ([t],[t])
-
-let split_token_stream tokens =
-  let rec loop = function
-      [] -> ([],[])
-    | token::tokens ->
-       let (minus,plus) = split_token token in
-       let (minus_stream,plus_stream) = loop tokens in
-       (minus@minus_stream,plus@plus_stream) in
-  loop tokens
-
-(* ----------------------------------------------------------------------- *)
-(* Find function names *)
-(* This addresses a shift-reduce problem in the parser, allowing us to
-distinguish a function declaration from a function call even if the latter
-has no return type.  Undoubtedly, this is not very nice, but it doesn't
-seem very convenient to refactor the grammar to get around the problem. *)
-
-let rec find_function_names = function
-    [] -> []
-  | ((PC.TIdent(_,clt),info) as t1) :: ((PC.TOPar(_),_) as t2) :: rest
-  | ((PC.TMetaId(_,_,_,clt),info) as t1) :: ((PC.TOPar(_),_) as t2) :: rest
-  | ((PC.TMetaFunc(_,_,_,clt),info) as t1) :: ((PC.TOPar(_),_) as t2) :: rest
-  | ((PC.TMetaLocalFunc(_,_,_,clt),info) as t1)::((PC.TOPar(_),_) as t2)::rest
-    ->
-      let rec skip level = function
-         [] -> ([],false,[])
-       | ((PC.TCPar(_),_) as t)::rest ->
-           let level = level - 1 in
-           if level = 0
-           then ([t],true,rest)
-           else let (pre,found,post) = skip level rest in (t::pre,found,post)
-       | ((PC.TOPar(_),_) as t)::rest ->
-           let level = level + 1 in
-           let (pre,found,post) = skip level rest in (t::pre,found,post)
-       | ((PC.TArobArob,_) as t)::rest
-       | ((PC.TArob,_) as t)::rest
-       | ((PC.EOF,_) as t)::rest -> ([t],false,rest)
-       | t::rest ->
-           let (pre,found,post) = skip level rest in (t::pre,found,post) in
-      let (pre,found,post) = skip 1 rest in
-      (match (found,post) with
-       (true,((PC.TOBrace(_),_) as t3)::rest) ->
-         (PC.TFunDecl(clt),info) :: t1 :: t2 :: pre @
-         t3 :: (find_function_names rest)
-      |        _ -> t1 :: t2 :: pre @ find_function_names post)
-  | t :: rest -> t :: find_function_names rest
-
-(* ----------------------------------------------------------------------- *)
-(* an attribute is an identifier that preceeds another identifier and
-   begins with __ *)
-
-let rec detect_attr l =
-  let is_id = function
-      (PC.TIdent(_,_),_) | (PC.TMetaId(_,_,_,_),_) | (PC.TMetaFunc(_,_,_,_),_)
-    | (PC.TMetaLocalFunc(_,_,_,_),_) -> true
-    | _ -> false in    
-  let rec loop = function
-      [] -> []
-    | [x] -> [x]
-    | ((PC.TIdent(nm,clt),info) as t1)::id::rest when is_id id ->
-       if String.length nm > 2 && String.sub nm 0 2 = "__"
-       then (PC.Tattr(nm,clt),info)::(loop (id::rest))
-       else t1::(loop (id::rest))
-    | x::xs -> x::(loop xs) in
-  loop l
-
-(* ----------------------------------------------------------------------- *)
-(* Look for variable declarations where the name is a typedef name.
-We assume that C code does not contain a multiplication as a top-level
-statement. *)
-
-(* bug: once a type, always a type, even if the same name is later intended
-   to be used as a real identifier *)
-let detect_types in_meta_decls l =
-  let is_delim infn = function
-      (PC.TOEllipsis(_),_) (* | (PC.TOCircles(_),_) | (PC.TOStars(_),_) *)
-    | (PC.TPOEllipsis(_),_) (* | (PC.TOCircles(_),_) | (PC.TOStars(_),_) *)
-    | (PC.TEllipsis(_),_) (* | (PC.TCircles(_),_) | (PC.TStars(_),_) *)
-    | (PC.TPtVirg(_),_) | (PC.TOBrace(_),_) | (PC.TCBrace(_),_)
-    | (PC.TPure,_) | (PC.TContext,_)
-    | (PC.Tstatic(_),_) | (PC.Textern(_),_)
-    | (PC.Tinline(_),_) | (PC.Ttypedef(_),_) | (PC.Tattr(_),_) -> true
-    | (PC.TComma(_),_) when infn > 0 or in_meta_decls -> true
-    | (PC.TDotDot(_),_) when in_meta_decls -> true
-    | _ -> false in
-  let is_choices_delim = function
-      (PC.TOBrace(_),_) | (PC.TComma(_),_) -> true | _ -> false in
-  let is_id = function
-      (PC.TIdent(_,_),_) | (PC.TMetaId(_,_,_,_),_) | (PC.TMetaFunc(_,_,_,_),_)
-    | (PC.TMetaLocalFunc(_,_,_,_),_) -> true
-    | (PC.TMetaParam(_,_,_),_)
-    | (PC.TMetaParamList(_,_,_,_),_)
-    | (PC.TMetaConst(_,_,_,_,_),_)
-    | (PC.TMetaErr(_,_,_,_),_)
-    | (PC.TMetaExp(_,_,_,_,_),_)
-    | (PC.TMetaIdExp(_,_,_,_,_),_)
-    | (PC.TMetaLocalIdExp(_,_,_,_,_),_)
-    | (PC.TMetaExpList(_,_,_,_),_)
-    | (PC.TMetaType(_,_,_),_)
-    | (PC.TMetaStm(_,_,_),_)
-    | (PC.TMetaStmList(_,_,_),_)
-    | (PC.TMetaPos(_,_,_,_),_) -> in_meta_decls 
-    | _ -> false in
-  let redo_id ident clt v =
-    !Data.add_type_name ident;
-    (PC.TTypeId(ident,clt),v) in
-  let rec loop start infn type_names = function
-      (* infn: 0 means not in a function header
-        > 0 means in a function header, after infn - 1 unmatched open parens*)
-      [] -> []
-    | ((PC.TOBrace(clt),v)::_) as all when in_meta_decls ->
-       collect_choices type_names all (* never a function header *)
-    | delim::(PC.TIdent(ident,clt),v)::((PC.TMul(_),_) as x)::rest
-      when is_delim infn delim ->
-       let newid = redo_id ident clt v in
-       delim::newid::x::(loop false infn (ident::type_names) rest)
-    | delim::(PC.TIdent(ident,clt),v)::id::rest
-      when is_delim infn delim && is_id id ->
-       let newid = redo_id ident clt v in
-       delim::newid::id::(loop false infn (ident::type_names) rest)
-    | ((PC.TFunDecl(_),_) as fn)::rest ->
-       fn::(loop false 1 type_names rest)
-    | ((PC.TOPar(_),_) as lp)::rest when infn > 0 ->
-       lp::(loop false (infn + 1) type_names rest)
-    | ((PC.TCPar(_),_) as rp)::rest when infn > 0 ->
-       if infn - 1 = 1
-       then rp::(loop false 0 type_names rest) (* 0 means not in fn header *)
-       else rp::(loop false (infn - 1) type_names rest)
-    | (PC.TIdent(ident,clt),v)::((PC.TMul(_),_) as x)::rest when start ->
-       let newid = redo_id ident clt v in
-       newid::x::(loop false infn (ident::type_names) rest)
-    | (PC.TIdent(ident,clt),v)::id::rest when start && is_id id ->
-       let newid = redo_id ident clt v in
-       newid::id::(loop false infn (ident::type_names) rest)
-    | (PC.TIdent(ident,clt),v)::rest when List.mem ident type_names ->
-       (PC.TTypeId(ident,clt),v)::(loop false infn type_names rest)
-    | ((PC.TIdent(ident,clt),v) as x)::rest ->
-       x::(loop false infn type_names rest)
-    | x::rest -> x::(loop false infn type_names rest)
-  and collect_choices type_names = function
-      [] -> [] (* should happen, but let the parser detect that *)
-    | (PC.TCBrace(clt),v)::rest ->
-       (PC.TCBrace(clt),v)::(loop false 0 type_names rest)
-    | delim::(PC.TIdent(ident,clt),v)::rest
-      when is_choices_delim delim ->
-       let newid = redo_id ident clt v in
-       delim::newid::(collect_choices (ident::type_names) rest)
-    | x::rest -> x::(collect_choices type_names rest) in
-  loop true 0 [] l
-
-
-(* ----------------------------------------------------------------------- *)
-(* Insert TLineEnd tokens at the end of a line that contains a WHEN.
-   WHEN is restricted to a single line, to avoid ambiguity in eg:
-   ... WHEN != x
-   +3 *)
-
-let token2line (tok,_) =
-  match tok with
-    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt) 
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt) 
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
-  | PC.Tstatic(clt) | PC.Tauto(clt) | PC.Tregister(clt) | PC.Textern(clt) 
-  | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt) | PC.Tconst(clt)
-  | PC.Tvolatile(clt) 
-
-  | PC.TInc(clt) | PC.TDec(clt) 
-       
-  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt) 
-  | PC.TSwitch (clt) | PC.TCase (clt) | PC.TDefault (clt) | PC.TSizeof (clt)
-  | PC.TReturn(clt) | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt)
-  | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-  | PC.TMetaDeclarer(_,_,_,clt) | PC.TMetaIterator(_,_,_,clt)
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt) 
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt) 
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt) 
-  | PC.TDmOp(_,clt) | PC.TTilde (clt) 
-
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt) 
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaExp(_,_,_,_,clt)
-  | PC.TMetaIdExp(_,_,_,_,clt) | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt) 
-  | PC.TMetaId(_,_,_,clt) | PC.TMetaType(_,_,clt)
-  | PC.TMetaStm(_,_,clt) | PC.TMetaStmList(_,_,clt) | PC.TMetaFunc(_,_,_,clt)
-  | PC.TMetaLocalFunc(_,_,_,clt) | PC.TMetaPos(_,_,_,clt)
-
-  | PC.TFunDecl(clt)
-  | PC.TWhen(clt) | PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
-  (* | PC.TCircles(clt) | PC.TStars(clt) *)
-
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt) 
-  | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (*| PC.TOCircles(clt)
-  | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *)
-
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt)
-  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar(clt)  
-  | PC.TCPar0(clt) 
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt) 
-
-  | PC.TPtrOp(clt) 
-
-  | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_)
-  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt)
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt) 
-  | PC.TPtVirg(clt) ->
-      let (_,line,_,_,_,_,_,_) = clt in Some line
-
-  | _ -> None
-
-let rec insert_line_end = function
-    [] -> []
-  | (((PC.TWhen(clt),q) as x)::xs) ->
-      x::(find_line_end true (token2line x) clt q xs)
-  | (((PC.TDefine(clt,_),q) as x)::xs)
-  | (((PC.TDefineParam(clt,_,_),q) as x)::xs) ->
-      x::(find_line_end false (token2line x) clt q xs)
-  | x::xs -> x::(insert_line_end xs)
-
-and find_line_end inwhen line clt q = function
-    (* don't know what 2nd component should be so just use the info of
-       the When.  Also inherit - of when, if any *)
-    [] -> [(PC.TLineEnd(clt),q)]
-  | ((PC.TIdent("strict",clt),a) as x)::xs when token2line x = line ->
-      (PC.TStrict(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("STRICT",clt),a) as x)::xs when token2line x = line ->
-      (PC.TStrict(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("any",clt),a) as x)::xs when token2line x = line ->
-      (PC.TAny(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("ANY",clt),a) as x)::xs when token2line x = line ->
-      (PC.TAny(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("forall",clt),a) as x)::xs when token2line x = line ->
-      (PC.TForall,a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("exists",clt),a) as x)::xs when token2line x = line ->
-      (PC.TExists,a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TComma(clt),a) as x)::xs when token2line x = line ->
-      (PC.TComma(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TPArob,a) as x)::xs -> (* no line #, just assume on the same line *)
-      x :: (find_line_end inwhen line clt q xs)
-  | x::xs when token2line x = line -> x :: (find_line_end inwhen line clt q xs)
-  | xs -> (PC.TLineEnd(clt),q)::(insert_line_end xs)
-
-(* ----------------------------------------------------------------------- *)
-(* process pragmas: they can only be used in + code, and adjacent to
-another + token.  They are concatenated to the string representation of
-that other token. *)
-
-let rec collect_all_pragmas collected = function
-    (PC.TPragma(s),_)::rest -> collect_all_pragmas (s::collected) rest
-  | l -> (List.rev collected,l)
-
-let rec collect_up_to_pragmas skipped = function
-    [] -> None (* didn't reach a pragma, so nothing to do *)
-  | ((PC.TPragma(s),_) as t)::rest ->
-      let (pragmas,rest) = collect_all_pragmas [] (t::rest) in
-      Some (List.rev skipped,pragmas,rest)
-  | x::xs ->
-      match plus_attachable x with
-       PLUS -> None
-      |        NOTPLUS -> None
-      |        SKIP -> collect_up_to_pragmas (x::skipped) xs
-
-let rec collect_up_to_plus skipped = function
-    [] -> failwith "nothing to attach a pragma to"
-  | x::xs ->
-      match plus_attachable x with
-       PLUS -> (List.rev skipped,x,xs)
-      |        NOTPLUS -> failwith "nothing to attach a pragma to"
-      |        SKIP -> collect_up_to_plus (x::skipped) xs
-
-let rec process_pragmas = function
-    [] -> []
-  | ((PC.TPragma(s),_)::_) as l ->
-      let (pragmas,rest) = collect_all_pragmas [] l in
-      let (skipped,aft,rest) = collect_up_to_plus [] rest in
-      let (a,b,c,d,e,strbef,straft,pos) = get_clt aft in
-      skipped@
-      (process_pragmas ((update_clt aft (a,b,c,d,e,pragmas,straft,pos))::rest))
-  | bef::xs ->
-      (match plus_attachable bef with
-       PLUS ->
-         (match collect_up_to_pragmas [] xs with
-           Some(skipped,pragmas,rest) ->
-             let (a,b,c,d,e,strbef,straft,pos) = get_clt bef in
-             (update_clt bef (a,b,c,d,e,strbef,pragmas,pos))::
-             skipped@(process_pragmas rest)
-         | None -> bef::(process_pragmas xs))
-      |        _ -> bef::(process_pragmas xs))
-
-(* ----------------------------------------------------------------------- *)
-(* Drop ... ... .  This is only allowed in + code, and arises when there is
-some - code between the ... *)
-(* drop whens as well - they serve no purpose in + code and they cause
-problems for drop_double_dots *)
-
-let rec drop_when = function
-    [] -> []
-  | (PC.TWhen(clt),info)::xs ->
-      let rec loop = function
-         [] -> []
-       | (PC.TLineEnd(_),info)::xs -> drop_when xs
-       | x::xs -> loop xs in
-      loop xs
-  | x::xs -> x::drop_when xs
-
-(* instead of dropping the double dots, we put TNothing in between them.
-these vanish after the parser, but keeping all the ...s in the + code makes
-it easier to align the + and - code in context_neg and in preparation for the
-isomorphisms.  This shouldn't matter because the context code of the +
-slice is mostly ignored anyway *)
-let rec drop_double_dots l =
-  let start = function
-      (PC.TOEllipsis(_),_) | (PC.TPOEllipsis(_),_)
- (* | (PC.TOCircles(_),_) | (PC.TOStars(_),_) *) ->
-       true
-    | _ -> false in
-  let middle = function
-      (PC.TEllipsis(_),_) (* | (PC.TCircles(_),_) | (PC.TStars(_),_) *) -> true
-    | _ -> false in
-  let final = function
-      (PC.TCEllipsis(_),_) | (PC.TPCEllipsis(_),_)
- (* | (PC.TCCircles(_),_) | (PC.TCStars(_),_) *) ->
-       true
-    | _ -> false in
-  let rec loop ((_,i) as prev) = function
-      [] -> []
-    | x::rest when middle prev && middle x -> (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when start prev && middle x ->  (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when start prev && final x ->   (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when middle prev && final x ->  (PC.TNothing,i)::x::(loop x rest)
-    | x::rest -> x :: (loop x rest) in
-  match l with
-    [] -> []
-  | (x::xs) -> x :: loop x xs
-
-let rec fix f l =
-  let cur = f l in
-  if l = cur then l else fix f cur
-
-(* ( | ... | ) also causes parsing problems *)
-
-exception Not_empty
-
-let rec drop_empty_thing starter middle ender = function
-    [] -> []
-  | hd::rest when starter hd ->
-      let rec loop = function
-         x::rest when middle x -> loop rest
-       | x::rest when ender x -> rest
-       | _ -> raise Not_empty in
-      (match try Some(loop rest) with Not_empty -> None with
-       Some x -> drop_empty_thing starter middle ender x
-      |        None -> hd :: drop_empty_thing starter middle ender rest)
-  | x::rest -> x :: drop_empty_thing starter middle ender rest
-
-let drop_empty_or =
-  drop_empty_thing
-    (function (PC.TOPar0(_),_) -> true | _ -> false)
-    (function (PC.TMid0(_),_) -> true | _ -> false)
-    (function (PC.TCPar0(_),_) -> true | _ -> false)
-
-let drop_empty_nest = drop_empty_thing
-
-(* ----------------------------------------------------------------------- *)
-(* Read tokens *)
-
-let get_s_starts (_, (s,_,(starts, ends))) =
-  Printf.printf "%d %d\n" starts ends; (s, starts)
-
-let pop2 l = 
-  let v = List.hd !l in
-  l := List.tl !l;
-  v
-
-let reinit _ =
-  PC.reinit (function _ -> PC.TArobArob (* a handy token *))
-    (Lexing.from_function
-       (function buf -> function n -> raise Common.Impossible))
-
-let parse_one str parsefn file toks =
-  let all_tokens = ref toks in
-  let cur_tok    = ref (List.hd !all_tokens) in
-
-  let lexer_function _ =
-      let (v, info) = pop2 all_tokens in
-      cur_tok := (v, info);
-      v in
-
-  let lexbuf_fake =
-    Lexing.from_function
-      (function buf -> function n -> raise Common.Impossible)
-  in
-
-  reinit();
-
-  try parsefn lexer_function lexbuf_fake 
-  with 
-    Lexer_cocci.Lexical s ->
-      failwith
-       (Printf.sprintf "%s: lexical error: %s\n =%s\n" str s
-          (Common.error_message file (get_s_starts !cur_tok) ))
-  | Parser_cocci_menhir.Error ->
-      failwith
-       (Printf.sprintf "%s: parse error: \n = %s\n" str
-          (Common.error_message file (get_s_starts !cur_tok) ))
-  | Semantic_cocci.Semantic s ->
-      failwith
-       (Printf.sprintf "%s: semantic error: %s\n =%s\n" str s
-          (Common.error_message file (get_s_starts !cur_tok) ))
-
-  | e -> raise e
-
-let prepare_tokens tokens =
-  insert_line_end
-    (detect_types false (find_function_names (detect_attr tokens)))
-
-let rec consume_minus_positions = function
-    [] -> []
-  | x::(PC.TPArob,_)::(PC.TMetaPos(name,constraints,per,clt),_)::xs ->
-      let (arity,ln,lln,offset,col,strbef,straft,_) = get_clt x in
-      let name = Parse_aux.clt2mcode name clt in
-      let x =
-       update_clt x
-         (arity,ln,lln,offset,col,strbef,straft,
-          Ast0.MetaPos(name,constraints,per)) in
-      x::(consume_minus_positions xs)
-  | x::xs -> x::consume_minus_positions xs
-
-let any_modif rule =
-  let mcode x =
-    match Ast0.get_mcode_mcodekind x with
-      Ast0.MINUS _ | Ast0.PLUS -> true
-    | _ -> false in
-  let donothing r k e = k e in
-  let bind x y = x or y in
-  let option_default = false in
-  let fn =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing donothing
-      donothing donothing in
-  List.exists fn.V0.combiner_top_level rule
-
-let drop_last extra l = List.rev(extra@(List.tl(List.rev l)))
-
-let partition_either l =
-  let rec part_either left right = function
-  | [] -> (List.rev left, List.rev right)
-  | x :: l -> 
-      (match x with
-      | Common.Left  e -> part_either (e :: left) right l
-      | Common.Right e -> part_either left (e :: right) l) in
-  part_either [] [] l
-
-let get_metavars parse_fn table file lexbuf =
-  let rec meta_loop acc (* read one decl at a time *) =
-    let (_,tokens) =
-      tokens_all table file true lexbuf [PC.TArobArob;PC.TMPtVirg] in
-    let tokens = prepare_tokens tokens in
-    match tokens with
-      [(PC.TArobArob,_)] -> List.rev acc
-    | _ ->
-       let metavars = parse_one "meta" parse_fn file tokens in
-       meta_loop (metavars@acc) in
-  partition_either (meta_loop [])
-
-let get_script_metavars parse_fn table file lexbuf =
-  let rec meta_loop acc =
-    let (_, tokens) =
-      tokens_all table file true lexbuf [PC.TArobArob; PC.TMPtVirg] in
-    let tokens = prepare_tokens tokens in
-    match tokens with
-      [(PC.TArobArob, _)] -> List.rev acc
-    | _ -> 
-      let metavar = parse_one "scriptmeta" parse_fn file tokens in
-      meta_loop (metavar :: acc)
-  in
-  meta_loop []
-
-let get_rule_name parse_fn starts_with_name get_tokens file prefix =
-  Data.in_rule_name := true;
-  let mknm _ = make_name prefix (!Lexer_cocci.line) in
-  let name_res =
-    if starts_with_name
-    then
-      let (_,tokens) = get_tokens [PC.TArob] in
-      match parse_one "rule name" parse_fn file tokens with
-       Ast.CocciRulename (None,a,b,c,d,e) -> 
-          Ast.CocciRulename (Some (mknm()),a,b,c,d,e)
-      |        Ast.CocciRulename (Some nm,a,b,c,d,e) ->
-         (if List.mem nm reserved_names
-         then failwith (Printf.sprintf "invalid name %s\n" nm));
-         Ast.CocciRulename (Some nm,a,b,c,d,e)
-      | Ast.ScriptRulename(s,deps) -> Ast.ScriptRulename(s,deps)
-    else
-      Ast.CocciRulename(Some(mknm()),Ast.NoDep,[],[],Ast.Undetermined,false) in
-  Data.in_rule_name := false;
-  name_res
-
-let parse_iso file =
-  let table = Common.full_charpos_to_pos file in
-  Common.with_open_infile file (fun channel ->
-    let lexbuf = Lexing.from_channel channel in
-    let get_tokens = tokens_all table file false lexbuf in
-    let res =
-      match get_tokens [PC.TArobArob;PC.TArob] with
-       (true,start) ->
-         let parse_start start =
-           let rev = List.rev start in
-           let (arob,_) = List.hd rev in
-           (arob = PC.TArob,List.rev(List.tl rev)) in
-         let (starts_with_name,start) = parse_start start in
-         let rec loop starts_with_name start =
-           (!Data.init_rule)();
-           (* get metavariable declarations - have to be read before the
-              rest *)
-           let (rule_name,_,_,_,_,_) =
-              match get_rule_name PC.iso_rule_name starts_with_name get_tokens
-               file ("iso file "^file) with
-                Ast.CocciRulename (Some n,a,b,c,d,e) -> (n,a,b,c,d,e)
-              | _ -> failwith "Script rules cannot appear in isomorphism rules"
-              in
-           Ast0.rule_name := rule_name;
-           Data.in_meta := true;
-           let iso_metavars =
-             match get_metavars PC.iso_meta_main table file lexbuf with
-               (iso_metavars,[]) -> iso_metavars
-             | _ -> failwith "unexpected inheritance in iso" in
-           Data.in_meta := false;
-           (* get the rule *)
-           let (more,tokens) =
-             get_tokens
-               [PC.TIsoStatement;PC.TIsoExpression;PC.TIsoArgExpression;
-                 PC.TIsoTestExpression;
-                 PC.TIsoDeclaration;PC.TIsoType;PC.TIsoTopLevel] in
-           let next_start = List.hd(List.rev tokens) in
-           let dummy_info = ("",(-1,-1),(-1,-1)) in
-           let tokens = drop_last [(PC.EOF,dummy_info)] tokens in
-           let tokens = prepare_tokens (start@tokens) in
-            (*
-              print_tokens "iso tokens" tokens;
-           *)
-           let entry = parse_one "iso main" PC.iso_main file tokens in
-           let entry = List.map (List.map Test_exps.process_anything) entry in
-           if more
-           then (* The code below allows a header like Statement list,
-                   which is more than one word.  We don't have that any more,
-                   but the code is left here in case it is put back. *)
-             match get_tokens [PC.TArobArob;PC.TArob] with
-               (true,start) ->
-                 let (starts_with_name,start) = parse_start start in
-                 (iso_metavars,entry,rule_name) ::
-                 (loop starts_with_name (next_start::start))
-             | _ -> failwith "isomorphism ends early"
-           else [(iso_metavars,entry,rule_name)] in
-         loop starts_with_name start
-      | (false,_) -> [] in
-    res)
-
-let parse_iso_files existing_isos iso_files extra_path =
-  let get_names = List.map (function (_,_,nm) -> nm) in
-  let old_names = get_names existing_isos in
-  Data.in_iso := true;
-  let (res,_) =
-    List.fold_left
-      (function (prev,names) ->
-       function file ->
-         Lexer_cocci.init ();
-         let file =
-           match file with
-             Common.Left(fl)  -> Filename.concat extra_path fl
-           | Common.Right(fl) -> Filename.concat Config.path fl in
-         let current = parse_iso file in
-         let new_names = get_names current in
-         if List.exists (function x -> List.mem x names) new_names
-         then failwith (Printf.sprintf "repeated iso name found in %s" file);
-         (current::prev,new_names @ names))
-      ([],old_names) iso_files in
-  Data.in_iso := false;
-  existing_isos@(List.concat (List.rev res))
-
-let parse file =
-  let table = Common.full_charpos_to_pos file in
-  Common.with_open_infile file (fun channel ->
-  let lexbuf = Lexing.from_channel channel in
-  let get_tokens = tokens_all table file false lexbuf in
-  Data.in_prolog := true;
-  let initial_tokens = get_tokens [PC.TArobArob;PC.TArob] in
-  Data.in_prolog := false;
-  let res =
-    match initial_tokens with
-    (true,data) ->
-      (match List.rev data with
-       ((PC.TArobArob as x),_)::_ | ((PC.TArob as x),_)::_ ->
-         let iso_files =
-           parse_one "iso file names" PC.include_main file data in
-
-          let parse_cocci_rule old_metas
-             (rule_name, dependencies, iso, dropiso, exists, is_expression) =
-            Ast0.rule_name := rule_name;
-            Data.inheritable_positions :=
-               rule_name :: !Data.inheritable_positions;
-
-            (* get metavariable declarations *)
-            Data.in_meta := true;
-            let (metavars, inherited_metavars) =
-              get_metavars PC.meta_main table file lexbuf in
-            Data.in_meta := false;
-            Hashtbl.add Data.all_metadecls rule_name metavars;
-            Hashtbl.add Lexer_cocci.rule_names rule_name ();
-            Hashtbl.add Lexer_cocci.all_metavariables rule_name
-              (Hashtbl.fold
-                (fun key v rest -> (key,v)::rest)
-                Lexer_cocci.metavariables []);
-
-            (* get transformation rules *)
-            let (more, tokens) = get_tokens [PC.TArobArob; PC.TArob] in
-            let (minus_tokens, plus_tokens) = split_token_stream tokens in
-
-           let minus_tokens = consume_minus_positions minus_tokens in
-           let minus_tokens = prepare_tokens minus_tokens in
-           let plus_tokens = prepare_tokens plus_tokens in
-
-           (*
-              print_tokens "minus tokens" minus_tokens;
-              print_tokens "plus tokens" plus_tokens;
-           *)
-
-           let plus_tokens =
-             process_pragmas
-               (fix (function x -> drop_double_dots (drop_empty_or x))
-                  (drop_when plus_tokens)) in
-           (*
-               print_tokens "plus tokens" plus_tokens;
-              Printf.printf "before minus parse\n";
-           *)
-           let minus_res =
-             if is_expression
-             then parse_one "minus" PC.minus_exp_main file minus_tokens
-             else parse_one "minus" PC.minus_main file minus_tokens in
-           (*
-              Unparse_ast0.unparse minus_res;
-              Printf.printf "before plus parse\n";
-           *)
-           let plus_res =
-             if !Flag.sgrep_mode2
-             then (* not actually used for anything, except context_neg *)
-               List.map
-                 (Iso_pattern.rebuild_mcode None).V0.rebuilder_top_level
-                 minus_res
-             else
-               if is_expression
-               then parse_one "plus" PC.plus_exp_main file plus_tokens
-               else parse_one "plus" PC.plus_main file plus_tokens in
-           (*
-              Printf.printf "after plus parse\n";
-           *)
-
-           (if not !Flag.sgrep_mode2 &&
-             (any_modif minus_res or any_modif plus_res)
-           then Data.inheritable_positions := []);
-
-           Check_meta.check_meta rule_name old_metas inherited_metavars
-             metavars minus_res plus_res;
-
-            (more, Ast0.CocciRule ((minus_res, metavars,
-              (iso, dropiso, dependencies, rule_name, exists)),
-              (plus_res, metavars)), metavars, tokens) in
-
-          let parse_script_rule language old_metas deps =
-            let get_tokens = tokens_script_all table file false lexbuf in
-
-              (* meta-variables *)
-            Data.in_meta := true;
-            let metavars =
-             get_script_metavars PC.script_meta_main table file lexbuf in
-            Data.in_meta := false;
-
-            let exists_in old_metas (py,(r,m)) =
-              let test (rr,mr) x =
-                let (ro,vo) = Ast.get_meta_name x in
-                ro = rr && vo = mr in
-              List.exists (test (r,m)) old_metas in
-
-           List.iter
-             (function x ->
-               let meta2c (r,n) = Printf.sprintf "%s.%s" r n in
-               if not (exists_in old_metas x) then
-                 failwith
-                   (Printf.sprintf
-                      "Script references unknown meta-variable: %s"
-                      (meta2c(snd x))))
-             metavars;
-
-              (* script code *)
-            let (more, tokens) = get_tokens [PC.TArobArob; PC.TArob] in
-            let data =
-              match List.hd tokens with
-                (PC.TScriptData(s),_) -> s
-              | (PC.TArobArob,_) | (PC.TArob,_) -> ""
-              | _ -> failwith "Malformed script rule" in
-            (more,Ast0.ScriptRule(language, deps, metavars, data),[],tokens) in
-
-          let parse_rule old_metas starts_with_name =
-            let rulename =
-             get_rule_name PC.rule_name starts_with_name get_tokens file
-               "rule" in
-            match rulename with
-              Ast.CocciRulename (Some s, a, b, c, d, e) -> 
-                parse_cocci_rule old_metas (s, a, b, c, d, e)
-            | Ast.ScriptRulename (l,deps) -> parse_script_rule l old_metas deps
-            | _ -> failwith "Malformed rule name"
-            in
-
-         let rec loop old_metas starts_with_name =
-           (!Data.init_rule)();
-
-            let gen_starts_with_name more tokens =
-              more &&
-              (match List.hd (List.rev tokens) with
-                    (PC.TArobArob,_) -> false
-                  | (PC.TArob,_) -> true
-                  | _ -> failwith "unexpected token") 
-            in
-
-            let (more, rule, metavars, tokens) =
-              parse_rule old_metas starts_with_name in
-            if more then
-              rule::
-             (loop (metavars @ old_metas) (gen_starts_with_name more tokens))
-            else [rule];
-
-            in
-
-         (iso_files, loop [] (x = PC.TArob))
-      |        _ -> failwith "unexpected code before the first rule\n")
-  | (false,[(PC.TArobArob,_)]) | (false,[(PC.TArob,_)]) ->
-      ([],([] : Ast0.parsed_rule list))
-  | _ -> failwith "unexpected code before the first rule\n" in
-  res)
-
-(* parse to ast0 and then convert to ast *)
-let process file isofile verbose =
-  let extra_path = Filename.dirname file in
-  Lexer_cocci.init();
-  let (iso_files, rules) = parse file in
-  let std_isos =
-    match isofile with
-      None -> []
-    | Some iso_file -> parse_iso_files [] [Common.Left iso_file] "" in
-  let global_isos = parse_iso_files std_isos iso_files extra_path in
-  let rules = Unitary_ast0.do_unitary rules in
-  let parsed =
-    List.map
-      (function
-          Ast0.ScriptRule (a,b,c,d) -> [([],Ast.ScriptRule (a,b,c,d))]
-       | Ast0.CocciRule
-           ((minus, metavarsm,
-             (iso, dropiso, dependencies, rule_name, exists)),
-            (plus, metavars)) ->
-              let chosen_isos =
-                parse_iso_files global_isos
-                  (List.map (function x -> Common.Left x) iso)
-                  extra_path in
-              let chosen_isos =
-            (* check that dropped isos are actually available *)
-                (try
-                  let iso_names =
-                    List.map (function (_,_,nm) -> nm) chosen_isos in
-                  let local_iso_names = reserved_names @ iso_names in
-                  let bad_dropped =
-                    List.find
-                      (function dropped ->
-                        not (List.mem dropped local_iso_names))
-                      dropiso in
-                  failwith
-                    ("invalid iso name " ^ bad_dropped ^ " in " ^ rule_name)
-                with Not_found -> ());
-                if List.mem "all" dropiso 
-                then 
-                  if List.length dropiso = 1
-                  then []
-                  else failwith "disable all should only be by itself"
-                else (* drop those isos *)
-                  List.filter
-                    (function (_,_,nm) -> not (List.mem nm dropiso))
-                    chosen_isos in
-              List.iter Iso_compile.process chosen_isos;
-              let dropped_isos =
-                match reserved_names with
-                  "all"::others ->
-                    (match dropiso with
-                      ["all"] -> others
-                    | _ ->
-                        List.filter (function x -> List.mem x dropiso) others)
-                | _ ->
-                    failwith
-                      "bad list of reserved names - all must be at start" in
-              let minus = Test_exps.process minus in
-              let minus = Compute_lines.compute_lines minus in
-              let plus = Compute_lines.compute_lines plus in
-              let is_exp =
-                (* only relevant to Flag.make_hrule *)
-                (* doesn't handle multiple minirules properly, but since
-                   we don't really handle them in lots of other ways, it
-                   doesn't seem very important *)
-                match plus with
-                  [] -> [false]
-                | p::_ ->
-                    [match Ast0.unwrap p with
-                      Ast0.CODE c ->
-                        (match List.map Ast0.unwrap (Ast0.undots c) with
-                          [Ast0.Exp e] -> true | _ -> false)
-                    | _ -> false] in
-              let minus = Arity.minus_arity minus in
-              let ((metavars,minus),function_prototypes) =
-                Function_prototypes.process
-                  rule_name metavars dropped_isos minus plus in
-          (* warning! context_neg side-effects its arguments *)
-              let (m,p) = List.split (Context_neg.context_neg minus plus) in 
-              Type_infer.type_infer p;
-              (if not !Flag.sgrep_mode2 then Insert_plus.insert_plus m p);
-              Type_infer.type_infer minus;
-              let (extra_meta, minus) =
-                Iso_pattern.apply_isos chosen_isos minus rule_name in
-              let minus = Comm_assoc.comm_assoc minus rule_name dropiso in
-              let minus =
-                if !Flag.sgrep_mode2 then minus
-                else Single_statement.single_statement minus in
-              let minus = Simple_assignments.simple_assignments minus in
-              let minus_ast =
-                Ast0toast.ast0toast rule_name dependencies dropped_isos
-                  exists minus is_exp in
-              match function_prototypes with
-                None -> [(extra_meta @ metavars, minus_ast)]
-              | Some mv_fp ->
-                  [(extra_meta @ metavars, minus_ast); mv_fp])
-(*          Ast0.CocciRule ((minus, metavarsm, (iso, dropiso, dependencies, rule_name, exists)), (plus, metavars))*)
-      rules in
-  let parsed = List.concat parsed in
-  let disjd = Disjdistr.disj parsed in
-  
-  let (code,fvs,neg_pos,ua,pos) = Free_vars.free_vars disjd in
-  if !Flag_parsing_cocci.show_SP
-  then List.iter Pretty_print_cocci.unparse code;
-  
-  let grep_tokens =
-    Common.profile_code "get_constants"
-      (fun () -> Get_constants.get_constants code) in (* for grep *)
-  let glimpse_tokens2 =
-    Common.profile_code "get_glimpse_constants"
-      (fun () -> Get_constants2.get_constants code neg_pos) in(* for glimpse *)
-  (code,fvs,neg_pos,ua,pos,grep_tokens,glimpse_tokens2)
diff --git a/parsing_cocci/.#parse_cocci.ml.1.163 b/parsing_cocci/.#parse_cocci.ml.1.163
deleted file mode 100644 (file)
index a38afe9..0000000
+++ /dev/null
@@ -1,1530 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* splits the entire file into minus and plus fragments, and parses each
-separately (thus duplicating work for the parsing of the context elements) *)
-
-module D = Data
-module PC = Parser_cocci_menhir
-module V0 = Visitor_ast0
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-let pr = Printf.sprintf
-(*let pr2 s = prerr_string s; prerr_string "\n"; flush stderr*)
-let pr2 s = Printf.printf "%s\n" s
-
-(* for isomorphisms.  all should be at the front!!! *)
-let reserved_names = 
-  ["all";"optional_storage";"optional_qualifier";"value_format";"comm_assoc"]
-
-(* ----------------------------------------------------------------------- *)
-(* Debugging... *)
-
-let line_type (d,_,_,_,_,_,_,_) = d
-
-let line_type2c tok =
-  match line_type tok with
-    D.MINUS | D.OPTMINUS | D.UNIQUEMINUS -> ":-"
-  | D.PLUS -> ":+"
-  | D.CONTEXT | D.UNIQUE | D.OPT -> ""
-
-let token2c (tok,_) =
- match tok with
-    PC.TIdentifier -> "identifier"
-  | PC.TType -> "type"
-  | PC.TParameter -> "parameter"
-  | PC.TConstant -> "constant"
-  | PC.TExpression -> "expression"
-  | PC.TIdExpression -> "idexpression"
-  | PC.TStatement -> "statement"
-  | PC.TPosition -> "position"
-  | PC.TPosAny -> "any"
-  | PC.TFunction -> "function"
-  | PC.TLocal -> "local"
-  | PC.Tlist -> "list"
-  | PC.TFresh -> "fresh"
-  | PC.TPure -> "pure"
-  | PC.TContext -> "context"
-  | PC.TTypedef -> "typedef"
-  | PC.TDeclarer -> "declarer"
-  | PC.TIterator -> "iterator"
-  | PC.TName -> "name"
-  | PC.TRuleName str -> "rule_name-"^str
-  | PC.TUsing -> "using"
-  | PC.TPathIsoFile str -> "path_iso_file-"^str
-  | PC.TDisable -> "disable"
-  | PC.TExtends -> "extends"
-  | PC.TDepends -> "depends"
-  | PC.TOn -> "on"
-  | PC.TEver -> "ever"
-  | PC.TNever -> "never"
-  | PC.TExists -> "exists"
-  | PC.TForall -> "forall"
-  | PC.TReverse -> "reverse"
-  | PC.TError -> "error"
-  | PC.TWords -> "words"
-
-  | PC.TNothing -> "nothing"
-
-  | PC.Tchar(clt) -> "char"^(line_type2c  clt)
-  | PC.Tshort(clt) -> "short"^(line_type2c clt)
-  | PC.Tint(clt) -> "int"^(line_type2c clt)
-  | PC.Tdouble(clt) -> "double"^(line_type2c clt)
-  | PC.Tfloat(clt) -> "float"^(line_type2c clt)
-  | PC.Tlong(clt) -> "long"^(line_type2c clt)
-  | PC.Tvoid(clt) -> "void"^(line_type2c clt)
-  | PC.Tstruct(clt) -> "struct"^(line_type2c clt)
-  | PC.Tunion(clt) -> "union"^(line_type2c clt)
-  | PC.Tunsigned(clt) -> "unsigned"^(line_type2c clt)
-  | PC.Tsigned(clt) -> "signed"^(line_type2c clt)
-  | PC.Tstatic(clt) -> "static"^(line_type2c clt)
-  | PC.Tinline(clt) -> "inline"^(line_type2c clt)
-  | PC.Ttypedef(clt) -> "typedef"^(line_type2c clt)
-  | PC.Tattr(s,clt) -> s^(line_type2c clt)
-  | PC.Tauto(clt) -> "auto"^(line_type2c clt)
-  | PC.Tregister(clt) -> "register"^(line_type2c clt)
-  | PC.Textern(clt) -> "extern"^(line_type2c clt)
-  | PC.Tconst(clt) -> "const"^(line_type2c clt)
-  | PC.Tvolatile(clt) -> "volatile"^(line_type2c clt)
-
-  | PC.TPragma(s) -> s
-  | PC.TIncludeL(s,clt) -> (pr "#include \"%s\"" s)^(line_type2c clt)
-  | PC.TIncludeNL(s,clt) -> (pr "#include <%s>" s)^(line_type2c clt)
-  | PC.TDefine(clt,_) -> "#define"^(line_type2c clt)
-  | PC.TDefineParam(clt,_,_) -> "#define_param"^(line_type2c clt)
-  | PC.TMinusFile(s,clt) -> (pr "--- %s" s)^(line_type2c clt)
-  | PC.TPlusFile(s,clt) -> (pr "+++ %s" s)^(line_type2c clt)
-
-  | PC.TInc(clt) -> "++"^(line_type2c clt)
-  | PC.TDec(clt) -> "--"^(line_type2c clt)
-       
-  | PC.TIf(clt) -> "if"^(line_type2c clt)
-  | PC.TElse(clt) -> "else"^(line_type2c clt)
-  | PC.TWhile(clt) -> "while"^(line_type2c clt)
-  | PC.TFor(clt) -> "for"^(line_type2c clt)
-  | PC.TDo(clt) -> "do"^(line_type2c clt)
-  | PC.TSwitch(clt) -> "switch"^(line_type2c clt)
-  | PC.TCase(clt) -> "case"^(line_type2c clt)
-  | PC.TDefault(clt) -> "default"^(line_type2c clt)
-  | PC.TReturn(clt) -> "return"^(line_type2c clt)
-  | PC.TBreak(clt) -> "break"^(line_type2c clt)
-  | PC.TContinue(clt) -> "continue"^(line_type2c clt)
-  | PC.TGoto(clt) -> "goto"^(line_type2c clt)
-  | PC.TIdent(s,clt) -> (pr "ident-%s" s)^(line_type2c clt)
-  | PC.TTypeId(s,clt) -> (pr "typename-%s" s)^(line_type2c clt)
-  | PC.TDeclarerId(s,clt) -> (pr "declarername-%s" s)^(line_type2c clt)
-  | PC.TIteratorId(s,clt) -> (pr "iteratorname-%s" s)^(line_type2c clt)
-  | PC.TMetaDeclarer(_,_,_,clt) -> "declmeta"^(line_type2c clt)
-  | PC.TMetaIterator(_,_,_,clt) -> "itermeta"^(line_type2c clt)
-
-  | PC.TSizeof(clt) -> "sizeof"^(line_type2c clt)
-
-  | PC.TString(x,clt) -> x^(line_type2c clt)
-  | PC.TChar(x,clt) -> x^(line_type2c clt)
-  | PC.TFloat(x,clt) -> x^(line_type2c clt)
-  | PC.TInt(x,clt) -> x^(line_type2c clt)
-
-  | PC.TOrLog(clt) -> "||"^(line_type2c clt)
-  | PC.TAndLog(clt) -> "&&"^(line_type2c clt)
-  | PC.TOr(clt) -> "|"^(line_type2c clt)
-  | PC.TXor(clt) -> "^"^(line_type2c clt)
-  | PC.TAnd (clt) -> "&"^(line_type2c clt)
-  | PC.TEqEq(clt) -> "=="^(line_type2c clt)
-  | PC.TNotEq(clt) -> "!="^(line_type2c clt)
-  | PC.TLogOp(op,clt) ->
-      (match op with
-       Ast.Inf -> "<"
-      |        Ast.InfEq -> "<="
-      |        Ast.Sup -> ">"
-      |        Ast.SupEq -> ">="
-      |        _ -> failwith "not possible")
-      ^(line_type2c clt)
-  | PC.TShOp(op,clt) ->
-      (match op with
-       Ast.DecLeft -> "<<"
-      |        Ast.DecRight -> ">>"
-      |        _ -> failwith "not possible")
-      ^(line_type2c clt)
-  | PC.TPlus(clt) -> "+"^(line_type2c clt)
-  | PC.TMinus(clt) -> "-"^(line_type2c clt)
-  | PC.TMul(clt) -> "*"^(line_type2c clt)
-  | PC.TDmOp(op,clt) ->
-      (match op with
-       Ast.Div -> "/"
-      |        Ast.Mod -> "%"
-      |        _ -> failwith "not possible")
-      ^(line_type2c clt)
-  | PC.TTilde (clt) -> "~"^(line_type2c clt)
-
-  | PC.TMetaParam(_,_,clt) -> "parammeta"^(line_type2c clt)
-  | PC.TMetaParamList(_,_,_,clt) -> "paramlistmeta"^(line_type2c clt)
-  | PC.TMetaConst(_,_,_,_,clt) -> "constmeta"^(line_type2c clt)
-  | PC.TMetaErr(_,_,_,clt) -> "errmeta"^(line_type2c clt)
-  | PC.TMetaExp(_,_,_,_,clt) -> "expmeta"^(line_type2c clt)
-  | PC.TMetaIdExp(_,_,_,_,clt) -> "idexpmeta"^(line_type2c clt)
-  | PC.TMetaLocalIdExp(_,_,_,_,clt) -> "localidexpmeta"^(line_type2c clt)
-  | PC.TMetaExpList(_,_,_,clt) -> "explistmeta"^(line_type2c clt)
-  | PC.TMetaId(_,_,_,clt)    -> "idmeta"^(line_type2c clt)
-  | PC.TMetaType(_,_,clt)    -> "typemeta"^(line_type2c clt)
-  | PC.TMetaStm(_,_,clt)   -> "stmmeta"^(line_type2c clt)
-  | PC.TMetaStmList(_,_,clt)   -> "stmlistmeta"^(line_type2c clt)
-  | PC.TMetaFunc(_,_,_,clt)  -> "funcmeta"^(line_type2c clt)
-  | PC.TMetaLocalFunc(_,_,_,clt) -> "funcmeta"^(line_type2c clt)
-  | PC.TMetaPos(_,_,_,clt)   -> "posmeta"
-  | PC.TMPtVirg -> ";"
-  | PC.TArobArob -> "@@"
-  | PC.TArob -> "@"
-  | PC.TPArob -> "P@"
-  | PC.TScript -> "script"
-
-  | PC.TWhen(clt) -> "WHEN"^(line_type2c clt)
-  | PC.TWhenTrue(clt) -> "WHEN TRUE"^(line_type2c clt)
-  | PC.TWhenFalse(clt) -> "WHEN FALSE"^(line_type2c clt)
-  | PC.TAny(clt) -> "ANY"^(line_type2c clt)
-  | PC.TStrict(clt) -> "STRICT"^(line_type2c clt)
-  | PC.TEllipsis(clt) -> "..."^(line_type2c clt)
-(*
-  | PC.TCircles(clt)  -> "ooo"^(line_type2c clt)
-  | PC.TStars(clt)    -> "***"^(line_type2c clt)
-*)
-
-  | PC.TOEllipsis(clt) -> "<..."^(line_type2c clt)
-  | PC.TCEllipsis(clt) -> "...>"^(line_type2c clt)
-  | PC.TPOEllipsis(clt) -> "<+..."^(line_type2c clt)
-  | PC.TPCEllipsis(clt) -> "...+>"^(line_type2c clt)
-(*
-  | PC.TOCircles(clt)  -> "<ooo"^(line_type2c clt)
-  | PC.TCCircles(clt)  -> "ooo>"^(line_type2c clt)
-  | PC.TOStars(clt)    -> "<***"^(line_type2c clt)
-  | PC.TCStars(clt)    -> "***>"^(line_type2c clt)
-*)
-  | PC.TBang0 -> "!"
-  | PC.TPlus0 -> "+"
-  | PC.TWhy0  -> "?"
-
-  | PC.TWhy(clt)   -> "?"^(line_type2c clt)
-  | PC.TDotDot(clt)   -> ":"^(line_type2c clt)
-  | PC.TBang(clt)  -> "!"^(line_type2c clt)
-  | PC.TOPar(clt)  -> "("^(line_type2c clt)
-  | PC.TOPar0(clt) -> "("^(line_type2c clt)
-  | PC.TMid0(clt)  -> "|"^(line_type2c clt)
-  | PC.TCPar(clt)  -> ")"^(line_type2c clt)
-  | PC.TCPar0(clt) -> ")"^(line_type2c clt)
-
-  | PC.TOBrace(clt) -> "{"^(line_type2c clt)
-  | PC.TCBrace(clt) -> "}"^(line_type2c clt)
-  | PC.TOCro(clt) -> "["^(line_type2c clt)
-  | PC.TCCro(clt) -> "]"^(line_type2c clt)
-
-  | PC.TPtrOp(clt) -> "->"^(line_type2c clt)
-
-  | PC.TEq(clt) -> "="^(line_type2c clt)
-  | PC.TAssign(_,clt) -> "=op"^(line_type2c clt)
-  | PC.TDot(clt) -> "."^(line_type2c clt)
-  | PC.TComma(clt) -> ","^(line_type2c clt)
-  | PC.TPtVirg(clt) -> ";"^(line_type2c clt)
-
-  | PC.EOF -> "eof"
-  | PC.TLineEnd(clt) -> "line end"
-  | PC.TInvalid -> "invalid"
-  | PC.TFunDecl(clt) -> "fundecl"
-
-  | PC.TIso -> "<=>"
-  | PC.TRightIso -> "=>"
-  | PC.TIsoTopLevel -> "TopLevel"
-  | PC.TIsoExpression -> "Expression"
-  | PC.TIsoArgExpression -> "ArgExpression"
-  | PC.TIsoTestExpression -> "TestExpression"
-  | PC.TIsoStatement -> "Statement"
-  | PC.TIsoDeclaration -> "Declaration"
-  | PC.TIsoType -> "Type"
-  | PC.TScriptData s -> s
-
-let print_tokens s tokens =
-  Printf.printf "%s\n" s;
-  List.iter (function x -> Printf.printf "%s " (token2c x)) tokens;
-  Printf.printf "\n\n";
-  flush stdout
-
-type plus = PLUS | NOTPLUS | SKIP
-
-let plus_attachable (tok,_) =
-  match tok with
-    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt) | PC.Tstatic(clt)
-  | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt)
-  | PC.Tauto(clt) | PC.Tregister(clt)
-  | PC.Textern(clt) | PC.Tconst(clt) | PC.Tvolatile(clt)
-
-  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt) | PC.TDefine(clt,_)
-  | PC.TDefineParam(clt,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
-
-  | PC.TInc(clt) | PC.TDec(clt)
-       
-  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
-  | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt) | PC.TReturn(clt)
-  | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt) | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-
-  | PC.TSizeof(clt)
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt)
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt)
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt)
-  | PC.TDmOp(_,clt) | PC.TTilde (clt)
-
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt)
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaErr(_,_,_,clt)
-  | PC.TMetaExp(_,_,_,_,clt) | PC.TMetaIdExp(_,_,_,_,clt)
-  | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt)
-  | PC.TMetaId(_,_,_,clt)
-  | PC.TMetaType(_,_,clt) | PC.TMetaStm(_,_,clt)  
-  | PC.TMetaStmList(_,_,clt)  | PC.TMetaFunc(_,_,_,clt) 
-  | PC.TMetaLocalFunc(_,_,_,clt)
-
-  | PC.TWhen(clt) |  PC.TWhenTrue(clt) |  PC.TWhenFalse(clt)
-  | PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
-  (* | PC.TCircles(clt) | PC.TStars(clt) *)
-
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt) 
-  | PC.TCPar(clt)
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt)
-
-  | PC.TPtrOp(clt)
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
-  | PC.TPtVirg(clt) ->
-      if line_type clt = D.PLUS then PLUS else NOTPLUS
-
-  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar0(clt)
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt) 
-  | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (* | PC.TOCircles(clt)
-  | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *) -> NOTPLUS
-  | PC.TMetaPos(nm,_,_,_) -> NOTPLUS
-
-  | _ -> SKIP
-
-let get_clt (tok,_) =
-  match tok with
-    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt) | PC.Tstatic(clt)
-  | PC.Tinline(clt) | PC.Tattr(_,clt) | PC.Tauto(clt) | PC.Tregister(clt)
-  | PC.Textern(clt) | PC.Tconst(clt) | PC.Tvolatile(clt)
-
-  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt) | PC.TDefine(clt,_)
-  | PC.TDefineParam(clt,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
-
-  | PC.TInc(clt) | PC.TDec(clt)
-       
-  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
-  | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt) | PC.TReturn(clt)
-  | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt) | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-
-  | PC.TSizeof(clt)
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt)
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt)
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt)
-  | PC.TDmOp(_,clt) | PC.TTilde (clt)
-
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt)
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaErr(_,_,_,clt)
-  | PC.TMetaExp(_,_,_,_,clt) | PC.TMetaIdExp(_,_,_,_,clt)
-  | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt)
-  | PC.TMetaId(_,_,_,clt)
-  | PC.TMetaType(_,_,clt) | PC.TMetaStm(_,_,clt)  
-  | PC.TMetaStmList(_,_,clt)  | PC.TMetaFunc(_,_,_,clt) 
-  | PC.TMetaLocalFunc(_,_,_,clt) | PC.TMetaPos(_,_,_,clt)
-
-  | PC.TWhen(clt) | PC.TWhenTrue(clt) | PC.TWhenFalse(clt) |
-    PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
-  (* | PC.TCircles(clt) | PC.TStars(clt) *)
-
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt) 
-  | PC.TCPar(clt)
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt)
-
-  | PC.TPtrOp(clt)
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
-  | PC.TPtVirg(clt)
-
-  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar0(clt)
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt)
-  | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (* | PC.TOCircles(clt)
-  | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *) -> clt
-
-  | _ -> failwith "no clt"
-
-let update_clt (tok,x) clt =
-  match tok with
-    PC.Tchar(_) -> (PC.Tchar(clt),x)
-  | PC.Tshort(_) -> (PC.Tshort(clt),x)
-  | PC.Tint(_) -> (PC.Tint(clt),x)
-  | PC.Tdouble(_) -> (PC.Tdouble(clt),x)
-  | PC.Tfloat(_) -> (PC.Tfloat(clt),x)
-  | PC.Tlong(_) -> (PC.Tlong(clt),x)
-  | PC.Tvoid(_) -> (PC.Tvoid(clt),x)
-  | PC.Tstruct(_) -> (PC.Tstruct(clt),x)
-  | PC.Tunion(_) -> (PC.Tunion(clt),x)
-  | PC.Tunsigned(_) -> (PC.Tunsigned(clt),x)
-  | PC.Tsigned(_) -> (PC.Tsigned(clt),x)
-  | PC.Tstatic(_) -> (PC.Tstatic(clt),x)
-  | PC.Tinline(_) -> (PC.Tinline(clt),x)
-  | PC.Ttypedef(_) -> (PC.Ttypedef(clt),x)
-  | PC.Tattr(s,_) -> (PC.Tattr(s,clt),x)
-  | PC.Tauto(_) -> (PC.Tauto(clt),x)
-  | PC.Tregister(_) -> (PC.Tregister(clt),x)
-  | PC.Textern(_) -> (PC.Textern(clt),x)
-  | PC.Tconst(_) -> (PC.Tconst(clt),x)
-  | PC.Tvolatile(_) -> (PC.Tvolatile(clt),x)
-
-  | PC.TIncludeL(s,_) -> (PC.TIncludeL(s,clt),x)
-  | PC.TIncludeNL(s,_) -> (PC.TIncludeNL(s,clt),x)
-  | PC.TDefine(_,a) -> (PC.TDefine(clt,a),x)
-  | PC.TDefineParam(_,a,b) -> (PC.TDefineParam(clt,a,b),x)
-  | PC.TMinusFile(s,_) -> (PC.TMinusFile(s,clt),x)
-  | PC.TPlusFile(s,_) -> (PC.TPlusFile(s,clt),x)
-
-  | PC.TInc(_) -> (PC.TInc(clt),x)
-  | PC.TDec(_) -> (PC.TDec(clt),x)
-       
-  | PC.TIf(_) -> (PC.TIf(clt),x)
-  | PC.TElse(_) -> (PC.TElse(clt),x)
-  | PC.TWhile(_) -> (PC.TWhile(clt),x)
-  | PC.TFor(_) -> (PC.TFor(clt),x)
-  | PC.TDo(_) -> (PC.TDo(clt),x)
-  | PC.TSwitch(_) -> (PC.TSwitch(clt),x)
-  | PC.TCase(_) -> (PC.TCase(clt),x)
-  | PC.TDefault(_) -> (PC.TDefault(clt),x)
-  | PC.TReturn(_) -> (PC.TReturn(clt),x)
-  | PC.TBreak(_) -> (PC.TBreak(clt),x)
-  | PC.TContinue(_) -> (PC.TContinue(clt),x)
-  | PC.TGoto(_) -> (PC.TGoto(clt),x)
-  | PC.TIdent(s,_) -> (PC.TIdent(s,clt),x)
-  | PC.TTypeId(s,_) -> (PC.TTypeId(s,clt),x)
-  | PC.TDeclarerId(s,_) -> (PC.TDeclarerId(s,clt),x)
-  | PC.TIteratorId(s,_) -> (PC.TIteratorId(s,clt),x)
-
-  | PC.TSizeof(_) -> (PC.TSizeof(clt),x)
-
-  | PC.TString(s,_) -> (PC.TString(s,clt),x)
-  | PC.TChar(s,_) -> (PC.TChar(s,clt),x)
-  | PC.TFloat(s,_) -> (PC.TFloat(s,clt),x)
-  | PC.TInt(s,_) -> (PC.TInt(s,clt),x)
-
-  | PC.TOrLog(_) -> (PC.TOrLog(clt),x)
-  | PC.TAndLog(_) -> (PC.TAndLog(clt),x)
-  | PC.TOr(_) -> (PC.TOr(clt),x)
-  | PC.TXor(_) -> (PC.TXor(clt),x)
-  | PC.TAnd (_) -> (PC.TAnd (clt),x)
-  | PC.TEqEq(_) -> (PC.TEqEq(clt),x)
-  | PC.TNotEq(_) -> (PC.TNotEq(clt),x)
-  | PC.TLogOp(op,_) -> (PC.TLogOp(op,clt),x)
-  | PC.TShOp(op,_) -> (PC.TShOp(op,clt),x)
-  | PC.TPlus(_) -> (PC.TPlus(clt),x)
-  | PC.TMinus(_) -> (PC.TMinus(clt),x)
-  | PC.TMul(_) -> (PC.TMul(clt),x)
-  | PC.TDmOp(op,_) -> (PC.TDmOp(op,clt),x)
-  | PC.TTilde (_) -> (PC.TTilde (clt),x)
-
-  | PC.TMetaParam(a,b,_) -> (PC.TMetaParam(a,b,clt),x)
-  | PC.TMetaParamList(a,b,c,_) -> (PC.TMetaParamList(a,b,c,clt),x)
-  | PC.TMetaConst(a,b,c,d,_) -> (PC.TMetaConst(a,b,c,d,clt),x)
-  | PC.TMetaErr(a,b,c,_) -> (PC.TMetaErr(a,b,c,clt),x)
-  | PC.TMetaExp(a,b,c,d,_) -> (PC.TMetaExp(a,b,c,d,clt),x)
-  | PC.TMetaIdExp(a,b,c,d,_) -> (PC.TMetaIdExp(a,b,c,d,clt),x)
-  | PC.TMetaLocalIdExp(a,b,c,d,_) -> (PC.TMetaLocalIdExp(a,b,c,d,clt),x)
-  | PC.TMetaExpList(a,b,c,_) -> (PC.TMetaExpList(a,b,c,clt),x)
-  | PC.TMetaId(a,b,c,_)    -> (PC.TMetaId(a,b,c,clt),x)
-  | PC.TMetaType(a,b,_)    -> (PC.TMetaType(a,b,clt),x)
-  | PC.TMetaStm(a,b,_)   -> (PC.TMetaStm(a,b,clt),x)
-  | PC.TMetaStmList(a,b,_)   -> (PC.TMetaStmList(a,b,clt),x)
-  | PC.TMetaFunc(a,b,c,_)  -> (PC.TMetaFunc(a,b,c,clt),x)
-  | PC.TMetaLocalFunc(a,b,c,_) -> (PC.TMetaLocalFunc(a,b,c,clt),x)
-
-  | PC.TWhen(_) -> (PC.TWhen(clt),x)
-  | PC.TWhenTrue(_) -> (PC.TWhenTrue(clt),x)
-  | PC.TWhenFalse(_) -> (PC.TWhenFalse(clt),x)
-  | PC.TAny(_) -> (PC.TAny(clt),x)
-  | PC.TStrict(_) -> (PC.TStrict(clt),x)
-  | PC.TEllipsis(_) -> (PC.TEllipsis(clt),x)
-(*
-  | PC.TCircles(_)  -> (PC.TCircles(clt),x)
-  | PC.TStars(_)    -> (PC.TStars(clt),x)
-*)
-
-  | PC.TOEllipsis(_) -> (PC.TOEllipsis(clt),x)
-  | PC.TCEllipsis(_) -> (PC.TCEllipsis(clt),x)
-  | PC.TPOEllipsis(_) -> (PC.TPOEllipsis(clt),x)
-  | PC.TPCEllipsis(_) -> (PC.TPCEllipsis(clt),x)
-(*
-  | PC.TOCircles(_)  -> (PC.TOCircles(clt),x)
-  | PC.TCCircles(_)  -> (PC.TCCircles(clt),x)
-  | PC.TOStars(_)    -> (PC.TOStars(clt),x)
-  | PC.TCStars(_)    -> (PC.TCStars(clt),x)
-*)
-
-  | PC.TWhy(_)   -> (PC.TWhy(clt),x)
-  | PC.TDotDot(_)   -> (PC.TDotDot(clt),x)
-  | PC.TBang(_)  -> (PC.TBang(clt),x)
-  | PC.TOPar(_)  -> (PC.TOPar(clt),x)
-  | PC.TOPar0(_) -> (PC.TOPar0(clt),x)
-  | PC.TMid0(_)  -> (PC.TMid0(clt),x)
-  | PC.TCPar(_)  -> (PC.TCPar(clt),x)
-  | PC.TCPar0(_) -> (PC.TCPar0(clt),x)
-
-  | PC.TOBrace(_) -> (PC.TOBrace(clt),x)
-  | PC.TCBrace(_) -> (PC.TCBrace(clt),x)
-  | PC.TOCro(_) -> (PC.TOCro(clt),x)
-  | PC.TCCro(_) -> (PC.TCCro(clt),x)
-
-  | PC.TPtrOp(_) -> (PC.TPtrOp(clt),x)
-
-  | PC.TEq(_) -> (PC.TEq(clt),x)
-  | PC.TAssign(s,_) -> (PC.TAssign(s,clt),x)
-  | PC.TDot(_) -> (PC.TDot(clt),x)
-  | PC.TComma(_) -> (PC.TComma(clt),x)
-  | PC.TPtVirg(_) -> (PC.TPtVirg(clt),x)
-
-  | PC.TLineEnd(_) -> (PC.TLineEnd(clt),x)
-  | PC.TFunDecl(_) -> (PC.TFunDecl(clt),x)
-
-  | _ -> failwith "no clt"
-
-
-(* ----------------------------------------------------------------------- *)
-
-let make_name prefix ln = Printf.sprintf "%s starting on line %d" prefix ln
-
-(* ----------------------------------------------------------------------- *)
-(* Read tokens *)
-
-let wrap_lexbuf_info lexbuf =
-  (Lexing.lexeme lexbuf, Lexing.lexeme_start lexbuf)    
-
-let tokens_all_full token table file get_ats lexbuf end_markers :
-    (bool * ((PC.token * (string * (int * int) * (int * int))) list)) =
-  try 
-    let rec aux () = 
-      let result = token lexbuf in
-      let info = (Lexing.lexeme lexbuf, 
-                  (table.(Lexing.lexeme_start lexbuf)),
-                  (Lexing.lexeme_start lexbuf, Lexing.lexeme_end lexbuf)) in
-      if result = PC.EOF 
-      then
-       if get_ats
-       then failwith "unexpected end of file in a metavariable declaration"
-       else (false,[(result,info)])
-      else if List.mem result end_markers
-      then (true,[(result,info)])
-      else
-       let (more,rest) = aux() in
-       (more,(result, info)::rest)
-    in aux () 
-  with
-    e -> pr2 (Common.error_message file (wrap_lexbuf_info lexbuf) ); raise e
-
-let tokens_all table file get_ats lexbuf end_markers :
-    (bool * ((PC.token * (string * (int * int) * (int * int))) list)) =
-  tokens_all_full Lexer_cocci.token table file get_ats lexbuf end_markers
-
-let tokens_script_all table file get_ats lexbuf end_markers :
-    (bool * ((PC.token * (string * (int * int) * (int * int))) list)) =
-  tokens_all_full Lexer_script.token table file get_ats lexbuf end_markers
-
-(* ----------------------------------------------------------------------- *)
-(* Split tokens into minus and plus fragments *)
-
-let split t clt =
-  let (d,_,_,_,_,_,_,_) = clt in
-  match d with
-    D.MINUS | D.OPTMINUS | D.UNIQUEMINUS -> ([t],[])
-  | D.PLUS -> ([],[t])
-  | D.CONTEXT | D.UNIQUE | D.OPT -> ([t],[t])
-
-let split_token ((tok,_) as t) =
-  match tok with
-    PC.TIdentifier | PC.TConstant | PC.TExpression | PC.TIdExpression
-  | PC.TStatement | PC.TPosition | PC.TPosAny
-  | PC.TFunction | PC.TTypedef | PC.TDeclarer | PC.TIterator | PC.TName
-  | PC.TType | PC.TParameter | PC.TLocal | PC.Tlist | PC.TFresh | PC.TPure
-  | PC.TContext | PC.TRuleName(_) | PC.TUsing | PC.TDisable | PC.TExtends
-  | PC.TPathIsoFile(_)
-  | PC.TDepends | PC.TOn | PC.TEver | PC.TNever | PC.TExists | PC.TForall
-  | PC.TReverse
-  | PC.TError | PC.TWords | PC.TNothing -> ([t],[t])
-
-  | PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
-  | PC.Tstatic(clt) | PC.Tauto(clt) | PC.Tregister(clt) | PC.Textern(clt)
-  | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt)
-  | PC.Tconst(clt) | PC.Tvolatile(clt) -> split t clt
-
-  | PC.TPragma(s) -> ([],[t]) (* only allowed in + *)
-  | PC.TPlusFile(s,clt) | PC.TMinusFile(s,clt)
-  | PC.TIncludeL(s,clt) | PC.TIncludeNL(s,clt) ->
-      split t clt
-  | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_) -> split t clt
-
-  | PC.TIf(clt) | PC.TElse(clt)  | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
-  | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt)
-  | PC.TSizeof(clt)
-  | PC.TReturn(clt) | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt)
-  | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaExp(_,_,_,_,clt)
-  | PC.TMetaIdExp(_,_,_,_,clt) | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt)
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt)
-  | PC.TMetaId(_,_,_,clt) | PC.TMetaType(_,_,clt)
-  | PC.TMetaStm(_,_,clt) | PC.TMetaStmList(_,_,clt) | PC.TMetaErr(_,_,_,clt)
-  | PC.TMetaFunc(_,_,_,clt) | PC.TMetaLocalFunc(_,_,_,clt)
-  | PC.TMetaDeclarer(_,_,_,clt) | PC.TMetaIterator(_,_,_,clt) -> split t clt
-  | PC.TMPtVirg | PC.TArob | PC.TArobArob | PC.TScript -> ([t],[t])
-  | PC.TPArob | PC.TMetaPos(_,_,_,_) -> ([t],[])
-
-  | PC.TFunDecl(clt)
-  | PC.TWhen(clt) | PC.TWhenTrue(clt) | PC.TWhenFalse(clt)
-  | PC.TAny(clt) | PC.TStrict(clt) | PC.TLineEnd(clt)
-  | PC.TEllipsis(clt) (* | PC.TCircles(clt) | PC.TStars(clt) *) -> split t clt
-
-  | PC.TOEllipsis(_) | PC.TCEllipsis(_) (* clt must be context *)
-  | PC.TPOEllipsis(_) | PC.TPCEllipsis(_) (* clt must be context *)
-(*
-  | PC.TOCircles(_) | PC.TCCircles(_)   (* clt must be context *)
-  | PC.TOStars(_) | PC.TCStars(_)       (* clt must be context *)
-*)
-  | PC.TBang0 | PC.TPlus0 | PC.TWhy0 ->
-      ([t],[t])
-
-  | PC.TWhy(clt)  | PC.TDotDot(clt)
-  | PC.TBang(clt) | PC.TOPar(clt) | PC.TOPar0(clt)
-  | PC.TMid0(clt) | PC.TCPar(clt) | PC.TCPar0(clt) -> split t clt
-
-  | PC.TInc(clt) | PC.TDec(clt) -> split t clt
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt) ->
-      split t clt
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt)
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt)
-  | PC.TDmOp(_,clt) | PC.TTilde (clt) -> split t clt
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) -> split t clt
-  | PC.TOCro(clt) | PC.TCCro(clt) -> split t clt
-
-  | PC.TPtrOp(clt) -> split t clt
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
-  | PC.TPtVirg(clt) -> split t clt
-
-  | PC.EOF | PC.TInvalid -> ([t],[t])
-
-  | PC.TIso | PC.TRightIso
-  | PC.TIsoExpression | PC.TIsoStatement | PC.TIsoDeclaration | PC.TIsoType
-  | PC.TIsoTopLevel | PC.TIsoArgExpression | PC.TIsoTestExpression ->
-      failwith "unexpected tokens"
-  | PC.TScriptData s -> ([t],[t])
-
-let split_token_stream tokens =
-  let rec loop = function
-      [] -> ([],[])
-    | token::tokens ->
-       let (minus,plus) = split_token token in
-       let (minus_stream,plus_stream) = loop tokens in
-       (minus@minus_stream,plus@plus_stream) in
-  loop tokens
-
-(* ----------------------------------------------------------------------- *)
-(* Find function names *)
-(* This addresses a shift-reduce problem in the parser, allowing us to
-distinguish a function declaration from a function call even if the latter
-has no return type.  Undoubtedly, this is not very nice, but it doesn't
-seem very convenient to refactor the grammar to get around the problem. *)
-
-let rec find_function_names = function
-    [] -> []
-  | ((PC.TIdent(_,clt),info) as t1) :: ((PC.TOPar(_),_) as t2) :: rest
-  | ((PC.TMetaId(_,_,_,clt),info) as t1) :: ((PC.TOPar(_),_) as t2) :: rest
-  | ((PC.TMetaFunc(_,_,_,clt),info) as t1) :: ((PC.TOPar(_),_) as t2) :: rest
-  | ((PC.TMetaLocalFunc(_,_,_,clt),info) as t1)::((PC.TOPar(_),_) as t2)::rest
-    ->
-      let rec skip level = function
-         [] -> ([],false,[])
-       | ((PC.TCPar(_),_) as t)::rest ->
-           let level = level - 1 in
-           if level = 0
-           then ([t],true,rest)
-           else let (pre,found,post) = skip level rest in (t::pre,found,post)
-       | ((PC.TOPar(_),_) as t)::rest ->
-           let level = level + 1 in
-           let (pre,found,post) = skip level rest in (t::pre,found,post)
-       | ((PC.TArobArob,_) as t)::rest
-       | ((PC.TArob,_) as t)::rest
-       | ((PC.EOF,_) as t)::rest -> ([t],false,rest)
-       | t::rest ->
-           let (pre,found,post) = skip level rest in (t::pre,found,post) in
-      let (pre,found,post) = skip 1 rest in
-      (match (found,post) with
-       (true,((PC.TOBrace(_),_) as t3)::rest) ->
-         (PC.TFunDecl(clt),info) :: t1 :: t2 :: pre @
-         t3 :: (find_function_names rest)
-      |        _ -> t1 :: t2 :: pre @ find_function_names post)
-  | t :: rest -> t :: find_function_names rest
-
-(* ----------------------------------------------------------------------- *)
-(* an attribute is an identifier that preceeds another identifier and
-   begins with __ *)
-
-let rec detect_attr l =
-  let is_id = function
-      (PC.TIdent(_,_),_) | (PC.TMetaId(_,_,_,_),_) | (PC.TMetaFunc(_,_,_,_),_)
-    | (PC.TMetaLocalFunc(_,_,_,_),_) -> true
-    | _ -> false in    
-  let rec loop = function
-      [] -> []
-    | [x] -> [x]
-    | ((PC.TIdent(nm,clt),info) as t1)::id::rest when is_id id ->
-       if String.length nm > 2 && String.sub nm 0 2 = "__"
-       then (PC.Tattr(nm,clt),info)::(loop (id::rest))
-       else t1::(loop (id::rest))
-    | x::xs -> x::(loop xs) in
-  loop l
-
-(* ----------------------------------------------------------------------- *)
-(* Look for variable declarations where the name is a typedef name.
-We assume that C code does not contain a multiplication as a top-level
-statement. *)
-
-(* bug: once a type, always a type, even if the same name is later intended
-   to be used as a real identifier *)
-let detect_types in_meta_decls l =
-  let is_delim infn = function
-      (PC.TOEllipsis(_),_) (* | (PC.TOCircles(_),_) | (PC.TOStars(_),_) *)
-    | (PC.TPOEllipsis(_),_) (* | (PC.TOCircles(_),_) | (PC.TOStars(_),_) *)
-    | (PC.TEllipsis(_),_) (* | (PC.TCircles(_),_) | (PC.TStars(_),_) *)
-    | (PC.TPtVirg(_),_) | (PC.TOBrace(_),_) | (PC.TCBrace(_),_)
-    | (PC.TPure,_) | (PC.TContext,_)
-    | (PC.Tstatic(_),_) | (PC.Textern(_),_)
-    | (PC.Tinline(_),_) | (PC.Ttypedef(_),_) | (PC.Tattr(_),_) -> true
-    | (PC.TComma(_),_) when infn > 0 or in_meta_decls -> true
-    | (PC.TDotDot(_),_) when in_meta_decls -> true
-    | _ -> false in
-  let is_choices_delim = function
-      (PC.TOBrace(_),_) | (PC.TComma(_),_) -> true | _ -> false in
-  let is_id = function
-      (PC.TIdent(_,_),_) | (PC.TMetaId(_,_,_,_),_) | (PC.TMetaFunc(_,_,_,_),_)
-    | (PC.TMetaLocalFunc(_,_,_,_),_) -> true
-    | (PC.TMetaParam(_,_,_),_)
-    | (PC.TMetaParamList(_,_,_,_),_)
-    | (PC.TMetaConst(_,_,_,_,_),_)
-    | (PC.TMetaErr(_,_,_,_),_)
-    | (PC.TMetaExp(_,_,_,_,_),_)
-    | (PC.TMetaIdExp(_,_,_,_,_),_)
-    | (PC.TMetaLocalIdExp(_,_,_,_,_),_)
-    | (PC.TMetaExpList(_,_,_,_),_)
-    | (PC.TMetaType(_,_,_),_)
-    | (PC.TMetaStm(_,_,_),_)
-    | (PC.TMetaStmList(_,_,_),_)
-    | (PC.TMetaPos(_,_,_,_),_) -> in_meta_decls 
-    | _ -> false in
-  let redo_id ident clt v =
-    !Data.add_type_name ident;
-    (PC.TTypeId(ident,clt),v) in
-  let rec loop start infn type_names = function
-      (* infn: 0 means not in a function header
-        > 0 means in a function header, after infn - 1 unmatched open parens*)
-      [] -> []
-    | ((PC.TOBrace(clt),v)::_) as all when in_meta_decls ->
-       collect_choices type_names all (* never a function header *)
-    | delim::(PC.TIdent(ident,clt),v)::((PC.TMul(_),_) as x)::rest
-      when is_delim infn delim ->
-       let newid = redo_id ident clt v in
-       delim::newid::x::(loop false infn (ident::type_names) rest)
-    | delim::(PC.TIdent(ident,clt),v)::id::rest
-      when is_delim infn delim && is_id id ->
-       let newid = redo_id ident clt v in
-       delim::newid::id::(loop false infn (ident::type_names) rest)
-    | ((PC.TFunDecl(_),_) as fn)::rest ->
-       fn::(loop false 1 type_names rest)
-    | ((PC.TOPar(_),_) as lp)::rest when infn > 0 ->
-       lp::(loop false (infn + 1) type_names rest)
-    | ((PC.TCPar(_),_) as rp)::rest when infn > 0 ->
-       if infn - 1 = 1
-       then rp::(loop false 0 type_names rest) (* 0 means not in fn header *)
-       else rp::(loop false (infn - 1) type_names rest)
-    | (PC.TIdent(ident,clt),v)::((PC.TMul(_),_) as x)::rest when start ->
-       let newid = redo_id ident clt v in
-       newid::x::(loop false infn (ident::type_names) rest)
-    | (PC.TIdent(ident,clt),v)::id::rest when start && is_id id ->
-       let newid = redo_id ident clt v in
-       newid::id::(loop false infn (ident::type_names) rest)
-    | (PC.TIdent(ident,clt),v)::rest when List.mem ident type_names ->
-       (PC.TTypeId(ident,clt),v)::(loop false infn type_names rest)
-    | ((PC.TIdent(ident,clt),v) as x)::rest ->
-       x::(loop false infn type_names rest)
-    | x::rest -> x::(loop false infn type_names rest)
-  and collect_choices type_names = function
-      [] -> [] (* should happen, but let the parser detect that *)
-    | (PC.TCBrace(clt),v)::rest ->
-       (PC.TCBrace(clt),v)::(loop false 0 type_names rest)
-    | delim::(PC.TIdent(ident,clt),v)::rest
-      when is_choices_delim delim ->
-       let newid = redo_id ident clt v in
-       delim::newid::(collect_choices (ident::type_names) rest)
-    | x::rest -> x::(collect_choices type_names rest) in
-  loop true 0 [] l
-
-
-(* ----------------------------------------------------------------------- *)
-(* Insert TLineEnd tokens at the end of a line that contains a WHEN.
-   WHEN is restricted to a single line, to avoid ambiguity in eg:
-   ... WHEN != x
-   +3 *)
-
-let token2line (tok,_) =
-  match tok with
-    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt) 
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt) 
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
-  | PC.Tstatic(clt) | PC.Tauto(clt) | PC.Tregister(clt) | PC.Textern(clt) 
-  | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt) | PC.Tconst(clt)
-  | PC.Tvolatile(clt) 
-
-  | PC.TInc(clt) | PC.TDec(clt) 
-       
-  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt) 
-  | PC.TSwitch (clt) | PC.TCase (clt) | PC.TDefault (clt) | PC.TSizeof (clt)
-  | PC.TReturn(clt) | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt)
-  | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-  | PC.TMetaDeclarer(_,_,_,clt) | PC.TMetaIterator(_,_,_,clt)
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt) 
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt) 
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt) 
-  | PC.TDmOp(_,clt) | PC.TTilde (clt) 
-
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt) 
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaExp(_,_,_,_,clt)
-  | PC.TMetaIdExp(_,_,_,_,clt) | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt) 
-  | PC.TMetaId(_,_,_,clt) | PC.TMetaType(_,_,clt)
-  | PC.TMetaStm(_,_,clt) | PC.TMetaStmList(_,_,clt) | PC.TMetaFunc(_,_,_,clt)
-  | PC.TMetaLocalFunc(_,_,_,clt) | PC.TMetaPos(_,_,_,clt)
-
-  | PC.TFunDecl(clt)
-  | PC.TWhen(clt) | PC.TWhenTrue(clt) | PC.TWhenFalse(clt)
-  | PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
-  (* | PC.TCircles(clt) | PC.TStars(clt) *)
-
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt) 
-  | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (*| PC.TOCircles(clt)
-  | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *)
-
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt)
-  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar(clt)  
-  | PC.TCPar0(clt) 
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt) 
-
-  | PC.TPtrOp(clt) 
-
-  | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_)
-  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt)
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt) 
-  | PC.TPtVirg(clt) ->
-      let (_,line,_,_,_,_,_,_) = clt in Some line
-
-  | _ -> None
-
-let rec insert_line_end = function
-    [] -> []
-  | (((PC.TWhen(clt),q) as x)::xs) ->
-      x::(find_line_end true (token2line x) clt q xs)
-  | (((PC.TDefine(clt,_),q) as x)::xs)
-  | (((PC.TDefineParam(clt,_,_),q) as x)::xs) ->
-      x::(find_line_end false (token2line x) clt q xs)
-  | x::xs -> x::(insert_line_end xs)
-
-and find_line_end inwhen line clt q = function
-    (* don't know what 2nd component should be so just use the info of
-       the When.  Also inherit - of when, if any *)
-    [] -> [(PC.TLineEnd(clt),q)]
-  | ((PC.TIdent("strict",clt),a) as x)::xs when token2line x = line ->
-      (PC.TStrict(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("STRICT",clt),a) as x)::xs when token2line x = line ->
-      (PC.TStrict(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("any",clt),a) as x)::xs when token2line x = line ->
-      (PC.TAny(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("ANY",clt),a) as x)::xs when token2line x = line ->
-      (PC.TAny(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("forall",clt),a) as x)::xs when token2line x = line ->
-      (PC.TForall,a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("exists",clt),a) as x)::xs when token2line x = line ->
-      (PC.TExists,a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TComma(clt),a) as x)::xs when token2line x = line ->
-      (PC.TComma(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TPArob,a) as x)::xs -> (* no line #, just assume on the same line *)
-      x :: (find_line_end inwhen line clt q xs)
-  | x::xs when token2line x = line -> x :: (find_line_end inwhen line clt q xs)
-  | xs -> (PC.TLineEnd(clt),q)::(insert_line_end xs)
-
-let rec translate_when_true_false = function
-    [] -> []
-  | (PC.TWhen(clt),q)::((PC.TNotEq(_),_) as x)::(PC.TIdent("true",_),_)::xs ->
-      (PC.TWhenTrue(clt),q)::x::xs
-  | (PC.TWhen(clt),q)::((PC.TNotEq(_),_) as x)::(PC.TIdent("false",_),_)::xs ->
-      (PC.TWhenFalse(clt),q)::x::xs
-  | x::xs -> x :: (translate_when_true_false xs)
-
-(* ----------------------------------------------------------------------- *)
-(* process pragmas: they can only be used in + code, and adjacent to
-another + token.  They are concatenated to the string representation of
-that other token. *)
-
-let rec collect_all_pragmas collected = function
-    (PC.TPragma(s),_)::rest -> collect_all_pragmas (s::collected) rest
-  | l -> (List.rev collected,l)
-
-let rec collect_up_to_pragmas skipped = function
-    [] -> None (* didn't reach a pragma, so nothing to do *)
-  | ((PC.TPragma(s),_) as t)::rest ->
-      let (pragmas,rest) = collect_all_pragmas [] (t::rest) in
-      Some (List.rev skipped,pragmas,rest)
-  | x::xs ->
-      match plus_attachable x with
-       PLUS -> None
-      |        NOTPLUS -> None
-      |        SKIP -> collect_up_to_pragmas (x::skipped) xs
-
-let rec collect_up_to_plus skipped = function
-    [] -> failwith "nothing to attach a pragma to"
-  | x::xs ->
-      match plus_attachable x with
-       PLUS -> (List.rev skipped,x,xs)
-      |        NOTPLUS -> failwith "nothing to attach a pragma to"
-      |        SKIP -> collect_up_to_plus (x::skipped) xs
-
-let rec process_pragmas = function
-    [] -> []
-  | ((PC.TPragma(s),_)::_) as l ->
-      let (pragmas,rest) = collect_all_pragmas [] l in
-      let (skipped,aft,rest) = collect_up_to_plus [] rest in
-      let (a,b,c,d,e,strbef,straft,pos) = get_clt aft in
-      skipped@
-      (process_pragmas ((update_clt aft (a,b,c,d,e,pragmas,straft,pos))::rest))
-  | bef::xs ->
-      (match plus_attachable bef with
-       PLUS ->
-         (match collect_up_to_pragmas [] xs with
-           Some(skipped,pragmas,rest) ->
-             let (a,b,c,d,e,strbef,straft,pos) = get_clt bef in
-             (update_clt bef (a,b,c,d,e,strbef,pragmas,pos))::
-             skipped@(process_pragmas rest)
-         | None -> bef::(process_pragmas xs))
-      |        _ -> bef::(process_pragmas xs))
-
-(* ----------------------------------------------------------------------- *)
-(* Drop ... ... .  This is only allowed in + code, and arises when there is
-some - code between the ... *)
-(* drop whens as well - they serve no purpose in + code and they cause
-problems for drop_double_dots *)
-
-let rec drop_when = function
-    [] -> []
-  | (PC.TWhen(clt),info)::xs ->
-      let rec loop = function
-         [] -> []
-       | (PC.TLineEnd(_),info)::xs -> drop_when xs
-       | x::xs -> loop xs in
-      loop xs
-  | x::xs -> x::drop_when xs
-
-(* instead of dropping the double dots, we put TNothing in between them.
-these vanish after the parser, but keeping all the ...s in the + code makes
-it easier to align the + and - code in context_neg and in preparation for the
-isomorphisms.  This shouldn't matter because the context code of the +
-slice is mostly ignored anyway *)
-let rec drop_double_dots l =
-  let start = function
-      (PC.TOEllipsis(_),_) | (PC.TPOEllipsis(_),_)
- (* | (PC.TOCircles(_),_) | (PC.TOStars(_),_) *) ->
-       true
-    | _ -> false in
-  let middle = function
-      (PC.TEllipsis(_),_) (* | (PC.TCircles(_),_) | (PC.TStars(_),_) *) -> true
-    | _ -> false in
-  let final = function
-      (PC.TCEllipsis(_),_) | (PC.TPCEllipsis(_),_)
- (* | (PC.TCCircles(_),_) | (PC.TCStars(_),_) *) ->
-       true
-    | _ -> false in
-  let rec loop ((_,i) as prev) = function
-      [] -> []
-    | x::rest when middle prev && middle x -> (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when start prev && middle x ->  (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when start prev && final x ->   (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when middle prev && final x ->  (PC.TNothing,i)::x::(loop x rest)
-    | x::rest -> x :: (loop x rest) in
-  match l with
-    [] -> []
-  | (x::xs) -> x :: loop x xs
-
-let rec fix f l =
-  let cur = f l in
-  if l = cur then l else fix f cur
-
-(* ( | ... | ) also causes parsing problems *)
-
-exception Not_empty
-
-let rec drop_empty_thing starter middle ender = function
-    [] -> []
-  | hd::rest when starter hd ->
-      let rec loop = function
-         x::rest when middle x -> loop rest
-       | x::rest when ender x -> rest
-       | _ -> raise Not_empty in
-      (match try Some(loop rest) with Not_empty -> None with
-       Some x -> drop_empty_thing starter middle ender x
-      |        None -> hd :: drop_empty_thing starter middle ender rest)
-  | x::rest -> x :: drop_empty_thing starter middle ender rest
-
-let drop_empty_or =
-  drop_empty_thing
-    (function (PC.TOPar0(_),_) -> true | _ -> false)
-    (function (PC.TMid0(_),_) -> true | _ -> false)
-    (function (PC.TCPar0(_),_) -> true | _ -> false)
-
-let drop_empty_nest = drop_empty_thing
-
-(* ----------------------------------------------------------------------- *)
-(* Read tokens *)
-
-let get_s_starts (_, (s,_,(starts, ends))) =
-  Printf.printf "%d %d\n" starts ends; (s, starts)
-
-let pop2 l = 
-  let v = List.hd !l in
-  l := List.tl !l;
-  v
-
-let reinit _ =
-  PC.reinit (function _ -> PC.TArobArob (* a handy token *))
-    (Lexing.from_function
-       (function buf -> function n -> raise Common.Impossible))
-
-let parse_one str parsefn file toks =
-  let all_tokens = ref toks in
-  let cur_tok    = ref (List.hd !all_tokens) in
-
-  let lexer_function _ =
-      let (v, info) = pop2 all_tokens in
-      cur_tok := (v, info);
-      v in
-
-  let lexbuf_fake =
-    Lexing.from_function
-      (function buf -> function n -> raise Common.Impossible)
-  in
-
-  reinit();
-
-  try parsefn lexer_function lexbuf_fake 
-  with 
-    Lexer_cocci.Lexical s ->
-      failwith
-       (Printf.sprintf "%s: lexical error: %s\n =%s\n" str s
-          (Common.error_message file (get_s_starts !cur_tok) ))
-  | Parser_cocci_menhir.Error ->
-      failwith
-       (Printf.sprintf "%s: parse error: \n = %s\n" str
-          (Common.error_message file (get_s_starts !cur_tok) ))
-  | Semantic_cocci.Semantic s ->
-      failwith
-       (Printf.sprintf "%s: semantic error: %s\n =%s\n" str s
-          (Common.error_message file (get_s_starts !cur_tok) ))
-
-  | e -> raise e
-
-let prepare_tokens tokens =
-  translate_when_true_false (* after insert_line_end *)
-    (insert_line_end
-       (detect_types false (find_function_names (detect_attr tokens))))
-
-let rec consume_minus_positions = function
-    [] -> []
-  | x::(PC.TPArob,_)::(PC.TMetaPos(name,constraints,per,clt),_)::xs ->
-      let (arity,ln,lln,offset,col,strbef,straft,_) = get_clt x in
-      let name = Parse_aux.clt2mcode name clt in
-      let x =
-       update_clt x
-         (arity,ln,lln,offset,col,strbef,straft,
-          Ast0.MetaPos(name,constraints,per)) in
-      x::(consume_minus_positions xs)
-  | x::xs -> x::consume_minus_positions xs
-
-let any_modif rule =
-  let mcode x =
-    match Ast0.get_mcode_mcodekind x with
-      Ast0.MINUS _ | Ast0.PLUS -> true
-    | _ -> false in
-  let donothing r k e = k e in
-  let bind x y = x or y in
-  let option_default = false in
-  let fn =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing donothing
-      donothing donothing in
-  List.exists fn.V0.combiner_top_level rule
-
-let drop_last extra l = List.rev(extra@(List.tl(List.rev l)))
-
-let partition_either l =
-  let rec part_either left right = function
-  | [] -> (List.rev left, List.rev right)
-  | x :: l -> 
-      (match x with
-      | Common.Left  e -> part_either (e :: left) right l
-      | Common.Right e -> part_either left (e :: right) l) in
-  part_either [] [] l
-
-let get_metavars parse_fn table file lexbuf =
-  let rec meta_loop acc (* read one decl at a time *) =
-    let (_,tokens) =
-      tokens_all table file true lexbuf [PC.TArobArob;PC.TMPtVirg] in
-    let tokens = prepare_tokens tokens in
-    match tokens with
-      [(PC.TArobArob,_)] -> List.rev acc
-    | _ ->
-       let metavars = parse_one "meta" parse_fn file tokens in
-       meta_loop (metavars@acc) in
-  partition_either (meta_loop [])
-
-let get_script_metavars parse_fn table file lexbuf =
-  let rec meta_loop acc =
-    let (_, tokens) =
-      tokens_all table file true lexbuf [PC.TArobArob; PC.TMPtVirg] in
-    let tokens = prepare_tokens tokens in
-    match tokens with
-      [(PC.TArobArob, _)] -> List.rev acc
-    | _ -> 
-      let metavar = parse_one "scriptmeta" parse_fn file tokens in
-      meta_loop (metavar :: acc)
-  in
-  meta_loop []
-
-let get_rule_name parse_fn starts_with_name get_tokens file prefix =
-  Data.in_rule_name := true;
-  let mknm _ = make_name prefix (!Lexer_cocci.line) in
-  let name_res =
-    if starts_with_name
-    then
-      let (_,tokens) = get_tokens [PC.TArob] in
-      match parse_one "rule name" parse_fn file tokens with
-       Ast.CocciRulename (None,a,b,c,d,e) -> 
-          Ast.CocciRulename (Some (mknm()),a,b,c,d,e)
-      |        Ast.CocciRulename (Some nm,a,b,c,d,e) ->
-         (if List.mem nm reserved_names
-         then failwith (Printf.sprintf "invalid name %s\n" nm));
-         Ast.CocciRulename (Some nm,a,b,c,d,e)
-      | Ast.ScriptRulename(s,deps) -> Ast.ScriptRulename(s,deps)
-    else
-      Ast.CocciRulename(Some(mknm()),Ast.NoDep,[],[],Ast.Undetermined,false) in
-  Data.in_rule_name := false;
-  name_res
-
-let parse_iso file =
-  let table = Common.full_charpos_to_pos file in
-  Common.with_open_infile file (fun channel ->
-    let lexbuf = Lexing.from_channel channel in
-    let get_tokens = tokens_all table file false lexbuf in
-    let res =
-      match get_tokens [PC.TArobArob;PC.TArob] with
-       (true,start) ->
-         let parse_start start =
-           let rev = List.rev start in
-           let (arob,_) = List.hd rev in
-           (arob = PC.TArob,List.rev(List.tl rev)) in
-         let (starts_with_name,start) = parse_start start in
-         let rec loop starts_with_name start =
-           (!Data.init_rule)();
-           (* get metavariable declarations - have to be read before the
-              rest *)
-           let (rule_name,_,_,_,_,_) =
-              match get_rule_name PC.iso_rule_name starts_with_name get_tokens
-               file ("iso file "^file) with
-                Ast.CocciRulename (Some n,a,b,c,d,e) -> (n,a,b,c,d,e)
-              | _ -> failwith "Script rules cannot appear in isomorphism rules"
-              in
-           Ast0.rule_name := rule_name;
-           Data.in_meta := true;
-           let iso_metavars =
-             match get_metavars PC.iso_meta_main table file lexbuf with
-               (iso_metavars,[]) -> iso_metavars
-             | _ -> failwith "unexpected inheritance in iso" in
-           Data.in_meta := false;
-           (* get the rule *)
-           let (more,tokens) =
-             get_tokens
-               [PC.TIsoStatement;PC.TIsoExpression;PC.TIsoArgExpression;
-                 PC.TIsoTestExpression;
-                 PC.TIsoDeclaration;PC.TIsoType;PC.TIsoTopLevel] in
-           let next_start = List.hd(List.rev tokens) in
-           let dummy_info = ("",(-1,-1),(-1,-1)) in
-           let tokens = drop_last [(PC.EOF,dummy_info)] tokens in
-           let tokens = prepare_tokens (start@tokens) in
-            (*
-              print_tokens "iso tokens" tokens;
-           *)
-           let entry = parse_one "iso main" PC.iso_main file tokens in
-           let entry = List.map (List.map Test_exps.process_anything) entry in
-           if more
-           then (* The code below allows a header like Statement list,
-                   which is more than one word.  We don't have that any more,
-                   but the code is left here in case it is put back. *)
-             match get_tokens [PC.TArobArob;PC.TArob] with
-               (true,start) ->
-                 let (starts_with_name,start) = parse_start start in
-                 (iso_metavars,entry,rule_name) ::
-                 (loop starts_with_name (next_start::start))
-             | _ -> failwith "isomorphism ends early"
-           else [(iso_metavars,entry,rule_name)] in
-         loop starts_with_name start
-      | (false,_) -> [] in
-    res)
-
-let parse_iso_files existing_isos iso_files extra_path =
-  let get_names = List.map (function (_,_,nm) -> nm) in
-  let old_names = get_names existing_isos in
-  Data.in_iso := true;
-  let (res,_) =
-    List.fold_left
-      (function (prev,names) ->
-       function file ->
-         Lexer_cocci.init ();
-         let file =
-           match file with
-             Common.Left(fl)  -> Filename.concat extra_path fl
-           | Common.Right(fl) -> Filename.concat Config.path fl in
-         let current = parse_iso file in
-         let new_names = get_names current in
-         if List.exists (function x -> List.mem x names) new_names
-         then failwith (Printf.sprintf "repeated iso name found in %s" file);
-         (current::prev,new_names @ names))
-      ([],old_names) iso_files in
-  Data.in_iso := false;
-  existing_isos@(List.concat (List.rev res))
-
-let parse file =
-  let table = Common.full_charpos_to_pos file in
-  Common.with_open_infile file (fun channel ->
-  let lexbuf = Lexing.from_channel channel in
-  let get_tokens = tokens_all table file false lexbuf in
-  Data.in_prolog := true;
-  let initial_tokens = get_tokens [PC.TArobArob;PC.TArob] in
-  Data.in_prolog := false;
-  let res =
-    match initial_tokens with
-    (true,data) ->
-      (match List.rev data with
-       ((PC.TArobArob as x),_)::_ | ((PC.TArob as x),_)::_ ->
-         let iso_files =
-           parse_one "iso file names" PC.include_main file data in
-
-          let parse_cocci_rule old_metas
-             (rule_name, dependencies, iso, dropiso, exists, is_expression) =
-            Ast0.rule_name := rule_name;
-            Data.inheritable_positions :=
-               rule_name :: !Data.inheritable_positions;
-
-            (* get metavariable declarations *)
-            Data.in_meta := true;
-            let (metavars, inherited_metavars) =
-              get_metavars PC.meta_main table file lexbuf in
-            Data.in_meta := false;
-            Hashtbl.add Data.all_metadecls rule_name metavars;
-            Hashtbl.add Lexer_cocci.rule_names rule_name ();
-            Hashtbl.add Lexer_cocci.all_metavariables rule_name
-              (Hashtbl.fold
-                (fun key v rest -> (key,v)::rest)
-                Lexer_cocci.metavariables []);
-
-            (* get transformation rules *)
-            let (more, tokens) = get_tokens [PC.TArobArob; PC.TArob] in
-            let (minus_tokens, plus_tokens) = split_token_stream tokens in
-
-           let minus_tokens = consume_minus_positions minus_tokens in
-           let minus_tokens = prepare_tokens minus_tokens in
-           let plus_tokens = prepare_tokens plus_tokens in
-
-           (*
-              print_tokens "minus tokens" minus_tokens;
-              print_tokens "plus tokens" plus_tokens;
-           *)
-
-           let plus_tokens =
-             process_pragmas
-               (fix (function x -> drop_double_dots (drop_empty_or x))
-                  (drop_when plus_tokens)) in
-           (*
-               print_tokens "plus tokens" plus_tokens;
-              Printf.printf "before minus parse\n";
-           *)
-           let minus_res =
-             if is_expression
-             then parse_one "minus" PC.minus_exp_main file minus_tokens
-             else parse_one "minus" PC.minus_main file minus_tokens in
-           (*
-              Unparse_ast0.unparse minus_res;
-              Printf.printf "before plus parse\n";
-           *)
-           let plus_res =
-             if !Flag.sgrep_mode2
-             then (* not actually used for anything, except context_neg *)
-               List.map
-                 (Iso_pattern.rebuild_mcode None).V0.rebuilder_top_level
-                 minus_res
-             else
-               if is_expression
-               then parse_one "plus" PC.plus_exp_main file plus_tokens
-               else parse_one "plus" PC.plus_main file plus_tokens in
-           (*
-              Printf.printf "after plus parse\n";
-           *)
-
-           (if not !Flag.sgrep_mode2 &&
-             (any_modif minus_res or any_modif plus_res)
-           then Data.inheritable_positions := []);
-
-           Check_meta.check_meta rule_name old_metas inherited_metavars
-             metavars minus_res plus_res;
-
-            (more, Ast0.CocciRule ((minus_res, metavars,
-              (iso, dropiso, dependencies, rule_name, exists)),
-              (plus_res, metavars)), metavars, tokens) in
-
-          let parse_script_rule language old_metas deps =
-            let get_tokens = tokens_script_all table file false lexbuf in
-
-              (* meta-variables *)
-            Data.in_meta := true;
-            let metavars =
-             get_script_metavars PC.script_meta_main table file lexbuf in
-            Data.in_meta := false;
-
-            let exists_in old_metas (py,(r,m)) =
-              let test (rr,mr) x =
-                let (ro,vo) = Ast.get_meta_name x in
-                ro = rr && vo = mr in
-              List.exists (test (r,m)) old_metas in
-
-           List.iter
-             (function x ->
-               let meta2c (r,n) = Printf.sprintf "%s.%s" r n in
-               if not (exists_in old_metas x) then
-                 failwith
-                   (Printf.sprintf
-                      "Script references unknown meta-variable: %s"
-                      (meta2c(snd x))))
-             metavars;
-
-              (* script code *)
-            let (more, tokens) = get_tokens [PC.TArobArob; PC.TArob] in
-            let data =
-              match List.hd tokens with
-                (PC.TScriptData(s),_) -> s
-              | (PC.TArobArob,_) | (PC.TArob,_) -> ""
-              | _ -> failwith "Malformed script rule" in
-            (more,Ast0.ScriptRule(language, deps, metavars, data),[],tokens) in
-
-          let parse_rule old_metas starts_with_name =
-            let rulename =
-             get_rule_name PC.rule_name starts_with_name get_tokens file
-               "rule" in
-            match rulename with
-              Ast.CocciRulename (Some s, a, b, c, d, e) -> 
-                parse_cocci_rule old_metas (s, a, b, c, d, e)
-            | Ast.ScriptRulename (l,deps) -> parse_script_rule l old_metas deps
-            | _ -> failwith "Malformed rule name"
-            in
-
-         let rec loop old_metas starts_with_name =
-           (!Data.init_rule)();
-
-            let gen_starts_with_name more tokens =
-              more &&
-              (match List.hd (List.rev tokens) with
-                    (PC.TArobArob,_) -> false
-                  | (PC.TArob,_) -> true
-                  | _ -> failwith "unexpected token") 
-            in
-
-            let (more, rule, metavars, tokens) =
-              parse_rule old_metas starts_with_name in
-            if more then
-              rule::
-             (loop (metavars @ old_metas) (gen_starts_with_name more tokens))
-            else [rule];
-
-            in
-
-         (iso_files, loop [] (x = PC.TArob))
-      |        _ -> failwith "unexpected code before the first rule\n")
-  | (false,[(PC.TArobArob,_)]) | (false,[(PC.TArob,_)]) ->
-      ([],([] : Ast0.parsed_rule list))
-  | _ -> failwith "unexpected code before the first rule\n" in
-  res)
-
-(* parse to ast0 and then convert to ast *)
-let process file isofile verbose =
-  let extra_path = Filename.dirname file in
-  Lexer_cocci.init();
-  let (iso_files, rules) = parse file in
-  let std_isos =
-    match isofile with
-      None -> []
-    | Some iso_file -> parse_iso_files [] [Common.Left iso_file] "" in
-  let global_isos = parse_iso_files std_isos iso_files extra_path in
-  let rules = Unitary_ast0.do_unitary rules in
-  let parsed =
-    List.map
-      (function
-          Ast0.ScriptRule (a,b,c,d) -> [([],Ast.ScriptRule (a,b,c,d))]
-       | Ast0.CocciRule
-           ((minus, metavarsm,
-             (iso, dropiso, dependencies, rule_name, exists)),
-            (plus, metavars)) ->
-              let chosen_isos =
-                parse_iso_files global_isos
-                  (List.map (function x -> Common.Left x) iso)
-                  extra_path in
-              let chosen_isos =
-            (* check that dropped isos are actually available *)
-                (try
-                  let iso_names =
-                    List.map (function (_,_,nm) -> nm) chosen_isos in
-                  let local_iso_names = reserved_names @ iso_names in
-                  let bad_dropped =
-                    List.find
-                      (function dropped ->
-                        not (List.mem dropped local_iso_names))
-                      dropiso in
-                  failwith
-                    ("invalid iso name " ^ bad_dropped ^ " in " ^ rule_name)
-                with Not_found -> ());
-                if List.mem "all" dropiso 
-                then 
-                  if List.length dropiso = 1
-                  then []
-                  else failwith "disable all should only be by itself"
-                else (* drop those isos *)
-                  List.filter
-                    (function (_,_,nm) -> not (List.mem nm dropiso))
-                    chosen_isos in
-              List.iter Iso_compile.process chosen_isos;
-              let dropped_isos =
-                match reserved_names with
-                  "all"::others ->
-                    (match dropiso with
-                      ["all"] -> others
-                    | _ ->
-                        List.filter (function x -> List.mem x dropiso) others)
-                | _ ->
-                    failwith
-                      "bad list of reserved names - all must be at start" in
-              let minus = Test_exps.process minus in
-              let minus = Compute_lines.compute_lines minus in
-              let plus = Compute_lines.compute_lines plus in
-              let is_exp =
-                (* only relevant to Flag.make_hrule *)
-                (* doesn't handle multiple minirules properly, but since
-                   we don't really handle them in lots of other ways, it
-                   doesn't seem very important *)
-                match plus with
-                  [] -> [false]
-                | p::_ ->
-                    [match Ast0.unwrap p with
-                      Ast0.CODE c ->
-                        (match List.map Ast0.unwrap (Ast0.undots c) with
-                          [Ast0.Exp e] -> true | _ -> false)
-                    | _ -> false] in
-              let minus = Arity.minus_arity minus in
-              let ((metavars,minus),function_prototypes) =
-                Function_prototypes.process
-                  rule_name metavars dropped_isos minus plus in
-          (* warning! context_neg side-effects its arguments *)
-              let (m,p) = List.split (Context_neg.context_neg minus plus) in 
-              Type_infer.type_infer p;
-              (if not !Flag.sgrep_mode2 then Insert_plus.insert_plus m p);
-              Type_infer.type_infer minus;
-              let (extra_meta, minus) =
-                Iso_pattern.apply_isos chosen_isos minus rule_name in
-              let minus = Comm_assoc.comm_assoc minus rule_name dropiso in
-              let minus =
-                if !Flag.sgrep_mode2 then minus
-                else Single_statement.single_statement minus in
-              let minus = Simple_assignments.simple_assignments minus in
-              let minus_ast =
-                Ast0toast.ast0toast rule_name dependencies dropped_isos
-                  exists minus is_exp in
-              match function_prototypes with
-                None -> [(extra_meta @ metavars, minus_ast)]
-              | Some mv_fp ->
-                  [(extra_meta @ metavars, minus_ast); mv_fp])
-(*          Ast0.CocciRule ((minus, metavarsm, (iso, dropiso, dependencies, rule_name, exists)), (plus, metavars))*)
-      rules in
-  let parsed = List.concat parsed in
-  let disjd = Disjdistr.disj parsed in
-  
-  let (code,fvs,neg_pos,ua,pos) = Free_vars.free_vars disjd in
-  if !Flag_parsing_cocci.show_SP
-  then List.iter Pretty_print_cocci.unparse code;
-  
-  let grep_tokens =
-    Common.profile_code "get_constants"
-      (fun () -> Get_constants.get_constants code) in (* for grep *)
-  let glimpse_tokens2 =
-    Common.profile_code "get_glimpse_constants"
-      (fun () -> Get_constants2.get_constants code neg_pos) in(* for glimpse *)
-  (code,fvs,neg_pos,ua,pos,grep_tokens,glimpse_tokens2)
diff --git a/parsing_cocci/.#parse_cocci.ml.1.164 b/parsing_cocci/.#parse_cocci.ml.1.164
deleted file mode 100644 (file)
index b661baf..0000000
+++ /dev/null
@@ -1,1566 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* splits the entire file into minus and plus fragments, and parses each
-separately (thus duplicating work for the parsing of the context elements) *)
-
-module D = Data
-module PC = Parser_cocci_menhir
-module V0 = Visitor_ast0
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-let pr = Printf.sprintf
-(*let pr2 s = prerr_string s; prerr_string "\n"; flush stderr*)
-let pr2 s = Printf.printf "%s\n" s
-
-(* for isomorphisms.  all should be at the front!!! *)
-let reserved_names = 
-  ["all";"optional_storage";"optional_qualifier";"value_format";"comm_assoc"]
-
-(* ----------------------------------------------------------------------- *)
-(* Debugging... *)
-
-let line_type (d,_,_,_,_,_,_,_) = d
-
-let line_type2c tok =
-  match line_type tok with
-    D.MINUS | D.OPTMINUS | D.UNIQUEMINUS -> ":-"
-  | D.PLUS -> ":+"
-  | D.CONTEXT | D.UNIQUE | D.OPT -> ""
-
-let token2c (tok,_) =
- match tok with
-    PC.TIdentifier -> "identifier"
-  | PC.TType -> "type"
-  | PC.TParameter -> "parameter"
-  | PC.TConstant -> "constant"
-  | PC.TExpression -> "expression"
-  | PC.TIdExpression -> "idexpression"
-  | PC.TStatement -> "statement"
-  | PC.TPosition -> "position"
-  | PC.TPosAny -> "any"
-  | PC.TFunction -> "function"
-  | PC.TLocal -> "local"
-  | PC.Tlist -> "list"
-  | PC.TFresh -> "fresh"
-  | PC.TPure -> "pure"
-  | PC.TContext -> "context"
-  | PC.TTypedef -> "typedef"
-  | PC.TDeclarer -> "declarer"
-  | PC.TIterator -> "iterator"
-  | PC.TName -> "name"
-  | PC.TRuleName str -> "rule_name-"^str
-  | PC.TUsing -> "using"
-  | PC.TPathIsoFile str -> "path_iso_file-"^str
-  | PC.TDisable -> "disable"
-  | PC.TExtends -> "extends"
-  | PC.TDepends -> "depends"
-  | PC.TOn -> "on"
-  | PC.TEver -> "ever"
-  | PC.TNever -> "never"
-  | PC.TExists -> "exists"
-  | PC.TForall -> "forall"
-  | PC.TReverse -> "reverse"
-  | PC.TError -> "error"
-  | PC.TWords -> "words"
-
-  | PC.TNothing -> "nothing"
-
-  | PC.Tchar(clt) -> "char"^(line_type2c  clt)
-  | PC.Tshort(clt) -> "short"^(line_type2c clt)
-  | PC.Tint(clt) -> "int"^(line_type2c clt)
-  | PC.Tdouble(clt) -> "double"^(line_type2c clt)
-  | PC.Tfloat(clt) -> "float"^(line_type2c clt)
-  | PC.Tlong(clt) -> "long"^(line_type2c clt)
-  | PC.Tvoid(clt) -> "void"^(line_type2c clt)
-  | PC.Tstruct(clt) -> "struct"^(line_type2c clt)
-  | PC.Tunion(clt) -> "union"^(line_type2c clt)
-  | PC.Tunsigned(clt) -> "unsigned"^(line_type2c clt)
-  | PC.Tsigned(clt) -> "signed"^(line_type2c clt)
-  | PC.Tstatic(clt) -> "static"^(line_type2c clt)
-  | PC.Tinline(clt) -> "inline"^(line_type2c clt)
-  | PC.Ttypedef(clt) -> "typedef"^(line_type2c clt)
-  | PC.Tattr(s,clt) -> s^(line_type2c clt)
-  | PC.Tauto(clt) -> "auto"^(line_type2c clt)
-  | PC.Tregister(clt) -> "register"^(line_type2c clt)
-  | PC.Textern(clt) -> "extern"^(line_type2c clt)
-  | PC.Tconst(clt) -> "const"^(line_type2c clt)
-  | PC.Tvolatile(clt) -> "volatile"^(line_type2c clt)
-
-  | PC.TPragma(s) -> s
-  | PC.TIncludeL(s,clt) -> (pr "#include \"%s\"" s)^(line_type2c clt)
-  | PC.TIncludeNL(s,clt) -> (pr "#include <%s>" s)^(line_type2c clt)
-  | PC.TDefine(clt,_) -> "#define"^(line_type2c clt)
-  | PC.TDefineParam(clt,_,_) -> "#define_param"^(line_type2c clt)
-  | PC.TMinusFile(s,clt) -> (pr "--- %s" s)^(line_type2c clt)
-  | PC.TPlusFile(s,clt) -> (pr "+++ %s" s)^(line_type2c clt)
-
-  | PC.TInc(clt) -> "++"^(line_type2c clt)
-  | PC.TDec(clt) -> "--"^(line_type2c clt)
-       
-  | PC.TIf(clt) -> "if"^(line_type2c clt)
-  | PC.TElse(clt) -> "else"^(line_type2c clt)
-  | PC.TWhile(clt) -> "while"^(line_type2c clt)
-  | PC.TFor(clt) -> "for"^(line_type2c clt)
-  | PC.TDo(clt) -> "do"^(line_type2c clt)
-  | PC.TSwitch(clt) -> "switch"^(line_type2c clt)
-  | PC.TCase(clt) -> "case"^(line_type2c clt)
-  | PC.TDefault(clt) -> "default"^(line_type2c clt)
-  | PC.TReturn(clt) -> "return"^(line_type2c clt)
-  | PC.TBreak(clt) -> "break"^(line_type2c clt)
-  | PC.TContinue(clt) -> "continue"^(line_type2c clt)
-  | PC.TGoto(clt) -> "goto"^(line_type2c clt)
-  | PC.TIdent(s,clt) -> (pr "ident-%s" s)^(line_type2c clt)
-  | PC.TTypeId(s,clt) -> (pr "typename-%s" s)^(line_type2c clt)
-  | PC.TDeclarerId(s,clt) -> (pr "declarername-%s" s)^(line_type2c clt)
-  | PC.TIteratorId(s,clt) -> (pr "iteratorname-%s" s)^(line_type2c clt)
-  | PC.TMetaDeclarer(_,_,_,clt) -> "declmeta"^(line_type2c clt)
-  | PC.TMetaIterator(_,_,_,clt) -> "itermeta"^(line_type2c clt)
-
-  | PC.TSizeof(clt) -> "sizeof"^(line_type2c clt)
-
-  | PC.TString(x,clt) -> x^(line_type2c clt)
-  | PC.TChar(x,clt) -> x^(line_type2c clt)
-  | PC.TFloat(x,clt) -> x^(line_type2c clt)
-  | PC.TInt(x,clt) -> x^(line_type2c clt)
-
-  | PC.TOrLog(clt) -> "||"^(line_type2c clt)
-  | PC.TAndLog(clt) -> "&&"^(line_type2c clt)
-  | PC.TOr(clt) -> "|"^(line_type2c clt)
-  | PC.TXor(clt) -> "^"^(line_type2c clt)
-  | PC.TAnd (clt) -> "&"^(line_type2c clt)
-  | PC.TEqEq(clt) -> "=="^(line_type2c clt)
-  | PC.TNotEq(clt) -> "!="^(line_type2c clt)
-  | PC.TLogOp(op,clt) ->
-      (match op with
-       Ast.Inf -> "<"
-      |        Ast.InfEq -> "<="
-      |        Ast.Sup -> ">"
-      |        Ast.SupEq -> ">="
-      |        _ -> failwith "not possible")
-      ^(line_type2c clt)
-  | PC.TShOp(op,clt) ->
-      (match op with
-       Ast.DecLeft -> "<<"
-      |        Ast.DecRight -> ">>"
-      |        _ -> failwith "not possible")
-      ^(line_type2c clt)
-  | PC.TPlus(clt) -> "+"^(line_type2c clt)
-  | PC.TMinus(clt) -> "-"^(line_type2c clt)
-  | PC.TMul(clt) -> "*"^(line_type2c clt)
-  | PC.TDmOp(op,clt) ->
-      (match op with
-       Ast.Div -> "/"
-      |        Ast.Mod -> "%"
-      |        _ -> failwith "not possible")
-      ^(line_type2c clt)
-  | PC.TTilde (clt) -> "~"^(line_type2c clt)
-
-  | PC.TMetaParam(_,_,clt) -> "parammeta"^(line_type2c clt)
-  | PC.TMetaParamList(_,_,_,clt) -> "paramlistmeta"^(line_type2c clt)
-  | PC.TMetaConst(_,_,_,_,clt) -> "constmeta"^(line_type2c clt)
-  | PC.TMetaErr(_,_,_,clt) -> "errmeta"^(line_type2c clt)
-  | PC.TMetaExp(_,_,_,_,clt) -> "expmeta"^(line_type2c clt)
-  | PC.TMetaIdExp(_,_,_,_,clt) -> "idexpmeta"^(line_type2c clt)
-  | PC.TMetaLocalIdExp(_,_,_,_,clt) -> "localidexpmeta"^(line_type2c clt)
-  | PC.TMetaExpList(_,_,_,clt) -> "explistmeta"^(line_type2c clt)
-  | PC.TMetaId(_,_,_,clt)    -> "idmeta"^(line_type2c clt)
-  | PC.TMetaType(_,_,clt)    -> "typemeta"^(line_type2c clt)
-  | PC.TMetaStm(_,_,clt)   -> "stmmeta"^(line_type2c clt)
-  | PC.TMetaStmList(_,_,clt)   -> "stmlistmeta"^(line_type2c clt)
-  | PC.TMetaFunc(_,_,_,clt)  -> "funcmeta"^(line_type2c clt)
-  | PC.TMetaLocalFunc(_,_,_,clt) -> "funcmeta"^(line_type2c clt)
-  | PC.TMetaPos(_,_,_,clt)   -> "posmeta"
-  | PC.TMPtVirg -> ";"
-  | PC.TArobArob -> "@@"
-  | PC.TArob -> "@"
-  | PC.TPArob -> "P@"
-  | PC.TScript -> "script"
-
-  | PC.TWhen(clt) -> "WHEN"^(line_type2c clt)
-  | PC.TWhenTrue(clt) -> "WHEN TRUE"^(line_type2c clt)
-  | PC.TWhenFalse(clt) -> "WHEN FALSE"^(line_type2c clt)
-  | PC.TAny(clt) -> "ANY"^(line_type2c clt)
-  | PC.TStrict(clt) -> "STRICT"^(line_type2c clt)
-  | PC.TEllipsis(clt) -> "..."^(line_type2c clt)
-(*
-  | PC.TCircles(clt)  -> "ooo"^(line_type2c clt)
-  | PC.TStars(clt)    -> "***"^(line_type2c clt)
-*)
-
-  | PC.TOEllipsis(clt) -> "<..."^(line_type2c clt)
-  | PC.TCEllipsis(clt) -> "...>"^(line_type2c clt)
-  | PC.TPOEllipsis(clt) -> "<+..."^(line_type2c clt)
-  | PC.TPCEllipsis(clt) -> "...+>"^(line_type2c clt)
-(*
-  | PC.TOCircles(clt)  -> "<ooo"^(line_type2c clt)
-  | PC.TCCircles(clt)  -> "ooo>"^(line_type2c clt)
-  | PC.TOStars(clt)    -> "<***"^(line_type2c clt)
-  | PC.TCStars(clt)    -> "***>"^(line_type2c clt)
-*)
-  | PC.TBang0 -> "!"
-  | PC.TPlus0 -> "+"
-  | PC.TWhy0  -> "?"
-
-  | PC.TWhy(clt)   -> "?"^(line_type2c clt)
-  | PC.TDotDot(clt)   -> ":"^(line_type2c clt)
-  | PC.TBang(clt)  -> "!"^(line_type2c clt)
-  | PC.TOPar(clt)  -> "("^(line_type2c clt)
-  | PC.TOPar0(clt) -> "("^(line_type2c clt)
-  | PC.TMid0(clt)  -> "|"^(line_type2c clt)
-  | PC.TCPar(clt)  -> ")"^(line_type2c clt)
-  | PC.TCPar0(clt) -> ")"^(line_type2c clt)
-
-  | PC.TOBrace(clt) -> "{"^(line_type2c clt)
-  | PC.TCBrace(clt) -> "}"^(line_type2c clt)
-  | PC.TOCro(clt) -> "["^(line_type2c clt)
-  | PC.TCCro(clt) -> "]"^(line_type2c clt)
-  | PC.TOInit(clt) -> "{"^(line_type2c clt)
-
-  | PC.TPtrOp(clt) -> "->"^(line_type2c clt)
-
-  | PC.TEq(clt) -> "="^(line_type2c clt)
-  | PC.TAssign(_,clt) -> "=op"^(line_type2c clt)
-  | PC.TDot(clt) -> "."^(line_type2c clt)
-  | PC.TComma(clt) -> ","^(line_type2c clt)
-  | PC.TPtVirg(clt) -> ";"^(line_type2c clt)
-
-  | PC.EOF -> "eof"
-  | PC.TLineEnd(clt) -> "line end"
-  | PC.TInvalid -> "invalid"
-  | PC.TFunDecl(clt) -> "fundecl"
-
-  | PC.TIso -> "<=>"
-  | PC.TRightIso -> "=>"
-  | PC.TIsoTopLevel -> "TopLevel"
-  | PC.TIsoExpression -> "Expression"
-  | PC.TIsoArgExpression -> "ArgExpression"
-  | PC.TIsoTestExpression -> "TestExpression"
-  | PC.TIsoStatement -> "Statement"
-  | PC.TIsoDeclaration -> "Declaration"
-  | PC.TIsoType -> "Type"
-  | PC.TScriptData s -> s
-
-let print_tokens s tokens =
-  Printf.printf "%s\n" s;
-  List.iter (function x -> Printf.printf "%s " (token2c x)) tokens;
-  Printf.printf "\n\n";
-  flush stdout
-
-type plus = PLUS | NOTPLUS | SKIP
-
-let plus_attachable (tok,_) =
-  match tok with
-    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt) | PC.Tstatic(clt)
-  | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt)
-  | PC.Tauto(clt) | PC.Tregister(clt)
-  | PC.Textern(clt) | PC.Tconst(clt) | PC.Tvolatile(clt)
-
-  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt) | PC.TDefine(clt,_)
-  | PC.TDefineParam(clt,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
-
-  | PC.TInc(clt) | PC.TDec(clt)
-       
-  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
-  | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt) | PC.TReturn(clt)
-  | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt) | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-
-  | PC.TSizeof(clt)
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt)
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt)
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt)
-  | PC.TDmOp(_,clt) | PC.TTilde (clt)
-
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt)
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaErr(_,_,_,clt)
-  | PC.TMetaExp(_,_,_,_,clt) | PC.TMetaIdExp(_,_,_,_,clt)
-  | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt)
-  | PC.TMetaId(_,_,_,clt)
-  | PC.TMetaType(_,_,clt) | PC.TMetaStm(_,_,clt)  
-  | PC.TMetaStmList(_,_,clt)  | PC.TMetaFunc(_,_,_,clt) 
-  | PC.TMetaLocalFunc(_,_,_,clt)
-
-  | PC.TWhen(clt) |  PC.TWhenTrue(clt) |  PC.TWhenFalse(clt)
-  | PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
-  (* | PC.TCircles(clt) | PC.TStars(clt) *)
-
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt) 
-  | PC.TCPar(clt)
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt)
-  | PC.TOInit(clt) 
-
-  | PC.TPtrOp(clt)
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
-  | PC.TPtVirg(clt) ->
-      if line_type clt = D.PLUS then PLUS else NOTPLUS
-
-  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar0(clt)
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt) 
-  | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (* | PC.TOCircles(clt)
-  | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *) -> NOTPLUS
-  | PC.TMetaPos(nm,_,_,_) -> NOTPLUS
-
-  | _ -> SKIP
-
-let get_clt (tok,_) =
-  match tok with
-    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt) | PC.Tstatic(clt)
-  | PC.Tinline(clt) | PC.Tattr(_,clt) | PC.Tauto(clt) | PC.Tregister(clt)
-  | PC.Textern(clt) | PC.Tconst(clt) | PC.Tvolatile(clt)
-
-  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt) | PC.TDefine(clt,_)
-  | PC.TDefineParam(clt,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
-
-  | PC.TInc(clt) | PC.TDec(clt)
-       
-  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
-  | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt) | PC.TReturn(clt)
-  | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt) | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-
-  | PC.TSizeof(clt)
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt)
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt)
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt)
-  | PC.TDmOp(_,clt) | PC.TTilde (clt)
-
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt)
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaErr(_,_,_,clt)
-  | PC.TMetaExp(_,_,_,_,clt) | PC.TMetaIdExp(_,_,_,_,clt)
-  | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt)
-  | PC.TMetaId(_,_,_,clt)
-  | PC.TMetaType(_,_,clt) | PC.TMetaStm(_,_,clt)  
-  | PC.TMetaStmList(_,_,clt)  | PC.TMetaFunc(_,_,_,clt) 
-  | PC.TMetaLocalFunc(_,_,_,clt) | PC.TMetaPos(_,_,_,clt)
-
-  | PC.TWhen(clt) | PC.TWhenTrue(clt) | PC.TWhenFalse(clt) |
-    PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
-  (* | PC.TCircles(clt) | PC.TStars(clt) *)
-
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt) 
-  | PC.TCPar(clt)
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt)
-  | PC.TOInit(clt)
-
-  | PC.TPtrOp(clt)
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
-  | PC.TPtVirg(clt)
-
-  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar0(clt)
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt)
-  | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (* | PC.TOCircles(clt)
-  | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *) -> clt
-
-  | _ -> failwith "no clt"
-
-let update_clt (tok,x) clt =
-  match tok with
-    PC.Tchar(_) -> (PC.Tchar(clt),x)
-  | PC.Tshort(_) -> (PC.Tshort(clt),x)
-  | PC.Tint(_) -> (PC.Tint(clt),x)
-  | PC.Tdouble(_) -> (PC.Tdouble(clt),x)
-  | PC.Tfloat(_) -> (PC.Tfloat(clt),x)
-  | PC.Tlong(_) -> (PC.Tlong(clt),x)
-  | PC.Tvoid(_) -> (PC.Tvoid(clt),x)
-  | PC.Tstruct(_) -> (PC.Tstruct(clt),x)
-  | PC.Tunion(_) -> (PC.Tunion(clt),x)
-  | PC.Tunsigned(_) -> (PC.Tunsigned(clt),x)
-  | PC.Tsigned(_) -> (PC.Tsigned(clt),x)
-  | PC.Tstatic(_) -> (PC.Tstatic(clt),x)
-  | PC.Tinline(_) -> (PC.Tinline(clt),x)
-  | PC.Ttypedef(_) -> (PC.Ttypedef(clt),x)
-  | PC.Tattr(s,_) -> (PC.Tattr(s,clt),x)
-  | PC.Tauto(_) -> (PC.Tauto(clt),x)
-  | PC.Tregister(_) -> (PC.Tregister(clt),x)
-  | PC.Textern(_) -> (PC.Textern(clt),x)
-  | PC.Tconst(_) -> (PC.Tconst(clt),x)
-  | PC.Tvolatile(_) -> (PC.Tvolatile(clt),x)
-
-  | PC.TIncludeL(s,_) -> (PC.TIncludeL(s,clt),x)
-  | PC.TIncludeNL(s,_) -> (PC.TIncludeNL(s,clt),x)
-  | PC.TDefine(_,a) -> (PC.TDefine(clt,a),x)
-  | PC.TDefineParam(_,a,b) -> (PC.TDefineParam(clt,a,b),x)
-  | PC.TMinusFile(s,_) -> (PC.TMinusFile(s,clt),x)
-  | PC.TPlusFile(s,_) -> (PC.TPlusFile(s,clt),x)
-
-  | PC.TInc(_) -> (PC.TInc(clt),x)
-  | PC.TDec(_) -> (PC.TDec(clt),x)
-       
-  | PC.TIf(_) -> (PC.TIf(clt),x)
-  | PC.TElse(_) -> (PC.TElse(clt),x)
-  | PC.TWhile(_) -> (PC.TWhile(clt),x)
-  | PC.TFor(_) -> (PC.TFor(clt),x)
-  | PC.TDo(_) -> (PC.TDo(clt),x)
-  | PC.TSwitch(_) -> (PC.TSwitch(clt),x)
-  | PC.TCase(_) -> (PC.TCase(clt),x)
-  | PC.TDefault(_) -> (PC.TDefault(clt),x)
-  | PC.TReturn(_) -> (PC.TReturn(clt),x)
-  | PC.TBreak(_) -> (PC.TBreak(clt),x)
-  | PC.TContinue(_) -> (PC.TContinue(clt),x)
-  | PC.TGoto(_) -> (PC.TGoto(clt),x)
-  | PC.TIdent(s,_) -> (PC.TIdent(s,clt),x)
-  | PC.TTypeId(s,_) -> (PC.TTypeId(s,clt),x)
-  | PC.TDeclarerId(s,_) -> (PC.TDeclarerId(s,clt),x)
-  | PC.TIteratorId(s,_) -> (PC.TIteratorId(s,clt),x)
-
-  | PC.TSizeof(_) -> (PC.TSizeof(clt),x)
-
-  | PC.TString(s,_) -> (PC.TString(s,clt),x)
-  | PC.TChar(s,_) -> (PC.TChar(s,clt),x)
-  | PC.TFloat(s,_) -> (PC.TFloat(s,clt),x)
-  | PC.TInt(s,_) -> (PC.TInt(s,clt),x)
-
-  | PC.TOrLog(_) -> (PC.TOrLog(clt),x)
-  | PC.TAndLog(_) -> (PC.TAndLog(clt),x)
-  | PC.TOr(_) -> (PC.TOr(clt),x)
-  | PC.TXor(_) -> (PC.TXor(clt),x)
-  | PC.TAnd (_) -> (PC.TAnd (clt),x)
-  | PC.TEqEq(_) -> (PC.TEqEq(clt),x)
-  | PC.TNotEq(_) -> (PC.TNotEq(clt),x)
-  | PC.TLogOp(op,_) -> (PC.TLogOp(op,clt),x)
-  | PC.TShOp(op,_) -> (PC.TShOp(op,clt),x)
-  | PC.TPlus(_) -> (PC.TPlus(clt),x)
-  | PC.TMinus(_) -> (PC.TMinus(clt),x)
-  | PC.TMul(_) -> (PC.TMul(clt),x)
-  | PC.TDmOp(op,_) -> (PC.TDmOp(op,clt),x)
-  | PC.TTilde (_) -> (PC.TTilde (clt),x)
-
-  | PC.TMetaParam(a,b,_) -> (PC.TMetaParam(a,b,clt),x)
-  | PC.TMetaParamList(a,b,c,_) -> (PC.TMetaParamList(a,b,c,clt),x)
-  | PC.TMetaConst(a,b,c,d,_) -> (PC.TMetaConst(a,b,c,d,clt),x)
-  | PC.TMetaErr(a,b,c,_) -> (PC.TMetaErr(a,b,c,clt),x)
-  | PC.TMetaExp(a,b,c,d,_) -> (PC.TMetaExp(a,b,c,d,clt),x)
-  | PC.TMetaIdExp(a,b,c,d,_) -> (PC.TMetaIdExp(a,b,c,d,clt),x)
-  | PC.TMetaLocalIdExp(a,b,c,d,_) -> (PC.TMetaLocalIdExp(a,b,c,d,clt),x)
-  | PC.TMetaExpList(a,b,c,_) -> (PC.TMetaExpList(a,b,c,clt),x)
-  | PC.TMetaId(a,b,c,_)    -> (PC.TMetaId(a,b,c,clt),x)
-  | PC.TMetaType(a,b,_)    -> (PC.TMetaType(a,b,clt),x)
-  | PC.TMetaStm(a,b,_)   -> (PC.TMetaStm(a,b,clt),x)
-  | PC.TMetaStmList(a,b,_)   -> (PC.TMetaStmList(a,b,clt),x)
-  | PC.TMetaFunc(a,b,c,_)  -> (PC.TMetaFunc(a,b,c,clt),x)
-  | PC.TMetaLocalFunc(a,b,c,_) -> (PC.TMetaLocalFunc(a,b,c,clt),x)
-
-  | PC.TWhen(_) -> (PC.TWhen(clt),x)
-  | PC.TWhenTrue(_) -> (PC.TWhenTrue(clt),x)
-  | PC.TWhenFalse(_) -> (PC.TWhenFalse(clt),x)
-  | PC.TAny(_) -> (PC.TAny(clt),x)
-  | PC.TStrict(_) -> (PC.TStrict(clt),x)
-  | PC.TEllipsis(_) -> (PC.TEllipsis(clt),x)
-(*
-  | PC.TCircles(_)  -> (PC.TCircles(clt),x)
-  | PC.TStars(_)    -> (PC.TStars(clt),x)
-*)
-
-  | PC.TOEllipsis(_) -> (PC.TOEllipsis(clt),x)
-  | PC.TCEllipsis(_) -> (PC.TCEllipsis(clt),x)
-  | PC.TPOEllipsis(_) -> (PC.TPOEllipsis(clt),x)
-  | PC.TPCEllipsis(_) -> (PC.TPCEllipsis(clt),x)
-(*
-  | PC.TOCircles(_)  -> (PC.TOCircles(clt),x)
-  | PC.TCCircles(_)  -> (PC.TCCircles(clt),x)
-  | PC.TOStars(_)    -> (PC.TOStars(clt),x)
-  | PC.TCStars(_)    -> (PC.TCStars(clt),x)
-*)
-
-  | PC.TWhy(_)   -> (PC.TWhy(clt),x)
-  | PC.TDotDot(_)   -> (PC.TDotDot(clt),x)
-  | PC.TBang(_)  -> (PC.TBang(clt),x)
-  | PC.TOPar(_)  -> (PC.TOPar(clt),x)
-  | PC.TOPar0(_) -> (PC.TOPar0(clt),x)
-  | PC.TMid0(_)  -> (PC.TMid0(clt),x)
-  | PC.TCPar(_)  -> (PC.TCPar(clt),x)
-  | PC.TCPar0(_) -> (PC.TCPar0(clt),x)
-
-  | PC.TOBrace(_) -> (PC.TOBrace(clt),x)
-  | PC.TCBrace(_) -> (PC.TCBrace(clt),x)
-  | PC.TOCro(_) -> (PC.TOCro(clt),x)
-  | PC.TCCro(_) -> (PC.TCCro(clt),x)
-  | PC.TOInit(_) -> (PC.TOInit(clt),x)
-
-  | PC.TPtrOp(_) -> (PC.TPtrOp(clt),x)
-
-  | PC.TEq(_) -> (PC.TEq(clt),x)
-  | PC.TAssign(s,_) -> (PC.TAssign(s,clt),x)
-  | PC.TDot(_) -> (PC.TDot(clt),x)
-  | PC.TComma(_) -> (PC.TComma(clt),x)
-  | PC.TPtVirg(_) -> (PC.TPtVirg(clt),x)
-
-  | PC.TLineEnd(_) -> (PC.TLineEnd(clt),x)
-  | PC.TFunDecl(_) -> (PC.TFunDecl(clt),x)
-
-  | _ -> failwith "no clt"
-
-
-(* ----------------------------------------------------------------------- *)
-
-let make_name prefix ln = Printf.sprintf "%s starting on line %d" prefix ln
-
-(* ----------------------------------------------------------------------- *)
-(* Read tokens *)
-
-let wrap_lexbuf_info lexbuf =
-  (Lexing.lexeme lexbuf, Lexing.lexeme_start lexbuf)    
-
-let tokens_all_full token table file get_ats lexbuf end_markers :
-    (bool * ((PC.token * (string * (int * int) * (int * int))) list)) =
-  try 
-    let rec aux () = 
-      let result = token lexbuf in
-      let info = (Lexing.lexeme lexbuf, 
-                  (table.(Lexing.lexeme_start lexbuf)),
-                  (Lexing.lexeme_start lexbuf, Lexing.lexeme_end lexbuf)) in
-      if result = PC.EOF 
-      then
-       if get_ats
-       then failwith "unexpected end of file in a metavariable declaration"
-       else (false,[(result,info)])
-      else if List.mem result end_markers
-      then (true,[(result,info)])
-      else
-       let (more,rest) = aux() in
-       (more,(result, info)::rest)
-    in aux () 
-  with
-    e -> pr2 (Common.error_message file (wrap_lexbuf_info lexbuf) ); raise e
-
-let tokens_all table file get_ats lexbuf end_markers :
-    (bool * ((PC.token * (string * (int * int) * (int * int))) list)) =
-  tokens_all_full Lexer_cocci.token table file get_ats lexbuf end_markers
-
-let tokens_script_all table file get_ats lexbuf end_markers :
-    (bool * ((PC.token * (string * (int * int) * (int * int))) list)) =
-  tokens_all_full Lexer_script.token table file get_ats lexbuf end_markers
-
-(* ----------------------------------------------------------------------- *)
-(* Split tokens into minus and plus fragments *)
-
-let split t clt =
-  let (d,_,_,_,_,_,_,_) = clt in
-  match d with
-    D.MINUS | D.OPTMINUS | D.UNIQUEMINUS -> ([t],[])
-  | D.PLUS -> ([],[t])
-  | D.CONTEXT | D.UNIQUE | D.OPT -> ([t],[t])
-
-let split_token ((tok,_) as t) =
-  match tok with
-    PC.TIdentifier | PC.TConstant | PC.TExpression | PC.TIdExpression
-  | PC.TStatement | PC.TPosition | PC.TPosAny
-  | PC.TFunction | PC.TTypedef | PC.TDeclarer | PC.TIterator | PC.TName
-  | PC.TType | PC.TParameter | PC.TLocal | PC.Tlist | PC.TFresh | PC.TPure
-  | PC.TContext | PC.TRuleName(_) | PC.TUsing | PC.TDisable | PC.TExtends
-  | PC.TPathIsoFile(_)
-  | PC.TDepends | PC.TOn | PC.TEver | PC.TNever | PC.TExists | PC.TForall
-  | PC.TReverse
-  | PC.TError | PC.TWords | PC.TNothing -> ([t],[t])
-
-  | PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
-  | PC.Tstatic(clt) | PC.Tauto(clt) | PC.Tregister(clt) | PC.Textern(clt)
-  | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt)
-  | PC.Tconst(clt) | PC.Tvolatile(clt) -> split t clt
-
-  | PC.TPragma(s) -> ([],[t]) (* only allowed in + *)
-  | PC.TPlusFile(s,clt) | PC.TMinusFile(s,clt)
-  | PC.TIncludeL(s,clt) | PC.TIncludeNL(s,clt) ->
-      split t clt
-  | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_) -> split t clt
-
-  | PC.TIf(clt) | PC.TElse(clt)  | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
-  | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt)
-  | PC.TSizeof(clt)
-  | PC.TReturn(clt) | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt)
-  | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaExp(_,_,_,_,clt)
-  | PC.TMetaIdExp(_,_,_,_,clt) | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt)
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt)
-  | PC.TMetaId(_,_,_,clt) | PC.TMetaType(_,_,clt)
-  | PC.TMetaStm(_,_,clt) | PC.TMetaStmList(_,_,clt) | PC.TMetaErr(_,_,_,clt)
-  | PC.TMetaFunc(_,_,_,clt) | PC.TMetaLocalFunc(_,_,_,clt)
-  | PC.TMetaDeclarer(_,_,_,clt) | PC.TMetaIterator(_,_,_,clt) -> split t clt
-  | PC.TMPtVirg | PC.TArob | PC.TArobArob | PC.TScript -> ([t],[t])
-  | PC.TPArob | PC.TMetaPos(_,_,_,_) -> ([t],[])
-
-  | PC.TFunDecl(clt)
-  | PC.TWhen(clt) | PC.TWhenTrue(clt) | PC.TWhenFalse(clt)
-  | PC.TAny(clt) | PC.TStrict(clt) | PC.TLineEnd(clt)
-  | PC.TEllipsis(clt) (* | PC.TCircles(clt) | PC.TStars(clt) *) -> split t clt
-
-  | PC.TOEllipsis(_) | PC.TCEllipsis(_) (* clt must be context *)
-  | PC.TPOEllipsis(_) | PC.TPCEllipsis(_) (* clt must be context *)
-(*
-  | PC.TOCircles(_) | PC.TCCircles(_)   (* clt must be context *)
-  | PC.TOStars(_) | PC.TCStars(_)       (* clt must be context *)
-*)
-  | PC.TBang0 | PC.TPlus0 | PC.TWhy0 ->
-      ([t],[t])
-
-  | PC.TWhy(clt)  | PC.TDotDot(clt)
-  | PC.TBang(clt) | PC.TOPar(clt) | PC.TOPar0(clt)
-  | PC.TMid0(clt) | PC.TCPar(clt) | PC.TCPar0(clt) -> split t clt
-
-  | PC.TInc(clt) | PC.TDec(clt) -> split t clt
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt) ->
-      split t clt
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt)
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt)
-  | PC.TDmOp(_,clt) | PC.TTilde (clt) -> split t clt
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOInit(clt) -> split t clt
-  | PC.TOCro(clt) | PC.TCCro(clt) -> split t clt
-
-  | PC.TPtrOp(clt) -> split t clt
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
-  | PC.TPtVirg(clt) -> split t clt
-
-  | PC.EOF | PC.TInvalid -> ([t],[t])
-
-  | PC.TIso | PC.TRightIso
-  | PC.TIsoExpression | PC.TIsoStatement | PC.TIsoDeclaration | PC.TIsoType
-  | PC.TIsoTopLevel | PC.TIsoArgExpression | PC.TIsoTestExpression ->
-      failwith "unexpected tokens"
-  | PC.TScriptData s -> ([t],[t])
-
-let split_token_stream tokens =
-  let rec loop = function
-      [] -> ([],[])
-    | token::tokens ->
-       let (minus,plus) = split_token token in
-       let (minus_stream,plus_stream) = loop tokens in
-       (minus@minus_stream,plus@plus_stream) in
-  loop tokens
-
-(* ----------------------------------------------------------------------- *)
-(* Find function names *)
-(* This addresses a shift-reduce problem in the parser, allowing us to
-distinguish a function declaration from a function call even if the latter
-has no return type.  Undoubtedly, this is not very nice, but it doesn't
-seem very convenient to refactor the grammar to get around the problem. *)
-
-let rec find_function_names = function
-    [] -> []
-  | ((PC.TIdent(_,clt),info) as t1) :: ((PC.TOPar(_),_) as t2) :: rest
-  | ((PC.TMetaId(_,_,_,clt),info) as t1) :: ((PC.TOPar(_),_) as t2) :: rest
-  | ((PC.TMetaFunc(_,_,_,clt),info) as t1) :: ((PC.TOPar(_),_) as t2) :: rest
-  | ((PC.TMetaLocalFunc(_,_,_,clt),info) as t1)::((PC.TOPar(_),_) as t2)::rest
-    ->
-      let rec skip level = function
-         [] -> ([],false,[])
-       | ((PC.TCPar(_),_) as t)::rest ->
-           let level = level - 1 in
-           if level = 0
-           then ([t],true,rest)
-           else let (pre,found,post) = skip level rest in (t::pre,found,post)
-       | ((PC.TOPar(_),_) as t)::rest ->
-           let level = level + 1 in
-           let (pre,found,post) = skip level rest in (t::pre,found,post)
-       | ((PC.TArobArob,_) as t)::rest
-       | ((PC.TArob,_) as t)::rest
-       | ((PC.EOF,_) as t)::rest -> ([t],false,rest)
-       | t::rest ->
-           let (pre,found,post) = skip level rest in (t::pre,found,post) in
-      let (pre,found,post) = skip 1 rest in
-      (match (found,post) with
-       (true,((PC.TOBrace(_),_) as t3)::rest) ->
-         (PC.TFunDecl(clt),info) :: t1 :: t2 :: pre @
-         t3 :: (find_function_names rest)
-      |        _ -> t1 :: t2 :: pre @ find_function_names post)
-  | t :: rest -> t :: find_function_names rest
-
-(* ----------------------------------------------------------------------- *)
-(* an attribute is an identifier that preceeds another identifier and
-   begins with __ *)
-
-let rec detect_attr l =
-  let is_id = function
-      (PC.TIdent(_,_),_) | (PC.TMetaId(_,_,_,_),_) | (PC.TMetaFunc(_,_,_,_),_)
-    | (PC.TMetaLocalFunc(_,_,_,_),_) -> true
-    | _ -> false in    
-  let rec loop = function
-      [] -> []
-    | [x] -> [x]
-    | ((PC.TIdent(nm,clt),info) as t1)::id::rest when is_id id ->
-       if String.length nm > 2 && String.sub nm 0 2 = "__"
-       then (PC.Tattr(nm,clt),info)::(loop (id::rest))
-       else t1::(loop (id::rest))
-    | x::xs -> x::(loop xs) in
-  loop l
-
-(* ----------------------------------------------------------------------- *)
-(* Look for variable declarations where the name is a typedef name.
-We assume that C code does not contain a multiplication as a top-level
-statement. *)
-
-(* bug: once a type, always a type, even if the same name is later intended
-   to be used as a real identifier *)
-let detect_types in_meta_decls l =
-  let is_delim infn = function
-      (PC.TOEllipsis(_),_) (* | (PC.TOCircles(_),_) | (PC.TOStars(_),_) *)
-    | (PC.TPOEllipsis(_),_) (* | (PC.TOCircles(_),_) | (PC.TOStars(_),_) *)
-    | (PC.TEllipsis(_),_) (* | (PC.TCircles(_),_) | (PC.TStars(_),_) *)
-    | (PC.TPtVirg(_),_) | (PC.TOBrace(_),_) | (PC.TOInit(_),_)
-    | (PC.TCBrace(_),_)
-    | (PC.TPure,_) | (PC.TContext,_)
-    | (PC.Tstatic(_),_) | (PC.Textern(_),_)
-    | (PC.Tinline(_),_) | (PC.Ttypedef(_),_) | (PC.Tattr(_),_) -> true
-    | (PC.TComma(_),_) when infn > 0 or in_meta_decls -> true
-    | (PC.TDotDot(_),_) when in_meta_decls -> true
-    | _ -> false in
-  let is_choices_delim = function
-      (PC.TOBrace(_),_) | (PC.TComma(_),_) -> true | _ -> false in
-  let is_id = function
-      (PC.TIdent(_,_),_) | (PC.TMetaId(_,_,_,_),_) | (PC.TMetaFunc(_,_,_,_),_)
-    | (PC.TMetaLocalFunc(_,_,_,_),_) -> true
-    | (PC.TMetaParam(_,_,_),_)
-    | (PC.TMetaParamList(_,_,_,_),_)
-    | (PC.TMetaConst(_,_,_,_,_),_)
-    | (PC.TMetaErr(_,_,_,_),_)
-    | (PC.TMetaExp(_,_,_,_,_),_)
-    | (PC.TMetaIdExp(_,_,_,_,_),_)
-    | (PC.TMetaLocalIdExp(_,_,_,_,_),_)
-    | (PC.TMetaExpList(_,_,_,_),_)
-    | (PC.TMetaType(_,_,_),_)
-    | (PC.TMetaStm(_,_,_),_)
-    | (PC.TMetaStmList(_,_,_),_)
-    | (PC.TMetaPos(_,_,_,_),_) -> in_meta_decls 
-    | _ -> false in
-  let redo_id ident clt v =
-    !Data.add_type_name ident;
-    (PC.TTypeId(ident,clt),v) in
-  let rec loop start infn type_names = function
-      (* infn: 0 means not in a function header
-        > 0 means in a function header, after infn - 1 unmatched open parens*)
-      [] -> []
-    | ((PC.TOBrace(clt),v)::_) as all when in_meta_decls ->
-       collect_choices type_names all (* never a function header *)
-    | delim::(PC.TIdent(ident,clt),v)::((PC.TMul(_),_) as x)::rest
-      when is_delim infn delim ->
-       let newid = redo_id ident clt v in
-       delim::newid::x::(loop false infn (ident::type_names) rest)
-    | delim::(PC.TIdent(ident,clt),v)::id::rest
-      when is_delim infn delim && is_id id ->
-       let newid = redo_id ident clt v in
-       delim::newid::id::(loop false infn (ident::type_names) rest)
-    | ((PC.TFunDecl(_),_) as fn)::rest ->
-       fn::(loop false 1 type_names rest)
-    | ((PC.TOPar(_),_) as lp)::rest when infn > 0 ->
-       lp::(loop false (infn + 1) type_names rest)
-    | ((PC.TCPar(_),_) as rp)::rest when infn > 0 ->
-       if infn - 1 = 1
-       then rp::(loop false 0 type_names rest) (* 0 means not in fn header *)
-       else rp::(loop false (infn - 1) type_names rest)
-    | (PC.TIdent(ident,clt),v)::((PC.TMul(_),_) as x)::rest when start ->
-       let newid = redo_id ident clt v in
-       newid::x::(loop false infn (ident::type_names) rest)
-    | (PC.TIdent(ident,clt),v)::id::rest when start && is_id id ->
-       let newid = redo_id ident clt v in
-       newid::id::(loop false infn (ident::type_names) rest)
-    | (PC.TIdent(ident,clt),v)::rest when List.mem ident type_names ->
-       (PC.TTypeId(ident,clt),v)::(loop false infn type_names rest)
-    | ((PC.TIdent(ident,clt),v) as x)::rest ->
-       x::(loop false infn type_names rest)
-    | x::rest -> x::(loop false infn type_names rest)
-  and collect_choices type_names = function
-      [] -> [] (* should happen, but let the parser detect that *)
-    | (PC.TCBrace(clt),v)::rest ->
-       (PC.TCBrace(clt),v)::(loop false 0 type_names rest)
-    | delim::(PC.TIdent(ident,clt),v)::rest
-      when is_choices_delim delim ->
-       let newid = redo_id ident clt v in
-       delim::newid::(collect_choices (ident::type_names) rest)
-    | x::rest -> x::(collect_choices type_names rest) in
-  loop true 0 [] l
-
-
-(* ----------------------------------------------------------------------- *)
-(* Insert TLineEnd tokens at the end of a line that contains a WHEN.
-   WHEN is restricted to a single line, to avoid ambiguity in eg:
-   ... WHEN != x
-   +3 *)
-
-let token2line (tok,_) =
-  match tok with
-    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt) 
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt) 
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
-  | PC.Tstatic(clt) | PC.Tauto(clt) | PC.Tregister(clt) | PC.Textern(clt) 
-  | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt) | PC.Tconst(clt)
-  | PC.Tvolatile(clt) 
-
-  | PC.TInc(clt) | PC.TDec(clt) 
-       
-  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt) 
-  | PC.TSwitch (clt) | PC.TCase (clt) | PC.TDefault (clt) | PC.TSizeof (clt)
-  | PC.TReturn(clt) | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt)
-  | PC.TIdent(_,clt)
-  | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
-  | PC.TMetaDeclarer(_,_,_,clt) | PC.TMetaIterator(_,_,_,clt)
-
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt) 
-
-  | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt) 
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt) 
-  | PC.TDmOp(_,clt) | PC.TTilde (clt) 
-
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt) 
-  | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaExp(_,_,_,_,clt)
-  | PC.TMetaIdExp(_,_,_,_,clt) | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt) 
-  | PC.TMetaId(_,_,_,clt) | PC.TMetaType(_,_,clt)
-  | PC.TMetaStm(_,_,clt) | PC.TMetaStmList(_,_,clt) | PC.TMetaFunc(_,_,_,clt)
-  | PC.TMetaLocalFunc(_,_,_,clt) | PC.TMetaPos(_,_,_,clt)
-
-  | PC.TFunDecl(clt)
-  | PC.TWhen(clt) | PC.TWhenTrue(clt) | PC.TWhenFalse(clt)
-  | PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
-  (* | PC.TCircles(clt) | PC.TStars(clt) *)
-
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt) 
-  | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (*| PC.TOCircles(clt)
-  | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *)
-
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt)
-  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar(clt)  
-  | PC.TCPar0(clt) 
-
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt) 
-  | PC.TOInit(clt)
-
-  | PC.TPtrOp(clt) 
-
-  | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_)
-  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt)
-
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt) 
-  | PC.TPtVirg(clt) ->
-      let (_,line,_,_,_,_,_,_) = clt in Some line
-
-  | _ -> None
-
-let rec insert_line_end = function
-    [] -> []
-  | (((PC.TWhen(clt),q) as x)::xs) ->
-      x::(find_line_end true (token2line x) clt q xs)
-  | (((PC.TDefine(clt,_),q) as x)::xs)
-  | (((PC.TDefineParam(clt,_,_),q) as x)::xs) ->
-      x::(find_line_end false (token2line x) clt q xs)
-  | x::xs -> x::(insert_line_end xs)
-
-and find_line_end inwhen line clt q = function
-    (* don't know what 2nd component should be so just use the info of
-       the When.  Also inherit - of when, if any *)
-    [] -> [(PC.TLineEnd(clt),q)]
-  | ((PC.TIdent("strict",clt),a) as x)::xs when token2line x = line ->
-      (PC.TStrict(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("STRICT",clt),a) as x)::xs when token2line x = line ->
-      (PC.TStrict(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("any",clt),a) as x)::xs when token2line x = line ->
-      (PC.TAny(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("ANY",clt),a) as x)::xs when token2line x = line ->
-      (PC.TAny(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("forall",clt),a) as x)::xs when token2line x = line ->
-      (PC.TForall,a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TIdent("exists",clt),a) as x)::xs when token2line x = line ->
-      (PC.TExists,a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TComma(clt),a) as x)::xs when token2line x = line ->
-      (PC.TComma(clt),a) :: (find_line_end inwhen line clt q xs)
-  | ((PC.TPArob,a) as x)::xs -> (* no line #, just assume on the same line *)
-      x :: (find_line_end inwhen line clt q xs)
-  | x::xs when token2line x = line -> x :: (find_line_end inwhen line clt q xs)
-  | xs -> (PC.TLineEnd(clt),q)::(insert_line_end xs)
-
-let rec translate_when_true_false = function
-    [] -> []
-  | (PC.TWhen(clt),q)::((PC.TNotEq(_),_) as x)::(PC.TIdent("true",_),_)::xs ->
-      (PC.TWhenTrue(clt),q)::x::xs
-  | (PC.TWhen(clt),q)::((PC.TNotEq(_),_) as x)::(PC.TIdent("false",_),_)::xs ->
-      (PC.TWhenFalse(clt),q)::x::xs
-  | x::xs -> x :: (translate_when_true_false xs)
-
-(* ----------------------------------------------------------------------- *)
-(* top level initializers: a sequence of braces followed by a dot *)
-
-let find_top_init tokens =
-  match tokens with
-    (PC.TOBrace(clt),q) :: rest ->
-      let rec dot_start acc = function
-         ((PC.TOBrace(_),_) as x) :: rest ->
-           dot_start (x::acc) rest
-       | ((PC.TDot(_),_) :: rest) as x ->
-           Some ((PC.TOInit(clt),q) :: (List.rev acc) @ x)
-       | l -> None in
-      let rec comma_end acc = function
-         ((PC.TCBrace(_),_) as x) :: rest ->
-           comma_end (x::acc) rest
-       | ((PC.TComma(_),_) :: rest) as x ->
-           Some ((PC.TOInit(clt),q) :: (List.rev x) @ acc)
-       | l -> None in
-      (match dot_start [] rest with
-       Some x -> x
-      |        None ->
-         (match List.rev rest with
-           ((PC.EOF,_) as x)::rest ->
-             (match comma_end [x] rest with
-               Some x -> x
-             | None -> tokens)
-         | _ -> failwith "unexpected empty token list"))
-  | _ -> tokens
-
-(* ----------------------------------------------------------------------- *)
-(* process pragmas: they can only be used in + code, and adjacent to
-another + token.  They are concatenated to the string representation of
-that other token. *)
-
-let rec collect_all_pragmas collected = function
-    (PC.TPragma(s),_)::rest -> collect_all_pragmas (s::collected) rest
-  | l -> (List.rev collected,l)
-
-let rec collect_up_to_pragmas skipped = function
-    [] -> None (* didn't reach a pragma, so nothing to do *)
-  | ((PC.TPragma(s),_) as t)::rest ->
-      let (pragmas,rest) = collect_all_pragmas [] (t::rest) in
-      Some (List.rev skipped,pragmas,rest)
-  | x::xs ->
-      match plus_attachable x with
-       PLUS -> None
-      |        NOTPLUS -> None
-      |        SKIP -> collect_up_to_pragmas (x::skipped) xs
-
-let rec collect_up_to_plus skipped = function
-    [] -> failwith "nothing to attach a pragma to"
-  | x::xs ->
-      match plus_attachable x with
-       PLUS -> (List.rev skipped,x,xs)
-      |        NOTPLUS -> failwith "nothing to attach a pragma to"
-      |        SKIP -> collect_up_to_plus (x::skipped) xs
-
-let rec process_pragmas = function
-    [] -> []
-  | ((PC.TPragma(s),_)::_) as l ->
-      let (pragmas,rest) = collect_all_pragmas [] l in
-      let (skipped,aft,rest) = collect_up_to_plus [] rest in
-      let (a,b,c,d,e,strbef,straft,pos) = get_clt aft in
-      skipped@
-      (process_pragmas ((update_clt aft (a,b,c,d,e,pragmas,straft,pos))::rest))
-  | bef::xs ->
-      (match plus_attachable bef with
-       PLUS ->
-         (match collect_up_to_pragmas [] xs with
-           Some(skipped,pragmas,rest) ->
-             let (a,b,c,d,e,strbef,straft,pos) = get_clt bef in
-             (update_clt bef (a,b,c,d,e,strbef,pragmas,pos))::
-             skipped@(process_pragmas rest)
-         | None -> bef::(process_pragmas xs))
-      |        _ -> bef::(process_pragmas xs))
-
-(* ----------------------------------------------------------------------- *)
-(* Drop ... ... .  This is only allowed in + code, and arises when there is
-some - code between the ... *)
-(* drop whens as well - they serve no purpose in + code and they cause
-problems for drop_double_dots *)
-
-let rec drop_when = function
-    [] -> []
-  | (PC.TWhen(clt),info)::xs ->
-      let rec loop = function
-         [] -> []
-       | (PC.TLineEnd(_),info)::xs -> drop_when xs
-       | x::xs -> loop xs in
-      loop xs
-  | x::xs -> x::drop_when xs
-
-(* instead of dropping the double dots, we put TNothing in between them.
-these vanish after the parser, but keeping all the ...s in the + code makes
-it easier to align the + and - code in context_neg and in preparation for the
-isomorphisms.  This shouldn't matter because the context code of the +
-slice is mostly ignored anyway *)
-let rec drop_double_dots l =
-  let start = function
-      (PC.TOEllipsis(_),_) | (PC.TPOEllipsis(_),_)
- (* | (PC.TOCircles(_),_) | (PC.TOStars(_),_) *) ->
-       true
-    | _ -> false in
-  let middle = function
-      (PC.TEllipsis(_),_) (* | (PC.TCircles(_),_) | (PC.TStars(_),_) *) -> true
-    | _ -> false in
-  let final = function
-      (PC.TCEllipsis(_),_) | (PC.TPCEllipsis(_),_)
- (* | (PC.TCCircles(_),_) | (PC.TCStars(_),_) *) ->
-       true
-    | _ -> false in
-  let rec loop ((_,i) as prev) = function
-      [] -> []
-    | x::rest when middle prev && middle x -> (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when start prev && middle x ->  (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when start prev && final x ->   (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when middle prev && final x ->  (PC.TNothing,i)::x::(loop x rest)
-    | x::rest -> x :: (loop x rest) in
-  match l with
-    [] -> []
-  | (x::xs) -> x :: loop x xs
-
-let rec fix f l =
-  let cur = f l in
-  if l = cur then l else fix f cur
-
-(* ( | ... | ) also causes parsing problems *)
-
-exception Not_empty
-
-let rec drop_empty_thing starter middle ender = function
-    [] -> []
-  | hd::rest when starter hd ->
-      let rec loop = function
-         x::rest when middle x -> loop rest
-       | x::rest when ender x -> rest
-       | _ -> raise Not_empty in
-      (match try Some(loop rest) with Not_empty -> None with
-       Some x -> drop_empty_thing starter middle ender x
-      |        None -> hd :: drop_empty_thing starter middle ender rest)
-  | x::rest -> x :: drop_empty_thing starter middle ender rest
-
-let drop_empty_or =
-  drop_empty_thing
-    (function (PC.TOPar0(_),_) -> true | _ -> false)
-    (function (PC.TMid0(_),_) -> true | _ -> false)
-    (function (PC.TCPar0(_),_) -> true | _ -> false)
-
-let drop_empty_nest = drop_empty_thing
-
-(* ----------------------------------------------------------------------- *)
-(* Read tokens *)
-
-let get_s_starts (_, (s,_,(starts, ends))) =
-  Printf.printf "%d %d\n" starts ends; (s, starts)
-
-let pop2 l = 
-  let v = List.hd !l in
-  l := List.tl !l;
-  v
-
-let reinit _ =
-  PC.reinit (function _ -> PC.TArobArob (* a handy token *))
-    (Lexing.from_function
-       (function buf -> function n -> raise Common.Impossible))
-
-let parse_one str parsefn file toks =
-  let all_tokens = ref toks in
-  let cur_tok    = ref (List.hd !all_tokens) in
-
-  let lexer_function _ =
-      let (v, info) = pop2 all_tokens in
-      cur_tok := (v, info);
-      v in
-
-  let lexbuf_fake =
-    Lexing.from_function
-      (function buf -> function n -> raise Common.Impossible)
-  in
-
-  reinit();
-
-  try parsefn lexer_function lexbuf_fake 
-  with 
-    Lexer_cocci.Lexical s ->
-      failwith
-       (Printf.sprintf "%s: lexical error: %s\n =%s\n" str s
-          (Common.error_message file (get_s_starts !cur_tok) ))
-  | Parser_cocci_menhir.Error ->
-      failwith
-       (Printf.sprintf "%s: parse error: \n = %s\n" str
-          (Common.error_message file (get_s_starts !cur_tok) ))
-  | Semantic_cocci.Semantic s ->
-      failwith
-       (Printf.sprintf "%s: semantic error: %s\n =%s\n" str s
-          (Common.error_message file (get_s_starts !cur_tok) ))
-
-  | e -> raise e
-
-let prepare_tokens tokens =
-  find_top_init
-    (translate_when_true_false (* after insert_line_end *)
-       (insert_line_end
-         (detect_types false (find_function_names (detect_attr tokens)))))
-
-let rec consume_minus_positions = function
-    [] -> []
-  | x::(PC.TPArob,_)::(PC.TMetaPos(name,constraints,per,clt),_)::xs ->
-      let (arity,ln,lln,offset,col,strbef,straft,_) = get_clt x in
-      let name = Parse_aux.clt2mcode name clt in
-      let x =
-       update_clt x
-         (arity,ln,lln,offset,col,strbef,straft,
-          Ast0.MetaPos(name,constraints,per)) in
-      x::(consume_minus_positions xs)
-  | x::xs -> x::consume_minus_positions xs
-
-let any_modif rule =
-  let mcode x =
-    match Ast0.get_mcode_mcodekind x with
-      Ast0.MINUS _ | Ast0.PLUS -> true
-    | _ -> false in
-  let donothing r k e = k e in
-  let bind x y = x or y in
-  let option_default = false in
-  let fn =
-    V0.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing donothing donothing
-      donothing donothing in
-  List.exists fn.V0.combiner_top_level rule
-
-let drop_last extra l = List.rev(extra@(List.tl(List.rev l)))
-
-let partition_either l =
-  let rec part_either left right = function
-  | [] -> (List.rev left, List.rev right)
-  | x :: l -> 
-      (match x with
-      | Common.Left  e -> part_either (e :: left) right l
-      | Common.Right e -> part_either left (e :: right) l) in
-  part_either [] [] l
-
-let get_metavars parse_fn table file lexbuf =
-  let rec meta_loop acc (* read one decl at a time *) =
-    let (_,tokens) =
-      tokens_all table file true lexbuf [PC.TArobArob;PC.TMPtVirg] in
-    let tokens = prepare_tokens tokens in
-    match tokens with
-      [(PC.TArobArob,_)] -> List.rev acc
-    | _ ->
-       let metavars = parse_one "meta" parse_fn file tokens in
-       meta_loop (metavars@acc) in
-  partition_either (meta_loop [])
-
-let get_script_metavars parse_fn table file lexbuf =
-  let rec meta_loop acc =
-    let (_, tokens) =
-      tokens_all table file true lexbuf [PC.TArobArob; PC.TMPtVirg] in
-    let tokens = prepare_tokens tokens in
-    match tokens with
-      [(PC.TArobArob, _)] -> List.rev acc
-    | _ -> 
-      let metavar = parse_one "scriptmeta" parse_fn file tokens in
-      meta_loop (metavar :: acc)
-  in
-  meta_loop []
-
-let get_rule_name parse_fn starts_with_name get_tokens file prefix =
-  Data.in_rule_name := true;
-  let mknm _ = make_name prefix (!Lexer_cocci.line) in
-  let name_res =
-    if starts_with_name
-    then
-      let (_,tokens) = get_tokens [PC.TArob] in
-      match parse_one "rule name" parse_fn file tokens with
-       Ast.CocciRulename (None,a,b,c,d,e) -> 
-          Ast.CocciRulename (Some (mknm()),a,b,c,d,e)
-      |        Ast.CocciRulename (Some nm,a,b,c,d,e) ->
-         (if List.mem nm reserved_names
-         then failwith (Printf.sprintf "invalid name %s\n" nm));
-         Ast.CocciRulename (Some nm,a,b,c,d,e)
-      | Ast.ScriptRulename(s,deps) -> Ast.ScriptRulename(s,deps)
-    else
-      Ast.CocciRulename(Some(mknm()),Ast.NoDep,[],[],Ast.Undetermined,false) in
-  Data.in_rule_name := false;
-  name_res
-
-let parse_iso file =
-  let table = Common.full_charpos_to_pos file in
-  Common.with_open_infile file (fun channel ->
-    let lexbuf = Lexing.from_channel channel in
-    let get_tokens = tokens_all table file false lexbuf in
-    let res =
-      match get_tokens [PC.TArobArob;PC.TArob] with
-       (true,start) ->
-         let parse_start start =
-           let rev = List.rev start in
-           let (arob,_) = List.hd rev in
-           (arob = PC.TArob,List.rev(List.tl rev)) in
-         let (starts_with_name,start) = parse_start start in
-         let rec loop starts_with_name start =
-           (!Data.init_rule)();
-           (* get metavariable declarations - have to be read before the
-              rest *)
-           let (rule_name,_,_,_,_,_) =
-              match get_rule_name PC.iso_rule_name starts_with_name get_tokens
-               file ("iso file "^file) with
-                Ast.CocciRulename (Some n,a,b,c,d,e) -> (n,a,b,c,d,e)
-              | _ -> failwith "Script rules cannot appear in isomorphism rules"
-              in
-           Ast0.rule_name := rule_name;
-           Data.in_meta := true;
-           let iso_metavars =
-             match get_metavars PC.iso_meta_main table file lexbuf with
-               (iso_metavars,[]) -> iso_metavars
-             | _ -> failwith "unexpected inheritance in iso" in
-           Data.in_meta := false;
-           (* get the rule *)
-           let (more,tokens) =
-             get_tokens
-               [PC.TIsoStatement;PC.TIsoExpression;PC.TIsoArgExpression;
-                 PC.TIsoTestExpression;
-                 PC.TIsoDeclaration;PC.TIsoType;PC.TIsoTopLevel] in
-           let next_start = List.hd(List.rev tokens) in
-           let dummy_info = ("",(-1,-1),(-1,-1)) in
-           let tokens = drop_last [(PC.EOF,dummy_info)] tokens in
-           let tokens = prepare_tokens (start@tokens) in
-            (*
-              print_tokens "iso tokens" tokens;
-           *)
-           let entry = parse_one "iso main" PC.iso_main file tokens in
-           let entry = List.map (List.map Test_exps.process_anything) entry in
-           if more
-           then (* The code below allows a header like Statement list,
-                   which is more than one word.  We don't have that any more,
-                   but the code is left here in case it is put back. *)
-             match get_tokens [PC.TArobArob;PC.TArob] with
-               (true,start) ->
-                 let (starts_with_name,start) = parse_start start in
-                 (iso_metavars,entry,rule_name) ::
-                 (loop starts_with_name (next_start::start))
-             | _ -> failwith "isomorphism ends early"
-           else [(iso_metavars,entry,rule_name)] in
-         loop starts_with_name start
-      | (false,_) -> [] in
-    res)
-
-let parse_iso_files existing_isos iso_files extra_path =
-  let get_names = List.map (function (_,_,nm) -> nm) in
-  let old_names = get_names existing_isos in
-  Data.in_iso := true;
-  let (res,_) =
-    List.fold_left
-      (function (prev,names) ->
-       function file ->
-         Lexer_cocci.init ();
-         let file =
-           match file with
-             Common.Left(fl)  -> Filename.concat extra_path fl
-           | Common.Right(fl) -> Filename.concat Config.path fl in
-         let current = parse_iso file in
-         let new_names = get_names current in
-         if List.exists (function x -> List.mem x names) new_names
-         then failwith (Printf.sprintf "repeated iso name found in %s" file);
-         (current::prev,new_names @ names))
-      ([],old_names) iso_files in
-  Data.in_iso := false;
-  existing_isos@(List.concat (List.rev res))
-
-let parse file =
-  let table = Common.full_charpos_to_pos file in
-  Common.with_open_infile file (fun channel ->
-  let lexbuf = Lexing.from_channel channel in
-  let get_tokens = tokens_all table file false lexbuf in
-  Data.in_prolog := true;
-  let initial_tokens = get_tokens [PC.TArobArob;PC.TArob] in
-  Data.in_prolog := false;
-  let res =
-    match initial_tokens with
-    (true,data) ->
-      (match List.rev data with
-       ((PC.TArobArob as x),_)::_ | ((PC.TArob as x),_)::_ ->
-         let iso_files =
-           parse_one "iso file names" PC.include_main file data in
-
-          let parse_cocci_rule old_metas
-             (rule_name, dependencies, iso, dropiso, exists, is_expression) =
-            Ast0.rule_name := rule_name;
-            Data.inheritable_positions :=
-               rule_name :: !Data.inheritable_positions;
-
-            (* get metavariable declarations *)
-            Data.in_meta := true;
-            let (metavars, inherited_metavars) =
-              get_metavars PC.meta_main table file lexbuf in
-            Data.in_meta := false;
-            Hashtbl.add Data.all_metadecls rule_name metavars;
-            Hashtbl.add Lexer_cocci.rule_names rule_name ();
-            Hashtbl.add Lexer_cocci.all_metavariables rule_name
-              (Hashtbl.fold
-                (fun key v rest -> (key,v)::rest)
-                Lexer_cocci.metavariables []);
-
-            (* get transformation rules *)
-            let (more, tokens) = get_tokens [PC.TArobArob; PC.TArob] in
-            let (minus_tokens, plus_tokens) = split_token_stream tokens in
-
-           let minus_tokens = consume_minus_positions minus_tokens in
-           let minus_tokens = prepare_tokens minus_tokens in
-           let plus_tokens = prepare_tokens plus_tokens in
-
-           (*
-              print_tokens "minus tokens" minus_tokens;
-              print_tokens "plus tokens" plus_tokens;
-           *)
-
-           let plus_tokens =
-             process_pragmas
-               (fix (function x -> drop_double_dots (drop_empty_or x))
-                  (drop_when plus_tokens)) in
-           (*
-               print_tokens "plus tokens" plus_tokens;
-              Printf.printf "before minus parse\n";
-           *)
-           let minus_res =
-             if is_expression
-             then parse_one "minus" PC.minus_exp_main file minus_tokens
-             else parse_one "minus" PC.minus_main file minus_tokens in
-           (*
-              Unparse_ast0.unparse minus_res;
-              Printf.printf "before plus parse\n";
-           *)
-           let plus_res =
-             if !Flag.sgrep_mode2
-             then (* not actually used for anything, except context_neg *)
-               List.map
-                 (Iso_pattern.rebuild_mcode None).V0.rebuilder_top_level
-                 minus_res
-             else
-               if is_expression
-               then parse_one "plus" PC.plus_exp_main file plus_tokens
-               else parse_one "plus" PC.plus_main file plus_tokens in
-           (*
-              Printf.printf "after plus parse\n";
-           *)
-
-           (if not !Flag.sgrep_mode2 &&
-             (any_modif minus_res or any_modif plus_res)
-           then Data.inheritable_positions := []);
-
-           Check_meta.check_meta rule_name old_metas inherited_metavars
-             metavars minus_res plus_res;
-
-            (more, Ast0.CocciRule ((minus_res, metavars,
-              (iso, dropiso, dependencies, rule_name, exists)),
-              (plus_res, metavars)), metavars, tokens) in
-
-          let parse_script_rule language old_metas deps =
-            let get_tokens = tokens_script_all table file false lexbuf in
-
-              (* meta-variables *)
-            Data.in_meta := true;
-            let metavars =
-             get_script_metavars PC.script_meta_main table file lexbuf in
-            Data.in_meta := false;
-
-            let exists_in old_metas (py,(r,m)) =
-              let test (rr,mr) x =
-                let (ro,vo) = Ast.get_meta_name x in
-                ro = rr && vo = mr in
-              List.exists (test (r,m)) old_metas in
-
-           List.iter
-             (function x ->
-               let meta2c (r,n) = Printf.sprintf "%s.%s" r n in
-               if not (exists_in old_metas x) then
-                 failwith
-                   (Printf.sprintf
-                      "Script references unknown meta-variable: %s"
-                      (meta2c(snd x))))
-             metavars;
-
-              (* script code *)
-            let (more, tokens) = get_tokens [PC.TArobArob; PC.TArob] in
-            let data =
-              match List.hd tokens with
-                (PC.TScriptData(s),_) -> s
-              | (PC.TArobArob,_) | (PC.TArob,_) -> ""
-              | _ -> failwith "Malformed script rule" in
-            (more,Ast0.ScriptRule(language, deps, metavars, data),[],tokens) in
-
-          let parse_rule old_metas starts_with_name =
-            let rulename =
-             get_rule_name PC.rule_name starts_with_name get_tokens file
-               "rule" in
-            match rulename with
-              Ast.CocciRulename (Some s, a, b, c, d, e) -> 
-                parse_cocci_rule old_metas (s, a, b, c, d, e)
-            | Ast.ScriptRulename (l,deps) -> parse_script_rule l old_metas deps
-            | _ -> failwith "Malformed rule name"
-            in
-
-         let rec loop old_metas starts_with_name =
-           (!Data.init_rule)();
-
-            let gen_starts_with_name more tokens =
-              more &&
-              (match List.hd (List.rev tokens) with
-                    (PC.TArobArob,_) -> false
-                  | (PC.TArob,_) -> true
-                  | _ -> failwith "unexpected token") 
-            in
-
-            let (more, rule, metavars, tokens) =
-              parse_rule old_metas starts_with_name in
-            if more then
-              rule::
-             (loop (metavars @ old_metas) (gen_starts_with_name more tokens))
-            else [rule];
-
-            in
-
-         (iso_files, loop [] (x = PC.TArob))
-      |        _ -> failwith "unexpected code before the first rule\n")
-  | (false,[(PC.TArobArob,_)]) | (false,[(PC.TArob,_)]) ->
-      ([],([] : Ast0.parsed_rule list))
-  | _ -> failwith "unexpected code before the first rule\n" in
-  res)
-
-(* parse to ast0 and then convert to ast *)
-let process file isofile verbose =
-  let extra_path = Filename.dirname file in
-  Lexer_cocci.init();
-  let (iso_files, rules) = parse file in
-  let std_isos =
-    match isofile with
-      None -> []
-    | Some iso_file -> parse_iso_files [] [Common.Left iso_file] "" in
-  let global_isos = parse_iso_files std_isos iso_files extra_path in
-  let rules = Unitary_ast0.do_unitary rules in
-  let parsed =
-    List.map
-      (function
-          Ast0.ScriptRule (a,b,c,d) -> [([],Ast.ScriptRule (a,b,c,d))]
-       | Ast0.CocciRule
-           ((minus, metavarsm,
-             (iso, dropiso, dependencies, rule_name, exists)),
-            (plus, metavars)) ->
-              let chosen_isos =
-                parse_iso_files global_isos
-                  (List.map (function x -> Common.Left x) iso)
-                  extra_path in
-              let chosen_isos =
-            (* check that dropped isos are actually available *)
-                (try
-                  let iso_names =
-                    List.map (function (_,_,nm) -> nm) chosen_isos in
-                  let local_iso_names = reserved_names @ iso_names in
-                  let bad_dropped =
-                    List.find
-                      (function dropped ->
-                        not (List.mem dropped local_iso_names))
-                      dropiso in
-                  failwith
-                    ("invalid iso name " ^ bad_dropped ^ " in " ^ rule_name)
-                with Not_found -> ());
-                if List.mem "all" dropiso 
-                then 
-                  if List.length dropiso = 1
-                  then []
-                  else failwith "disable all should only be by itself"
-                else (* drop those isos *)
-                  List.filter
-                    (function (_,_,nm) -> not (List.mem nm dropiso))
-                    chosen_isos in
-              List.iter Iso_compile.process chosen_isos;
-              let dropped_isos =
-                match reserved_names with
-                  "all"::others ->
-                    (match dropiso with
-                      ["all"] -> others
-                    | _ ->
-                        List.filter (function x -> List.mem x dropiso) others)
-                | _ ->
-                    failwith
-                      "bad list of reserved names - all must be at start" in
-              let minus = Test_exps.process minus in
-              let minus = Compute_lines.compute_lines minus in
-              let plus = Compute_lines.compute_lines plus in
-              let is_exp =
-                (* only relevant to Flag.make_hrule *)
-                (* doesn't handle multiple minirules properly, but since
-                   we don't really handle them in lots of other ways, it
-                   doesn't seem very important *)
-                match plus with
-                  [] -> [false]
-                | p::_ ->
-                    [match Ast0.unwrap p with
-                      Ast0.CODE c ->
-                        (match List.map Ast0.unwrap (Ast0.undots c) with
-                          [Ast0.Exp e] -> true | _ -> false)
-                    | _ -> false] in
-              let minus = Arity.minus_arity minus in
-              let ((metavars,minus),function_prototypes) =
-                Function_prototypes.process
-                  rule_name metavars dropped_isos minus plus in
-          (* warning! context_neg side-effects its arguments *)
-              let (m,p) = List.split (Context_neg.context_neg minus plus) in 
-              Type_infer.type_infer p;
-              (if not !Flag.sgrep_mode2 then Insert_plus.insert_plus m p);
-              Type_infer.type_infer minus;
-              let (extra_meta, minus) =
-                Iso_pattern.apply_isos chosen_isos minus rule_name in
-              let minus = Comm_assoc.comm_assoc minus rule_name dropiso in
-              let minus =
-                if !Flag.sgrep_mode2 then minus
-                else Single_statement.single_statement minus in
-              let minus = Simple_assignments.simple_assignments minus in
-              let minus_ast =
-                Ast0toast.ast0toast rule_name dependencies dropped_isos
-                  exists minus is_exp in
-              match function_prototypes with
-                None -> [(extra_meta @ metavars, minus_ast)]
-              | Some mv_fp ->
-                  [(extra_meta @ metavars, minus_ast); mv_fp])
-(*          Ast0.CocciRule ((minus, metavarsm, (iso, dropiso, dependencies, rule_name, exists)), (plus, metavars))*)
-      rules in
-  let parsed = List.concat parsed in
-  let disjd = Disjdistr.disj parsed in
-  
-  let (code,fvs,neg_pos,ua,pos) = Free_vars.free_vars disjd in
-  if !Flag_parsing_cocci.show_SP
-  then List.iter Pretty_print_cocci.unparse code;
-  
-  let grep_tokens =
-    Common.profile_code "get_constants"
-      (fun () -> Get_constants.get_constants code) in (* for grep *)
-  let glimpse_tokens2 =
-    Common.profile_code "get_glimpse_constants"
-      (fun () -> Get_constants2.get_constants code neg_pos) in(* for glimpse *)
-  (code,fvs,neg_pos,ua,pos,grep_tokens,glimpse_tokens2)
diff --git a/parsing_cocci/.#parser_cocci_menhir.mly.1.153 b/parsing_cocci/.#parser_cocci_menhir.mly.1.153
deleted file mode 100644 (file)
index a3be6b6..0000000
+++ /dev/null
@@ -1,1765 +0,0 @@
-/*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*/
-
-
-%{
-
-(* Not clear how to allow function declarations to specify a return type
-and how to allow both to be specified as static, because they are in
-different rules.  The rules seem to have to be combined, which would allow
-functions to be declared as local variables *)
-
-(* Not clear how to let a function have a parameter of type void.  At the
-moment, void is allowed to be the type of a variable, which is wrong, and a
-parameter needs both a type and an identifier *)
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-module P = Parse_aux
-%}
-
-%token EOF
-
-%token TIdentifier TExpression TStatement TFunction TLocal TType TParameter
-%token TIdExpression
-%token Tlist TFresh TConstant TError TWords TWhy0 TPlus0 TBang0
-%token TPure TContext
-%token TTypedef TDeclarer TIterator TName TPosition TPosAny
-%token TUsing TDisable TExtends TDepends TOn TEver TNever TExists TForall
-%token TReverse TNothing
-%token<string> TRuleName
-
-%token<Data.clt> Tchar Tshort Tint Tdouble Tfloat Tlong
-%token<Data.clt> Tvoid Tstruct Tunion
-%token<Data.clt> Tunsigned Tsigned
-
-%token<Data.clt> Tstatic Tauto Tregister Textern Tinline Ttypedef
-%token<Data.clt> Tconst Tvolatile
-%token<string * Data.clt> Tattr
-
-%token <Data.clt> TIf TElse TWhile TFor TDo TSwitch TCase TDefault TReturn
-%token <Data.clt> TBreak TContinue TGoto TSizeof TFunDecl
-%token <string * Data.clt> TIdent TTypeId TDeclarerId TIteratorId
-
-%token <Parse_aux.idinfo>     TMetaId TMetaFunc TMetaLocalFunc
-%token <Parse_aux.idinfo>     TMetaIterator TMetaDeclarer
-%token <Parse_aux.expinfo>    TMetaErr 
-%token <Parse_aux.info>       TMetaParam TMetaStm TMetaStmList TMetaType
-%token <Parse_aux.list_info>  TMetaParamList TMetaExpList
-%token <Parse_aux.typed_info> TMetaExp TMetaIdExp TMetaLocalIdExp TMetaConst
-%token <Parse_aux.pos_info>   TMetaPos
-
-%token TArob TArobArob TPArob
-%token <string> TScriptData
-
-%token <Data.clt> TEllipsis TOEllipsis TCEllipsis TPOEllipsis TPCEllipsis
-%token <Data.clt> TWhen TAny TStrict TLineEnd
-
-%token <Data.clt> TWhy TDotDot TBang TOPar TOPar0
-%token <Data.clt> TMid0 TCPar TCPar0
-
-%token <string>  TPragma TPathIsoFile
-%token <string * Data.clt> TIncludeL TIncludeNL
-%token <Data.clt * token> TDefine
-%token <Data.clt * token * int> TDefineParam
-%token <string * Data.clt> TMinusFile TPlusFile
-
-%token <Data.clt> TInc TDec
-
-%token <string * Data.clt> TString TChar TFloat TInt
-
-%token <Data.clt> TOrLog
-%token <Data.clt> TAndLog
-%token <Data.clt> TOr
-%token <Data.clt> TXor
-%token <Data.clt> TAnd 
-%token <Data.clt> TEqEq TNotEq
-%token <Ast_cocci.logicalOp * Data.clt> TLogOp /* TInf TSup TInfEq TSupEq */
-%token <Ast_cocci.arithOp * Data.clt>   TShOp  /* TShl TShr */
-%token <Ast_cocci.arithOp * Data.clt>   TDmOp  /* TDiv TMod */
-%token <Data.clt> TPlus TMinus
-%token <Data.clt> TMul TTilde
-
-%token <Data.clt> TOBrace TCBrace
-%token <Data.clt> TOCro TCCro
-
-%token <Data.clt> TPtrOp
-
-%token TMPtVirg
-%token <Data.clt> TEq TDot TComma TPtVirg
-%token <Ast_cocci.assignOp * Data.clt> TAssign
-
-%token TIso TRightIso TIsoExpression TIsoStatement TIsoDeclaration TIsoType
-%token TIsoTopLevel TIsoArgExpression TIsoTestExpression
-
-%token TInvalid
-
-/* operator precedence */
-%nonassoc TIf
-%nonassoc TElse
-
-%left TOrLog
-%left TAndLog
-%left TOr
-%left TXor
-%left TAnd 
-%left TEqEq TNotEq
-%left TLogOp /* TInf TSup TInfEq TSupEq */
-%left TShOp /* TShl TShr */
-%left TPlus TMinus
-%left TMul TDmOp /* TDiv TMod */
-
-%start reinit
-%type <unit> reinit
-
-%start minus_main
-%type <Ast0_cocci.rule> minus_main
-
-%start minus_exp_main
-%type <Ast0_cocci.rule> minus_exp_main
-
-%start plus_main
-%type <Ast0_cocci.rule> plus_main
-
-%start plus_exp_main
-%type <Ast0_cocci.rule> plus_exp_main
-
-%start include_main
-%type <(string,string) Common.either list> include_main
-
-%start iso_rule_name
-%type <Ast_cocci.rulename>
-iso_rule_name
-
-%start rule_name
-%type <Ast_cocci.rulename>
-rule_name
-
-%start meta_main
-%type <(Ast_cocci.metavar,Ast_cocci.metavar) Common.either list> meta_main
-
-%start <string * (string * string)> script_meta_main
-
-%start iso_main
-%type <Ast0_cocci.anything list list> iso_main
-
-%start iso_meta_main
-%type <(Ast_cocci.metavar,Ast_cocci.metavar) Common.either list> iso_meta_main
-
-%start never_used
-%type <unit> never_used
-
-%%
-
-reinit: { }
-minus_main: minus_body EOF { $1 } | m=minus_body TArobArob { m }
-| m=minus_body TArob { m }
-plus_main: plus_body EOF { $1 } | p=plus_body TArobArob { p }
-| p=plus_body TArob { p }
-minus_exp_main: minus_exp_body EOF { $1 } | m=minus_exp_body TArobArob { m }
-| m=minus_exp_body TArob { m }
-plus_exp_main: plus_exp_body EOF { $1 } | p=plus_exp_body TArobArob { p }
-| p=plus_exp_body TArob { p }
-meta_main: m=metadec   { m (!Ast0.rule_name) }
-iso_meta_main: m=metadec { m "" }
-
-/*****************************************************************************
-*
-*
-*****************************************************************************/
-
-pure:
-  TPure          { Ast0.Pure }
-| TContext       { Ast0.Context }
-| TPure TContext { Ast0.PureContext }
-| TContext TPure { Ast0.PureContext }
-| /* empty */    { Ast0.Impure }
-
-iso_rule_name:
-  nm=pure_ident TArob { P.make_iso_rule_name_result (P.id2name nm) }
-
-rule_name:
-  nm=ioption(pure_ident) extends d=depends i=loption(choose_iso)
-    a=loption(disable) e=exists ee=is_expression TArob
-      { P.make_cocci_rule_name_result nm d i a e ee }
-  | scr=pure_ident TDotDot lang=pure_ident d=depends TArob
-      { P.make_script_rule_name_result scr lang d }
-
-extends:
-  /* empty */                                     { () }
-| TExtends parent=TRuleName
-    { !Data.install_bindings (parent) }
-
-depends:
-  /* empty */              { Ast.NoDep }
-| TDepends TOn parents=dep { parents }
-
-dep:
-  pnrule           { $1 }
-| dep TAndLog dep  { Ast.AndDep($1, $3) }
-| dep TOrLog  dep  { Ast.OrDep ($1, $3) }
-
-pnrule:
-  TRuleName        { Ast.Dep      $1 }
-| TBang TRuleName  { Ast.AntiDep  $2 }
-| TEver TRuleName  { Ast.EverDep  $2 }
-| TNever TRuleName { Ast.NeverDep $2 }
-| TOPar dep TCPar  { $2 }
-
-choose_iso:
-  TUsing separated_nonempty_list(TComma,TString) { List.map P.id2name $2 }
-
-disable:
-  TDisable separated_nonempty_list(TComma,pure_ident) { List.map P.id2name $2 }
-
-exists:
-  TExists { Ast.Exists }
-| TForall { Ast.Forall }
-| TReverse TForall { Ast.ReverseForall }
-|         { Ast.Undetermined }
-
-is_expression: // for more flexible parsing of top level expressions
-              { false }
-| TExpression { true }
-
-include_main:
-  list(incl) TArob     { $1 }
-| list(incl) TArobArob { $1 }
-
-incl:
-  TUsing TString      { Common.Left(P.id2name $2) }
-| TUsing TPathIsoFile { Common.Right $2 }
-
-metadec:
-  ar=arity ispure=pure
-  kindfn=metakind ids=comma_list(pure_ident_or_meta_ident) TMPtVirg
-    { P.create_metadec ar ispure kindfn ids }
-| ar=arity ispure=pure
-  kindfn=metakind_atomic
-  ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_eq)) TMPtVirg
-    { P.create_metadec_ne ar ispure kindfn ids }
-| ar=arity ispure=pure
-  kindfn=metakind_atomic_expi
-  ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_eqe)) TMPtVirg
-    { P.create_metadec_ne ar ispure kindfn ids }
-| ar=arity ispure=pure
-  kindfn=metakind_atomic_expe
-  ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_ceq)) TMPtVirg
-    { P.create_metadec_ne ar ispure kindfn ids }
-| ar=arity TPosition a=option(TPosAny)
-    ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_pos)) TMPtVirg
-    { let kindfn arity name pure check_meta constraints =
-      let tok = check_meta(Ast.MetaPosDecl(arity,name)) in
-      let any = match a with None -> Ast.PER | Some _ -> Ast.ALL in
-      !Data.add_pos_meta name constraints any; tok in
-    P.create_metadec_ne ar false kindfn ids }
-| ar=arity ispure=pure
-    TParameter Tlist TOCro id=pure_ident_or_meta_ident TCCro
-    ids=comma_list(pure_ident_or_meta_ident) TMPtVirg
-    { P.create_len_metadec ar ispure
-       (fun lenname arity name pure check_meta ->
-         let tok =
-           check_meta(Ast.MetaParamListDecl(arity,name,Some lenname)) in
-         !Data.add_paramlist_meta name (Some lenname) pure; tok)
-       id ids }
-| ar=arity ispure=pure
-    TExpression Tlist TOCro id=pure_ident_or_meta_ident TCCro
-    ids=comma_list(pure_ident_or_meta_ident) TMPtVirg
-    { P.create_len_metadec ar ispure
-       (fun lenname arity name pure check_meta ->
-         let tok =
-           check_meta(Ast.MetaExpListDecl(arity,name,Some lenname)) in
-         !Data.add_explist_meta name (Some lenname) pure; tok)
-       id ids }
-
-%inline metakind:
-  TFresh TIdentifier
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaFreshIdDecl(arity,name)) in
-      !Data.add_id_meta name [] pure; tok) }
-| TParameter
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaParamDecl(arity,name)) in
-      !Data.add_param_meta name pure; tok) }
-| TParameter Tlist
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaParamListDecl(arity,name,None)) in
-      !Data.add_paramlist_meta name None pure; tok) }
-| TExpression Tlist
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaExpListDecl(arity,name,None)) in
-      !Data.add_explist_meta name None pure; tok) }
-| TType
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaTypeDecl(arity,name)) in
-      !Data.add_type_meta name pure; tok) } 
-| TStatement
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaStmDecl(arity,name)) in
-      !Data.add_stm_meta name pure; tok) }
-| TStatement Tlist
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaStmListDecl(arity,name)) in
-      !Data.add_stmlist_meta name pure; tok) }
-| TTypedef
-    { (fun arity (_,name) pure check_meta ->
-      if arity = Ast.NONE && pure = Ast0.Impure
-      then (!Data.add_type_name name; [])
-      else raise (Semantic_cocci.Semantic "bad typedef")) }
-| TDeclarer TName
-    { (fun arity (_,name) pure check_meta ->
-      if arity = Ast.NONE && pure = Ast0.Impure
-      then (!Data.add_declarer_name name; [])
-      else raise (Semantic_cocci.Semantic "bad declarer")) }
-| TIterator TName
-    { (fun arity (_,name) pure check_meta ->
-      if arity = Ast.NONE && pure = Ast0.Impure
-      then (!Data.add_iterator_name name; [])
-      else raise (Semantic_cocci.Semantic "bad iterator")) }
-
-
-%inline metakind_atomic:
-  TIdentifier
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaIdDecl(arity,name)) in
-      !Data.add_id_meta name constraints pure; tok) }
-| TFunction
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaFuncDecl(arity,name)) in
-      !Data.add_func_meta name constraints pure; tok) }
-| TLocal TFunction
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaLocalFuncDecl(arity,name)) in
-      !Data.add_local_func_meta name constraints pure;
-      tok) }
-| TDeclarer
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaDeclarerDecl(arity,name)) in
-      !Data.add_declarer_meta name constraints pure; tok) }
-| TIterator
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaIteratorDecl(arity,name)) in
-      !Data.add_iterator_meta name constraints pure; tok) }
-
-%inline metakind_atomic_expi:
-  TError
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaErrDecl(arity,name)) in
-      !Data.add_err_meta name constraints pure; tok) }
-| l=option(TLocal) TIdExpression ty=ioption(meta_exp_type)
-    { (fun arity name pure check_meta constraints ->
-      match l with
-       None ->
-         !Data.add_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaIdExpDecl(arity,name,ty))
-      | Some _ ->
-         !Data.add_local_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaLocalIdExpDecl(arity,name,ty))) }
-| l=option(TLocal) TIdExpression m=nonempty_list(TMul)
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some [P.ty_pointerify Type_cocci.Unknown m] in
-      match l with
-       None ->
-         !Data.add_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaIdExpDecl(arity,name,ty))
-      | Some _ ->
-         !Data.add_local_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaLocalIdExpDecl(arity,name,ty))) }
-| TExpression m=nonempty_list(TMul)
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some [P.ty_pointerify Type_cocci.Unknown m] in
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
-      !Data.add_exp_meta ty name constraints pure; tok) }
-| vl=meta_exp_type TOCro TCCro
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some (List.map (function x -> Type_cocci.Array x) vl) in
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
-      !Data.add_exp_meta ty name constraints pure; tok) }
-| TConstant ty=ioption(meta_exp_type)
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaConstDecl(arity,name,ty)) in
-      !Data.add_const_meta ty name constraints pure; tok) }
-
-%inline metakind_atomic_expe:
-  TExpression
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,None)) in
-      !Data.add_exp_meta None name constraints pure; tok) }
-| vl=meta_exp_type // no error if use $1 but doesn't type check
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some vl in
-      List.iter
-       (function c ->
-         match Ast0.unwrap c with
-           Ast0.Constant(_) ->
-             if not
-                 (List.exists
-                    (function
-                        Type_cocci.BaseType(Type_cocci.IntType,_) -> true
-                      | Type_cocci.BaseType(Type_cocci.ShortType,_) -> true
-                      | Type_cocci.BaseType(Type_cocci.LongType,_) -> true
-                      | _ -> false)
-                    vl)
-             then failwith "metavariable with int constraint must be an int"
-         | _ -> ())
-       constraints;
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
-      !Data.add_exp_meta ty name constraints pure; tok) }
-
-
-meta_exp_type:
-  t=ctype
-    { [Ast0_cocci.ast0_type_to_type t] }
-| TOBrace t=comma_list(ctype) TCBrace m=list(TMul)
-    { List.map
-       (function x -> P.ty_pointerify (Ast0_cocci.ast0_type_to_type x) m)
-       t }
-
-arity: TBang0 { Ast.UNIQUE }
-     | TWhy0  { Ast.OPT }
-     | TPlus0 { Ast.MULTI }
-     | /* empty */ { Ast.NONE }
-
-generic_ctype:
-       q=ctype_qualif
-         { Ast0.wrap(Ast0.ImplicitInt(q)) }
-     | q=ioption(ctype_qualif) ty=Tchar
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.CharType ty, q)) }
-     | q=ioption(ctype_qualif) ty=Tshort
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.ShortType ty, q)) }
-     | q=ioption(ctype_qualif) ty=Tint
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.IntType ty, q)) }
-     | t=Tdouble
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.DoubleType t, None)) }
-     | t=Tfloat
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.FloatType t, None)) }
-     | q=ioption(ctype_qualif) ty=Tlong
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.LongType ty, q)) }
-     | s=struct_or_union i=ident
-        { Ast0.wrap(Ast0.StructUnionName(s, Some i)) }
-     | s=struct_or_union i=ioption(ident)
-       l=TOBrace d=struct_decl_list r=TCBrace
-        { (if i = None && !Data.in_iso
-          then failwith "structures must be named in the iso file");
-           Ast0.wrap(Ast0.StructUnionDef(Ast0.wrap(Ast0.StructUnionName(s, i)),
-                                        P.clt2mcode "{" l,
-                                        d, P.clt2mcode "}" r)) }
-     | s=TMetaType l=TOBrace d=struct_decl_list r=TCBrace
-        { let (nm,pure,clt) = s in
-        let ty =
-          Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) in
-        Ast0.wrap
-          (Ast0.StructUnionDef(ty,P.clt2mcode "{" l,d,P.clt2mcode "}" r)) }
-     | r=TRuleName TDot p=TIdent
-        { let nm = (r,P.id2name p) in
-        (* this is only possible when we are in a metavar decl.  Otherwise,
-           it will be represented already as a MetaType *)
-        let _ = P.check_meta(Ast.MetaTypeDecl(Ast.NONE,nm)) in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm (P.id2clt p),
-                                Ast0.Impure (*will be ignored*))) }
-     | p=TTypeId
-        { Ast0.wrap(Ast0.TypeName(P.id2mcode p)) }
-     | p=TMetaType
-        { let (nm,pure,clt) = p in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) }
-
-struct_or_union:
-       s=Tstruct { P.clt2mcode Ast.Struct s }
-     | u=Tunion  { P.clt2mcode Ast.Union u }
-
-struct_decl:
-      TNothing { [] }
-    | t=ctype d=d_ident pv=TPtVirg
-        { let (id,fn) = d in
-        [Ast0.wrap(Ast0.UnInit(None,fn t,id,P.clt2mcode ";" pv))] }
-    | t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-       lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar pv=TPtVirg
-        { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-        [Ast0.wrap(Ast0.UnInit(None,fn t,id,P.clt2mcode ";" pv))] }
-     | cv=ioption(const_vol) i=pure_ident d=d_ident pv=TPtVirg
-        { let (id,fn) = d in
-        let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-        [Ast0.wrap(Ast0.UnInit(None,fn idtype,id,P.clt2mcode ";" pv))] }
-
-struct_decl_list:
-   struct_decl_list_start { Ast0.wrap(Ast0.DOTS($1)) }
-
-struct_decl_list_start:
-  struct_decl                        { $1 }
-| struct_decl struct_decl_list_start { $1@$2 }
-| d=edots_when(TEllipsis,struct_decl) r=continue_struct_decl_list
-    { (P.mkddots "..." d)::r }
-
-continue_struct_decl_list:
-  /* empty */                        { [] }
-| struct_decl struct_decl_list_start { $1@$2 }
-| struct_decl                        { $1 }
-
-ctype:
-       cv=ioption(const_vol) ty=generic_ctype m=list(TMul)
-        { P.pointerify (P.make_cv cv ty) m }
-     | cv=ioption(const_vol) t=Tvoid m=nonempty_list(TMul)
-         { let ty =
-            Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
-          P.pointerify (P.make_cv cv ty) m }
-   | lp=TOPar0 t=midzero_list(ctype,ctype) rp=TCPar0
-      /* more hacks */
-    { let (mids,code) = t in
-      Ast0.wrap
-       (Ast0.DisjType(P.clt2mcode "(" lp,code,mids, P.clt2mcode ")" rp)) }
-
-
-fn_ctype: // allows metavariables
-       ty=generic_ctype m=list(TMul) { P.pointerify ty m }
-     | t=Tvoid m=list(TMul)
-         { P.pointerify
-            (Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)))
-            m }
-
-ctype_qualif:
-       Tunsigned   { P.clt2mcode Ast.Unsigned $1 }
-     | Tsigned     { P.clt2mcode Ast.Signed $1 }
-
-/*****************************************************************************/
-
-/* have to inline everything to avoid conflicts? switch to proper
-declarations, statements, and expressions for the subterms */
-
-minus_body: 
-    f=loption(filespec)
-    b=loption(minus_start)
-    ew=loption(error_words)
-    { match f@b@ew with
-      [] -> raise (Semantic_cocci.Semantic "minus slice can't be empty")
-    | code -> Top_level.top_level code }
-
-plus_body: 
-    f=loption(filespec)
-    b=loption(plus_start)
-    ew=loption(error_words)
-    { Top_level.top_level (f@b@ew) }
-
-minus_exp_body:
-    f=loption(filespec)
-    b=top_eexpr
-    ew=loption(error_words)
-    { match f@[b]@ew with
-      [] -> raise (Semantic_cocci.Semantic "minus slice can't be empty")
-    | code -> Top_level.top_level code }
-
-plus_exp_body:
-    f=loption(filespec)
-    b=top_eexpr
-    ew=loption(error_words)
-    { Top_level.top_level (f@[b]@ew) }
-
-filespec:
-  TMinusFile TPlusFile
-    { [Ast0.wrap
-         (Ast0.FILEINFO(P.id2mcode $1,
-                        P.id2mcode $2))] }
-
-includes:
-  TIncludeL
-    { Ast0.wrap
-             (Ast0.Include(P.clt2mcode "#include" (P.drop_aft (P.id2clt $1)),
-                           let (arity,ln,lln,offset,col,strbef,straft,pos) =
-                             P.id2clt $1 in
-                           let clt =
-                             (arity,ln,lln,offset,0,strbef,straft,pos) in
-                           P.clt2mcode
-                             (Ast.Local (Parse_aux.str2inc (P.id2name $1)))
-                             (P.drop_bef clt))) }
-| TIncludeNL
-    { Ast0.wrap
-             (Ast0.Include(P.clt2mcode "#include" (P.drop_aft (P.id2clt $1)),
-                           let (arity,ln,lln,offset,col,strbef,straft,pos) =
-                             P.id2clt $1 in
-                           let clt =
-                             (arity,ln,lln,offset,0,strbef,straft,pos) in
-                           P.clt2mcode
-                             (Ast.NonLocal (Parse_aux.str2inc (P.id2name $1)))
-                             (P.drop_bef clt))) }
-| d=defineop t=ctype TLineEnd
-    { let ty = Ast0.wrap(Ast0.TopExp(Ast0.wrap(Ast0.TypeExp(t)))) in
-      d (Ast0.wrap(Ast0.DOTS([ty]))) }
-| defineop b=toplevel_seq_start(toplevel_after_dots) TLineEnd
-    { let body =
-       match b with
-         [e] ->
-           (match Ast0.unwrap e with
-             Ast0.Exp(e1) ->
-               [Ast0.rewrap e (Ast0.TopExp(Ast0.set_arg_exp (e1)))]
-           | _ -> b)
-       | _ -> b in
-      $1 (Ast0.wrap(Ast0.DOTS(body))) }
-
-defineop:
-  TDefine
-    { let (clt,ident) = $1 in
-      function body ->
-       Ast0.wrap
-         (Ast0.Define
-            (P.clt2mcode "#define" clt,
-             (match ident with
-               TMetaId((nm,constraints,pure,clt)) ->
-                 Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure))
-             | TIdent(nm_pure) ->
-                 Ast0.wrap(Ast0.Id(P.id2mcode nm_pure))
-             | _ ->
-                 raise
-                   (Semantic_cocci.Semantic
-                      "unexpected name for a #define")),
-             Ast0.wrap Ast0.NoParams,
-             body)) }
-| TDefineParam define_param_list_option TCPar
-    { let (clt,ident,parenoff) = $1 in
-      let (arity,line,lline,offset,col,strbef,straft,pos) = clt in
-      let lp =
-       P.clt2mcode "(" (arity,line,lline,parenoff,0,[],[],Ast0.NoMetaPos) in
-      function body ->
-       Ast0.wrap
-         (Ast0.Define
-            (P.clt2mcode "#define" clt,
-             (match ident with
-               TMetaId((nm,constraints,pure,clt)) ->
-                 Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure))
-             | TIdent(nm_pure) ->
-                 Ast0.wrap(Ast0.Id(P.id2mcode nm_pure))
-             | _ ->
-                 raise
-                   (Semantic_cocci.Semantic
-                      "unexpected name for a #define")),
-             Ast0.wrap (Ast0.DParams (lp,$2,P.clt2mcode ")" $3)),body)) }
-
-/* ---------------------------------------------------------------------- */
-
-define_param_list: define_param_list_start
-     {let circle x =
-       match Ast0.unwrap x with Ast0.DPcircles(_) -> true | _ -> false in
-     if List.exists circle $1
-     then Ast0.wrap(Ast0.CIRCLES($1))
-     else Ast0.wrap(Ast0.DOTS($1)) }
-
-define_param_list_start:
-    ident { [Ast0.wrap(Ast0.DParam $1)] }
-  | ident TComma define_param_list_start
-      { Ast0.wrap(Ast0.DParam $1)::
-       Ast0.wrap(Ast0.DPComma(P.clt2mcode "," $2))::$3 }
-  | d=TEllipsis r=list(dp_comma_args(TEllipsis))
-      { (P.mkdpdots "..." d)::
-       (List.concat (List.map (function x -> x (P.mkdpdots "...")) r)) }
-
-dp_comma_args(dotter):
-  c=TComma d=dotter
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.DPComma(P.clt2mcode "," c)); dot_builder d] }
-| TComma ident
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.DPComma(P.clt2mcode "," $1));
-       Ast0.wrap(Ast0.DParam $2)] }
-
-define_param_list_option: define_param_list { $1 }
-         | /* empty */     { Ast0.wrap(Ast0.DOTS([])) }
-
-/*****************************************************************************/
-
-funproto:
-  s=ioption(storage) t=ctype
-  id=func_ident lp=TOPar d=decl_list(name_opt_decl) rp=TCPar pt=TPtVirg
-      { Ast0.wrap
-         (Ast0.UnInit
-            (s,
-             Ast0.wrap
-               (Ast0.FunctionType(Some t,
-                                  P.clt2mcode "(" lp, d, P.clt2mcode ")" rp)),
-             id, P.clt2mcode ";" pt)) }
-| s=ioption(storage) t=Tvoid
-  id=func_ident lp=TOPar d=decl_list(name_opt_decl) rp=TCPar pt=TPtVirg
-    { let t = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
-      Ast0.wrap
-        (Ast0.UnInit
-          (s,
-           Ast0.wrap
-             (Ast0.FunctionType(Some t,
-                                P.clt2mcode "(" lp, d, P.clt2mcode ")" rp)),
-           id, P.clt2mcode ";" pt)) }
-
-
-fundecl:
-  f=fninfo
-  TFunDecl i=func_ident lp=TOPar d=decl_list(decl) rp=TCPar
-  lb=TOBrace b=fun_start rb=TCBrace
-      { Ast0.wrap(Ast0.FunDecl((Ast0.default_info(),Ast0.context_befaft()),
-                              f, i,
-                              P.clt2mcode "(" lp, d,
-                              P.clt2mcode ")" rp,
-                              P.clt2mcode "{" lb, b,
-                              P.clt2mcode "}" rb)) }
-
-fninfo:
-    /* empty */ { [] }
-  | storage  fninfo
-      { try
-       let _ =
-         List.find (function Ast0.FStorage(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate storage")
-      with Not_found -> (Ast0.FStorage($1))::$2 }
-  | t=fn_ctype r=fninfo_nt { (Ast0.FType(t))::r }
-  | Tinline  fninfo
-      { try
-       let _ = List.find (function Ast0.FInline(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate inline")
-      with Not_found -> (Ast0.FInline(P.clt2mcode "inline" $1))::$2 }
-  | Tattr    fninfo
-      { try
-       let _ = List.find (function Ast0.FAttr(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "multiple attributes")
-      with Not_found -> (Ast0.FAttr(P.id2mcode $1))::$2 }
-
-fninfo_nt:
-    /* empty */ { [] }
-  | storage  fninfo_nt
-      { try
-       let _ =
-         List.find (function Ast0.FStorage(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate storage")
-      with Not_found -> (Ast0.FStorage($1))::$2 }
-  | Tinline  fninfo_nt
-      { try
-       let _ = List.find (function Ast0.FInline(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate inline")
-      with Not_found -> (Ast0.FInline(P.clt2mcode "inline" $1))::$2 }
-  | Tattr    fninfo_nt
-      { try
-       let _ = List.find (function Ast0.FAttr(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate init")
-      with Not_found -> (Ast0.FAttr(P.id2mcode $1))::$2 }
-
-storage:
-         s=Tstatic      { P.clt2mcode Ast.Static s }
-       | s=Tauto        { P.clt2mcode Ast.Auto s }
-       | s=Tregister    { P.clt2mcode Ast.Register s }
-       | s=Textern      { P.clt2mcode Ast.Extern s }
-
-decl: t=ctype i=ident
-       { Ast0.wrap(Ast0.Param(t, Some i)) }
-    | t=fn_ctype lp=TOPar s=TMul i=ident rp=TCPar
-       lp1=TOPar d=decl_list(name_opt_decl) rp1=TCPar
-        { let fnptr =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp,P.clt2mcode "*" s,P.clt2mcode ")" rp,
-               P.clt2mcode "(" lp1,d,P.clt2mcode ")" rp1)) in
-       Ast0.wrap(Ast0.Param(fnptr, Some i)) }
-    | t=Tvoid
-       { let ty = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
-          Ast0.wrap(Ast0.VoidParam(ty)) }
-    | TMetaParam
-       { let (nm,pure,clt) = $1 in
-       Ast0.wrap(Ast0.MetaParam(P.clt2mcode nm clt,pure)) }
-
-name_opt_decl:
-      decl  { $1 }
-    | t=ctype { Ast0.wrap(Ast0.Param(t, None)) }
-    | t=fn_ctype lp=TOPar s=TMul rp=TCPar
-       lp1=TOPar d=decl_list(name_opt_decl) rp1=TCPar
-        { let fnptr =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp,P.clt2mcode "*" s,P.clt2mcode ")" rp,
-               P.clt2mcode "(" lp1,d,P.clt2mcode ")" rp1)) in
-       Ast0.wrap(Ast0.Param(fnptr, None)) }
-
-const_vol:
-      Tconst       { P.clt2mcode Ast.Const $1 }
-    | Tvolatile    { P.clt2mcode Ast.Volatile $1 }
-
-/*****************************************************************************/
-
-statement:
-  includes { $1 } /* shouldn't be allowed to be a single_statement... */
-| TMetaStm
-    { P.meta_stm $1 }
-| expr TPtVirg
-    { P.exp_stm $1 $2 }
-| TIf TOPar eexpr TCPar single_statement %prec TIf
-    { P.ifthen $1 $2 $3 $4 $5 }
-| TIf TOPar eexpr TCPar single_statement TElse single_statement
-    { P.ifthenelse $1 $2 $3 $4 $5 $6 $7 }
-| TFor TOPar option(eexpr) TPtVirg option(eexpr) TPtVirg
-    option(eexpr) TCPar single_statement
-    { P.forloop $1 $2 $3 $4 $5 $6 $7 $8 $9 }
-| TWhile TOPar eexpr TCPar single_statement
-    { P.whileloop $1 $2 $3 $4 $5 }
-| TDo single_statement TWhile TOPar eexpr TCPar TPtVirg
-    { P.doloop $1 $2 $3 $4 $5 $6 $7 }
-| iter_ident TOPar eexpr_list_option TCPar single_statement
-    { P.iterator $1 $2 $3 $4 $5 }
-| TSwitch TOPar eexpr TCPar TOBrace list(case_line) TCBrace
-    { P.switch $1 $2 $3 $4 $5 $6 $7 }
-| TReturn eexpr TPtVirg { P.ret_exp $1 $2 $3 }
-| TReturn TPtVirg { P.ret $1 $2 }
-| TBreak TPtVirg { P.break $1 $2 }
-| TContinue TPtVirg { P.cont $1 $2 }
-| ident TDotDot { P.label $1 $2 }
-| TGoto ident TPtVirg { P.goto $1 $2 $3 }
-| TOBrace fun_start TCBrace
-    { P.seq $1 $2 $3 }
-
-stm_dots:
-  TEllipsis w=list(whenppdecs)
-    { Ast0.wrap(Ast0.Dots(P.clt2mcode "..." $1, List.concat w)) }
-| TOEllipsis w=list(whenppdecs) b=nest_start c=TCEllipsis
-    { Ast0.wrap(Ast0.Nest(P.clt2mcode "<..." $1, b,
-                         P.clt2mcode "...>" c, List.concat w, false)) }
-| TPOEllipsis w=list(whenppdecs) b=nest_start c=TPCEllipsis
-    { Ast0.wrap(Ast0.Nest(P.clt2mcode "<+..." $1, b,
-                         P.clt2mcode "...+>" c, List.concat w, true)) }
-
-whenppdecs: w=whens(when_start,rule_elem_statement)
-    { w }
-
-/* a statement that fits into a single rule_elem.  should nests be included?
-what about statement metavariables? */
-rule_elem_statement:
-  one_decl_var
-    { Ast0.wrap(Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),$1)) }
-| expr TPtVirg { P.exp_stm $1 $2 }
-| TReturn eexpr TPtVirg { P.ret_exp $1 $2 $3 }
-| TReturn TPtVirg { P.ret $1 $2 }
-| TBreak TPtVirg { P.break $1 $2 }
-| TContinue TPtVirg { P.cont $1 $2 }
-| TOPar0 midzero_list(rule_elem_statement,rule_elem_statement) TCPar0
-    { let (mids,code) = $2 in
-    Ast0.wrap
-      (Ast0.Disj(P.clt2mcode "(" $1,
-                List.map (function x -> Ast0.wrap(Ast0.DOTS([x]))) code,
-                mids, P.clt2mcode ")" $3)) }
-
-/* a statement on its own */
-single_statement:
-    statement                         { $1 }
-  | TOPar0 midzero_list(statement,statement) TCPar0
-      /* degenerate case, elements are single statements and thus don't
-       contain dots */
-      { let (mids,code) = $2 in
-        Ast0.wrap
-         (Ast0.Disj(P.clt2mcode "(" $1,
-                    List.map (function x -> Ast0.wrap(Ast0.DOTS([x]))) code,
-                    mids, P.clt2mcode ")" $3)) }
-
-case_line:
-    TDefault TDotDot fun_start
-      { Ast0.wrap(Ast0.Default(P.clt2mcode "default" $1,P.clt2mcode ":" $2,$3)) }
-  | TCase eexpr TDotDot fun_start
-      { Ast0.wrap(Ast0.Case(P.clt2mcode "case" $1,$2,P.clt2mcode ":" $3,$4)) }
-
-/* In the following, an identifier as a type is not fully supported.  Indeed,
-the language is ambiguous: what is foo * bar; */
-/* The AST DisjDecl cannot be generated because it would be ambiguous with
-a disjunction on a statement with a declaration in each branch */
-decl_var:
-    t=ctype pv=TPtVirg
-      { [Ast0.wrap(Ast0.TyDecl(t,P.clt2mcode ";" pv))] }
-  | s=ioption(storage) t=ctype d=comma_list(d_ident) pv=TPtVirg
-      { List.map
-         (function (id,fn) ->
-           Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)))
-         d }
-  | f=funproto { [f] }
-  | s=ioption(storage) t=ctype d=d_ident q=TEq e=initialize pv=TPtVirg
-      {let (id,fn) = d in
-      [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))]}
-  /* type is a typedef name */
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident
-      d=comma_list(d_ident) pv=TPtVirg
-      { List.map
-         (function (id,fn) ->
-           let idtype =
-             P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-           Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)))
-         d }
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident d=d_ident q=TEq
-      e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-      !Data.add_type_name (P.id2name i);
-      let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-      [Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
-                          P.clt2mcode ";" pv))] }
-  /* function pointer type */
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-        [Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv))] }
-  | decl_ident TOPar eexpr_list_option TCPar TPtVirg
-      { [Ast0.wrap(Ast0.MacroDecl($1,P.clt2mcode "(" $2,$3,
-                                 P.clt2mcode ")" $4,P.clt2mcode ";" $5))] } 
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    q=TEq e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-      [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))]}
-  | s=Ttypedef t=ctype id=typedef_ident pv=TPtVirg
-      { let s = P.clt2mcode "typedef" s in
-        [Ast0.wrap(Ast0.Typedef(s,t,id,P.clt2mcode ";" pv))] }
-
-one_decl_var:
-    t=ctype pv=TPtVirg
-      { Ast0.wrap(Ast0.TyDecl(t,P.clt2mcode ";" pv)) }
-  | s=ioption(storage) t=ctype d=d_ident pv=TPtVirg
-      { let (id,fn) = d in
-        Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) }
-  | f=funproto { f }
-  | s=ioption(storage) t=ctype d=d_ident q=TEq e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-      Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv)) }
-  /* type is a typedef name */
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident
-      d=d_ident pv=TPtVirg
-      { let (id,fn) = d in
-        let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-       Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)) }
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident d=d_ident q=TEq
-      e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-      !Data.add_type_name (P.id2name i);
-      let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-      Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
-                          P.clt2mcode ";" pv)) }
-  /* function pointer type */
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-        Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) }
-  | decl_ident TOPar eexpr_list_option TCPar TPtVirg
-      { Ast0.wrap(Ast0.MacroDecl($1,P.clt2mcode "(" $2,$3,
-                                 P.clt2mcode ")" $4,P.clt2mcode ";" $5)) } 
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    q=TEq e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-      Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))}
-
-
-d_ident:
-    ident list(array_dec)
-      { ($1,
-        function t ->
-          List.fold_right
-            (function (l,i,r) ->
-              function rest ->
-                Ast0.wrap
-                  (Ast0.Array(rest,P.clt2mcode "[" l,i,P.clt2mcode "]" r)))
-            $2 t) }
-
-array_dec: l=TOCro i=option(eexpr) r=TCCro { (l,i,r) }
-
-initialize:
-    eexpr
-      { Ast0.wrap(Ast0.InitExpr($1)) }
-  | TOBrace initialize_list TCBrace
-      { Ast0.wrap(Ast0.InitList(P.clt2mcode "{" $1,$2,P.clt2mcode "}" $3)) }
-  | TOBrace TCBrace
-      { Ast0.wrap
-         (Ast0.InitList(P.clt2mcode "{" $1,Ast0.wrap(Ast0.DOTS []),
-                        P.clt2mcode "}" $2)) }
-
-initialize2:
-  /*arithexpr and not eexpr because can have ambiguity with comma*/
-  /*dots and nests probably not allowed at top level, haven't looked into why*/
-  arith_expr(eexpr,invalid) { Ast0.wrap(Ast0.InitExpr($1)) }
-| TOBrace initialize_list TCBrace
-    { Ast0.wrap(Ast0.InitList(P.clt2mcode "{" $1,$2,P.clt2mcode "}" $3)) }
-| TOBrace TCBrace
-    { Ast0.wrap
-       (Ast0.InitList(P.clt2mcode "{" $1,Ast0.wrap(Ast0.DOTS []),
-                      P.clt2mcode "}" $2)) }
-           /* gccext:, labeled elements */
-| TDot ident TEq initialize2
-    { Ast0.wrap(Ast0.InitGccDotName(P.clt2mcode "." $1,$2,P.clt2mcode "=" $3,$4)) }
-| ident TDotDot initialize2
-    { Ast0.wrap(Ast0.InitGccName($1,P.clt2mcode ":" $2,$3)) } /* in old kernel */
-| TOCro eexpr TCCro TEq initialize2
-    { Ast0.wrap(Ast0.InitGccIndex(P.clt2mcode "[" $1,$2,P.clt2mcode "]" $3,
-                                 P.clt2mcode "=" $4,$5)) }
-| TOCro eexpr TEllipsis eexpr TCCro TEq initialize2
-    { Ast0.wrap(Ast0.InitGccRange(P.clt2mcode "[" $1,$2,P.clt2mcode "..." $3,
-                                 $4,P.clt2mcode "]" $5,P.clt2mcode "=" $6,$7)) }
-
-initialize_list:
-   initialize_list_start { Ast0.wrap(Ast0.DOTS($1)) }
-
-initialize_list_start:
-  initialize2 TComma { [$1;Ast0.wrap(Ast0.IComma(P.clt2mcode "," $2))] }
-| initialize2 TComma initialize_list_start
-    { $1::Ast0.wrap(Ast0.IComma(P.clt2mcode "," $2))::$3 }
-| d=edots_when(TEllipsis,initialize)
-      r=comma_initializers(edots_when(TEllipsis,initialize))
-    { (P.mkidots "..." d)::
-      (List.concat(List.map (function x -> x (P.mkidots "...")) r)) }
-
-comma_initializers(dotter):
-  /* empty */ { [] }
-| d=dotter r=comma_initializers2(dotter)
-      { (function dot_builder -> [dot_builder d])::r }
-| i=initialize2 c=TComma r=comma_initializers(dotter)
-    { (function dot_builder -> [i; Ast0.wrap(Ast0.IComma(P.clt2mcode "," c))])::
-      r }
-
-comma_initializers2(dotter):
-  /* empty */ { [] }
-| i=initialize2 c=TComma r=comma_initializers(dotter)
-    { (function dot_builder -> [i; Ast0.wrap(Ast0.IComma(P.clt2mcode "," c))])::
-      r }
-
-/* a statement that is part of a list */
-decl_statement:
-    TMetaStmList
-      { let (nm,pure,clt) = $1 in
-      [Ast0.wrap(Ast0.MetaStmt(P.clt2mcode nm clt,pure))] }
-  | decl_var
-      { List.map
-         (function x ->
-           Ast0.wrap
-             (Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),x)))
-         $1 }
-  | statement { [$1] }
-  /* this doesn't allow expressions at top level, because the parser doesn't
-       know whether there is one.  If there is one, this is not sequencible.
-       If there is not one, then it is.  It seems complicated to get around
-    this at the parser level.  We would have to have a check afterwards to
-    allow this.  One case where this would be useful is for a when.  Now
-       we allow a sequence of whens, so one can be on only statements and
-    one can be on only expressions. */
-  | TOPar0 t=midzero_list(fun_start,fun_start) TCPar0
-      { let (mids,code) = t in
-       if List.for_all
-           (function x ->
-             match Ast0.unwrap x with Ast0.DOTS([]) -> true | _ -> false)
-           code
-      then []
-      else
-         [Ast0.wrap(Ast0.Disj(P.clt2mcode "(" $1, code, mids,
-                              P.clt2mcode ")" $3))] }
-
-/* a statement that is part of a list */
-decl_statement_expr:
-    TMetaStmList
-      { let (nm,pure,clt) = $1 in
-      [Ast0.wrap(Ast0.MetaStmt(P.clt2mcode nm clt,pure))] }
-  | decl_var
-      { List.map
-         (function x ->
-           Ast0.wrap
-             (Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),x)))
-         $1 }
-  | statement { [$1] }
-  /* this doesn't allow expressions at top level, because the parser doesn't
-       know whether there is one.  If there is one, this is not sequencible.
-       If there is not one, then it is.  It seems complicated to get around
-    this at the parser level.  We would have to have a check afterwards to
-    allow this.  One case where this would be useful is for a when.  Now
-       we allow a sequence of whens, so one can be on only statements and
-    one can be on only expressions. */
-  | TOPar0 t=midzero_list(fun_after_stm,fun_after_dots_or) TCPar0
-      { let (mids,code) = t in
-       if List.for_all (function [] -> true | _ -> false) code
-      then []
-      else
-         let dot_code =
-           List.map (function x -> Ast0.wrap(Ast0.DOTS x)) code in
-         [Ast0.wrap(Ast0.Disj(P.clt2mcode "(" $1, dot_code, mids,
-                              P.clt2mcode ")" $3))] }
-
-/*****************************************************************************/
-
-/* The following cannot contain <... ...> at the top level.  This can only
-be allowed as an expression when the expression is delimited on both sides
-by expression-specific markers.  In that case, the rule eexpr is used, which
-allows <... ...> anywhere.  Hopefully, this will not be too much of a problem
-in practice. */
-expr:  basic_expr(expr,invalid) { $1 }
-/* allows ... and nests */
-eexpr: basic_expr(eexpr,dot_expressions) { $1 }
-/* allows nests but not .... */
-dexpr: basic_expr(eexpr,nest_expressions) { $1 }
-
-top_eexpr:
-  eexpr { Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp($1)))) }
-
-invalid:
-  TInvalid { raise (Semantic_cocci.Semantic "not matchable") }
-
-dot_expressions:
-  TEllipsis { Ast0.wrap(Ast0.Edots(P.clt2mcode "..." $1,None)) }
-| nest_expressions { $1 }
-
-nest_expressions:
-  TOEllipsis w=option(whenexp) e=expr_dots(TEllipsis) c=TCEllipsis
-    { Ast0.wrap(Ast0.NestExpr(P.clt2mcode "<..." $1,
-                             Ast0.wrap(Ast0.DOTS(e (P.mkedots "..."))),
-                             P.clt2mcode "...>" c, w, false)) }
-| TPOEllipsis w=option(whenexp) e=expr_dots(TEllipsis) c=TPCEllipsis
-    { Ast0.wrap(Ast0.NestExpr(P.clt2mcode "<+..." $1,
-                             Ast0.wrap(Ast0.DOTS(e (P.mkedots "..."))),
-                             P.clt2mcode "...+>" c, w, true)) }
-
-whenexp: TWhen TNotEq w=eexpr TLineEnd { w }
-
-basic_expr(recurser,primary_extra):
-  assign_expr(recurser,primary_extra)                        { $1 }
-
-assign_expr(r,pe):
-    cond_expr(r,pe)                        { $1 }
-  | unary_expr(r,pe) TAssign assign_expr_bis
-      { let (op,clt) = $2 in
-      Ast0.wrap(Ast0.Assignment($1,P.clt2mcode op clt,
-                               Ast0.set_arg_exp $3,false)) }
-  | unary_expr(r,pe) TEq assign_expr_bis
-      { Ast0.wrap
-         (Ast0.Assignment
-            ($1,P.clt2mcode Ast.SimpleAssign $2,Ast0.set_arg_exp $3,false)) }
-
-assign_expr_bis:
-    cond_expr(eexpr,dot_expressions)                        { $1 }
-  | unary_expr(eexpr,dot_expressions) TAssign assign_expr_bis
-      { let (op,clt) = $2 in
-      Ast0.wrap(Ast0.Assignment($1,P.clt2mcode op clt,
-                               Ast0.set_arg_exp $3,false)) }
-  | unary_expr(eexpr,dot_expressions) TEq assign_expr_bis
-      { Ast0.wrap
-         (Ast0.Assignment
-            ($1,P.clt2mcode Ast.SimpleAssign $2,Ast0.set_arg_exp $3,false)) }
-
-cond_expr(r,pe):
-    arith_expr(r,pe)                         { $1 }
-  | l=arith_expr(r,pe) w=TWhy t=option(eexpr) dd=TDotDot r=cond_expr(r,pe)
-      { Ast0.wrap(Ast0.CondExpr (l, P.clt2mcode "?" w, t,
-                                P.clt2mcode ":" dd, r)) }
-
-arith_expr(r,pe):
-    cast_expr(r,pe)                         { $1 }
-  | arith_expr(r,pe) TMul    arith_expr(r,pe)
-      { P.arith_op Ast.Mul $1 $2 $3 }
-  | arith_expr(r,pe) TDmOp    arith_expr(r,pe)
-      { let (op,clt) = $2 in P.arith_op op $1 clt $3 }
-  | arith_expr(r,pe) TPlus   arith_expr(r,pe)
-      { P.arith_op Ast.Plus $1 $2 $3 }
-  | arith_expr(r,pe) TMinus  arith_expr(r,pe)
-      { P.arith_op Ast.Minus $1 $2 $3 }
-  | arith_expr(r,pe) TShOp    arith_expr(r,pe)
-      { let (op,clt) = $2 in P.arith_op op $1 clt $3 }
-  | arith_expr(r,pe) TLogOp    arith_expr(r,pe)
-      { let (op,clt) = $2 in P.logic_op op $1 clt $3 }
-  | arith_expr(r,pe) TEqEq   arith_expr(r,pe)
-      { P.logic_op Ast.Eq $1 $2 $3 }
-  | arith_expr(r,pe) TNotEq  arith_expr(r,pe)
-      { P.logic_op Ast.NotEq $1 $2 $3 }
-  | arith_expr(r,pe) TAnd    arith_expr(r,pe)
-      { P.arith_op Ast.And $1 $2 $3 }
-  | arith_expr(r,pe) TOr     arith_expr(r,pe)
-      { P.arith_op Ast.Or $1 $2 $3 }
-  | arith_expr(r,pe) TXor    arith_expr(r,pe)
-      { P.arith_op Ast.Xor $1 $2 $3 }
-  | arith_expr(r,pe) TAndLog arith_expr(r,pe)
-      { P.logic_op Ast.AndLog $1 $2 $3 }
-  | arith_expr(r,pe) TOrLog  arith_expr(r,pe)
-      { P.logic_op Ast.OrLog $1 $2 $3 }
-
-cast_expr(r,pe):
-    unary_expr(r,pe)                      { $1 }
-  | lp=TOPar t=ctype rp=TCPar e=cast_expr(r,pe)
-      { Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, t,
-                            P.clt2mcode ")" rp, e)) }
-
-unary_expr(r,pe):
-    postfix_expr(r,pe)                   { $1 }
-  | TInc unary_expr(r,pe)
-      { Ast0.wrap(Ast0.Infix ($2, P.clt2mcode Ast.Inc $1)) }
-  | TDec unary_expr(r,pe)
-      { Ast0.wrap(Ast0.Infix ($2, P.clt2mcode Ast.Dec $1)) }
-  | unary_op unary_expr(r,pe)
-      { let mcode = $1 in Ast0.wrap(Ast0.Unary($2, mcode)) }
-  | TBang unary_expr(r,pe)
-      { let mcode = P.clt2mcode Ast.Not $1 in
-      Ast0.wrap(Ast0.Unary($2, mcode)) }
-  | TSizeof unary_expr(r,pe)
-      { Ast0.wrap(Ast0.SizeOfExpr (P.clt2mcode "sizeof" $1, $2)) }
-  | s=TSizeof lp=TOPar t=ctype rp=TCPar
-      { Ast0.wrap(Ast0.SizeOfType (P.clt2mcode "sizeof" s,
-                                   P.clt2mcode "(" lp,t,
-                                   P.clt2mcode ")" rp)) }
-
-unary_op: TAnd    { P.clt2mcode Ast.GetRef $1 }
-       | TMul    { P.clt2mcode Ast.DeRef $1 }
-       | TPlus   { P.clt2mcode Ast.UnPlus $1 }
-       | TMinus  { P.clt2mcode Ast.UnMinus $1 }
-       | TTilde  { P.clt2mcode Ast.Tilde $1 }
-
-postfix_expr(r,pe):
-   primary_expr(r,pe)                            { $1 }
- | postfix_expr(r,pe) TOCro eexpr TCCro
-     { Ast0.wrap(Ast0.ArrayAccess ($1,P.clt2mcode "[" $2,$3,
-                                      P.clt2mcode "]" $4)) }
- | postfix_expr(r,pe) TDot   ident
-     { Ast0.wrap(Ast0.RecordAccess($1, P.clt2mcode "." $2, $3)) }
- | postfix_expr(r,pe) TPtrOp ident
-     { Ast0.wrap(Ast0.RecordPtAccess($1, P.clt2mcode "->" $2,
-                                    $3)) }
- | postfix_expr(r,pe) TInc
-     { Ast0.wrap(Ast0.Postfix ($1, P.clt2mcode Ast.Inc $2)) }
- | postfix_expr(r,pe) TDec
-     { Ast0.wrap(Ast0.Postfix ($1, P.clt2mcode Ast.Dec $2)) }
- | postfix_expr(r,pe) TOPar eexpr_list_option TCPar
-     { Ast0.wrap(Ast0.FunCall($1,P.clt2mcode "(" $2,
-                             $3,
-                             P.clt2mcode ")" $4)) }
-
-primary_expr(recurser,primary_extra):
-   func_ident   { Ast0.wrap(Ast0.Ident($1)) }
- | TInt
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) }
- | TFloat
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Float x) clt)) }
- | TString
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.String x) clt)) }
- | TChar
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Char x) clt)) }
- | TMetaConst
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.CONST,pure)) }
- | TMetaErr
-     { let (nm,constraints,pure,clt) = $1 in
-     Ast0.wrap(Ast0.MetaErr(P.clt2mcode nm clt,constraints,pure)) }
- | TMetaExp
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ANY,pure)) }
- | TMetaIdExp
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ID,pure)) }
- | TMetaLocalIdExp
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.LocalID,pure)) }
- | TOPar eexpr TCPar
-     { Ast0.wrap(Ast0.Paren(P.clt2mcode "(" $1,$2,
-                           P.clt2mcode ")" $3)) }
- | TOPar0 midzero_list(recurser,eexpr) TCPar0
-     { let (mids,code) = $2 in
-       Ast0.wrap(Ast0.DisjExpr(P.clt2mcode "(" $1,
-                              code, mids,
-                              P.clt2mcode ")" $3)) }
- | primary_extra { $1 }
-
-expr_dots(dotter):
-    r=no_dot_start_end(dexpr,edots_when(dotter,eexpr)) { r }
-
-// used in NEST
-no_dot_start_end(grammar,dotter):
-  g=grammar dg=list(pair(dotter,grammar))
-  { function dot_builder ->
-      g :: (List.concat(List.map (function (d,g) -> [dot_builder d;g]) dg)) }
-
-/*****************************************************************************/
-
-pure_ident:
-     TIdent { $1 }
-
-meta_ident:
-       TRuleName TDot pure_ident { (Some $1,P.id2name $3) }
-
-pure_ident_or_meta_ident:
-       pure_ident                { (None,P.id2name $1) }
-     | meta_ident                { $1 }
-     | Tlist                     { (None,"list") }
-     | TError                    { (None,"error") }
-     | TType                     { (None,"type") }
-
-pure_ident_or_meta_ident_with_not_eq(not_eq):
-       i=pure_ident_or_meta_ident l=loption(not_eq) { (i,l) }
-
-not_eq:
-       TNotEq i=pure_ident
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          [Ast0.wrap(Ast0.Id(P.id2mcode i))] }
-     | TNotEq TOBrace l=comma_list(pure_ident) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          List.map (function i -> Ast0.wrap(Ast0.Id(P.id2mcode i))) l }
-
-not_eqe:
-       TNotEq i=pure_ident
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          [Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i))))] }
-     | TNotEq TOBrace l=comma_list(pure_ident) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          List.map
-            (function i ->
-              Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i)))))
-            l }
-
-not_ceq:
-       TNotEq i=ident_or_const
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          [i] }
-     | TNotEq TOBrace l=comma_list(ident_or_const) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          l }
-
-ident_or_const:
-       i=pure_ident { Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i)))) }
-     | TInt
-        { let (x,clt) = $1 in
-        Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) }
-
-not_pos:
-       TNotEq i=meta_ident
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          match i with
-            (None,_) -> failwith "constraint must be an inherited variable"
-          | (Some rule,name) ->
-              let i = (rule,name) in
-              P.check_meta(Ast.MetaPosDecl(Ast.NONE,i));
-              [i] }
-     | TNotEq TOBrace l=comma_list(meta_ident) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          List.map
-            (function
-                (None,_) ->
-                  failwith "constraint must be an inherited variable"
-              | (Some rule,name) ->
-                  let i = (rule,name) in
-                  P.check_meta(Ast.MetaPosDecl(Ast.NONE,i));
-                  i)
-            l }
-
-func_ident: pure_ident
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaId
-         { let (nm,constraints,pure,clt) = $1 in
-        Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-     | TMetaFunc
-         { let (nm,constraints,pure,clt) = $1 in
-        Ast0.wrap(Ast0.MetaFunc(P.clt2mcode nm clt,constraints,pure)) }
-     | TMetaLocalFunc
-        { let (nm,constraints,pure,clt) = $1 in
-        Ast0.wrap
-          (Ast0.MetaLocalFunc(P.clt2mcode nm clt,constraints,pure)) }
-
-ident: pure_ident
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaId
-         { let (nm,constraints,pure,clt) = $1 in
-         Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-
-decl_ident:
-       TDeclarerId
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaDeclarer
-         { let (nm,constraints,pure,clt) = $1 in
-         Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-
-iter_ident:
-       TIteratorId
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaIterator
-         { let (nm,constraints,pure,clt) = $1 in
-         Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-
-typedef_ident:
-       pure_ident
-         { Ast0.wrap(Ast0.TypeName(P.id2mcode $1)) }
-     | TMetaType
-         { let (nm,pure,clt) = $1 in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) }
-
-/*****************************************************************************/
-
-decl_list(decl):
-   decl_list_start(decl)
-     {let circle x =
-       match Ast0.unwrap x with Ast0.Pcircles(_) -> true | _ -> false in
-     if List.exists circle $1
-     then Ast0.wrap(Ast0.CIRCLES($1))
-     else Ast0.wrap(Ast0.DOTS($1)) }
-
-decl_list_start(decl):
-  one_dec(decl)  { [$1] }
-| one_dec(decl) TComma decl_list_start(decl)
-    { $1::Ast0.wrap(Ast0.PComma(P.clt2mcode "," $2))::$3 }
-| TEllipsis list(comma_decls(TEllipsis,decl))
-    { Ast0.wrap(Ast0.Pdots(P.clt2mcode "..." $1))::
-      (List.concat(List.map (function x -> x (P.mkpdots "...")) $2)) }
-
-one_dec(decl):
-  decl  { $1 }
-| TMetaParamList
-    { let (nm,lenname,pure,clt) = $1 in
-    let nm = P.clt2mcode nm clt in
-    let lenname =
-      match lenname with
-       Some nm -> Some(P.clt2mcode nm clt)
-      | None -> None in
-    Ast0.wrap(Ast0.MetaParamList(nm,lenname,pure)) }
-comma_decls(dotter,decl):
-  TComma dotter
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.PComma(P.clt2mcode "," $1));
-       dot_builder $2] }
-| TComma one_dec(decl)
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.PComma(P.clt2mcode "," $1)); $2] }
-
-/* ---------------------------------------------------------------------- */
-
-error_words:
-    TError TWords TEq TOCro cl=comma_list(dexpr) TCCro
-      { [Ast0.wrap(Ast0.ERRORWORDS(cl))] }
-
-/* ---------------------------------------------------------------------- */
-/* sequences of statements and expressions */
-
-/* There are number of cases that must be considered:
-
-1. Top level:
-   Dots and nests allowed at the beginning or end
-   Expressions allowed at the beginning or end
-   One function allowed, by itself
-2. A function body:
-   Dots and nests allowed at the beginning or end
-   Expressions not allowed at the beginning or end
-   Functions not allowed
-3. The body of a nest:
-   Dots and nests not allowed at the beginning or end
-   Expressions allowed at the beginning or end
-   Functions not allowed
-4. Whencode:
-   Dots and nests not allowed at the beginning but allowed at the end
-   Expressions allowed at the beginning or end
-   Functions not allowed
-
-These are implemented by the rules minus_toplevel_sequence,
-plus_toplevel_sequence, function_body_sequence, nest_body_sequence, and
-when_body_sequence.
-*/
-/* ------------------------------------------------------------------------ */
-/* Minus top level */
-
-/* doesn't allow only ... */
-minus_start:
-  fundecl                { [Ast0.wrap(Ast0.DECL($1))] }
-| ctype                  { [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Ty($1))))] }
-| toplevel_seq_start(toplevel_after_dots_init)
-    { List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1 }
-
-toplevel_seq_start(after_dots_init):
-  stm_dots after_dots_init           { $1::$2 }
-| expr toplevel_after_exp            { (Ast0.wrap(Ast0.Exp($1)))::$2 }
-| decl_statement_expr toplevel_after_stm  { $1@$2 }
-
-toplevel_after_dots_init:
-  TNothing toplevel_after_exp        {$2}
-| expr toplevel_after_exp            {(Ast0.wrap(Ast0.Exp($1)))::$2}
-| decl_statement_expr toplevel_after_stm  {$1@$2}
-
-toplevel_after_exp:
-  /* empty */                        {[]}
-| stm_dots toplevel_after_dots       {$1::$2}
-
-toplevel_after_dots:
-  /* empty */                        {[]}
-| TNothing toplevel_after_exp        {$2}
-| expr toplevel_after_exp            {(Ast0.wrap(Ast0.Exp($1)))::$2}
-| decl_statement_expr toplevel_after_stm  {$1@$2}
-
-toplevel_after_stm:
-  /* empty */                        {[]}
-| stm_dots toplevel_after_dots       {$1::$2}
-| decl_statement toplevel_after_stm  {$1@$2}
-
-/* ------------------------------------------------------------------------ */
-/* Plus top level */
-
-/* does allow only ... also allows multiple top-level functions */
-plus_start:
-  ctype                   { [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Ty($1))))] }
-| stm_dots plus_after_dots
-                                          { (Ast0.wrap(Ast0.OTHER($1)))::$2 }
-| expr plus_after_exp
-                     { (Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp($1)))))::$2 }
-| fundecl plus_after_stm                     { Ast0.wrap(Ast0.DECL($1))::$2 }
-| decl_statement_expr plus_after_stm
-                { (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1)@$2 }
-
-plus_after_exp:
-  /* empty */                                                            {[]}
-| stm_dots plus_after_dots                { (Ast0.wrap(Ast0.OTHER($1)))::$2 }
-
-plus_after_dots:
-  /* empty */                                                            {[]}
-| TNothing plus_after_exp                                                {$2}
-| expr plus_after_exp
-                     { (Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp($1)))))::$2 }
-| fundecl plus_after_stm                     { Ast0.wrap(Ast0.DECL($1))::$2 }
-| decl_statement_expr plus_after_stm
-                { (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1)@$2 }
-
-plus_after_stm:
-  /* empty */                                                            {[]}
-| stm_dots plus_after_dots                { (Ast0.wrap(Ast0.OTHER($1)))::$2 }
-| fundecl plus_after_stm                     { Ast0.wrap(Ast0.DECL($1))::$2 }
-| decl_statement plus_after_stm
-                { (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1)@$2 }
-
-/* ------------------------------------------------------------------------ */
-/* Function body */
-
-fun_start:
-  fun_after_stm  { Ast0.wrap(Ast0.DOTS($1)) }
-
-fun_after_stm:
-  /* empty */                  {[]}
-| stm_dots fun_after_dots      {$1::$2}
-| decl_statement fun_after_stm {$1@$2}
-
-fun_after_dots:
-  /* empty */                  {[]}
-| TNothing fun_after_exp       {$2}
-| expr fun_after_exp           {Ast0.wrap(Ast0.Exp($1))::$2}
-| decl_statement_expr fun_after_stm {$1@$2}
-
-fun_after_exp:
-  stm_dots fun_after_dots      {$1::$2}
-
-/* hack to allow mixing statements and expressions in an or */
-fun_after_dots_or:
-  /* empty */                  {[]}
-| TNothing fun_after_exp_or    {$2}
-| expr fun_after_exp_or        {Ast0.wrap(Ast0.Exp($1))::$2}
-| decl_statement_expr fun_after_stm {$1@$2}
-
-fun_after_exp_or:
-  /* empty */                  {[]}
-| stm_dots fun_after_dots      {$1::$2}
-
-/* ------------------------------------------------------------------------ */
-/* Nest body */
-
-nest_start:
-  nest_after_dots  { Ast0.wrap(Ast0.DOTS($1)) }
-
-nest_after_dots:
-  decl_statement_expr nest_after_stm {$1@$2}
-| TNothing nest_after_exp       {$2}
-| expr nest_after_exp           {(Ast0.wrap(Ast0.Exp($1)))::$2}
-
-nest_after_stm:
-  /* empty */                   {[]}
-| stm_dots nest_after_dots      {$1::$2}
-| decl_statement nest_after_stm {$1@$2}
-
-nest_after_exp:
-  /* empty */                   {[]}
-| stm_dots nest_after_dots      {$1::$2}
-
-/* ------------------------------------------------------------------------ */
-/*Whencode*/
-
-when_start:
-  expr toplevel_after_exp
-    { Ast0.wrap(Ast0.DOTS((Ast0.wrap(Ast0.Exp($1)))::$2)) }
-| decl_statement toplevel_after_stm
-    { Ast0.wrap(Ast0.DOTS($1@$2)) }
-
-/* ---------------------------------------------------------------------- */
-
-eexpr_list:
-  eexpr_list_start
-     {let circle x =
-       match Ast0.unwrap x with Ast0.Ecircles(_) -> true | _ -> false in
-     let star x =
-       match Ast0.unwrap x with Ast0.Estars(_) -> true | _ -> false in
-     if List.exists circle $1
-     then Ast0.wrap(Ast0.CIRCLES($1))
-     else
-       if List.exists star $1
-       then Ast0.wrap(Ast0.STARS($1))
-       else Ast0.wrap(Ast0.DOTS($1)) }
-
-/* arg expr.  may contain a type or a explist metavariable */
-aexpr:
-    eexpr
-      { Ast0.set_arg_exp $1 }
-  | TMetaExpList
-      { let (nm,lenname,pure,clt) = $1 in
-      let nm = P.clt2mcode nm clt in
-      let lenname =
-       match lenname with
-         Some nm -> Some(P.clt2mcode nm clt)
-       | None -> None in
-      Ast0.wrap(Ast0.MetaExprList(nm,lenname,pure)) }
-  | ctype
-      { Ast0.set_arg_exp(Ast0.wrap(Ast0.TypeExp($1))) }
-
-eexpr_list_start:
-    aexpr { [$1] }
-  | aexpr TComma eexpr_list_start
-      { $1::Ast0.wrap(Ast0.EComma(P.clt2mcode "," $2))::$3 }
-
-comma_args(dotter):
-  c=TComma d=dotter
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.EComma(P.clt2mcode "," c)); dot_builder d] }
-| TComma aexpr
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.EComma(P.clt2mcode "," $1)); $2] }
-
-eexpr_list_option: eexpr_list { $1 }
-         | /* empty */     { Ast0.wrap(Ast0.DOTS([])) }
-
-/****************************************************************************/
-
-// non-empty lists - drop separator
-comma_list(elem):
-  separated_nonempty_list(TComma,elem) { $1 }
-
-midzero_list(elem,aft):
-  a=elem b=list(mzl(aft))
-     { let (mids,code) = List.split b in (mids,(a::code)) }
-
-mzl(elem):
-  a=TMid0 b=elem { (P.clt2mcode "|" a, b) }
-
-edots_when(dotter,when_grammar):
-    d=dotter                                      { (d,None) }
-  | d=dotter TWhen TNotEq w=when_grammar TLineEnd { (d,Some w) }
-
-dots_when(dotter,when_grammar,simple_when_grammar):
-    d=dotter w=list(whens(when_grammar,simple_when_grammar))
-      { (d,List.concat w) }
-
-whens(when_grammar,simple_when_grammar):
-    TWhen TNotEq w=when_grammar TLineEnd { [Ast0.WhenNot w] }
-  | TWhen TEq w=simple_when_grammar TLineEnd { [Ast0.WhenAlways w] }
-  | TWhen comma_list(any_strict) TLineEnd
-      { List.map (function x -> Ast0.WhenModifier(x)) $2 }
-
-any_strict:
-    TAny    { Ast.WhenAny }
-  | TStrict { Ast.WhenStrict }
-  | TForall { Ast.WhenForall }
-  | TExists { Ast.WhenExists }
-
-/*****************************************************************************
-*
-*
-*****************************************************************************/
-
-iso_main:
-  TIsoExpression e1=dexpr el=list(iso(dexpr)) EOF
-    { P.iso_adjust (function x -> Ast0.ExprTag x) e1 el }
-| TIsoArgExpression e1=dexpr el=list(iso(dexpr)) EOF
-    { P.iso_adjust (function x -> Ast0.ArgExprTag x) e1 el }
-| TIsoTestExpression e1=dexpr el=list(iso(dexpr)) EOF
-    { P.iso_adjust (function x -> Ast0.TestExprTag x) e1 el }
-| TIsoStatement s1=single_statement sl=list(iso(single_statement)) EOF
-    { P.iso_adjust (function x -> Ast0.StmtTag x) s1 sl }
-| TIsoType t1=ctype tl=list(iso(ctype)) EOF
-    { P.iso_adjust (function x -> Ast0.TypeCTag x) t1 tl }
-| TIsoTopLevel e1=nest_start el=list(iso(nest_start)) EOF
-    { P.iso_adjust (function x -> Ast0.DotsStmtTag x) e1 el }
-| TIsoDeclaration d1=decl_var dl=list(iso(decl_var)) EOF
-    { let check_one = function
-       [x] -> x
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              "only one variable per declaration in an isomorphism rule") in
-    let d1 = check_one d1 in
-    let dl =
-      List.map
-       (function
-           Common.Left x -> Common.Left(check_one x)
-         | Common.Right x -> Common.Right(check_one x))
-       dl in
-    P.iso_adjust (function x -> Ast0.DeclTag x) d1 dl }
-
-iso(term):
-    TIso t=term { Common.Left t }
-  | TRightIso t=term { Common.Right t }
-
-/*****************************************************************************
-*
-*
-*****************************************************************************/
-
-never_used: TPragma { () }
-  | TPArob TMetaPos { () }
-  | TScriptData     { () }
-
-script_meta_main: py=pure_ident TShOp TRuleName TDot cocci=pure_ident TMPtVirg
-  { (P.id2name py, ($3, P.id2name cocci)) }
diff --git a/parsing_cocci/.#parser_cocci_menhir.mly.1.155 b/parsing_cocci/.#parser_cocci_menhir.mly.1.155
deleted file mode 100644 (file)
index 3e30d2d..0000000
+++ /dev/null
@@ -1,1763 +0,0 @@
-/*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*/
-
-
-%{
-
-(* Not clear how to allow function declarations to specify a return type
-and how to allow both to be specified as static, because they are in
-different rules.  The rules seem to have to be combined, which would allow
-functions to be declared as local variables *)
-
-(* Not clear how to let a function have a parameter of type void.  At the
-moment, void is allowed to be the type of a variable, which is wrong, and a
-parameter needs both a type and an identifier *)
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-module P = Parse_aux
-%}
-
-%token EOF
-
-%token TIdentifier TExpression TStatement TFunction TLocal TType TParameter
-%token TIdExpression
-%token Tlist TFresh TConstant TError TWords TWhy0 TPlus0 TBang0
-%token TPure TContext
-%token TTypedef TDeclarer TIterator TName TPosition TPosAny
-%token TUsing TDisable TExtends TDepends TOn TEver TNever TExists TForall TScript
-%token TReverse TNothing
-%token<string> TRuleName
-
-%token<Data.clt> Tchar Tshort Tint Tdouble Tfloat Tlong
-%token<Data.clt> Tvoid Tstruct Tunion
-%token<Data.clt> Tunsigned Tsigned
-
-%token<Data.clt> Tstatic Tauto Tregister Textern Tinline Ttypedef
-%token<Data.clt> Tconst Tvolatile
-%token<string * Data.clt> Tattr
-
-%token <Data.clt> TIf TElse TWhile TFor TDo TSwitch TCase TDefault TReturn
-%token <Data.clt> TBreak TContinue TGoto TSizeof TFunDecl
-%token <string * Data.clt> TIdent TTypeId TDeclarerId TIteratorId
-
-%token <Parse_aux.idinfo>     TMetaId TMetaFunc TMetaLocalFunc
-%token <Parse_aux.idinfo>     TMetaIterator TMetaDeclarer
-%token <Parse_aux.expinfo>    TMetaErr 
-%token <Parse_aux.info>       TMetaParam TMetaStm TMetaStmList TMetaType
-%token <Parse_aux.list_info>  TMetaParamList TMetaExpList
-%token <Parse_aux.typed_info> TMetaExp TMetaIdExp TMetaLocalIdExp TMetaConst
-%token <Parse_aux.pos_info>   TMetaPos
-
-%token TArob TArobArob TPArob
-%token <string> TScriptData
-
-%token <Data.clt> TEllipsis TOEllipsis TCEllipsis TPOEllipsis TPCEllipsis
-%token <Data.clt> TWhen TWhenTrue TWhenFalse TAny TStrict TLineEnd
-
-%token <Data.clt> TWhy TDotDot TBang TOPar TOPar0
-%token <Data.clt> TMid0 TCPar TCPar0
-
-%token <string>  TPragma TPathIsoFile
-%token <string * Data.clt> TIncludeL TIncludeNL
-%token <Data.clt * token> TDefine
-%token <Data.clt * token * int> TDefineParam
-%token <string * Data.clt> TMinusFile TPlusFile
-
-%token <Data.clt> TInc TDec
-
-%token <string * Data.clt> TString TChar TFloat TInt
-
-%token <Data.clt> TOrLog
-%token <Data.clt> TAndLog
-%token <Data.clt> TOr
-%token <Data.clt> TXor
-%token <Data.clt> TAnd 
-%token <Data.clt> TEqEq TNotEq
-%token <Ast_cocci.logicalOp * Data.clt> TLogOp /* TInf TSup TInfEq TSupEq */
-%token <Ast_cocci.arithOp * Data.clt>   TShOp  /* TShl TShr */
-%token <Ast_cocci.arithOp * Data.clt>   TDmOp  /* TDiv TMod */
-%token <Data.clt> TPlus TMinus
-%token <Data.clt> TMul TTilde
-
-%token <Data.clt> TOBrace TCBrace
-%token <Data.clt> TOCro TCCro
-
-%token <Data.clt> TPtrOp
-
-%token TMPtVirg
-%token <Data.clt> TEq TDot TComma TPtVirg
-%token <Ast_cocci.assignOp * Data.clt> TAssign
-
-%token TIso TRightIso TIsoExpression TIsoStatement TIsoDeclaration TIsoType
-%token TIsoTopLevel TIsoArgExpression TIsoTestExpression
-
-%token TInvalid
-
-/* operator precedence */
-%nonassoc TIf
-%nonassoc TElse
-
-%left TOrLog
-%left TAndLog
-%left TOr
-%left TXor
-%left TAnd 
-%left TEqEq TNotEq
-%left TLogOp /* TInf TSup TInfEq TSupEq */
-%left TShOp /* TShl TShr */
-%left TPlus TMinus
-%left TMul TDmOp /* TDiv TMod */
-
-%start reinit
-%type <unit> reinit
-
-%start minus_main
-%type <Ast0_cocci.rule> minus_main
-
-%start minus_exp_main
-%type <Ast0_cocci.rule> minus_exp_main
-
-%start plus_main
-%type <Ast0_cocci.rule> plus_main
-
-%start plus_exp_main
-%type <Ast0_cocci.rule> plus_exp_main
-
-%start include_main
-%type <(string,string) Common.either list> include_main
-
-%start iso_rule_name
-%type <Ast_cocci.rulename>
-iso_rule_name
-
-%start rule_name
-%type <Ast_cocci.rulename>
-rule_name
-
-%start meta_main
-%type <(Ast_cocci.metavar,Ast_cocci.metavar) Common.either list> meta_main
-
-%start <string * (string * string)> script_meta_main
-
-%start iso_main
-%type <Ast0_cocci.anything list list> iso_main
-
-%start iso_meta_main
-%type <(Ast_cocci.metavar,Ast_cocci.metavar) Common.either list> iso_meta_main
-
-%start never_used
-%type <unit> never_used
-
-%%
-
-reinit: { }
-minus_main: minus_body EOF { $1 } | m=minus_body TArobArob { m }
-| m=minus_body TArob { m }
-plus_main: plus_body EOF { $1 } | p=plus_body TArobArob { p }
-| p=plus_body TArob { p }
-minus_exp_main: minus_exp_body EOF { $1 } | m=minus_exp_body TArobArob { m }
-| m=minus_exp_body TArob { m }
-plus_exp_main: plus_exp_body EOF { $1 } | p=plus_exp_body TArobArob { p }
-| p=plus_exp_body TArob { p }
-meta_main: m=metadec   { m (!Ast0.rule_name) }
-iso_meta_main: m=metadec { m "" }
-
-/*****************************************************************************
-*
-*
-*****************************************************************************/
-
-pure:
-  TPure          { Ast0.Pure }
-| TContext       { Ast0.Context }
-| TPure TContext { Ast0.PureContext }
-| TContext TPure { Ast0.PureContext }
-| /* empty */    { Ast0.Impure }
-
-iso_rule_name:
-  nm=pure_ident TArob { P.make_iso_rule_name_result (P.id2name nm) }
-
-rule_name:
-  nm=ioption(pure_ident) extends d=depends i=loption(choose_iso)
-    a=loption(disable) e=exists ee=is_expression TArob
-      { P.make_cocci_rule_name_result nm d i a e ee }
-  | TScript TDotDot lang=pure_ident d=depends TArob
-      { P.make_script_rule_name_result lang d }
-
-extends:
-  /* empty */                                     { () }
-| TExtends parent=TRuleName
-    { !Data.install_bindings (parent) }
-
-depends:
-  /* empty */              { Ast.NoDep }
-| TDepends TOn parents=dep { parents }
-
-dep:
-  pnrule           { $1 }
-| dep TAndLog dep  { Ast.AndDep($1, $3) }
-| dep TOrLog  dep  { Ast.OrDep ($1, $3) }
-
-pnrule:
-  TRuleName        { Ast.Dep      $1 }
-| TBang TRuleName  { Ast.AntiDep  $2 }
-| TEver TRuleName  { Ast.EverDep  $2 }
-| TNever TRuleName { Ast.NeverDep $2 }
-| TOPar dep TCPar  { $2 }
-
-choose_iso:
-  TUsing separated_nonempty_list(TComma,TString) { List.map P.id2name $2 }
-
-disable:
-  TDisable separated_nonempty_list(TComma,pure_ident) { List.map P.id2name $2 }
-
-exists:
-  TExists { Ast.Exists }
-| TForall { Ast.Forall }
-| TReverse TForall { Ast.ReverseForall }
-|         { Ast.Undetermined }
-
-is_expression: // for more flexible parsing of top level expressions
-              { false }
-| TExpression { true }
-
-include_main:
-  list(incl) TArob     { $1 }
-| list(incl) TArobArob { $1 }
-
-incl:
-  TUsing TString      { Common.Left(P.id2name $2) }
-| TUsing TPathIsoFile { Common.Right $2 }
-
-metadec:
-  ar=arity ispure=pure
-  kindfn=metakind ids=comma_list(pure_ident_or_meta_ident) TMPtVirg
-    { P.create_metadec ar ispure kindfn ids }
-| ar=arity ispure=pure
-  kindfn=metakind_atomic
-  ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_eq)) TMPtVirg
-    { P.create_metadec_ne ar ispure kindfn ids }
-| ar=arity ispure=pure
-  kindfn=metakind_atomic_expi
-  ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_eqe)) TMPtVirg
-    { P.create_metadec_ne ar ispure kindfn ids }
-| ar=arity ispure=pure
-  kindfn=metakind_atomic_expe
-  ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_ceq)) TMPtVirg
-    { P.create_metadec_ne ar ispure kindfn ids }
-| ar=arity TPosition a=option(TPosAny)
-    ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_pos)) TMPtVirg
-    { let kindfn arity name pure check_meta constraints =
-      let tok = check_meta(Ast.MetaPosDecl(arity,name)) in
-      let any = match a with None -> Ast.PER | Some _ -> Ast.ALL in
-      !Data.add_pos_meta name constraints any; tok in
-    P.create_metadec_ne ar false kindfn ids }
-| ar=arity ispure=pure
-    TParameter Tlist TOCro id=pure_ident_or_meta_ident TCCro
-    ids=comma_list(pure_ident_or_meta_ident) TMPtVirg
-    { P.create_len_metadec ar ispure
-       (fun lenname arity name pure check_meta ->
-         let tok =
-           check_meta(Ast.MetaParamListDecl(arity,name,Some lenname)) in
-         !Data.add_paramlist_meta name (Some lenname) pure; tok)
-       id ids }
-| ar=arity ispure=pure
-    TExpression Tlist TOCro id=pure_ident_or_meta_ident TCCro
-    ids=comma_list(pure_ident_or_meta_ident) TMPtVirg
-    { P.create_len_metadec ar ispure
-       (fun lenname arity name pure check_meta ->
-         let tok =
-           check_meta(Ast.MetaExpListDecl(arity,name,Some lenname)) in
-         !Data.add_explist_meta name (Some lenname) pure; tok)
-       id ids }
-
-%inline metakind:
-  TFresh TIdentifier
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaFreshIdDecl(arity,name)) in
-      !Data.add_id_meta name [] pure; tok) }
-| TParameter
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaParamDecl(arity,name)) in
-      !Data.add_param_meta name pure; tok) }
-| TParameter Tlist
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaParamListDecl(arity,name,None)) in
-      !Data.add_paramlist_meta name None pure; tok) }
-| TExpression Tlist
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaExpListDecl(arity,name,None)) in
-      !Data.add_explist_meta name None pure; tok) }
-| TType
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaTypeDecl(arity,name)) in
-      !Data.add_type_meta name pure; tok) } 
-| TStatement
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaStmDecl(arity,name)) in
-      !Data.add_stm_meta name pure; tok) }
-| TStatement Tlist
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaStmListDecl(arity,name)) in
-      !Data.add_stmlist_meta name pure; tok) }
-| TTypedef
-    { (fun arity (_,name) pure check_meta ->
-      if arity = Ast.NONE && pure = Ast0.Impure
-      then (!Data.add_type_name name; [])
-      else raise (Semantic_cocci.Semantic "bad typedef")) }
-| TDeclarer TName
-    { (fun arity (_,name) pure check_meta ->
-      if arity = Ast.NONE && pure = Ast0.Impure
-      then (!Data.add_declarer_name name; [])
-      else raise (Semantic_cocci.Semantic "bad declarer")) }
-| TIterator TName
-    { (fun arity (_,name) pure check_meta ->
-      if arity = Ast.NONE && pure = Ast0.Impure
-      then (!Data.add_iterator_name name; [])
-      else raise (Semantic_cocci.Semantic "bad iterator")) }
-
-
-%inline metakind_atomic:
-  TIdentifier
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaIdDecl(arity,name)) in
-      !Data.add_id_meta name constraints pure; tok) }
-| TFunction
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaFuncDecl(arity,name)) in
-      !Data.add_func_meta name constraints pure; tok) }
-| TLocal TFunction
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaLocalFuncDecl(arity,name)) in
-      !Data.add_local_func_meta name constraints pure;
-      tok) }
-| TDeclarer
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaDeclarerDecl(arity,name)) in
-      !Data.add_declarer_meta name constraints pure; tok) }
-| TIterator
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaIteratorDecl(arity,name)) in
-      !Data.add_iterator_meta name constraints pure; tok) }
-
-%inline metakind_atomic_expi:
-  TError
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaErrDecl(arity,name)) in
-      !Data.add_err_meta name constraints pure; tok) }
-| l=option(TLocal) TIdExpression ty=ioption(meta_exp_type)
-    { (fun arity name pure check_meta constraints ->
-      match l with
-       None ->
-         !Data.add_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaIdExpDecl(arity,name,ty))
-      | Some _ ->
-         !Data.add_local_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaLocalIdExpDecl(arity,name,ty))) }
-| l=option(TLocal) TIdExpression m=nonempty_list(TMul)
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some [P.ty_pointerify Type_cocci.Unknown m] in
-      match l with
-       None ->
-         !Data.add_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaIdExpDecl(arity,name,ty))
-      | Some _ ->
-         !Data.add_local_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaLocalIdExpDecl(arity,name,ty))) }
-| TExpression m=nonempty_list(TMul)
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some [P.ty_pointerify Type_cocci.Unknown m] in
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
-      !Data.add_exp_meta ty name constraints pure; tok) }
-| vl=meta_exp_type TOCro TCCro
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some (List.map (function x -> Type_cocci.Array x) vl) in
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
-      !Data.add_exp_meta ty name constraints pure; tok) }
-| TConstant ty=ioption(meta_exp_type)
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaConstDecl(arity,name,ty)) in
-      !Data.add_const_meta ty name constraints pure; tok) }
-
-%inline metakind_atomic_expe:
-  TExpression
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,None)) in
-      !Data.add_exp_meta None name constraints pure; tok) }
-| vl=meta_exp_type // no error if use $1 but doesn't type check
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some vl in
-      List.iter
-       (function c ->
-         match Ast0.unwrap c with
-           Ast0.Constant(_) ->
-             if not
-                 (List.exists
-                    (function
-                        Type_cocci.BaseType(Type_cocci.IntType,_) -> true
-                      | Type_cocci.BaseType(Type_cocci.ShortType,_) -> true
-                      | Type_cocci.BaseType(Type_cocci.LongType,_) -> true
-                      | _ -> false)
-                    vl)
-             then failwith "metavariable with int constraint must be an int"
-         | _ -> ())
-       constraints;
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
-      !Data.add_exp_meta ty name constraints pure; tok) }
-
-
-meta_exp_type:
-  t=ctype
-    { [Ast0_cocci.ast0_type_to_type t] }
-| TOBrace t=comma_list(ctype) TCBrace m=list(TMul)
-    { List.map
-       (function x -> P.ty_pointerify (Ast0_cocci.ast0_type_to_type x) m)
-       t }
-
-arity: TBang0 { Ast.UNIQUE }
-     | TWhy0  { Ast.OPT }
-     | TPlus0 { Ast.MULTI }
-     | /* empty */ { Ast.NONE }
-
-generic_ctype:
-       q=ctype_qualif
-         { Ast0.wrap(Ast0.ImplicitInt(q)) }
-     | q=ioption(ctype_qualif) ty=Tchar
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.CharType ty, q)) }
-     | q=ioption(ctype_qualif) ty=Tshort
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.ShortType ty, q)) }
-     | q=ioption(ctype_qualif) ty=Tint
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.IntType ty, q)) }
-     | t=Tdouble
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.DoubleType t, None)) }
-     | t=Tfloat
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.FloatType t, None)) }
-     | q=ioption(ctype_qualif) ty=Tlong
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.LongType ty, q)) }
-     | s=struct_or_union i=ident
-        { Ast0.wrap(Ast0.StructUnionName(s, Some i)) }
-     | s=struct_or_union i=ioption(ident)
-       l=TOBrace d=struct_decl_list r=TCBrace
-        { (if i = None && !Data.in_iso
-          then failwith "structures must be named in the iso file");
-           Ast0.wrap(Ast0.StructUnionDef(Ast0.wrap(Ast0.StructUnionName(s, i)),
-                                        P.clt2mcode "{" l,
-                                        d, P.clt2mcode "}" r)) }
-     | s=TMetaType l=TOBrace d=struct_decl_list r=TCBrace
-        { let (nm,pure,clt) = s in
-        let ty =
-          Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) in
-        Ast0.wrap
-          (Ast0.StructUnionDef(ty,P.clt2mcode "{" l,d,P.clt2mcode "}" r)) }
-     | r=TRuleName TDot p=TIdent
-        { let nm = (r,P.id2name p) in
-        (* this is only possible when we are in a metavar decl.  Otherwise,
-           it will be represented already as a MetaType *)
-        let _ = P.check_meta(Ast.MetaTypeDecl(Ast.NONE,nm)) in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm (P.id2clt p),
-                                Ast0.Impure (*will be ignored*))) }
-     | p=TTypeId
-        { Ast0.wrap(Ast0.TypeName(P.id2mcode p)) }
-     | p=TMetaType
-        { let (nm,pure,clt) = p in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) }
-
-struct_or_union:
-       s=Tstruct { P.clt2mcode Ast.Struct s }
-     | u=Tunion  { P.clt2mcode Ast.Union u }
-
-struct_decl:
-      TNothing { [] }
-    | t=ctype d=d_ident pv=TPtVirg
-        { let (id,fn) = d in
-        [Ast0.wrap(Ast0.UnInit(None,fn t,id,P.clt2mcode ";" pv))] }
-    | t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-       lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar pv=TPtVirg
-        { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-        [Ast0.wrap(Ast0.UnInit(None,fn t,id,P.clt2mcode ";" pv))] }
-     | cv=ioption(const_vol) i=pure_ident d=d_ident pv=TPtVirg
-        { let (id,fn) = d in
-        let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-        [Ast0.wrap(Ast0.UnInit(None,fn idtype,id,P.clt2mcode ";" pv))] }
-
-struct_decl_list:
-   struct_decl_list_start { Ast0.wrap(Ast0.DOTS($1)) }
-
-struct_decl_list_start:
-  struct_decl                        { $1 }
-| struct_decl struct_decl_list_start { $1@$2 }
-| d=edots_when(TEllipsis,struct_decl) r=continue_struct_decl_list
-    { (P.mkddots "..." d)::r }
-
-continue_struct_decl_list:
-  /* empty */                        { [] }
-| struct_decl struct_decl_list_start { $1@$2 }
-| struct_decl                        { $1 }
-
-ctype:
-       cv=ioption(const_vol) ty=generic_ctype m=list(TMul)
-        { P.pointerify (P.make_cv cv ty) m }
-     | cv=ioption(const_vol) t=Tvoid m=nonempty_list(TMul)
-         { let ty =
-            Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
-          P.pointerify (P.make_cv cv ty) m }
-   | lp=TOPar0 t=midzero_list(ctype,ctype) rp=TCPar0
-      /* more hacks */
-    { let (mids,code) = t in
-      Ast0.wrap
-       (Ast0.DisjType(P.clt2mcode "(" lp,code,mids, P.clt2mcode ")" rp)) }
-
-
-fn_ctype: // allows metavariables
-       ty=generic_ctype m=list(TMul) { P.pointerify ty m }
-     | t=Tvoid m=list(TMul)
-         { P.pointerify
-            (Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)))
-            m }
-
-ctype_qualif:
-       Tunsigned   { P.clt2mcode Ast.Unsigned $1 }
-     | Tsigned     { P.clt2mcode Ast.Signed $1 }
-
-/*****************************************************************************/
-
-/* have to inline everything to avoid conflicts? switch to proper
-declarations, statements, and expressions for the subterms */
-
-minus_body: 
-    f=loption(filespec)
-    b=loption(minus_start)
-    ew=loption(error_words)
-    { match f@b@ew with
-      [] -> raise (Semantic_cocci.Semantic "minus slice can't be empty")
-    | code -> Top_level.top_level code }
-
-plus_body: 
-    f=loption(filespec)
-    b=loption(plus_start)
-    ew=loption(error_words)
-    { Top_level.top_level (f@b@ew) }
-
-minus_exp_body:
-    f=loption(filespec)
-    b=top_eexpr
-    ew=loption(error_words)
-    { match f@[b]@ew with
-      [] -> raise (Semantic_cocci.Semantic "minus slice can't be empty")
-    | code -> Top_level.top_level code }
-
-plus_exp_body:
-    f=loption(filespec)
-    b=top_eexpr
-    ew=loption(error_words)
-    { Top_level.top_level (f@[b]@ew) }
-
-filespec:
-  TMinusFile TPlusFile
-    { [Ast0.wrap
-         (Ast0.FILEINFO(P.id2mcode $1,
-                        P.id2mcode $2))] }
-
-includes:
-  TIncludeL
-    { Ast0.wrap
-             (Ast0.Include(P.clt2mcode "#include" (P.drop_aft (P.id2clt $1)),
-                           let (arity,ln,lln,offset,col,strbef,straft,pos) =
-                             P.id2clt $1 in
-                           let clt =
-                             (arity,ln,lln,offset,0,strbef,straft,pos) in
-                           P.clt2mcode
-                             (Ast.Local (Parse_aux.str2inc (P.id2name $1)))
-                             (P.drop_bef clt))) }
-| TIncludeNL
-    { Ast0.wrap
-             (Ast0.Include(P.clt2mcode "#include" (P.drop_aft (P.id2clt $1)),
-                           let (arity,ln,lln,offset,col,strbef,straft,pos) =
-                             P.id2clt $1 in
-                           let clt =
-                             (arity,ln,lln,offset,0,strbef,straft,pos) in
-                           P.clt2mcode
-                             (Ast.NonLocal (Parse_aux.str2inc (P.id2name $1)))
-                             (P.drop_bef clt))) }
-| d=defineop t=ctype TLineEnd
-    { let ty = Ast0.wrap(Ast0.TopExp(Ast0.wrap(Ast0.TypeExp(t)))) in
-      d (Ast0.wrap(Ast0.DOTS([ty]))) }
-| defineop b=toplevel_seq_start(toplevel_after_dots) TLineEnd
-    { let body =
-       match b with
-         [e] ->
-           (match Ast0.unwrap e with
-             Ast0.Exp(e1) ->
-               [Ast0.rewrap e (Ast0.TopExp(Ast0.set_arg_exp (e1)))]
-           | _ -> b)
-       | _ -> b in
-      $1 (Ast0.wrap(Ast0.DOTS(body))) }
-
-defineop:
-  TDefine
-    { let (clt,ident) = $1 in
-      function body ->
-       Ast0.wrap
-         (Ast0.Define
-            (P.clt2mcode "#define" clt,
-             (match ident with
-               TMetaId((nm,constraints,pure,clt)) ->
-                 Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure))
-             | TIdent(nm_pure) ->
-                 Ast0.wrap(Ast0.Id(P.id2mcode nm_pure))
-             | _ ->
-                 raise
-                   (Semantic_cocci.Semantic
-                      "unexpected name for a #define")),
-             Ast0.wrap Ast0.NoParams,
-             body)) }
-| TDefineParam define_param_list_option TCPar
-    { let (clt,ident,parenoff) = $1 in
-      let (arity,line,lline,offset,col,strbef,straft,pos) = clt in
-      let lp =
-       P.clt2mcode "(" (arity,line,lline,parenoff,0,[],[],Ast0.NoMetaPos) in
-      function body ->
-       Ast0.wrap
-         (Ast0.Define
-            (P.clt2mcode "#define" clt,
-             (match ident with
-               TMetaId((nm,constraints,pure,clt)) ->
-                 Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure))
-             | TIdent(nm_pure) ->
-                 Ast0.wrap(Ast0.Id(P.id2mcode nm_pure))
-             | _ ->
-                 raise
-                   (Semantic_cocci.Semantic
-                      "unexpected name for a #define")),
-             Ast0.wrap (Ast0.DParams (lp,$2,P.clt2mcode ")" $3)),body)) }
-
-/* ---------------------------------------------------------------------- */
-
-define_param_list: define_param_list_start
-     {let circle x =
-       match Ast0.unwrap x with Ast0.DPcircles(_) -> true | _ -> false in
-     if List.exists circle $1
-     then Ast0.wrap(Ast0.CIRCLES($1))
-     else Ast0.wrap(Ast0.DOTS($1)) }
-
-define_param_list_start:
-    ident { [Ast0.wrap(Ast0.DParam $1)] }
-  | ident TComma define_param_list_start
-      { Ast0.wrap(Ast0.DParam $1)::
-       Ast0.wrap(Ast0.DPComma(P.clt2mcode "," $2))::$3 }
-  | d=TEllipsis r=list(dp_comma_args(TEllipsis))
-      { (P.mkdpdots "..." d)::
-       (List.concat (List.map (function x -> x (P.mkdpdots "...")) r)) }
-
-dp_comma_args(dotter):
-  c=TComma d=dotter
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.DPComma(P.clt2mcode "," c)); dot_builder d] }
-| TComma ident
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.DPComma(P.clt2mcode "," $1));
-       Ast0.wrap(Ast0.DParam $2)] }
-
-define_param_list_option: define_param_list { $1 }
-         | /* empty */     { Ast0.wrap(Ast0.DOTS([])) }
-
-/*****************************************************************************/
-
-funproto:
-  s=ioption(storage) t=ctype
-  id=func_ident lp=TOPar d=decl_list(name_opt_decl) rp=TCPar pt=TPtVirg
-      { Ast0.wrap
-         (Ast0.UnInit
-            (s,
-             Ast0.wrap
-               (Ast0.FunctionType(Some t,
-                                  P.clt2mcode "(" lp, d, P.clt2mcode ")" rp)),
-             id, P.clt2mcode ";" pt)) }
-| s=ioption(storage) t=Tvoid
-  id=func_ident lp=TOPar d=decl_list(name_opt_decl) rp=TCPar pt=TPtVirg
-    { let t = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
-      Ast0.wrap
-        (Ast0.UnInit
-          (s,
-           Ast0.wrap
-             (Ast0.FunctionType(Some t,
-                                P.clt2mcode "(" lp, d, P.clt2mcode ")" rp)),
-           id, P.clt2mcode ";" pt)) }
-
-
-fundecl:
-  f=fninfo
-  TFunDecl i=func_ident lp=TOPar d=decl_list(decl) rp=TCPar
-  lb=TOBrace b=fun_start rb=TCBrace
-      { Ast0.wrap(Ast0.FunDecl((Ast0.default_info(),Ast0.context_befaft()),
-                              f, i,
-                              P.clt2mcode "(" lp, d,
-                              P.clt2mcode ")" rp,
-                              P.clt2mcode "{" lb, b,
-                              P.clt2mcode "}" rb)) }
-
-fninfo:
-    /* empty */ { [] }
-  | storage  fninfo
-      { try
-       let _ =
-         List.find (function Ast0.FStorage(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate storage")
-      with Not_found -> (Ast0.FStorage($1))::$2 }
-  | t=fn_ctype r=fninfo_nt { (Ast0.FType(t))::r }
-  | Tinline  fninfo
-      { try
-       let _ = List.find (function Ast0.FInline(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate inline")
-      with Not_found -> (Ast0.FInline(P.clt2mcode "inline" $1))::$2 }
-  | Tattr    fninfo
-      { try
-       let _ = List.find (function Ast0.FAttr(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "multiple attributes")
-      with Not_found -> (Ast0.FAttr(P.id2mcode $1))::$2 }
-
-fninfo_nt:
-    /* empty */ { [] }
-  | storage  fninfo_nt
-      { try
-       let _ =
-         List.find (function Ast0.FStorage(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate storage")
-      with Not_found -> (Ast0.FStorage($1))::$2 }
-  | Tinline  fninfo_nt
-      { try
-       let _ = List.find (function Ast0.FInline(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate inline")
-      with Not_found -> (Ast0.FInline(P.clt2mcode "inline" $1))::$2 }
-  | Tattr    fninfo_nt
-      { try
-       let _ = List.find (function Ast0.FAttr(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate init")
-      with Not_found -> (Ast0.FAttr(P.id2mcode $1))::$2 }
-
-storage:
-         s=Tstatic      { P.clt2mcode Ast.Static s }
-       | s=Tauto        { P.clt2mcode Ast.Auto s }
-       | s=Tregister    { P.clt2mcode Ast.Register s }
-       | s=Textern      { P.clt2mcode Ast.Extern s }
-
-decl: t=ctype i=ident
-       { Ast0.wrap(Ast0.Param(t, Some i)) }
-    | t=fn_ctype lp=TOPar s=TMul i=ident rp=TCPar
-       lp1=TOPar d=decl_list(name_opt_decl) rp1=TCPar
-        { let fnptr =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp,P.clt2mcode "*" s,P.clt2mcode ")" rp,
-               P.clt2mcode "(" lp1,d,P.clt2mcode ")" rp1)) in
-       Ast0.wrap(Ast0.Param(fnptr, Some i)) }
-    | t=Tvoid
-       { let ty = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
-          Ast0.wrap(Ast0.VoidParam(ty)) }
-    | TMetaParam
-       { let (nm,pure,clt) = $1 in
-       Ast0.wrap(Ast0.MetaParam(P.clt2mcode nm clt,pure)) }
-
-name_opt_decl:
-      decl  { $1 }
-    | t=ctype { Ast0.wrap(Ast0.Param(t, None)) }
-    | t=fn_ctype lp=TOPar s=TMul rp=TCPar
-       lp1=TOPar d=decl_list(name_opt_decl) rp1=TCPar
-        { let fnptr =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp,P.clt2mcode "*" s,P.clt2mcode ")" rp,
-               P.clt2mcode "(" lp1,d,P.clt2mcode ")" rp1)) in
-       Ast0.wrap(Ast0.Param(fnptr, None)) }
-
-const_vol:
-      Tconst       { P.clt2mcode Ast.Const $1 }
-    | Tvolatile    { P.clt2mcode Ast.Volatile $1 }
-
-/*****************************************************************************/
-
-statement:
-  includes { $1 } /* shouldn't be allowed to be a single_statement... */
-| TMetaStm
-    { P.meta_stm $1 }
-| expr TPtVirg
-    { P.exp_stm $1 $2 }
-| TIf TOPar eexpr TCPar single_statement %prec TIf
-    { P.ifthen $1 $2 $3 $4 $5 }
-| TIf TOPar eexpr TCPar single_statement TElse single_statement
-    { P.ifthenelse $1 $2 $3 $4 $5 $6 $7 }
-| TFor TOPar option(eexpr) TPtVirg option(eexpr) TPtVirg
-    option(eexpr) TCPar single_statement
-    { P.forloop $1 $2 $3 $4 $5 $6 $7 $8 $9 }
-| TWhile TOPar eexpr TCPar single_statement
-    { P.whileloop $1 $2 $3 $4 $5 }
-| TDo single_statement TWhile TOPar eexpr TCPar TPtVirg
-    { P.doloop $1 $2 $3 $4 $5 $6 $7 }
-| iter_ident TOPar eexpr_list_option TCPar single_statement
-    { P.iterator $1 $2 $3 $4 $5 }
-| TSwitch TOPar eexpr TCPar TOBrace list(case_line) TCBrace
-    { P.switch $1 $2 $3 $4 $5 $6 $7 }
-| TReturn eexpr TPtVirg { P.ret_exp $1 $2 $3 }
-| TReturn TPtVirg { P.ret $1 $2 }
-| TBreak TPtVirg { P.break $1 $2 }
-| TContinue TPtVirg { P.cont $1 $2 }
-| ident TDotDot { P.label $1 $2 }
-| TGoto ident TPtVirg { P.goto $1 $2 $3 }
-| TOBrace fun_start TCBrace
-    { P.seq $1 $2 $3 }
-
-stm_dots:
-  TEllipsis w=list(whenppdecs)
-    { Ast0.wrap(Ast0.Dots(P.clt2mcode "..." $1, List.concat w)) }
-| TOEllipsis w=list(whenppdecs) b=nest_start c=TCEllipsis
-    { Ast0.wrap(Ast0.Nest(P.clt2mcode "<..." $1, b,
-                         P.clt2mcode "...>" c, List.concat w, false)) }
-| TPOEllipsis w=list(whenppdecs) b=nest_start c=TPCEllipsis
-    { Ast0.wrap(Ast0.Nest(P.clt2mcode "<+..." $1, b,
-                         P.clt2mcode "...+>" c, List.concat w, true)) }
-
-whenppdecs: w=whens(when_start,rule_elem_statement)
-    { w }
-
-/* a statement that fits into a single rule_elem.  should nests be included?
-what about statement metavariables? */
-rule_elem_statement:
-  one_decl_var
-    { Ast0.wrap(Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),$1)) }
-| expr TPtVirg { P.exp_stm $1 $2 }
-| TReturn eexpr TPtVirg { P.ret_exp $1 $2 $3 }
-| TReturn TPtVirg { P.ret $1 $2 }
-| TBreak TPtVirg { P.break $1 $2 }
-| TContinue TPtVirg { P.cont $1 $2 }
-| TOPar0 midzero_list(rule_elem_statement,rule_elem_statement) TCPar0
-    { let (mids,code) = $2 in
-    Ast0.wrap
-      (Ast0.Disj(P.clt2mcode "(" $1,
-                List.map (function x -> Ast0.wrap(Ast0.DOTS([x]))) code,
-                mids, P.clt2mcode ")" $3)) }
-
-/* a statement on its own */
-single_statement:
-    statement                         { $1 }
-  | TOPar0 midzero_list(statement,statement) TCPar0
-      /* degenerate case, elements are single statements and thus don't
-       contain dots */
-      { let (mids,code) = $2 in
-        Ast0.wrap
-         (Ast0.Disj(P.clt2mcode "(" $1,
-                    List.map (function x -> Ast0.wrap(Ast0.DOTS([x]))) code,
-                    mids, P.clt2mcode ")" $3)) }
-
-case_line:
-    TDefault TDotDot fun_start
-      { Ast0.wrap(Ast0.Default(P.clt2mcode "default" $1,P.clt2mcode ":" $2,$3)) }
-  | TCase eexpr TDotDot fun_start
-      { Ast0.wrap(Ast0.Case(P.clt2mcode "case" $1,$2,P.clt2mcode ":" $3,$4)) }
-
-/* In the following, an identifier as a type is not fully supported.  Indeed,
-the language is ambiguous: what is foo * bar; */
-/* The AST DisjDecl cannot be generated because it would be ambiguous with
-a disjunction on a statement with a declaration in each branch */
-decl_var:
-    t=ctype pv=TPtVirg
-      { [Ast0.wrap(Ast0.TyDecl(t,P.clt2mcode ";" pv))] }
-  | s=ioption(storage) t=ctype d=comma_list(d_ident) pv=TPtVirg
-      { List.map
-         (function (id,fn) ->
-           Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)))
-         d }
-  | f=funproto { [f] }
-  | s=ioption(storage) t=ctype d=d_ident q=TEq e=initialize pv=TPtVirg
-      {let (id,fn) = d in
-      [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))]}
-  /* type is a typedef name */
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident
-      d=comma_list(d_ident) pv=TPtVirg
-      { List.map
-         (function (id,fn) ->
-           let idtype =
-             P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-           Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)))
-         d }
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident d=d_ident q=TEq
-      e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-      !Data.add_type_name (P.id2name i);
-      let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-      [Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
-                          P.clt2mcode ";" pv))] }
-  /* function pointer type */
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-        [Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv))] }
-  | decl_ident TOPar eexpr_list_option TCPar TPtVirg
-      { [Ast0.wrap(Ast0.MacroDecl($1,P.clt2mcode "(" $2,$3,
-                                 P.clt2mcode ")" $4,P.clt2mcode ";" $5))] } 
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    q=TEq e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-      [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))]}
-  | s=Ttypedef t=ctype id=typedef_ident pv=TPtVirg
-      { let s = P.clt2mcode "typedef" s in
-        [Ast0.wrap(Ast0.Typedef(s,t,id,P.clt2mcode ";" pv))] }
-
-one_decl_var:
-    t=ctype pv=TPtVirg
-      { Ast0.wrap(Ast0.TyDecl(t,P.clt2mcode ";" pv)) }
-  | s=ioption(storage) t=ctype d=d_ident pv=TPtVirg
-      { let (id,fn) = d in
-        Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) }
-  | f=funproto { f }
-  | s=ioption(storage) t=ctype d=d_ident q=TEq e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-      Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv)) }
-  /* type is a typedef name */
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident
-      d=d_ident pv=TPtVirg
-      { let (id,fn) = d in
-        let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-       Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)) }
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident d=d_ident q=TEq
-      e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-      !Data.add_type_name (P.id2name i);
-      let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-      Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
-                          P.clt2mcode ";" pv)) }
-  /* function pointer type */
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-        Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) }
-  | decl_ident TOPar eexpr_list_option TCPar TPtVirg
-      { Ast0.wrap(Ast0.MacroDecl($1,P.clt2mcode "(" $2,$3,
-                                 P.clt2mcode ")" $4,P.clt2mcode ";" $5)) } 
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    q=TEq e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-      Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))}
-
-
-d_ident:
-    ident list(array_dec)
-      { ($1,
-        function t ->
-          List.fold_right
-            (function (l,i,r) ->
-              function rest ->
-                Ast0.wrap
-                  (Ast0.Array(rest,P.clt2mcode "[" l,i,P.clt2mcode "]" r)))
-            $2 t) }
-
-array_dec: l=TOCro i=option(eexpr) r=TCCro { (l,i,r) }
-
-initialize:
-    eexpr
-      { Ast0.wrap(Ast0.InitExpr($1)) }
-  | TOBrace initialize_list TCBrace
-      { Ast0.wrap(Ast0.InitList(P.clt2mcode "{" $1,$2,P.clt2mcode "}" $3)) }
-  | TOBrace TCBrace
-      { Ast0.wrap
-         (Ast0.InitList(P.clt2mcode "{" $1,Ast0.wrap(Ast0.DOTS []),
-                        P.clt2mcode "}" $2)) }
-
-initialize2:
-  /*arithexpr and not eexpr because can have ambiguity with comma*/
-  /*dots and nests probably not allowed at top level, haven't looked into why*/
-  arith_expr(eexpr,invalid) { Ast0.wrap(Ast0.InitExpr($1)) }
-| TOBrace initialize_list TCBrace
-    { Ast0.wrap(Ast0.InitList(P.clt2mcode "{" $1,$2,P.clt2mcode "}" $3)) }
-| TOBrace TCBrace
-    { Ast0.wrap
-       (Ast0.InitList(P.clt2mcode "{" $1,Ast0.wrap(Ast0.DOTS []),
-                      P.clt2mcode "}" $2)) }
-           /* gccext:, labeled elements */
-| TDot ident TEq initialize2
-    { Ast0.wrap(Ast0.InitGccDotName(P.clt2mcode "." $1,$2,P.clt2mcode "=" $3,$4)) }
-| ident TDotDot initialize2
-    { Ast0.wrap(Ast0.InitGccName($1,P.clt2mcode ":" $2,$3)) } /* in old kernel */
-| TOCro eexpr TCCro TEq initialize2
-    { Ast0.wrap(Ast0.InitGccIndex(P.clt2mcode "[" $1,$2,P.clt2mcode "]" $3,
-                                 P.clt2mcode "=" $4,$5)) }
-| TOCro eexpr TEllipsis eexpr TCCro TEq initialize2
-    { Ast0.wrap(Ast0.InitGccRange(P.clt2mcode "[" $1,$2,P.clt2mcode "..." $3,
-                                 $4,P.clt2mcode "]" $5,P.clt2mcode "=" $6,$7)) }
-
-initialize_list:
-   initialize_list_start { Ast0.wrap(Ast0.DOTS($1)) }
-
-initialize_list_start:
-  initialize2 TComma { [$1;Ast0.wrap(Ast0.IComma(P.clt2mcode "," $2))] }
-| initialize2 TComma initialize_list_start
-    { $1::Ast0.wrap(Ast0.IComma(P.clt2mcode "," $2))::$3 }
-| d=edots_when(TEllipsis,initialize)
-      r=comma_initializers(edots_when(TEllipsis,initialize))
-    { (P.mkidots "..." d)::
-      (List.concat(List.map (function x -> x (P.mkidots "...")) r)) }
-
-comma_initializers(dotter):
-  /* empty */ { [] }
-| d=dotter r=comma_initializers2(dotter)
-      { (function dot_builder -> [dot_builder d])::r }
-| i=initialize2 c=TComma r=comma_initializers(dotter)
-    { (function dot_builder -> [i; Ast0.wrap(Ast0.IComma(P.clt2mcode "," c))])::
-      r }
-
-comma_initializers2(dotter):
-  /* empty */ { [] }
-| i=initialize2 c=TComma r=comma_initializers(dotter)
-    { (function dot_builder -> [i; Ast0.wrap(Ast0.IComma(P.clt2mcode "," c))])::
-      r }
-
-/* a statement that is part of a list */
-decl_statement:
-    TMetaStmList
-      { let (nm,pure,clt) = $1 in
-      [Ast0.wrap(Ast0.MetaStmt(P.clt2mcode nm clt,pure))] }
-  | decl_var
-      { List.map
-         (function x ->
-           Ast0.wrap
-             (Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),x)))
-         $1 }
-  | statement { [$1] }
-  /* this doesn't allow expressions at top level, because the parser doesn't
-       know whether there is one.  If there is one, this is not sequencible.
-       If there is not one, then it is.  It seems complicated to get around
-    this at the parser level.  We would have to have a check afterwards to
-    allow this.  One case where this would be useful is for a when.  Now
-       we allow a sequence of whens, so one can be on only statements and
-    one can be on only expressions. */
-  | TOPar0 t=midzero_list(fun_start,fun_start) TCPar0
-      { let (mids,code) = t in
-       if List.for_all
-           (function x ->
-             match Ast0.unwrap x with Ast0.DOTS([]) -> true | _ -> false)
-           code
-      then []
-      else
-         [Ast0.wrap(Ast0.Disj(P.clt2mcode "(" $1, code, mids,
-                              P.clt2mcode ")" $3))] }
-
-/* a statement that is part of a list */
-decl_statement_expr:
-    TMetaStmList
-      { let (nm,pure,clt) = $1 in
-      [Ast0.wrap(Ast0.MetaStmt(P.clt2mcode nm clt,pure))] }
-  | decl_var
-      { List.map
-         (function x ->
-           Ast0.wrap
-             (Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),x)))
-         $1 }
-  | statement { [$1] }
-  /* this doesn't allow expressions at top level, because the parser doesn't
-       know whether there is one.  If there is one, this is not sequencible.
-       If there is not one, then it is.  It seems complicated to get around
-    this at the parser level.  We would have to have a check afterwards to
-    allow this.  One case where this would be useful is for a when.  Now
-       we allow a sequence of whens, so one can be on only statements and
-    one can be on only expressions. */
-  | TOPar0 t=midzero_list(fun_after_stm,fun_after_dots_or) TCPar0
-      { let (mids,code) = t in
-       if List.for_all (function [] -> true | _ -> false) code
-      then []
-      else
-         let dot_code =
-           List.map (function x -> Ast0.wrap(Ast0.DOTS x)) code in
-         [Ast0.wrap(Ast0.Disj(P.clt2mcode "(" $1, dot_code, mids,
-                              P.clt2mcode ")" $3))] }
-
-/*****************************************************************************/
-
-/* The following cannot contain <... ...> at the top level.  This can only
-be allowed as an expression when the expression is delimited on both sides
-by expression-specific markers.  In that case, the rule eexpr is used, which
-allows <... ...> anywhere.  Hopefully, this will not be too much of a problem
-in practice. */
-expr:  basic_expr(expr,invalid) { $1 }
-/* allows ... and nests */
-eexpr: basic_expr(eexpr,dot_expressions) { $1 }
-/* allows nests but not .... */
-dexpr: basic_expr(eexpr,nest_expressions) { $1 }
-
-top_eexpr:
-  eexpr { Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp($1)))) }
-
-invalid:
-  TInvalid { raise (Semantic_cocci.Semantic "not matchable") }
-
-dot_expressions:
-  TEllipsis { Ast0.wrap(Ast0.Edots(P.clt2mcode "..." $1,None)) }
-| nest_expressions { $1 }
-
-nest_expressions:
-  TOEllipsis w=option(whenexp) e=expr_dots(TEllipsis) c=TCEllipsis
-    { Ast0.wrap(Ast0.NestExpr(P.clt2mcode "<..." $1,
-                             Ast0.wrap(Ast0.DOTS(e (P.mkedots "..."))),
-                             P.clt2mcode "...>" c, w, false)) }
-| TPOEllipsis w=option(whenexp) e=expr_dots(TEllipsis) c=TPCEllipsis
-    { Ast0.wrap(Ast0.NestExpr(P.clt2mcode "<+..." $1,
-                             Ast0.wrap(Ast0.DOTS(e (P.mkedots "..."))),
-                             P.clt2mcode "...+>" c, w, true)) }
-
-whenexp: TWhen TNotEq w=eexpr TLineEnd { w }
-
-basic_expr(recurser,primary_extra):
-  assign_expr(recurser,primary_extra)                        { $1 }
-
-assign_expr(r,pe):
-    cond_expr(r,pe)                        { $1 }
-  | unary_expr(r,pe) TAssign assign_expr_bis
-      { let (op,clt) = $2 in
-      Ast0.wrap(Ast0.Assignment($1,P.clt2mcode op clt,
-                               Ast0.set_arg_exp $3,false)) }
-  | unary_expr(r,pe) TEq assign_expr_bis
-      { Ast0.wrap
-         (Ast0.Assignment
-            ($1,P.clt2mcode Ast.SimpleAssign $2,Ast0.set_arg_exp $3,false)) }
-
-assign_expr_bis:
-    cond_expr(eexpr,dot_expressions)                        { $1 }
-  | unary_expr(eexpr,dot_expressions) TAssign assign_expr_bis
-      { let (op,clt) = $2 in
-      Ast0.wrap(Ast0.Assignment($1,P.clt2mcode op clt,
-                               Ast0.set_arg_exp $3,false)) }
-  | unary_expr(eexpr,dot_expressions) TEq assign_expr_bis
-      { Ast0.wrap
-         (Ast0.Assignment
-            ($1,P.clt2mcode Ast.SimpleAssign $2,Ast0.set_arg_exp $3,false)) }
-
-cond_expr(r,pe):
-    arith_expr(r,pe)                         { $1 }
-  | l=arith_expr(r,pe) w=TWhy t=option(eexpr) dd=TDotDot r=cond_expr(r,pe)
-      { Ast0.wrap(Ast0.CondExpr (l, P.clt2mcode "?" w, t,
-                                P.clt2mcode ":" dd, r)) }
-
-arith_expr(r,pe):
-    cast_expr(r,pe)                         { $1 }
-  | arith_expr(r,pe) TMul    arith_expr(r,pe)
-      { P.arith_op Ast.Mul $1 $2 $3 }
-  | arith_expr(r,pe) TDmOp    arith_expr(r,pe)
-      { let (op,clt) = $2 in P.arith_op op $1 clt $3 }
-  | arith_expr(r,pe) TPlus   arith_expr(r,pe)
-      { P.arith_op Ast.Plus $1 $2 $3 }
-  | arith_expr(r,pe) TMinus  arith_expr(r,pe)
-      { P.arith_op Ast.Minus $1 $2 $3 }
-  | arith_expr(r,pe) TShOp    arith_expr(r,pe)
-      { let (op,clt) = $2 in P.arith_op op $1 clt $3 }
-  | arith_expr(r,pe) TLogOp    arith_expr(r,pe)
-      { let (op,clt) = $2 in P.logic_op op $1 clt $3 }
-  | arith_expr(r,pe) TEqEq   arith_expr(r,pe)
-      { P.logic_op Ast.Eq $1 $2 $3 }
-  | arith_expr(r,pe) TNotEq  arith_expr(r,pe)
-      { P.logic_op Ast.NotEq $1 $2 $3 }
-  | arith_expr(r,pe) TAnd    arith_expr(r,pe)
-      { P.arith_op Ast.And $1 $2 $3 }
-  | arith_expr(r,pe) TOr     arith_expr(r,pe)
-      { P.arith_op Ast.Or $1 $2 $3 }
-  | arith_expr(r,pe) TXor    arith_expr(r,pe)
-      { P.arith_op Ast.Xor $1 $2 $3 }
-  | arith_expr(r,pe) TAndLog arith_expr(r,pe)
-      { P.logic_op Ast.AndLog $1 $2 $3 }
-  | arith_expr(r,pe) TOrLog  arith_expr(r,pe)
-      { P.logic_op Ast.OrLog $1 $2 $3 }
-
-cast_expr(r,pe):
-    unary_expr(r,pe)                      { $1 }
-  | lp=TOPar t=ctype rp=TCPar e=cast_expr(r,pe)
-      { Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, t,
-                            P.clt2mcode ")" rp, e)) }
-
-unary_expr(r,pe):
-    postfix_expr(r,pe)                   { $1 }
-  | TInc unary_expr(r,pe)
-      { Ast0.wrap(Ast0.Infix ($2, P.clt2mcode Ast.Inc $1)) }
-  | TDec unary_expr(r,pe)
-      { Ast0.wrap(Ast0.Infix ($2, P.clt2mcode Ast.Dec $1)) }
-  | unary_op unary_expr(r,pe)
-      { let mcode = $1 in Ast0.wrap(Ast0.Unary($2, mcode)) }
-  | TBang unary_expr(r,pe)
-      { let mcode = P.clt2mcode Ast.Not $1 in
-      Ast0.wrap(Ast0.Unary($2, mcode)) }
-  | TSizeof unary_expr(r,pe)
-      { Ast0.wrap(Ast0.SizeOfExpr (P.clt2mcode "sizeof" $1, $2)) }
-  | s=TSizeof lp=TOPar t=ctype rp=TCPar
-      { Ast0.wrap(Ast0.SizeOfType (P.clt2mcode "sizeof" s,
-                                   P.clt2mcode "(" lp,t,
-                                   P.clt2mcode ")" rp)) }
-
-unary_op: TAnd    { P.clt2mcode Ast.GetRef $1 }
-       | TMul    { P.clt2mcode Ast.DeRef $1 }
-       | TPlus   { P.clt2mcode Ast.UnPlus $1 }
-       | TMinus  { P.clt2mcode Ast.UnMinus $1 }
-       | TTilde  { P.clt2mcode Ast.Tilde $1 }
-
-postfix_expr(r,pe):
-   primary_expr(r,pe)                            { $1 }
- | postfix_expr(r,pe) TOCro eexpr TCCro
-     { Ast0.wrap(Ast0.ArrayAccess ($1,P.clt2mcode "[" $2,$3,
-                                      P.clt2mcode "]" $4)) }
- | postfix_expr(r,pe) TDot   ident
-     { Ast0.wrap(Ast0.RecordAccess($1, P.clt2mcode "." $2, $3)) }
- | postfix_expr(r,pe) TPtrOp ident
-     { Ast0.wrap(Ast0.RecordPtAccess($1, P.clt2mcode "->" $2,
-                                    $3)) }
- | postfix_expr(r,pe) TInc
-     { Ast0.wrap(Ast0.Postfix ($1, P.clt2mcode Ast.Inc $2)) }
- | postfix_expr(r,pe) TDec
-     { Ast0.wrap(Ast0.Postfix ($1, P.clt2mcode Ast.Dec $2)) }
- | postfix_expr(r,pe) TOPar eexpr_list_option TCPar
-     { Ast0.wrap(Ast0.FunCall($1,P.clt2mcode "(" $2,
-                             $3,
-                             P.clt2mcode ")" $4)) }
-
-primary_expr(recurser,primary_extra):
-   func_ident   { Ast0.wrap(Ast0.Ident($1)) }
- | TInt
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) }
- | TFloat
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Float x) clt)) }
- | TString
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.String x) clt)) }
- | TChar
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Char x) clt)) }
- | TMetaConst
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.CONST,pure)) }
- | TMetaErr
-     { let (nm,constraints,pure,clt) = $1 in
-     Ast0.wrap(Ast0.MetaErr(P.clt2mcode nm clt,constraints,pure)) }
- | TMetaExp
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ANY,pure)) }
- | TMetaIdExp
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ID,pure)) }
- | TMetaLocalIdExp
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.LocalID,pure)) }
- | TOPar eexpr TCPar
-     { Ast0.wrap(Ast0.Paren(P.clt2mcode "(" $1,$2,
-                           P.clt2mcode ")" $3)) }
- | TOPar0 midzero_list(recurser,eexpr) TCPar0
-     { let (mids,code) = $2 in
-       Ast0.wrap(Ast0.DisjExpr(P.clt2mcode "(" $1,
-                              code, mids,
-                              P.clt2mcode ")" $3)) }
- | primary_extra { $1 }
-
-expr_dots(dotter):
-    r=no_dot_start_end(dexpr,edots_when(dotter,eexpr)) { r }
-
-// used in NEST
-no_dot_start_end(grammar,dotter):
-  g=grammar dg=list(pair(dotter,grammar))
-  { function dot_builder ->
-      g :: (List.concat(List.map (function (d,g) -> [dot_builder d;g]) dg)) }
-
-/*****************************************************************************/
-
-pure_ident:
-     TIdent { $1 }
-
-meta_ident:
-       TRuleName TDot pure_ident { (Some $1,P.id2name $3) }
-
-pure_ident_or_meta_ident:
-       pure_ident                { (None,P.id2name $1) }
-     | meta_ident                { $1 }
-     | Tlist                     { (None,"list") }
-     | TError                    { (None,"error") }
-     | TType                     { (None,"type") }
-
-pure_ident_or_meta_ident_with_not_eq(not_eq):
-       i=pure_ident_or_meta_ident l=loption(not_eq) { (i,l) }
-
-not_eq:
-       TNotEq i=pure_ident
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          [Ast0.wrap(Ast0.Id(P.id2mcode i))] }
-     | TNotEq TOBrace l=comma_list(pure_ident) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          List.map (function i -> Ast0.wrap(Ast0.Id(P.id2mcode i))) l }
-
-not_eqe:
-       TNotEq i=pure_ident
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          [Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i))))] }
-     | TNotEq TOBrace l=comma_list(pure_ident) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          List.map
-            (function i ->
-              Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i)))))
-            l }
-
-not_ceq:
-       TNotEq i=ident_or_const
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          [i] }
-     | TNotEq TOBrace l=comma_list(ident_or_const) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          l }
-
-ident_or_const:
-       i=pure_ident { Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i)))) }
-     | TInt
-        { let (x,clt) = $1 in
-        Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) }
-
-not_pos:
-       TNotEq i=meta_ident
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          match i with
-            (None,_) -> failwith "constraint must be an inherited variable"
-          | (Some rule,name) ->
-              let i = (rule,name) in
-              P.check_meta(Ast.MetaPosDecl(Ast.NONE,i));
-              [i] }
-     | TNotEq TOBrace l=comma_list(meta_ident) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          List.map
-            (function
-                (None,_) ->
-                  failwith "constraint must be an inherited variable"
-              | (Some rule,name) ->
-                  let i = (rule,name) in
-                  P.check_meta(Ast.MetaPosDecl(Ast.NONE,i));
-                  i)
-            l }
-
-func_ident: pure_ident
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaId
-         { let (nm,constraints,pure,clt) = $1 in
-        Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-     | TMetaFunc
-         { let (nm,constraints,pure,clt) = $1 in
-        Ast0.wrap(Ast0.MetaFunc(P.clt2mcode nm clt,constraints,pure)) }
-     | TMetaLocalFunc
-        { let (nm,constraints,pure,clt) = $1 in
-        Ast0.wrap
-          (Ast0.MetaLocalFunc(P.clt2mcode nm clt,constraints,pure)) }
-
-ident: pure_ident
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaId
-         { let (nm,constraints,pure,clt) = $1 in
-         Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-
-decl_ident:
-       TDeclarerId
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaDeclarer
-         { let (nm,constraints,pure,clt) = $1 in
-         Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-
-iter_ident:
-       TIteratorId
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaIterator
-         { let (nm,constraints,pure,clt) = $1 in
-         Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-
-typedef_ident:
-       pure_ident
-         { Ast0.wrap(Ast0.TypeName(P.id2mcode $1)) }
-     | TMetaType
-         { let (nm,pure,clt) = $1 in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) }
-
-/*****************************************************************************/
-
-decl_list(decl):
-   decl_list_start(decl)
-     {let circle x =
-       match Ast0.unwrap x with Ast0.Pcircles(_) -> true | _ -> false in
-     if List.exists circle $1
-     then Ast0.wrap(Ast0.CIRCLES($1))
-     else Ast0.wrap(Ast0.DOTS($1)) }
-
-decl_list_start(decl):
-  one_dec(decl)  { [$1] }
-| one_dec(decl) TComma decl_list_start(decl)
-    { $1::Ast0.wrap(Ast0.PComma(P.clt2mcode "," $2))::$3 }
-| TEllipsis list(comma_decls(TEllipsis,decl))
-    { Ast0.wrap(Ast0.Pdots(P.clt2mcode "..." $1))::
-      (List.concat(List.map (function x -> x (P.mkpdots "...")) $2)) }
-
-one_dec(decl):
-  decl  { $1 }
-| TMetaParamList
-    { let (nm,lenname,pure,clt) = $1 in
-    let nm = P.clt2mcode nm clt in
-    let lenname =
-      match lenname with
-       Some nm -> Some(P.clt2mcode nm clt)
-      | None -> None in
-    Ast0.wrap(Ast0.MetaParamList(nm,lenname,pure)) }
-comma_decls(dotter,decl):
-  TComma dotter
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.PComma(P.clt2mcode "," $1));
-       dot_builder $2] }
-| TComma one_dec(decl)
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.PComma(P.clt2mcode "," $1)); $2] }
-
-/* ---------------------------------------------------------------------- */
-
-error_words:
-    TError TWords TEq TOCro cl=comma_list(dexpr) TCCro
-      { [Ast0.wrap(Ast0.ERRORWORDS(cl))] }
-
-/* ---------------------------------------------------------------------- */
-/* sequences of statements and expressions */
-
-/* There are number of cases that must be considered:
-
-1. Top level:
-   Dots and nests allowed at the beginning or end
-   Expressions allowed at the beginning or end
-   One function allowed, by itself
-2. A function body:
-   Dots and nests allowed at the beginning or end
-   Expressions not allowed at the beginning or end
-   Functions not allowed
-3. The body of a nest:
-   Dots and nests not allowed at the beginning or end
-   Expressions allowed at the beginning or end
-   Functions not allowed
-4. Whencode:
-   Dots and nests not allowed at the beginning but allowed at the end
-   Expressions allowed at the beginning or end
-   Functions not allowed
-
-These are implemented by the rules minus_toplevel_sequence,
-plus_toplevel_sequence, function_body_sequence, nest_body_sequence, and
-when_body_sequence.
-*/
-/* ------------------------------------------------------------------------ */
-/* Minus top level */
-
-/* doesn't allow only ... */
-minus_start:
-  fundecl                { [Ast0.wrap(Ast0.DECL($1))] }
-| ctype                  { [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Ty($1))))] }
-| toplevel_seq_start(toplevel_after_dots_init)
-    { List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1 }
-
-toplevel_seq_start(after_dots_init):
-  stm_dots after_dots_init           { $1::$2 }
-| expr toplevel_after_exp            { (Ast0.wrap(Ast0.Exp($1)))::$2 }
-| decl_statement_expr toplevel_after_stm  { $1@$2 }
-
-toplevel_after_dots_init:
-  TNothing toplevel_after_exp        {$2}
-| expr toplevel_after_exp            {(Ast0.wrap(Ast0.Exp($1)))::$2}
-| decl_statement_expr toplevel_after_stm  {$1@$2}
-
-toplevel_after_exp:
-  /* empty */                        {[]}
-| stm_dots toplevel_after_dots       {$1::$2}
-
-toplevel_after_dots:
-  /* empty */                        {[]}
-| TNothing toplevel_after_exp        {$2}
-| expr toplevel_after_exp            {(Ast0.wrap(Ast0.Exp($1)))::$2}
-| decl_statement_expr toplevel_after_stm  {$1@$2}
-
-toplevel_after_stm:
-  /* empty */                        {[]}
-| stm_dots toplevel_after_dots       {$1::$2}
-| decl_statement toplevel_after_stm  {$1@$2}
-
-/* ------------------------------------------------------------------------ */
-/* Plus top level */
-
-/* does allow only ... also allows multiple top-level functions */
-plus_start:
-  ctype                   { [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Ty($1))))] }
-| stm_dots plus_after_dots
-                                          { (Ast0.wrap(Ast0.OTHER($1)))::$2 }
-| expr plus_after_exp
-                     { (Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp($1)))))::$2 }
-| fundecl plus_after_stm                     { Ast0.wrap(Ast0.DECL($1))::$2 }
-| decl_statement_expr plus_after_stm
-                { (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1)@$2 }
-
-plus_after_exp:
-  /* empty */                                                            {[]}
-| stm_dots plus_after_dots                { (Ast0.wrap(Ast0.OTHER($1)))::$2 }
-
-plus_after_dots:
-  /* empty */                                                            {[]}
-| TNothing plus_after_exp                                                {$2}
-| expr plus_after_exp
-                     { (Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp($1)))))::$2 }
-| fundecl plus_after_stm                     { Ast0.wrap(Ast0.DECL($1))::$2 }
-| decl_statement_expr plus_after_stm
-                { (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1)@$2 }
-
-plus_after_stm:
-  /* empty */                                                            {[]}
-| stm_dots plus_after_dots                { (Ast0.wrap(Ast0.OTHER($1)))::$2 }
-| fundecl plus_after_stm                     { Ast0.wrap(Ast0.DECL($1))::$2 }
-| decl_statement plus_after_stm
-                { (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1)@$2 }
-
-/* ------------------------------------------------------------------------ */
-/* Function body */
-
-fun_start:
-  fun_after_stm  { Ast0.wrap(Ast0.DOTS($1)) }
-
-fun_after_stm:
-  /* empty */                  {[]}
-| stm_dots fun_after_dots      {$1::$2}
-| decl_statement fun_after_stm {$1@$2}
-
-fun_after_dots:
-  /* empty */                  {[]}
-| TNothing fun_after_exp       {$2}
-| expr fun_after_exp           {Ast0.wrap(Ast0.Exp($1))::$2}
-| decl_statement_expr fun_after_stm {$1@$2}
-
-fun_after_exp:
-  stm_dots fun_after_dots      {$1::$2}
-
-/* hack to allow mixing statements and expressions in an or */
-fun_after_dots_or:
-  /* empty */                  {[]}
-| TNothing fun_after_exp_or    {$2}
-| expr fun_after_exp_or        {Ast0.wrap(Ast0.Exp($1))::$2}
-| decl_statement_expr fun_after_stm {$1@$2}
-
-fun_after_exp_or:
-  /* empty */                  {[]}
-| stm_dots fun_after_dots      {$1::$2}
-
-/* ------------------------------------------------------------------------ */
-/* Nest body */
-
-nest_start:
-  nest_after_dots  { Ast0.wrap(Ast0.DOTS($1)) }
-
-nest_after_dots:
-  decl_statement_expr nest_after_stm {$1@$2}
-| TNothing nest_after_exp       {$2}
-| expr nest_after_exp           {(Ast0.wrap(Ast0.Exp($1)))::$2}
-
-nest_after_stm:
-  /* empty */                   {[]}
-| stm_dots nest_after_dots      {$1::$2}
-| decl_statement nest_after_stm {$1@$2}
-
-nest_after_exp:
-  /* empty */                   {[]}
-| stm_dots nest_after_dots      {$1::$2}
-
-/* ------------------------------------------------------------------------ */
-/*Whencode*/
-
-when_start:
-  expr toplevel_after_exp
-    { Ast0.wrap(Ast0.DOTS((Ast0.wrap(Ast0.Exp($1)))::$2)) }
-| decl_statement toplevel_after_stm
-    { Ast0.wrap(Ast0.DOTS($1@$2)) }
-
-/* ---------------------------------------------------------------------- */
-
-eexpr_list:
-  eexpr_list_start
-     {let circle x =
-       match Ast0.unwrap x with Ast0.Ecircles(_) -> true | _ -> false in
-     let star x =
-       match Ast0.unwrap x with Ast0.Estars(_) -> true | _ -> false in
-     if List.exists circle $1
-     then Ast0.wrap(Ast0.CIRCLES($1))
-     else
-       if List.exists star $1
-       then Ast0.wrap(Ast0.STARS($1))
-       else Ast0.wrap(Ast0.DOTS($1)) }
-
-/* arg expr.  may contain a type or a explist metavariable */
-aexpr:
-    eexpr
-      { Ast0.set_arg_exp $1 }
-  | TMetaExpList
-      { let (nm,lenname,pure,clt) = $1 in
-      let nm = P.clt2mcode nm clt in
-      let lenname =
-       match lenname with
-         Some nm -> Some(P.clt2mcode nm clt)
-       | None -> None in
-      Ast0.wrap(Ast0.MetaExprList(nm,lenname,pure)) }
-  | ctype
-      { Ast0.set_arg_exp(Ast0.wrap(Ast0.TypeExp($1))) }
-
-eexpr_list_start:
-    aexpr { [$1] }
-  | aexpr TComma eexpr_list_start
-      { $1::Ast0.wrap(Ast0.EComma(P.clt2mcode "," $2))::$3 }
-
-comma_args(dotter):
-  c=TComma d=dotter
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.EComma(P.clt2mcode "," c)); dot_builder d] }
-| TComma aexpr
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.EComma(P.clt2mcode "," $1)); $2] }
-
-eexpr_list_option: eexpr_list { $1 }
-         | /* empty */     { Ast0.wrap(Ast0.DOTS([])) }
-
-/****************************************************************************/
-
-// non-empty lists - drop separator
-comma_list(elem):
-  separated_nonempty_list(TComma,elem) { $1 }
-
-midzero_list(elem,aft):
-  a=elem b=list(mzl(aft))
-     { let (mids,code) = List.split b in (mids,(a::code)) }
-
-mzl(elem):
-  a=TMid0 b=elem { (P.clt2mcode "|" a, b) }
-
-edots_when(dotter,when_grammar):
-    d=dotter                                      { (d,None) }
-  | d=dotter TWhen TNotEq w=when_grammar TLineEnd { (d,Some w) }
-
-whens(when_grammar,simple_when_grammar):
-    TWhen TNotEq w=when_grammar TLineEnd { [Ast0.WhenNot w] }
-  | TWhen TEq w=simple_when_grammar TLineEnd { [Ast0.WhenAlways w] }
-  | TWhen comma_list(any_strict) TLineEnd
-      { List.map (function x -> Ast0.WhenModifier(x)) $2 }
-  | TWhenTrue TNotEq e = eexpr TLineEnd { [Ast0.WhenNotTrue e] }
-  | TWhenFalse TNotEq e = eexpr TLineEnd { [Ast0.WhenNotFalse e] }
-
-any_strict:
-    TAny    { Ast.WhenAny }
-  | TStrict { Ast.WhenStrict }
-  | TForall { Ast.WhenForall }
-  | TExists { Ast.WhenExists }
-
-/*****************************************************************************
-*
-*
-*****************************************************************************/
-
-iso_main:
-  TIsoExpression e1=dexpr el=list(iso(dexpr)) EOF
-    { P.iso_adjust (function x -> Ast0.ExprTag x) e1 el }
-| TIsoArgExpression e1=dexpr el=list(iso(dexpr)) EOF
-    { P.iso_adjust (function x -> Ast0.ArgExprTag x) e1 el }
-| TIsoTestExpression e1=dexpr el=list(iso(dexpr)) EOF
-    { P.iso_adjust (function x -> Ast0.TestExprTag x) e1 el }
-| TIsoStatement s1=single_statement sl=list(iso(single_statement)) EOF
-    { P.iso_adjust (function x -> Ast0.StmtTag x) s1 sl }
-| TIsoType t1=ctype tl=list(iso(ctype)) EOF
-    { P.iso_adjust (function x -> Ast0.TypeCTag x) t1 tl }
-| TIsoTopLevel e1=nest_start el=list(iso(nest_start)) EOF
-    { P.iso_adjust (function x -> Ast0.DotsStmtTag x) e1 el }
-| TIsoDeclaration d1=decl_var dl=list(iso(decl_var)) EOF
-    { let check_one = function
-       [x] -> x
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              "only one variable per declaration in an isomorphism rule") in
-    let d1 = check_one d1 in
-    let dl =
-      List.map
-       (function
-           Common.Left x -> Common.Left(check_one x)
-         | Common.Right x -> Common.Right(check_one x))
-       dl in
-    P.iso_adjust (function x -> Ast0.DeclTag x) d1 dl }
-
-iso(term):
-    TIso t=term { Common.Left t }
-  | TRightIso t=term { Common.Right t }
-
-/*****************************************************************************
-*
-*
-*****************************************************************************/
-
-never_used: TPragma { () }
-  | TPArob TMetaPos { () }
-  | TScriptData     { () }
-
-script_meta_main: py=pure_ident TShOp TRuleName TDot cocci=pure_ident TMPtVirg
-  { (P.id2name py, ($3, P.id2name cocci)) }
diff --git a/parsing_cocci/.#parser_cocci_menhir.mly.1.156 b/parsing_cocci/.#parser_cocci_menhir.mly.1.156
deleted file mode 100644 (file)
index 1e71638..0000000
+++ /dev/null
@@ -1,1769 +0,0 @@
-/*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*/
-
-
-%{
-
-(* Not clear how to allow function declarations to specify a return type
-and how to allow both to be specified as static, because they are in
-different rules.  The rules seem to have to be combined, which would allow
-functions to be declared as local variables *)
-
-(* Not clear how to let a function have a parameter of type void.  At the
-moment, void is allowed to be the type of a variable, which is wrong, and a
-parameter needs both a type and an identifier *)
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-module P = Parse_aux
-%}
-
-%token EOF
-
-%token TIdentifier TExpression TStatement TFunction TLocal TType TParameter
-%token TIdExpression
-%token Tlist TFresh TConstant TError TWords TWhy0 TPlus0 TBang0
-%token TPure TContext
-%token TTypedef TDeclarer TIterator TName TPosition TPosAny
-%token TUsing TDisable TExtends TDepends TOn TEver TNever TExists TForall TScript
-%token TReverse TNothing
-%token<string> TRuleName
-
-%token<Data.clt> Tchar Tshort Tint Tdouble Tfloat Tlong
-%token<Data.clt> Tvoid Tstruct Tunion
-%token<Data.clt> Tunsigned Tsigned
-
-%token<Data.clt> Tstatic Tauto Tregister Textern Tinline Ttypedef
-%token<Data.clt> Tconst Tvolatile
-%token<string * Data.clt> Tattr
-
-%token <Data.clt> TIf TElse TWhile TFor TDo TSwitch TCase TDefault TReturn
-%token <Data.clt> TBreak TContinue TGoto TSizeof TFunDecl
-%token <string * Data.clt> TIdent TTypeId TDeclarerId TIteratorId
-
-%token <Parse_aux.idinfo>     TMetaId TMetaFunc TMetaLocalFunc
-%token <Parse_aux.idinfo>     TMetaIterator TMetaDeclarer
-%token <Parse_aux.expinfo>    TMetaErr 
-%token <Parse_aux.info>       TMetaParam TMetaStm TMetaStmList TMetaType
-%token <Parse_aux.list_info>  TMetaParamList TMetaExpList
-%token <Parse_aux.typed_info> TMetaExp TMetaIdExp TMetaLocalIdExp TMetaConst
-%token <Parse_aux.pos_info>   TMetaPos
-
-%token TArob TArobArob TPArob
-%token <string> TScriptData
-
-%token <Data.clt> TEllipsis TOEllipsis TCEllipsis TPOEllipsis TPCEllipsis
-%token <Data.clt> TWhen TWhenTrue TWhenFalse TAny TStrict TLineEnd
-
-%token <Data.clt> TWhy TDotDot TBang TOPar TOPar0
-%token <Data.clt> TMid0 TCPar TCPar0
-
-%token <string>  TPragma TPathIsoFile
-%token <string * Data.clt> TIncludeL TIncludeNL
-%token <Data.clt * token> TDefine
-%token <Data.clt * token * int> TDefineParam
-%token <string * Data.clt> TMinusFile TPlusFile
-
-%token <Data.clt> TInc TDec
-
-%token <string * Data.clt> TString TChar TFloat TInt
-
-%token <Data.clt> TOrLog
-%token <Data.clt> TAndLog
-%token <Data.clt> TOr
-%token <Data.clt> TXor
-%token <Data.clt> TAnd 
-%token <Data.clt> TEqEq TNotEq
-%token <Ast_cocci.logicalOp * Data.clt> TLogOp /* TInf TSup TInfEq TSupEq */
-%token <Ast_cocci.arithOp * Data.clt>   TShOp  /* TShl TShr */
-%token <Ast_cocci.arithOp * Data.clt>   TDmOp  /* TDiv TMod */
-%token <Data.clt> TPlus TMinus
-%token <Data.clt> TMul TTilde
-
-%token <Data.clt> TOBrace TCBrace TOInit
-%token <Data.clt> TOCro TCCro
-
-%token <Data.clt> TPtrOp
-
-%token TMPtVirg
-%token <Data.clt> TEq TDot TComma TPtVirg
-%token <Ast_cocci.assignOp * Data.clt> TAssign
-
-%token TIso TRightIso TIsoExpression TIsoStatement TIsoDeclaration TIsoType
-%token TIsoTopLevel TIsoArgExpression TIsoTestExpression
-
-%token TInvalid
-
-/* operator precedence */
-%nonassoc TIf
-%nonassoc TElse
-
-%left TOrLog
-%left TAndLog
-%left TOr
-%left TXor
-%left TAnd 
-%left TEqEq TNotEq
-%left TLogOp /* TInf TSup TInfEq TSupEq */
-%left TShOp /* TShl TShr */
-%left TPlus TMinus
-%left TMul TDmOp /* TDiv TMod */
-
-%start reinit
-%type <unit> reinit
-
-%start minus_main
-%type <Ast0_cocci.rule> minus_main
-
-%start minus_exp_main
-%type <Ast0_cocci.rule> minus_exp_main
-
-%start plus_main
-%type <Ast0_cocci.rule> plus_main
-
-%start plus_exp_main
-%type <Ast0_cocci.rule> plus_exp_main
-
-%start include_main
-%type <(string,string) Common.either list> include_main
-
-%start iso_rule_name
-%type <Ast_cocci.rulename>
-iso_rule_name
-
-%start rule_name
-%type <Ast_cocci.rulename>
-rule_name
-
-%start meta_main
-%type <(Ast_cocci.metavar,Ast_cocci.metavar) Common.either list> meta_main
-
-%start <string * (string * string)> script_meta_main
-
-%start iso_main
-%type <Ast0_cocci.anything list list> iso_main
-
-%start iso_meta_main
-%type <(Ast_cocci.metavar,Ast_cocci.metavar) Common.either list> iso_meta_main
-
-%start never_used
-%type <unit> never_used
-
-%%
-
-reinit: { }
-minus_main: minus_body EOF { $1 } | m=minus_body TArobArob { m }
-| m=minus_body TArob { m }
-plus_main: plus_body EOF { $1 } | p=plus_body TArobArob { p }
-| p=plus_body TArob { p }
-minus_exp_main: minus_exp_body EOF { $1 } | m=minus_exp_body TArobArob { m }
-| m=minus_exp_body TArob { m }
-plus_exp_main: plus_exp_body EOF { $1 } | p=plus_exp_body TArobArob { p }
-| p=plus_exp_body TArob { p }
-meta_main: m=metadec   { m (!Ast0.rule_name) }
-iso_meta_main: m=metadec { m "" }
-
-/*****************************************************************************
-*
-*
-*****************************************************************************/
-
-pure:
-  TPure          { Ast0.Pure }
-| TContext       { Ast0.Context }
-| TPure TContext { Ast0.PureContext }
-| TContext TPure { Ast0.PureContext }
-| /* empty */    { Ast0.Impure }
-
-iso_rule_name:
-  nm=pure_ident TArob { P.make_iso_rule_name_result (P.id2name nm) }
-
-rule_name:
-  nm=ioption(pure_ident) extends d=depends i=loption(choose_iso)
-    a=loption(disable) e=exists ee=is_expression TArob
-      { P.make_cocci_rule_name_result nm d i a e ee }
-  | TScript TDotDot lang=pure_ident d=depends TArob
-      { P.make_script_rule_name_result lang d }
-
-extends:
-  /* empty */                                     { () }
-| TExtends parent=TRuleName
-    { !Data.install_bindings (parent) }
-
-depends:
-  /* empty */              { Ast.NoDep }
-| TDepends TOn parents=dep { parents }
-
-dep:
-  pnrule           { $1 }
-| dep TAndLog dep  { Ast.AndDep($1, $3) }
-| dep TOrLog  dep  { Ast.OrDep ($1, $3) }
-
-pnrule:
-  TRuleName        { Ast.Dep      $1 }
-| TBang TRuleName  { Ast.AntiDep  $2 }
-| TEver TRuleName  { Ast.EverDep  $2 }
-| TNever TRuleName { Ast.NeverDep $2 }
-| TOPar dep TCPar  { $2 }
-
-choose_iso:
-  TUsing separated_nonempty_list(TComma,TString) { List.map P.id2name $2 }
-
-disable:
-  TDisable separated_nonempty_list(TComma,pure_ident) { List.map P.id2name $2 }
-
-exists:
-  TExists { Ast.Exists }
-| TForall { Ast.Forall }
-| TReverse TForall { Ast.ReverseForall }
-|         { Ast.Undetermined }
-
-is_expression: // for more flexible parsing of top level expressions
-              { false }
-| TExpression { true }
-
-include_main:
-  list(incl) TArob     { $1 }
-| list(incl) TArobArob { $1 }
-
-incl:
-  TUsing TString      { Common.Left(P.id2name $2) }
-| TUsing TPathIsoFile { Common.Right $2 }
-
-metadec:
-  ar=arity ispure=pure
-  kindfn=metakind ids=comma_list(pure_ident_or_meta_ident) TMPtVirg
-    { P.create_metadec ar ispure kindfn ids }
-| ar=arity ispure=pure
-  kindfn=metakind_atomic
-  ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_eq)) TMPtVirg
-    { P.create_metadec_ne ar ispure kindfn ids }
-| ar=arity ispure=pure
-  kindfn=metakind_atomic_expi
-  ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_eqe)) TMPtVirg
-    { P.create_metadec_ne ar ispure kindfn ids }
-| ar=arity ispure=pure
-  kindfn=metakind_atomic_expe
-  ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_ceq)) TMPtVirg
-    { P.create_metadec_ne ar ispure kindfn ids }
-| ar=arity TPosition a=option(TPosAny)
-    ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_pos)) TMPtVirg
-    { let kindfn arity name pure check_meta constraints =
-      let tok = check_meta(Ast.MetaPosDecl(arity,name)) in
-      let any = match a with None -> Ast.PER | Some _ -> Ast.ALL in
-      !Data.add_pos_meta name constraints any; tok in
-    P.create_metadec_ne ar false kindfn ids }
-| ar=arity ispure=pure
-    TParameter Tlist TOCro id=pure_ident_or_meta_ident TCCro
-    ids=comma_list(pure_ident_or_meta_ident) TMPtVirg
-    { P.create_len_metadec ar ispure
-       (fun lenname arity name pure check_meta ->
-         let tok =
-           check_meta(Ast.MetaParamListDecl(arity,name,Some lenname)) in
-         !Data.add_paramlist_meta name (Some lenname) pure; tok)
-       id ids }
-| ar=arity ispure=pure
-    TExpression Tlist TOCro id=pure_ident_or_meta_ident TCCro
-    ids=comma_list(pure_ident_or_meta_ident) TMPtVirg
-    { P.create_len_metadec ar ispure
-       (fun lenname arity name pure check_meta ->
-         let tok =
-           check_meta(Ast.MetaExpListDecl(arity,name,Some lenname)) in
-         !Data.add_explist_meta name (Some lenname) pure; tok)
-       id ids }
-
-%inline metakind:
-  TFresh TIdentifier
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaFreshIdDecl(arity,name)) in
-      !Data.add_id_meta name [] pure; tok) }
-| TParameter
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaParamDecl(arity,name)) in
-      !Data.add_param_meta name pure; tok) }
-| TParameter Tlist
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaParamListDecl(arity,name,None)) in
-      !Data.add_paramlist_meta name None pure; tok) }
-| TExpression Tlist
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaExpListDecl(arity,name,None)) in
-      !Data.add_explist_meta name None pure; tok) }
-| TType
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaTypeDecl(arity,name)) in
-      !Data.add_type_meta name pure; tok) } 
-| TStatement
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaStmDecl(arity,name)) in
-      !Data.add_stm_meta name pure; tok) }
-| TStatement Tlist
-    { (fun arity name pure check_meta ->
-      let tok = check_meta(Ast.MetaStmListDecl(arity,name)) in
-      !Data.add_stmlist_meta name pure; tok) }
-| TTypedef
-    { (fun arity (_,name) pure check_meta ->
-      if arity = Ast.NONE && pure = Ast0.Impure
-      then (!Data.add_type_name name; [])
-      else raise (Semantic_cocci.Semantic "bad typedef")) }
-| TDeclarer TName
-    { (fun arity (_,name) pure check_meta ->
-      if arity = Ast.NONE && pure = Ast0.Impure
-      then (!Data.add_declarer_name name; [])
-      else raise (Semantic_cocci.Semantic "bad declarer")) }
-| TIterator TName
-    { (fun arity (_,name) pure check_meta ->
-      if arity = Ast.NONE && pure = Ast0.Impure
-      then (!Data.add_iterator_name name; [])
-      else raise (Semantic_cocci.Semantic "bad iterator")) }
-
-
-%inline metakind_atomic:
-  TIdentifier
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaIdDecl(arity,name)) in
-      !Data.add_id_meta name constraints pure; tok) }
-| TFunction
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaFuncDecl(arity,name)) in
-      !Data.add_func_meta name constraints pure; tok) }
-| TLocal TFunction
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaLocalFuncDecl(arity,name)) in
-      !Data.add_local_func_meta name constraints pure;
-      tok) }
-| TDeclarer
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaDeclarerDecl(arity,name)) in
-      !Data.add_declarer_meta name constraints pure; tok) }
-| TIterator
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaIteratorDecl(arity,name)) in
-      !Data.add_iterator_meta name constraints pure; tok) }
-
-%inline metakind_atomic_expi:
-  TError
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaErrDecl(arity,name)) in
-      !Data.add_err_meta name constraints pure; tok) }
-| l=option(TLocal) TIdExpression ty=ioption(meta_exp_type)
-    { (fun arity name pure check_meta constraints ->
-      match l with
-       None ->
-         !Data.add_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaIdExpDecl(arity,name,ty))
-      | Some _ ->
-         !Data.add_local_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaLocalIdExpDecl(arity,name,ty))) }
-| l=option(TLocal) TIdExpression m=nonempty_list(TMul)
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some [P.ty_pointerify Type_cocci.Unknown m] in
-      match l with
-       None ->
-         !Data.add_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaIdExpDecl(arity,name,ty))
-      | Some _ ->
-         !Data.add_local_idexp_meta ty name constraints pure;
-         check_meta(Ast.MetaLocalIdExpDecl(arity,name,ty))) }
-| TExpression m=nonempty_list(TMul)
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some [P.ty_pointerify Type_cocci.Unknown m] in
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
-      !Data.add_exp_meta ty name constraints pure; tok) }
-| vl=meta_exp_type TOCro TCCro
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some (List.map (function x -> Type_cocci.Array x) vl) in
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
-      !Data.add_exp_meta ty name constraints pure; tok) }
-| TConstant ty=ioption(meta_exp_type)
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaConstDecl(arity,name,ty)) in
-      !Data.add_const_meta ty name constraints pure; tok) }
-
-%inline metakind_atomic_expe:
-  TExpression
-    { (fun arity name pure check_meta constraints ->
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,None)) in
-      !Data.add_exp_meta None name constraints pure; tok) }
-| vl=meta_exp_type // no error if use $1 but doesn't type check
-    { (fun arity name pure check_meta constraints ->
-      let ty = Some vl in
-      List.iter
-       (function c ->
-         match Ast0.unwrap c with
-           Ast0.Constant(_) ->
-             if not
-                 (List.exists
-                    (function
-                        Type_cocci.BaseType(Type_cocci.IntType,_) -> true
-                      | Type_cocci.BaseType(Type_cocci.ShortType,_) -> true
-                      | Type_cocci.BaseType(Type_cocci.LongType,_) -> true
-                      | _ -> false)
-                    vl)
-             then failwith "metavariable with int constraint must be an int"
-         | _ -> ())
-       constraints;
-      let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
-      !Data.add_exp_meta ty name constraints pure; tok) }
-
-
-meta_exp_type:
-  t=ctype
-    { [Ast0_cocci.ast0_type_to_type t] }
-| TOBrace t=comma_list(ctype) TCBrace m=list(TMul)
-    { List.map
-       (function x -> P.ty_pointerify (Ast0_cocci.ast0_type_to_type x) m)
-       t }
-
-arity: TBang0 { Ast.UNIQUE }
-     | TWhy0  { Ast.OPT }
-     | TPlus0 { Ast.MULTI }
-     | /* empty */ { Ast.NONE }
-
-generic_ctype:
-       q=ctype_qualif
-         { Ast0.wrap(Ast0.ImplicitInt(q)) }
-     | q=ioption(ctype_qualif) ty=Tchar
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.CharType ty, q)) }
-     | q=ioption(ctype_qualif) ty=Tshort
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.ShortType ty, q)) }
-     | q=ioption(ctype_qualif) ty=Tint
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.IntType ty, q)) }
-     | t=Tdouble
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.DoubleType t, None)) }
-     | t=Tfloat
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.FloatType t, None)) }
-     | q=ioption(ctype_qualif) ty=Tlong
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.LongType ty, q)) }
-     | s=struct_or_union i=ident
-        { Ast0.wrap(Ast0.StructUnionName(s, Some i)) }
-     | s=struct_or_union i=ioption(ident)
-       l=TOBrace d=struct_decl_list r=TCBrace
-        { (if i = None && !Data.in_iso
-          then failwith "structures must be named in the iso file");
-           Ast0.wrap(Ast0.StructUnionDef(Ast0.wrap(Ast0.StructUnionName(s, i)),
-                                        P.clt2mcode "{" l,
-                                        d, P.clt2mcode "}" r)) }
-     | s=TMetaType l=TOBrace d=struct_decl_list r=TCBrace
-        { let (nm,pure,clt) = s in
-        let ty =
-          Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) in
-        Ast0.wrap
-          (Ast0.StructUnionDef(ty,P.clt2mcode "{" l,d,P.clt2mcode "}" r)) }
-     | r=TRuleName TDot p=TIdent
-        { let nm = (r,P.id2name p) in
-        (* this is only possible when we are in a metavar decl.  Otherwise,
-           it will be represented already as a MetaType *)
-        let _ = P.check_meta(Ast.MetaTypeDecl(Ast.NONE,nm)) in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm (P.id2clt p),
-                                Ast0.Impure (*will be ignored*))) }
-     | p=TTypeId
-        { Ast0.wrap(Ast0.TypeName(P.id2mcode p)) }
-     | p=TMetaType
-        { let (nm,pure,clt) = p in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) }
-
-struct_or_union:
-       s=Tstruct { P.clt2mcode Ast.Struct s }
-     | u=Tunion  { P.clt2mcode Ast.Union u }
-
-struct_decl:
-      TNothing { [] }
-    | t=ctype d=d_ident pv=TPtVirg
-        { let (id,fn) = d in
-        [Ast0.wrap(Ast0.UnInit(None,fn t,id,P.clt2mcode ";" pv))] }
-    | t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-       lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar pv=TPtVirg
-        { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-        [Ast0.wrap(Ast0.UnInit(None,fn t,id,P.clt2mcode ";" pv))] }
-     | cv=ioption(const_vol) i=pure_ident d=d_ident pv=TPtVirg
-        { let (id,fn) = d in
-        let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-        [Ast0.wrap(Ast0.UnInit(None,fn idtype,id,P.clt2mcode ";" pv))] }
-
-struct_decl_list:
-   struct_decl_list_start { Ast0.wrap(Ast0.DOTS($1)) }
-
-struct_decl_list_start:
-  struct_decl                        { $1 }
-| struct_decl struct_decl_list_start { $1@$2 }
-| d=edots_when(TEllipsis,struct_decl) r=continue_struct_decl_list
-    { (P.mkddots "..." d)::r }
-
-continue_struct_decl_list:
-  /* empty */                        { [] }
-| struct_decl struct_decl_list_start { $1@$2 }
-| struct_decl                        { $1 }
-
-ctype:
-       cv=ioption(const_vol) ty=generic_ctype m=list(TMul)
-        { P.pointerify (P.make_cv cv ty) m }
-     | cv=ioption(const_vol) t=Tvoid m=nonempty_list(TMul)
-         { let ty =
-            Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
-          P.pointerify (P.make_cv cv ty) m }
-   | lp=TOPar0 t=midzero_list(ctype,ctype) rp=TCPar0
-      /* more hacks */
-    { let (mids,code) = t in
-      Ast0.wrap
-       (Ast0.DisjType(P.clt2mcode "(" lp,code,mids, P.clt2mcode ")" rp)) }
-
-
-fn_ctype: // allows metavariables
-       ty=generic_ctype m=list(TMul) { P.pointerify ty m }
-     | t=Tvoid m=list(TMul)
-         { P.pointerify
-            (Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)))
-            m }
-
-ctype_qualif:
-       Tunsigned   { P.clt2mcode Ast.Unsigned $1 }
-     | Tsigned     { P.clt2mcode Ast.Signed $1 }
-
-/*****************************************************************************/
-
-/* have to inline everything to avoid conflicts? switch to proper
-declarations, statements, and expressions for the subterms */
-
-minus_body: 
-    f=loption(filespec)
-    b=loption(minus_start)
-    ew=loption(error_words)
-    { match f@b@ew with
-      [] -> raise (Semantic_cocci.Semantic "minus slice can't be empty")
-    | code -> Top_level.top_level code }
-
-plus_body: 
-    f=loption(filespec)
-    b=loption(plus_start)
-    ew=loption(error_words)
-    { Top_level.top_level (f@b@ew) }
-
-minus_exp_body:
-    f=loption(filespec)
-    b=top_eexpr
-    ew=loption(error_words)
-    { match f@[b]@ew with
-      [] -> raise (Semantic_cocci.Semantic "minus slice can't be empty")
-    | code -> Top_level.top_level code }
-
-plus_exp_body:
-    f=loption(filespec)
-    b=top_eexpr
-    ew=loption(error_words)
-    { Top_level.top_level (f@[b]@ew) }
-
-filespec:
-  TMinusFile TPlusFile
-    { [Ast0.wrap
-         (Ast0.FILEINFO(P.id2mcode $1,
-                        P.id2mcode $2))] }
-
-includes:
-  TIncludeL
-    { Ast0.wrap
-             (Ast0.Include(P.clt2mcode "#include" (P.drop_aft (P.id2clt $1)),
-                           let (arity,ln,lln,offset,col,strbef,straft,pos) =
-                             P.id2clt $1 in
-                           let clt =
-                             (arity,ln,lln,offset,0,strbef,straft,pos) in
-                           P.clt2mcode
-                             (Ast.Local (Parse_aux.str2inc (P.id2name $1)))
-                             (P.drop_bef clt))) }
-| TIncludeNL
-    { Ast0.wrap
-             (Ast0.Include(P.clt2mcode "#include" (P.drop_aft (P.id2clt $1)),
-                           let (arity,ln,lln,offset,col,strbef,straft,pos) =
-                             P.id2clt $1 in
-                           let clt =
-                             (arity,ln,lln,offset,0,strbef,straft,pos) in
-                           P.clt2mcode
-                             (Ast.NonLocal (Parse_aux.str2inc (P.id2name $1)))
-                             (P.drop_bef clt))) }
-| d=defineop t=ctype TLineEnd
-    { let ty = Ast0.wrap(Ast0.TopExp(Ast0.wrap(Ast0.TypeExp(t)))) in
-      d (Ast0.wrap(Ast0.DOTS([ty]))) }
-| defineop b=toplevel_seq_start(toplevel_after_dots) TLineEnd
-    { let body =
-       match b with
-         [e] ->
-           (match Ast0.unwrap e with
-             Ast0.Exp(e1) ->
-               [Ast0.rewrap e (Ast0.TopExp(Ast0.set_arg_exp (e1)))]
-           | _ -> b)
-       | _ -> b in
-      $1 (Ast0.wrap(Ast0.DOTS(body))) }
-
-defineop:
-  TDefine
-    { let (clt,ident) = $1 in
-      function body ->
-       Ast0.wrap
-         (Ast0.Define
-            (P.clt2mcode "#define" clt,
-             (match ident with
-               TMetaId((nm,constraints,pure,clt)) ->
-                 Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure))
-             | TIdent(nm_pure) ->
-                 Ast0.wrap(Ast0.Id(P.id2mcode nm_pure))
-             | _ ->
-                 raise
-                   (Semantic_cocci.Semantic
-                      "unexpected name for a #define")),
-             Ast0.wrap Ast0.NoParams,
-             body)) }
-| TDefineParam define_param_list_option TCPar
-    { let (clt,ident,parenoff) = $1 in
-      let (arity,line,lline,offset,col,strbef,straft,pos) = clt in
-      let lp =
-       P.clt2mcode "(" (arity,line,lline,parenoff,0,[],[],Ast0.NoMetaPos) in
-      function body ->
-       Ast0.wrap
-         (Ast0.Define
-            (P.clt2mcode "#define" clt,
-             (match ident with
-               TMetaId((nm,constraints,pure,clt)) ->
-                 Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure))
-             | TIdent(nm_pure) ->
-                 Ast0.wrap(Ast0.Id(P.id2mcode nm_pure))
-             | _ ->
-                 raise
-                   (Semantic_cocci.Semantic
-                      "unexpected name for a #define")),
-             Ast0.wrap (Ast0.DParams (lp,$2,P.clt2mcode ")" $3)),body)) }
-
-/* ---------------------------------------------------------------------- */
-
-define_param_list: define_param_list_start
-     {let circle x =
-       match Ast0.unwrap x with Ast0.DPcircles(_) -> true | _ -> false in
-     if List.exists circle $1
-     then Ast0.wrap(Ast0.CIRCLES($1))
-     else Ast0.wrap(Ast0.DOTS($1)) }
-
-define_param_list_start:
-    ident { [Ast0.wrap(Ast0.DParam $1)] }
-  | ident TComma define_param_list_start
-      { Ast0.wrap(Ast0.DParam $1)::
-       Ast0.wrap(Ast0.DPComma(P.clt2mcode "," $2))::$3 }
-  | d=TEllipsis r=list(dp_comma_args(TEllipsis))
-      { (P.mkdpdots "..." d)::
-       (List.concat (List.map (function x -> x (P.mkdpdots "...")) r)) }
-
-dp_comma_args(dotter):
-  c=TComma d=dotter
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.DPComma(P.clt2mcode "," c)); dot_builder d] }
-| TComma ident
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.DPComma(P.clt2mcode "," $1));
-       Ast0.wrap(Ast0.DParam $2)] }
-
-define_param_list_option: define_param_list { $1 }
-         | /* empty */     { Ast0.wrap(Ast0.DOTS([])) }
-
-/*****************************************************************************/
-
-funproto:
-  s=ioption(storage) t=ctype
-  id=func_ident lp=TOPar d=decl_list(name_opt_decl) rp=TCPar pt=TPtVirg
-      { Ast0.wrap
-         (Ast0.UnInit
-            (s,
-             Ast0.wrap
-               (Ast0.FunctionType(Some t,
-                                  P.clt2mcode "(" lp, d, P.clt2mcode ")" rp)),
-             id, P.clt2mcode ";" pt)) }
-| s=ioption(storage) t=Tvoid
-  id=func_ident lp=TOPar d=decl_list(name_opt_decl) rp=TCPar pt=TPtVirg
-    { let t = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
-      Ast0.wrap
-        (Ast0.UnInit
-          (s,
-           Ast0.wrap
-             (Ast0.FunctionType(Some t,
-                                P.clt2mcode "(" lp, d, P.clt2mcode ")" rp)),
-           id, P.clt2mcode ";" pt)) }
-
-
-fundecl:
-  f=fninfo
-  TFunDecl i=func_ident lp=TOPar d=decl_list(decl) rp=TCPar
-  lb=TOBrace b=fun_start rb=TCBrace
-      { Ast0.wrap(Ast0.FunDecl((Ast0.default_info(),Ast0.context_befaft()),
-                              f, i,
-                              P.clt2mcode "(" lp, d,
-                              P.clt2mcode ")" rp,
-                              P.clt2mcode "{" lb, b,
-                              P.clt2mcode "}" rb)) }
-
-fninfo:
-    /* empty */ { [] }
-  | storage  fninfo
-      { try
-       let _ =
-         List.find (function Ast0.FStorage(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate storage")
-      with Not_found -> (Ast0.FStorage($1))::$2 }
-  | t=fn_ctype r=fninfo_nt { (Ast0.FType(t))::r }
-  | Tinline  fninfo
-      { try
-       let _ = List.find (function Ast0.FInline(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate inline")
-      with Not_found -> (Ast0.FInline(P.clt2mcode "inline" $1))::$2 }
-  | Tattr    fninfo
-      { try
-       let _ = List.find (function Ast0.FAttr(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "multiple attributes")
-      with Not_found -> (Ast0.FAttr(P.id2mcode $1))::$2 }
-
-fninfo_nt:
-    /* empty */ { [] }
-  | storage  fninfo_nt
-      { try
-       let _ =
-         List.find (function Ast0.FStorage(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate storage")
-      with Not_found -> (Ast0.FStorage($1))::$2 }
-  | Tinline  fninfo_nt
-      { try
-       let _ = List.find (function Ast0.FInline(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate inline")
-      with Not_found -> (Ast0.FInline(P.clt2mcode "inline" $1))::$2 }
-  | Tattr    fninfo_nt
-      { try
-       let _ = List.find (function Ast0.FAttr(_) -> true | _ -> false) $2 in
-       raise (Semantic_cocci.Semantic "duplicate init")
-      with Not_found -> (Ast0.FAttr(P.id2mcode $1))::$2 }
-
-storage:
-         s=Tstatic      { P.clt2mcode Ast.Static s }
-       | s=Tauto        { P.clt2mcode Ast.Auto s }
-       | s=Tregister    { P.clt2mcode Ast.Register s }
-       | s=Textern      { P.clt2mcode Ast.Extern s }
-
-decl: t=ctype i=ident
-       { Ast0.wrap(Ast0.Param(t, Some i)) }
-    | t=fn_ctype lp=TOPar s=TMul i=ident rp=TCPar
-       lp1=TOPar d=decl_list(name_opt_decl) rp1=TCPar
-        { let fnptr =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp,P.clt2mcode "*" s,P.clt2mcode ")" rp,
-               P.clt2mcode "(" lp1,d,P.clt2mcode ")" rp1)) in
-       Ast0.wrap(Ast0.Param(fnptr, Some i)) }
-    | t=Tvoid
-       { let ty = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
-          Ast0.wrap(Ast0.VoidParam(ty)) }
-    | TMetaParam
-       { let (nm,pure,clt) = $1 in
-       Ast0.wrap(Ast0.MetaParam(P.clt2mcode nm clt,pure)) }
-
-name_opt_decl:
-      decl  { $1 }
-    | t=ctype { Ast0.wrap(Ast0.Param(t, None)) }
-    | t=fn_ctype lp=TOPar s=TMul rp=TCPar
-       lp1=TOPar d=decl_list(name_opt_decl) rp1=TCPar
-        { let fnptr =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp,P.clt2mcode "*" s,P.clt2mcode ")" rp,
-               P.clt2mcode "(" lp1,d,P.clt2mcode ")" rp1)) in
-       Ast0.wrap(Ast0.Param(fnptr, None)) }
-
-const_vol:
-      Tconst       { P.clt2mcode Ast.Const $1 }
-    | Tvolatile    { P.clt2mcode Ast.Volatile $1 }
-
-/*****************************************************************************/
-
-statement:
-  includes { $1 } /* shouldn't be allowed to be a single_statement... */
-| TMetaStm
-    { P.meta_stm $1 }
-| expr TPtVirg
-    { P.exp_stm $1 $2 }
-| TIf TOPar eexpr TCPar single_statement %prec TIf
-    { P.ifthen $1 $2 $3 $4 $5 }
-| TIf TOPar eexpr TCPar single_statement TElse single_statement
-    { P.ifthenelse $1 $2 $3 $4 $5 $6 $7 }
-| TFor TOPar option(eexpr) TPtVirg option(eexpr) TPtVirg
-    option(eexpr) TCPar single_statement
-    { P.forloop $1 $2 $3 $4 $5 $6 $7 $8 $9 }
-| TWhile TOPar eexpr TCPar single_statement
-    { P.whileloop $1 $2 $3 $4 $5 }
-| TDo single_statement TWhile TOPar eexpr TCPar TPtVirg
-    { P.doloop $1 $2 $3 $4 $5 $6 $7 }
-| iter_ident TOPar eexpr_list_option TCPar single_statement
-    { P.iterator $1 $2 $3 $4 $5 }
-| TSwitch TOPar eexpr TCPar TOBrace list(case_line) TCBrace
-    { P.switch $1 $2 $3 $4 $5 $6 $7 }
-| TReturn eexpr TPtVirg { P.ret_exp $1 $2 $3 }
-| TReturn TPtVirg { P.ret $1 $2 }
-| TBreak TPtVirg { P.break $1 $2 }
-| TContinue TPtVirg { P.cont $1 $2 }
-| ident TDotDot { P.label $1 $2 }
-| TGoto ident TPtVirg { P.goto $1 $2 $3 }
-| TOBrace fun_start TCBrace
-    { P.seq $1 $2 $3 }
-
-stm_dots:
-  TEllipsis w=list(whenppdecs)
-    { Ast0.wrap(Ast0.Dots(P.clt2mcode "..." $1, List.concat w)) }
-| TOEllipsis w=list(whenppdecs) b=nest_start c=TCEllipsis
-    { Ast0.wrap(Ast0.Nest(P.clt2mcode "<..." $1, b,
-                         P.clt2mcode "...>" c, List.concat w, false)) }
-| TPOEllipsis w=list(whenppdecs) b=nest_start c=TPCEllipsis
-    { Ast0.wrap(Ast0.Nest(P.clt2mcode "<+..." $1, b,
-                         P.clt2mcode "...+>" c, List.concat w, true)) }
-
-whenppdecs: w=whens(when_start,rule_elem_statement)
-    { w }
-
-/* a statement that fits into a single rule_elem.  should nests be included?
-what about statement metavariables? */
-rule_elem_statement:
-  one_decl_var
-    { Ast0.wrap(Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),$1)) }
-| expr TPtVirg { P.exp_stm $1 $2 }
-| TReturn eexpr TPtVirg { P.ret_exp $1 $2 $3 }
-| TReturn TPtVirg { P.ret $1 $2 }
-| TBreak TPtVirg { P.break $1 $2 }
-| TContinue TPtVirg { P.cont $1 $2 }
-| TOPar0 midzero_list(rule_elem_statement,rule_elem_statement) TCPar0
-    { let (mids,code) = $2 in
-    Ast0.wrap
-      (Ast0.Disj(P.clt2mcode "(" $1,
-                List.map (function x -> Ast0.wrap(Ast0.DOTS([x]))) code,
-                mids, P.clt2mcode ")" $3)) }
-
-/* a statement on its own */
-single_statement:
-    statement                         { $1 }
-  | TOPar0 midzero_list(statement,statement) TCPar0
-      /* degenerate case, elements are single statements and thus don't
-       contain dots */
-      { let (mids,code) = $2 in
-        Ast0.wrap
-         (Ast0.Disj(P.clt2mcode "(" $1,
-                    List.map (function x -> Ast0.wrap(Ast0.DOTS([x]))) code,
-                    mids, P.clt2mcode ")" $3)) }
-
-case_line:
-    TDefault TDotDot fun_start
-      { Ast0.wrap(Ast0.Default(P.clt2mcode "default" $1,P.clt2mcode ":" $2,$3)) }
-  | TCase eexpr TDotDot fun_start
-      { Ast0.wrap(Ast0.Case(P.clt2mcode "case" $1,$2,P.clt2mcode ":" $3,$4)) }
-
-/* In the following, an identifier as a type is not fully supported.  Indeed,
-the language is ambiguous: what is foo * bar; */
-/* The AST DisjDecl cannot be generated because it would be ambiguous with
-a disjunction on a statement with a declaration in each branch */
-decl_var:
-    t=ctype pv=TPtVirg
-      { [Ast0.wrap(Ast0.TyDecl(t,P.clt2mcode ";" pv))] }
-  | s=ioption(storage) t=ctype d=comma_list(d_ident) pv=TPtVirg
-      { List.map
-         (function (id,fn) ->
-           Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)))
-         d }
-  | f=funproto { [f] }
-  | s=ioption(storage) t=ctype d=d_ident q=TEq e=initialize pv=TPtVirg
-      {let (id,fn) = d in
-      [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))]}
-  /* type is a typedef name */
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident
-      d=comma_list(d_ident) pv=TPtVirg
-      { List.map
-         (function (id,fn) ->
-           let idtype =
-             P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-           Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)))
-         d }
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident d=d_ident q=TEq
-      e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-      !Data.add_type_name (P.id2name i);
-      let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-      [Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
-                          P.clt2mcode ";" pv))] }
-  /* function pointer type */
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-        [Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv))] }
-  | decl_ident TOPar eexpr_list_option TCPar TPtVirg
-      { [Ast0.wrap(Ast0.MacroDecl($1,P.clt2mcode "(" $2,$3,
-                                 P.clt2mcode ")" $4,P.clt2mcode ";" $5))] } 
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    q=TEq e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-      [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))]}
-  | s=Ttypedef t=ctype id=typedef_ident pv=TPtVirg
-      { let s = P.clt2mcode "typedef" s in
-        [Ast0.wrap(Ast0.Typedef(s,t,id,P.clt2mcode ";" pv))] }
-
-one_decl_var:
-    t=ctype pv=TPtVirg
-      { Ast0.wrap(Ast0.TyDecl(t,P.clt2mcode ";" pv)) }
-  | s=ioption(storage) t=ctype d=d_ident pv=TPtVirg
-      { let (id,fn) = d in
-        Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) }
-  | f=funproto { f }
-  | s=ioption(storage) t=ctype d=d_ident q=TEq e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-      Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv)) }
-  /* type is a typedef name */
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident
-      d=d_ident pv=TPtVirg
-      { let (id,fn) = d in
-        let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-       Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)) }
-  | s=ioption(storage) cv=ioption(const_vol) i=pure_ident d=d_ident q=TEq
-      e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-      !Data.add_type_name (P.id2name i);
-      let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
-      Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
-                          P.clt2mcode ";" pv)) }
-  /* function pointer type */
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-        Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) }
-  | decl_ident TOPar eexpr_list_option TCPar TPtVirg
-      { Ast0.wrap(Ast0.MacroDecl($1,P.clt2mcode "(" $2,$3,
-                                 P.clt2mcode ")" $4,P.clt2mcode ";" $5)) } 
-  | s=ioption(storage)
-    t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
-    lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
-    q=TEq e=initialize pv=TPtVirg
-      { let (id,fn) = d in
-        let t =
-         Ast0.wrap
-           (Ast0.FunctionPointer
-              (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
-               P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
-      Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))}
-
-
-d_ident:
-    ident list(array_dec)
-      { ($1,
-        function t ->
-          List.fold_right
-            (function (l,i,r) ->
-              function rest ->
-                Ast0.wrap
-                  (Ast0.Array(rest,P.clt2mcode "[" l,i,P.clt2mcode "]" r)))
-            $2 t) }
-
-array_dec: l=TOCro i=option(eexpr) r=TCCro { (l,i,r) }
-
-initialize:
-    eexpr
-      { Ast0.wrap(Ast0.InitExpr($1)) }
-  | TOBrace initialize_list TCBrace
-      { Ast0.wrap(Ast0.InitList(P.clt2mcode "{" $1,$2,P.clt2mcode "}" $3)) }
-  | TOBrace TCBrace
-      { Ast0.wrap
-         (Ast0.InitList(P.clt2mcode "{" $1,Ast0.wrap(Ast0.DOTS []),
-                        P.clt2mcode "}" $2)) }
-
-initialize2:
-  /*arithexpr and not eexpr because can have ambiguity with comma*/
-  /*dots and nests probably not allowed at top level, haven't looked into why*/
-  arith_expr(eexpr,invalid) { Ast0.wrap(Ast0.InitExpr($1)) }
-| TOBrace initialize_list TCBrace
-    { Ast0.wrap(Ast0.InitList(P.clt2mcode "{" $1,$2,P.clt2mcode "}" $3)) }
-| TOBrace TCBrace
-    { Ast0.wrap
-       (Ast0.InitList(P.clt2mcode "{" $1,Ast0.wrap(Ast0.DOTS []),
-                      P.clt2mcode "}" $2)) }
-           /* gccext:, labeled elements */
-| TDot ident TEq initialize2
-    { Ast0.wrap(Ast0.InitGccDotName(P.clt2mcode "." $1,$2,P.clt2mcode "=" $3,$4)) }
-| ident TDotDot initialize2
-    { Ast0.wrap(Ast0.InitGccName($1,P.clt2mcode ":" $2,$3)) } /* in old kernel */
-| TOCro eexpr TCCro TEq initialize2
-    { Ast0.wrap(Ast0.InitGccIndex(P.clt2mcode "[" $1,$2,P.clt2mcode "]" $3,
-                                 P.clt2mcode "=" $4,$5)) }
-| TOCro eexpr TEllipsis eexpr TCCro TEq initialize2
-    { Ast0.wrap(Ast0.InitGccRange(P.clt2mcode "[" $1,$2,P.clt2mcode "..." $3,
-                                 $4,P.clt2mcode "]" $5,P.clt2mcode "=" $6,$7)) }
-
-initialize_list:
-   initialize_list_start { Ast0.wrap(Ast0.DOTS($1)) }
-
-initialize_list_start:
-  initialize2 TComma { [$1;Ast0.wrap(Ast0.IComma(P.clt2mcode "," $2))] }
-| initialize2 TComma initialize_list_start
-    { $1::Ast0.wrap(Ast0.IComma(P.clt2mcode "," $2))::$3 }
-| d=edots_when(TEllipsis,initialize)
-      r=comma_initializers(edots_when(TEllipsis,initialize))
-    { (P.mkidots "..." d)::
-      (List.concat(List.map (function x -> x (P.mkidots "...")) r)) }
-
-comma_initializers(dotter):
-  /* empty */ { [] }
-| d=dotter r=comma_initializers2(dotter)
-      { (function dot_builder -> [dot_builder d])::r }
-| i=initialize2 c=TComma r=comma_initializers(dotter)
-    { (function dot_builder -> [i; Ast0.wrap(Ast0.IComma(P.clt2mcode "," c))])::
-      r }
-
-comma_initializers2(dotter):
-  /* empty */ { [] }
-| i=initialize2 c=TComma r=comma_initializers(dotter)
-    { (function dot_builder -> [i; Ast0.wrap(Ast0.IComma(P.clt2mcode "," c))])::
-      r }
-
-/* a statement that is part of a list */
-decl_statement:
-    TMetaStmList
-      { let (nm,pure,clt) = $1 in
-      [Ast0.wrap(Ast0.MetaStmt(P.clt2mcode nm clt,pure))] }
-  | decl_var
-      { List.map
-         (function x ->
-           Ast0.wrap
-             (Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),x)))
-         $1 }
-  | statement { [$1] }
-  /* this doesn't allow expressions at top level, because the parser doesn't
-       know whether there is one.  If there is one, this is not sequencible.
-       If there is not one, then it is.  It seems complicated to get around
-    this at the parser level.  We would have to have a check afterwards to
-    allow this.  One case where this would be useful is for a when.  Now
-       we allow a sequence of whens, so one can be on only statements and
-    one can be on only expressions. */
-  | TOPar0 t=midzero_list(fun_start,fun_start) TCPar0
-      { let (mids,code) = t in
-       if List.for_all
-           (function x ->
-             match Ast0.unwrap x with Ast0.DOTS([]) -> true | _ -> false)
-           code
-      then []
-      else
-         [Ast0.wrap(Ast0.Disj(P.clt2mcode "(" $1, code, mids,
-                              P.clt2mcode ")" $3))] }
-
-/* a statement that is part of a list */
-decl_statement_expr:
-    TMetaStmList
-      { let (nm,pure,clt) = $1 in
-      [Ast0.wrap(Ast0.MetaStmt(P.clt2mcode nm clt,pure))] }
-  | decl_var
-      { List.map
-         (function x ->
-           Ast0.wrap
-             (Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),x)))
-         $1 }
-  | statement { [$1] }
-  /* this doesn't allow expressions at top level, because the parser doesn't
-       know whether there is one.  If there is one, this is not sequencible.
-       If there is not one, then it is.  It seems complicated to get around
-    this at the parser level.  We would have to have a check afterwards to
-    allow this.  One case where this would be useful is for a when.  Now
-       we allow a sequence of whens, so one can be on only statements and
-    one can be on only expressions. */
-  | TOPar0 t=midzero_list(fun_after_stm,fun_after_dots_or) TCPar0
-      { let (mids,code) = t in
-       if List.for_all (function [] -> true | _ -> false) code
-      then []
-      else
-         let dot_code =
-           List.map (function x -> Ast0.wrap(Ast0.DOTS x)) code in
-         [Ast0.wrap(Ast0.Disj(P.clt2mcode "(" $1, dot_code, mids,
-                              P.clt2mcode ")" $3))] }
-
-/*****************************************************************************/
-
-/* The following cannot contain <... ...> at the top level.  This can only
-be allowed as an expression when the expression is delimited on both sides
-by expression-specific markers.  In that case, the rule eexpr is used, which
-allows <... ...> anywhere.  Hopefully, this will not be too much of a problem
-in practice. */
-expr:  basic_expr(expr,invalid) { $1 }
-/* allows ... and nests */
-eexpr: basic_expr(eexpr,dot_expressions) { $1 }
-/* allows nests but not .... */
-dexpr: basic_expr(eexpr,nest_expressions) { $1 }
-
-top_eexpr:
-  eexpr { Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp($1)))) }
-
-invalid:
-  TInvalid { raise (Semantic_cocci.Semantic "not matchable") }
-
-dot_expressions:
-  TEllipsis { Ast0.wrap(Ast0.Edots(P.clt2mcode "..." $1,None)) }
-| nest_expressions { $1 }
-
-nest_expressions:
-  TOEllipsis w=option(whenexp) e=expr_dots(TEllipsis) c=TCEllipsis
-    { Ast0.wrap(Ast0.NestExpr(P.clt2mcode "<..." $1,
-                             Ast0.wrap(Ast0.DOTS(e (P.mkedots "..."))),
-                             P.clt2mcode "...>" c, w, false)) }
-| TPOEllipsis w=option(whenexp) e=expr_dots(TEllipsis) c=TPCEllipsis
-    { Ast0.wrap(Ast0.NestExpr(P.clt2mcode "<+..." $1,
-                             Ast0.wrap(Ast0.DOTS(e (P.mkedots "..."))),
-                             P.clt2mcode "...+>" c, w, true)) }
-
-whenexp: TWhen TNotEq w=eexpr TLineEnd { w }
-
-basic_expr(recurser,primary_extra):
-  assign_expr(recurser,primary_extra)                        { $1 }
-
-assign_expr(r,pe):
-    cond_expr(r,pe)                        { $1 }
-  | unary_expr(r,pe) TAssign assign_expr_bis
-      { let (op,clt) = $2 in
-      Ast0.wrap(Ast0.Assignment($1,P.clt2mcode op clt,
-                               Ast0.set_arg_exp $3,false)) }
-  | unary_expr(r,pe) TEq assign_expr_bis
-      { Ast0.wrap
-         (Ast0.Assignment
-            ($1,P.clt2mcode Ast.SimpleAssign $2,Ast0.set_arg_exp $3,false)) }
-
-assign_expr_bis:
-    cond_expr(eexpr,dot_expressions)                        { $1 }
-  | unary_expr(eexpr,dot_expressions) TAssign assign_expr_bis
-      { let (op,clt) = $2 in
-      Ast0.wrap(Ast0.Assignment($1,P.clt2mcode op clt,
-                               Ast0.set_arg_exp $3,false)) }
-  | unary_expr(eexpr,dot_expressions) TEq assign_expr_bis
-      { Ast0.wrap
-         (Ast0.Assignment
-            ($1,P.clt2mcode Ast.SimpleAssign $2,Ast0.set_arg_exp $3,false)) }
-
-cond_expr(r,pe):
-    arith_expr(r,pe)                         { $1 }
-  | l=arith_expr(r,pe) w=TWhy t=option(eexpr) dd=TDotDot r=cond_expr(r,pe)
-      { Ast0.wrap(Ast0.CondExpr (l, P.clt2mcode "?" w, t,
-                                P.clt2mcode ":" dd, r)) }
-
-arith_expr(r,pe):
-    cast_expr(r,pe)                         { $1 }
-  | arith_expr(r,pe) TMul    arith_expr(r,pe)
-      { P.arith_op Ast.Mul $1 $2 $3 }
-  | arith_expr(r,pe) TDmOp    arith_expr(r,pe)
-      { let (op,clt) = $2 in P.arith_op op $1 clt $3 }
-  | arith_expr(r,pe) TPlus   arith_expr(r,pe)
-      { P.arith_op Ast.Plus $1 $2 $3 }
-  | arith_expr(r,pe) TMinus  arith_expr(r,pe)
-      { P.arith_op Ast.Minus $1 $2 $3 }
-  | arith_expr(r,pe) TShOp    arith_expr(r,pe)
-      { let (op,clt) = $2 in P.arith_op op $1 clt $3 }
-  | arith_expr(r,pe) TLogOp    arith_expr(r,pe)
-      { let (op,clt) = $2 in P.logic_op op $1 clt $3 }
-  | arith_expr(r,pe) TEqEq   arith_expr(r,pe)
-      { P.logic_op Ast.Eq $1 $2 $3 }
-  | arith_expr(r,pe) TNotEq  arith_expr(r,pe)
-      { P.logic_op Ast.NotEq $1 $2 $3 }
-  | arith_expr(r,pe) TAnd    arith_expr(r,pe)
-      { P.arith_op Ast.And $1 $2 $3 }
-  | arith_expr(r,pe) TOr     arith_expr(r,pe)
-      { P.arith_op Ast.Or $1 $2 $3 }
-  | arith_expr(r,pe) TXor    arith_expr(r,pe)
-      { P.arith_op Ast.Xor $1 $2 $3 }
-  | arith_expr(r,pe) TAndLog arith_expr(r,pe)
-      { P.logic_op Ast.AndLog $1 $2 $3 }
-  | arith_expr(r,pe) TOrLog  arith_expr(r,pe)
-      { P.logic_op Ast.OrLog $1 $2 $3 }
-
-cast_expr(r,pe):
-    unary_expr(r,pe)                      { $1 }
-  | lp=TOPar t=ctype rp=TCPar e=cast_expr(r,pe)
-      { Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, t,
-                            P.clt2mcode ")" rp, e)) }
-
-unary_expr(r,pe):
-    postfix_expr(r,pe)                   { $1 }
-  | TInc unary_expr(r,pe)
-      { Ast0.wrap(Ast0.Infix ($2, P.clt2mcode Ast.Inc $1)) }
-  | TDec unary_expr(r,pe)
-      { Ast0.wrap(Ast0.Infix ($2, P.clt2mcode Ast.Dec $1)) }
-  | unary_op unary_expr(r,pe)
-      { let mcode = $1 in Ast0.wrap(Ast0.Unary($2, mcode)) }
-  | TBang unary_expr(r,pe)
-      { let mcode = P.clt2mcode Ast.Not $1 in
-      Ast0.wrap(Ast0.Unary($2, mcode)) }
-  | TSizeof unary_expr(r,pe)
-      { Ast0.wrap(Ast0.SizeOfExpr (P.clt2mcode "sizeof" $1, $2)) }
-  | s=TSizeof lp=TOPar t=ctype rp=TCPar
-      { Ast0.wrap(Ast0.SizeOfType (P.clt2mcode "sizeof" s,
-                                   P.clt2mcode "(" lp,t,
-                                   P.clt2mcode ")" rp)) }
-
-unary_op: TAnd    { P.clt2mcode Ast.GetRef $1 }
-       | TMul    { P.clt2mcode Ast.DeRef $1 }
-       | TPlus   { P.clt2mcode Ast.UnPlus $1 }
-       | TMinus  { P.clt2mcode Ast.UnMinus $1 }
-       | TTilde  { P.clt2mcode Ast.Tilde $1 }
-
-postfix_expr(r,pe):
-   primary_expr(r,pe)                            { $1 }
- | postfix_expr(r,pe) TOCro eexpr TCCro
-     { Ast0.wrap(Ast0.ArrayAccess ($1,P.clt2mcode "[" $2,$3,
-                                      P.clt2mcode "]" $4)) }
- | postfix_expr(r,pe) TDot   ident
-     { Ast0.wrap(Ast0.RecordAccess($1, P.clt2mcode "." $2, $3)) }
- | postfix_expr(r,pe) TPtrOp ident
-     { Ast0.wrap(Ast0.RecordPtAccess($1, P.clt2mcode "->" $2,
-                                    $3)) }
- | postfix_expr(r,pe) TInc
-     { Ast0.wrap(Ast0.Postfix ($1, P.clt2mcode Ast.Inc $2)) }
- | postfix_expr(r,pe) TDec
-     { Ast0.wrap(Ast0.Postfix ($1, P.clt2mcode Ast.Dec $2)) }
- | postfix_expr(r,pe) TOPar eexpr_list_option TCPar
-     { Ast0.wrap(Ast0.FunCall($1,P.clt2mcode "(" $2,
-                             $3,
-                             P.clt2mcode ")" $4)) }
-
-primary_expr(recurser,primary_extra):
-   func_ident   { Ast0.wrap(Ast0.Ident($1)) }
- | TInt
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) }
- | TFloat
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Float x) clt)) }
- | TString
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.String x) clt)) }
- | TChar
-     { let (x,clt) = $1 in
-     Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Char x) clt)) }
- | TMetaConst
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.CONST,pure)) }
- | TMetaErr
-     { let (nm,constraints,pure,clt) = $1 in
-     Ast0.wrap(Ast0.MetaErr(P.clt2mcode nm clt,constraints,pure)) }
- | TMetaExp
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ANY,pure)) }
- | TMetaIdExp
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ID,pure)) }
- | TMetaLocalIdExp
-     { let (nm,constraints,pure,ty,clt) = $1 in
-     Ast0.wrap
-       (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.LocalID,pure)) }
- | TOPar eexpr TCPar
-     { Ast0.wrap(Ast0.Paren(P.clt2mcode "(" $1,$2,
-                           P.clt2mcode ")" $3)) }
- | TOPar0 midzero_list(recurser,eexpr) TCPar0
-     { let (mids,code) = $2 in
-       Ast0.wrap(Ast0.DisjExpr(P.clt2mcode "(" $1,
-                              code, mids,
-                              P.clt2mcode ")" $3)) }
- | primary_extra { $1 }
-
-expr_dots(dotter):
-    r=no_dot_start_end(dexpr,edots_when(dotter,eexpr)) { r }
-
-// used in NEST
-no_dot_start_end(grammar,dotter):
-  g=grammar dg=list(pair(dotter,grammar))
-  { function dot_builder ->
-      g :: (List.concat(List.map (function (d,g) -> [dot_builder d;g]) dg)) }
-
-/*****************************************************************************/
-
-pure_ident:
-     TIdent { $1 }
-
-meta_ident:
-       TRuleName TDot pure_ident { (Some $1,P.id2name $3) }
-
-pure_ident_or_meta_ident:
-       pure_ident                { (None,P.id2name $1) }
-     | meta_ident                { $1 }
-     | Tlist                     { (None,"list") }
-     | TError                    { (None,"error") }
-     | TType                     { (None,"type") }
-
-pure_ident_or_meta_ident_with_not_eq(not_eq):
-       i=pure_ident_or_meta_ident l=loption(not_eq) { (i,l) }
-
-not_eq:
-       TNotEq i=pure_ident
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          [Ast0.wrap(Ast0.Id(P.id2mcode i))] }
-     | TNotEq TOBrace l=comma_list(pure_ident) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          List.map (function i -> Ast0.wrap(Ast0.Id(P.id2mcode i))) l }
-
-not_eqe:
-       TNotEq i=pure_ident
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          [Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i))))] }
-     | TNotEq TOBrace l=comma_list(pure_ident) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          List.map
-            (function i ->
-              Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i)))))
-            l }
-
-not_ceq:
-       TNotEq i=ident_or_const
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          [i] }
-     | TNotEq TOBrace l=comma_list(ident_or_const) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          l }
-
-ident_or_const:
-       i=pure_ident { Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i)))) }
-     | TInt
-        { let (x,clt) = $1 in
-        Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) }
-
-not_pos:
-       TNotEq i=meta_ident
-         { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          match i with
-            (None,_) -> failwith "constraint must be an inherited variable"
-          | (Some rule,name) ->
-              let i = (rule,name) in
-              P.check_meta(Ast.MetaPosDecl(Ast.NONE,i));
-              [i] }
-     | TNotEq TOBrace l=comma_list(meta_ident) TCBrace
-        { (if !Data.in_iso
-          then failwith "constraints not allowed in iso file");
-          List.map
-            (function
-                (None,_) ->
-                  failwith "constraint must be an inherited variable"
-              | (Some rule,name) ->
-                  let i = (rule,name) in
-                  P.check_meta(Ast.MetaPosDecl(Ast.NONE,i));
-                  i)
-            l }
-
-func_ident: pure_ident
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaId
-         { let (nm,constraints,pure,clt) = $1 in
-        Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-     | TMetaFunc
-         { let (nm,constraints,pure,clt) = $1 in
-        Ast0.wrap(Ast0.MetaFunc(P.clt2mcode nm clt,constraints,pure)) }
-     | TMetaLocalFunc
-        { let (nm,constraints,pure,clt) = $1 in
-        Ast0.wrap
-          (Ast0.MetaLocalFunc(P.clt2mcode nm clt,constraints,pure)) }
-
-ident: pure_ident
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaId
-         { let (nm,constraints,pure,clt) = $1 in
-         Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-
-decl_ident:
-       TDeclarerId
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaDeclarer
-         { let (nm,constraints,pure,clt) = $1 in
-         Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-
-iter_ident:
-       TIteratorId
-         { Ast0.wrap(Ast0.Id(P.id2mcode $1)) }
-     | TMetaIterator
-         { let (nm,constraints,pure,clt) = $1 in
-         Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) }
-
-typedef_ident:
-       pure_ident
-         { Ast0.wrap(Ast0.TypeName(P.id2mcode $1)) }
-     | TMetaType
-         { let (nm,pure,clt) = $1 in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) }
-
-/*****************************************************************************/
-
-decl_list(decl):
-   decl_list_start(decl)
-     {let circle x =
-       match Ast0.unwrap x with Ast0.Pcircles(_) -> true | _ -> false in
-     if List.exists circle $1
-     then Ast0.wrap(Ast0.CIRCLES($1))
-     else Ast0.wrap(Ast0.DOTS($1)) }
-
-decl_list_start(decl):
-  one_dec(decl)  { [$1] }
-| one_dec(decl) TComma decl_list_start(decl)
-    { $1::Ast0.wrap(Ast0.PComma(P.clt2mcode "," $2))::$3 }
-| TEllipsis list(comma_decls(TEllipsis,decl))
-    { Ast0.wrap(Ast0.Pdots(P.clt2mcode "..." $1))::
-      (List.concat(List.map (function x -> x (P.mkpdots "...")) $2)) }
-
-one_dec(decl):
-  decl  { $1 }
-| TMetaParamList
-    { let (nm,lenname,pure,clt) = $1 in
-    let nm = P.clt2mcode nm clt in
-    let lenname =
-      match lenname with
-       Some nm -> Some(P.clt2mcode nm clt)
-      | None -> None in
-    Ast0.wrap(Ast0.MetaParamList(nm,lenname,pure)) }
-comma_decls(dotter,decl):
-  TComma dotter
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.PComma(P.clt2mcode "," $1));
-       dot_builder $2] }
-| TComma one_dec(decl)
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.PComma(P.clt2mcode "," $1)); $2] }
-
-/* ---------------------------------------------------------------------- */
-
-error_words:
-    TError TWords TEq TOCro cl=comma_list(dexpr) TCCro
-      { [Ast0.wrap(Ast0.ERRORWORDS(cl))] }
-
-/* ---------------------------------------------------------------------- */
-/* sequences of statements and expressions */
-
-/* There are number of cases that must be considered:
-
-1. Top level:
-   Dots and nests allowed at the beginning or end
-   Expressions allowed at the beginning or end
-   One function allowed, by itself
-2. A function body:
-   Dots and nests allowed at the beginning or end
-   Expressions not allowed at the beginning or end
-   Functions not allowed
-3. The body of a nest:
-   Dots and nests not allowed at the beginning or end
-   Expressions allowed at the beginning or end
-   Functions not allowed
-4. Whencode:
-   Dots and nests not allowed at the beginning but allowed at the end
-   Expressions allowed at the beginning or end
-   Functions not allowed
-
-These are implemented by the rules minus_toplevel_sequence,
-plus_toplevel_sequence, function_body_sequence, nest_body_sequence, and
-when_body_sequence.
-*/
-/* ------------------------------------------------------------------------ */
-/* Minus top level */
-
-/* doesn't allow only ... */
-minus_start:
-  fundecl                { [Ast0.wrap(Ast0.DECL($1))] }
-| ctype                  { [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Ty($1))))] }
-| top_init          { [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.TopInit($1))))] }
-| toplevel_seq_start(toplevel_after_dots_init)
-    { List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1 }
-
-toplevel_seq_start(after_dots_init):
-  stm_dots after_dots_init           { $1::$2 }
-| expr toplevel_after_exp            { (Ast0.wrap(Ast0.Exp($1)))::$2 }
-| decl_statement_expr toplevel_after_stm  { $1@$2 }
-
-toplevel_after_dots_init:
-  TNothing toplevel_after_exp        {$2}
-| expr toplevel_after_exp            {(Ast0.wrap(Ast0.Exp($1)))::$2}
-| decl_statement_expr toplevel_after_stm  {$1@$2}
-
-toplevel_after_exp:
-  /* empty */                        {[]}
-| stm_dots toplevel_after_dots       {$1::$2}
-
-toplevel_after_dots:
-  /* empty */                        {[]}
-| TNothing toplevel_after_exp        {$2}
-| expr toplevel_after_exp            {(Ast0.wrap(Ast0.Exp($1)))::$2}
-| decl_statement_expr toplevel_after_stm  {$1@$2}
-
-toplevel_after_stm:
-  /* empty */                        {[]}
-| stm_dots toplevel_after_dots       {$1::$2}
-| decl_statement toplevel_after_stm  {$1@$2}
-
-top_init:
-  TOInit initialize_list TCBrace
-    { Ast0.wrap(Ast0.InitList(P.clt2mcode "{" $1,$2,P.clt2mcode "}" $3)) }
-
-/* ------------------------------------------------------------------------ */
-/* Plus top level */
-
-/* does allow only ... also allows multiple top-level functions */
-plus_start:
-  ctype                   { [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Ty($1))))] }
-| top_init           { [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.TopInit($1))))] }
-| stm_dots plus_after_dots
-                                          { (Ast0.wrap(Ast0.OTHER($1)))::$2 }
-| expr plus_after_exp
-                     { (Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp($1)))))::$2 }
-| fundecl plus_after_stm                     { Ast0.wrap(Ast0.DECL($1))::$2 }
-| decl_statement_expr plus_after_stm
-                { (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1)@$2 }
-
-plus_after_exp:
-  /* empty */                                                            {[]}
-| stm_dots plus_after_dots                { (Ast0.wrap(Ast0.OTHER($1)))::$2 }
-
-plus_after_dots:
-  /* empty */                                                            {[]}
-| TNothing plus_after_exp                                                {$2}
-| expr plus_after_exp
-                     { (Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp($1)))))::$2 }
-| fundecl plus_after_stm                     { Ast0.wrap(Ast0.DECL($1))::$2 }
-| decl_statement_expr plus_after_stm
-                { (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1)@$2 }
-
-plus_after_stm:
-  /* empty */                                                            {[]}
-| stm_dots plus_after_dots                { (Ast0.wrap(Ast0.OTHER($1)))::$2 }
-| fundecl plus_after_stm                     { Ast0.wrap(Ast0.DECL($1))::$2 }
-| decl_statement plus_after_stm
-                { (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1)@$2 }
-
-/* ------------------------------------------------------------------------ */
-/* Function body */
-
-fun_start:
-  fun_after_stm  { Ast0.wrap(Ast0.DOTS($1)) }
-
-fun_after_stm:
-  /* empty */                  {[]}
-| stm_dots fun_after_dots      {$1::$2}
-| decl_statement fun_after_stm {$1@$2}
-
-fun_after_dots:
-  /* empty */                  {[]}
-| TNothing fun_after_exp       {$2}
-| expr fun_after_exp           {Ast0.wrap(Ast0.Exp($1))::$2}
-| decl_statement_expr fun_after_stm {$1@$2}
-
-fun_after_exp:
-  stm_dots fun_after_dots      {$1::$2}
-
-/* hack to allow mixing statements and expressions in an or */
-fun_after_dots_or:
-  /* empty */                  {[]}
-| TNothing fun_after_exp_or    {$2}
-| expr fun_after_exp_or        {Ast0.wrap(Ast0.Exp($1))::$2}
-| decl_statement_expr fun_after_stm {$1@$2}
-
-fun_after_exp_or:
-  /* empty */                  {[]}
-| stm_dots fun_after_dots      {$1::$2}
-
-/* ------------------------------------------------------------------------ */
-/* Nest body */
-
-nest_start:
-  nest_after_dots  { Ast0.wrap(Ast0.DOTS($1)) }
-
-nest_after_dots:
-  decl_statement_expr nest_after_stm {$1@$2}
-| TNothing nest_after_exp       {$2}
-| expr nest_after_exp           {(Ast0.wrap(Ast0.Exp($1)))::$2}
-
-nest_after_stm:
-  /* empty */                   {[]}
-| stm_dots nest_after_dots      {$1::$2}
-| decl_statement nest_after_stm {$1@$2}
-
-nest_after_exp:
-  /* empty */                   {[]}
-| stm_dots nest_after_dots      {$1::$2}
-
-/* ------------------------------------------------------------------------ */
-/*Whencode*/
-
-when_start:
-  expr toplevel_after_exp
-    { Ast0.wrap(Ast0.DOTS((Ast0.wrap(Ast0.Exp($1)))::$2)) }
-| decl_statement toplevel_after_stm
-    { Ast0.wrap(Ast0.DOTS($1@$2)) }
-
-/* ---------------------------------------------------------------------- */
-
-eexpr_list:
-  eexpr_list_start
-     {let circle x =
-       match Ast0.unwrap x with Ast0.Ecircles(_) -> true | _ -> false in
-     let star x =
-       match Ast0.unwrap x with Ast0.Estars(_) -> true | _ -> false in
-     if List.exists circle $1
-     then Ast0.wrap(Ast0.CIRCLES($1))
-     else
-       if List.exists star $1
-       then Ast0.wrap(Ast0.STARS($1))
-       else Ast0.wrap(Ast0.DOTS($1)) }
-
-/* arg expr.  may contain a type or a explist metavariable */
-aexpr:
-    eexpr
-      { Ast0.set_arg_exp $1 }
-  | TMetaExpList
-      { let (nm,lenname,pure,clt) = $1 in
-      let nm = P.clt2mcode nm clt in
-      let lenname =
-       match lenname with
-         Some nm -> Some(P.clt2mcode nm clt)
-       | None -> None in
-      Ast0.wrap(Ast0.MetaExprList(nm,lenname,pure)) }
-  | ctype
-      { Ast0.set_arg_exp(Ast0.wrap(Ast0.TypeExp($1))) }
-
-eexpr_list_start:
-    aexpr { [$1] }
-  | aexpr TComma eexpr_list_start
-      { $1::Ast0.wrap(Ast0.EComma(P.clt2mcode "," $2))::$3 }
-
-comma_args(dotter):
-  c=TComma d=dotter
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.EComma(P.clt2mcode "," c)); dot_builder d] }
-| TComma aexpr
-    { function dot_builder ->
-      [Ast0.wrap(Ast0.EComma(P.clt2mcode "," $1)); $2] }
-
-eexpr_list_option: eexpr_list { $1 }
-         | /* empty */     { Ast0.wrap(Ast0.DOTS([])) }
-
-/****************************************************************************/
-
-// non-empty lists - drop separator
-comma_list(elem):
-  separated_nonempty_list(TComma,elem) { $1 }
-
-midzero_list(elem,aft):
-  a=elem b=list(mzl(aft))
-     { let (mids,code) = List.split b in (mids,(a::code)) }
-
-mzl(elem):
-  a=TMid0 b=elem { (P.clt2mcode "|" a, b) }
-
-edots_when(dotter,when_grammar):
-    d=dotter                                      { (d,None) }
-  | d=dotter TWhen TNotEq w=when_grammar TLineEnd { (d,Some w) }
-
-whens(when_grammar,simple_when_grammar):
-    TWhen TNotEq w=when_grammar TLineEnd { [Ast0.WhenNot w] }
-  | TWhen TEq w=simple_when_grammar TLineEnd { [Ast0.WhenAlways w] }
-  | TWhen comma_list(any_strict) TLineEnd
-      { List.map (function x -> Ast0.WhenModifier(x)) $2 }
-  | TWhenTrue TNotEq e = eexpr TLineEnd { [Ast0.WhenNotTrue e] }
-  | TWhenFalse TNotEq e = eexpr TLineEnd { [Ast0.WhenNotFalse e] }
-
-any_strict:
-    TAny    { Ast.WhenAny }
-  | TStrict { Ast.WhenStrict }
-  | TForall { Ast.WhenForall }
-  | TExists { Ast.WhenExists }
-
-/*****************************************************************************
-*
-*
-*****************************************************************************/
-
-iso_main:
-  TIsoExpression e1=dexpr el=list(iso(dexpr)) EOF
-    { P.iso_adjust (function x -> Ast0.ExprTag x) e1 el }
-| TIsoArgExpression e1=dexpr el=list(iso(dexpr)) EOF
-    { P.iso_adjust (function x -> Ast0.ArgExprTag x) e1 el }
-| TIsoTestExpression e1=dexpr el=list(iso(dexpr)) EOF
-    { P.iso_adjust (function x -> Ast0.TestExprTag x) e1 el }
-| TIsoStatement s1=single_statement sl=list(iso(single_statement)) EOF
-    { P.iso_adjust (function x -> Ast0.StmtTag x) s1 sl }
-| TIsoType t1=ctype tl=list(iso(ctype)) EOF
-    { P.iso_adjust (function x -> Ast0.TypeCTag x) t1 tl }
-| TIsoTopLevel e1=nest_start el=list(iso(nest_start)) EOF
-    { P.iso_adjust (function x -> Ast0.DotsStmtTag x) e1 el }
-| TIsoDeclaration d1=decl_var dl=list(iso(decl_var)) EOF
-    { let check_one = function
-       [x] -> x
-      | _ ->
-         raise
-           (Semantic_cocci.Semantic
-              "only one variable per declaration in an isomorphism rule") in
-    let d1 = check_one d1 in
-    let dl =
-      List.map
-       (function
-           Common.Left x -> Common.Left(check_one x)
-         | Common.Right x -> Common.Right(check_one x))
-       dl in
-    P.iso_adjust (function x -> Ast0.DeclTag x) d1 dl }
-
-iso(term):
-    TIso t=term { Common.Left t }
-  | TRightIso t=term { Common.Right t }
-
-/*****************************************************************************
-*
-*
-*****************************************************************************/
-
-never_used: TPragma { () }
-  | TPArob TMetaPos { () }
-  | TScriptData     { () }
-
-script_meta_main: py=pure_ident TShOp TRuleName TDot cocci=pure_ident TMPtVirg
-  { (P.id2name py, ($3, P.id2name cocci)) }
diff --git a/parsing_cocci/.#pretty_print_cocci.ml.1.127 b/parsing_cocci/.#pretty_print_cocci.ml.1.127
deleted file mode 100644 (file)
index 308a25e..0000000
+++ /dev/null
@@ -1,855 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-open Format
-module Ast = Ast_cocci
-
-let print_plus_flag = ref true
-let print_minus_flag = ref true
-let print_newlines_disj = ref true
-
-let start_block str =
-  force_newline(); print_string "  "; open_box 0
-
-let end_block str =
-  close_box(); force_newline ()
-
-let print_string_box s = print_string s; open_box 0
-
-
-let print_option = Common.do_option
-let print_between = Common.print_between
-
-(* --------------------------------------------------------------------- *)
-(* Modified code *)
-
-(* avoid polyvariance problems *)
-let anything : (Ast.anything -> unit) ref = ref (function _ -> ())
-
-let rec print_anything str = function
-    [] -> ()
-  | stream ->
-      start_block();
-      print_between force_newline
-       (function x ->
-         print_string str; open_box 0; print_anything_list x; close_box())
-       stream;
-      end_block()
-
-and print_anything_list = function
-    [] -> ()
-  | [x] -> !anything x
-  | bef::((aft::_) as rest) ->
-      !anything bef;
-      let space =
-       (match bef with
-         Ast.Rule_elemTag(_) | Ast.AssignOpTag(_) | Ast.BinaryOpTag(_)
-       | Ast.ArithOpTag(_) | Ast.LogicalOpTag(_)
-       | Ast.Token("if",_) | Ast.Token("while",_) -> true | _ -> false) or
-       (match aft with
-         Ast.Rule_elemTag(_) | Ast.AssignOpTag(_) | Ast.BinaryOpTag(_)
-       | Ast.ArithOpTag(_) | Ast.LogicalOpTag(_) | Ast.Token("{",_) -> true
-       | _ -> false) in
-      if space then print_string " ";
-      print_anything_list rest
-
-let print_around printer term = function
-    Ast.NOTHING -> printer term
-  | Ast.BEFORE(bef) -> print_anything "<<< " bef; printer term
-  | Ast.AFTER(aft) -> printer term; print_anything ">>> " aft
-  | Ast.BEFOREAFTER(bef,aft) ->
-      print_anything "<<< " bef; printer term; print_anything ">>> " aft
-
-let print_string_befaft fn x info =
-  List.iter (function s -> print_string s; force_newline())
-    info.Ast.strbef;
-  fn x;
-  List.iter (function s -> force_newline(); print_string s)
-    info.Ast.straft
-
-let print_meta (r,x) = print_string r; print_string ":"; print_string x
-
-let print_pos = function
-    Ast.MetaPos(name,_,_,_,_) ->
-      let name = Ast.unwrap_mcode name in
-      print_string "@"; print_meta name
-  | _ -> ()
-
-let mcode fn = function
-    (x, _, Ast.MINUS(_,plus_stream), pos) ->
-      if !print_minus_flag
-      then print_string (if !Flag.sgrep_mode2 then "*" else "-");
-      fn x; print_pos pos;
-      if !print_plus_flag 
-      then print_anything ">>> " plus_stream
-  | (x, _, Ast.CONTEXT(_,plus_streams), pos) -> 
-      if !print_plus_flag
-      then
-       let fn x = fn x; print_pos pos in
-       print_around fn x plus_streams
-      else (fn x; print_pos pos)
-  | (x, info, Ast.PLUS, pos) ->
-      let fn x = fn x; print_pos pos in
-      print_string_befaft fn x info
-
-let print_mcodekind = function 
-    Ast.MINUS(_,plus_stream) ->
-      print_string "MINUS";
-      print_anything ">>> " plus_stream
-  | Ast.CONTEXT(_,plus_streams) ->
-      print_around (function _ -> print_string "CONTEXT") () plus_streams
-  | Ast.PLUS -> print_string "PLUS"
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-let dots between fn d =
-  match Ast.unwrap d with
-    Ast.DOTS(l) -> print_between between fn l
-  | Ast.CIRCLES(l) -> print_between between fn l
-  | Ast.STARS(l) -> print_between between fn l
-
-let nest_dots multi fn f d =
-  let mo s = if multi then "<+"^s else "<"^s in
-  let mc s = if multi then s^"+>" else s^">" in
-  match Ast.unwrap d with
-    Ast.DOTS(l) ->
-      print_string (mo "..."); f(); start_block();
-      print_between force_newline fn l;
-      end_block(); print_string (mc "...")
-  | Ast.CIRCLES(l) ->
-      print_string (mo "ooo"); f(); start_block();
-      print_between force_newline fn l;
-      end_block(); print_string (mc "ooo")
-  | Ast.STARS(l) ->
-      print_string (mo "***"); f(); start_block();
-      print_between force_newline fn l;
-      end_block(); print_string (mc "***")
-
-(* --------------------------------------------------------------------- *)
-
-let print_type keep info = function
-    None -> ()
-       (* print_string "/* ";
-           print_string "keep:"; print_unitary keep;
-           print_string " inherited:"; print_bool inherited;
-           print_string " */"*)
-  | Some ty -> ()
-      (*;
-      print_string "/* ";
-      print_between (function _ -> print_string ", ") Type_cocci.typeC ty;(*
-      print_string "keep:"; print_unitary keep;
-      print_string " inherited:"; print_bool inherited;*)
-      print_string " */"*)
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-let rec ident i =
-  match Ast.unwrap i with
-    Ast.Id(name) -> mcode print_string name
-  | Ast.MetaId(name,_,keep,inherited) -> mcode print_meta name
-  | Ast.MetaFunc(name,_,_,_) -> mcode print_meta name
-  | Ast.MetaLocalFunc(name,_,_,_) -> mcode print_meta name
-  | Ast.OptIdent(id) -> print_string "?"; ident id
-  | Ast.UniqueIdent(id) -> print_string "!"; ident id
-
-and print_unitary = function
-    Type_cocci.Unitary -> print_string "unitary"
-  | Type_cocci.Nonunitary -> print_string "nonunitary"
-  | Type_cocci.Saved -> print_string "saved"
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let print_disj_list fn l =
-  if !print_newlines_disj
-  then (force_newline(); print_string "("; force_newline())
-  else print_string "(";
-  print_between
-    (function _ ->
-      if !print_newlines_disj
-      then (force_newline(); print_string "|"; force_newline())
-      else print_string " | ")
-    fn l;
-  if !print_newlines_disj
-  then (force_newline(); print_string ")"; force_newline())
-  else print_string ")"
-
-let rec expression e =
-  match Ast.unwrap e with
-    Ast.Ident(id) -> ident id
-  | Ast.Constant(const) -> mcode constant const
-  | Ast.FunCall(fn,lp,args,rp) ->
-      expression fn; mcode print_string_box lp;
-      dots (function _ -> ()) expression args;
-      close_box(); mcode print_string rp
-  | Ast.Assignment(left,op,right,simple) ->
-      expression left; print_string " "; mcode assignOp op;
-      print_string " "; expression right
-  | Ast.CondExpr(exp1,why,exp2,colon,exp3) ->
-      expression exp1; print_string " "; mcode print_string why;
-      print_option (function e -> print_string " "; expression e) exp2;
-      print_string " "; mcode print_string colon; expression exp3
-  | Ast.Postfix(exp,op) -> expression exp; mcode fixOp op
-  | Ast.Infix(exp,op) -> mcode fixOp op; expression exp
-  | Ast.Unary(exp,op) -> mcode unaryOp op; expression exp
-  | Ast.Binary(left,op,right) ->
-      expression left; print_string " "; mcode binaryOp op; print_string " ";
-      expression right
-  | Ast.Nested(left,op,right) ->
-      expression left; print_string " "; mcode binaryOp op; print_string " ";
-      expression right
-  | Ast.Paren(lp,exp,rp) ->
-      mcode print_string_box lp; expression exp; close_box();
-      mcode print_string rp
-  | Ast.ArrayAccess(exp1,lb,exp2,rb) ->
-      expression exp1; mcode print_string_box lb; expression exp2; close_box();
-      mcode print_string rb
-  | Ast.RecordAccess(exp,pt,field) ->
-      expression exp; mcode print_string pt; ident field
-  | Ast.RecordPtAccess(exp,ar,field) ->
-      expression exp; mcode print_string ar; ident field
-  | Ast.Cast(lp,ty,rp,exp) ->
-      mcode print_string_box lp; fullType ty; close_box();
-      mcode print_string rp; expression exp
-  | Ast.SizeOfExpr(sizeof,exp) ->
-      mcode print_string sizeof; expression exp
-  | Ast.SizeOfType(sizeof,lp,ty,rp) ->
-      mcode print_string sizeof;
-      mcode print_string_box lp; fullType ty; close_box();
-      mcode print_string rp
-  | Ast.TypeExp(ty) -> fullType ty
-
-  | Ast.MetaErr(name,_,_,_) -> mcode print_meta name
-  | Ast.MetaExpr(name,_,keep,ty,form,inherited) ->
-      mcode print_meta name; print_type keep inherited ty
-  | Ast.MetaExprList(name,_,_,_) -> mcode print_meta name
-  | Ast.EComma(cm) -> mcode print_string cm; print_space()
-  | Ast.DisjExpr(exp_list) -> print_disj_list expression exp_list
-  | Ast.NestExpr(expr_dots,Some whencode,multi) ->
-      nest_dots multi expression
-       (function _ -> print_string "   when != "; expression whencode)
-       expr_dots
-  | Ast.NestExpr(expr_dots,None,multi) ->
-      nest_dots multi expression (function _ -> ()) expr_dots
-  | Ast.Edots(dots,Some whencode)
-  | Ast.Ecircles(dots,Some whencode)
-  | Ast.Estars(dots,Some whencode) ->
-      mcode print_string dots; print_string "   when != "; expression whencode
-  | Ast.Edots(dots,None)
-  | Ast.Ecircles(dots,None)
-  | Ast.Estars(dots,None) -> mcode print_string dots
-  | Ast.OptExp(exp) -> print_string "?"; expression exp
-  | Ast.UniqueExp(exp) -> print_string "!"; expression exp
-
-and  unaryOp = function
-    Ast.GetRef -> print_string "&"
-  | Ast.DeRef -> print_string "*"
-  | Ast.UnPlus -> print_string "+"
-  | Ast.UnMinus -> print_string "-"
-  | Ast.Tilde -> print_string "~"
-  | Ast.Not -> print_string "!"
-
-and  assignOp = function
-    Ast.SimpleAssign -> print_string "="
-  | Ast.OpAssign(aop) -> arithOp aop; print_string "="
-
-and  fixOp = function
-    Ast.Dec -> print_string "--"
-  | Ast.Inc -> print_string "++"
-
-and  binaryOp = function
-    Ast.Arith(aop) -> arithOp aop
-  | Ast.Logical(lop) -> logicalOp lop
-
-and  arithOp = function
-    Ast.Plus -> print_string "+"
-  | Ast.Minus -> print_string "-"
-  | Ast.Mul -> print_string "*"
-  | Ast.Div -> print_string "/"
-  | Ast.Mod -> print_string "%"
-  | Ast.DecLeft -> print_string "<<"
-  | Ast.DecRight -> print_string ">>"
-  | Ast.And -> print_string "&"
-  | Ast.Or -> print_string "|"
-  | Ast.Xor -> print_string "^"
-
-and  logicalOp = function
-    Ast.Inf -> print_string "<"
-  | Ast.Sup -> print_string ">"
-  | Ast.InfEq -> print_string "<="
-  | Ast.SupEq -> print_string ">="
-  | Ast.Eq -> print_string "=="
-  | Ast.NotEq -> print_string "!="
-  | Ast.AndLog -> print_string "&&"
-  | Ast.OrLog -> print_string "||"
-
-and constant = function
-    Ast.String(s) -> print_string "\""; print_string s; print_string "\""
-  | Ast.Char(s) -> print_string "'"; print_string s; print_string "'"
-  | Ast.Int(s) -> print_string s
-  | Ast.Float(s) -> print_string s
-
-(* --------------------------------------------------------------------- *)
-(* Declarations *)
-
-and storage = function
-    Ast.Static -> print_string "static "
-  | Ast.Auto -> print_string "auto "
-  | Ast.Register -> print_string "register "
-  | Ast.Extern -> print_string "extern "
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and fullType ft =
-  match Ast.unwrap ft with
-    Ast.Type(cv,ty) ->
-      print_option (function x -> mcode const_vol x; print_string " ") cv;
-      typeC ty
-  | Ast.DisjType(decls) -> print_disj_list fullType decls
-  | Ast.OptType(ty) -> print_string "?"; fullType ty
-  | Ast.UniqueType(ty) -> print_string "!"; fullType ty
-
-and print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2) fn =
-  fullType ty; mcode print_string lp1; mcode print_string star; fn();
-  mcode print_string rp1; mcode print_string lp1;
-  parameter_list params; mcode print_string rp2
-
-and print_function_type (ty,lp1,params,rp1) fn =
-  print_option fullType ty; fn(); mcode print_string lp1;
-  parameter_list params; mcode print_string rp1
-
-and print_fninfo = function
-    Ast.FStorage(stg) -> mcode storage stg
-  | Ast.FType(ty) -> fullType ty
-  | Ast.FInline(inline) -> mcode print_string inline; print_string " "
-  | Ast.FAttr(attr) -> mcode print_string attr; print_string " "
-
-and typeC ty =
-  match Ast.unwrap ty with
-    Ast.BaseType(ty,sgn) -> print_option (mcode sign) sgn; mcode baseType ty
-  | Ast.ImplicitInt(sgn) -> mcode sign sgn
-  | Ast.Pointer(ty,star) -> fullType ty; mcode print_string star
-  | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
-       (function _ -> ())
-  | Ast.FunctionType (_,ty,lp1,params,rp1) ->
-      print_function_type (ty,lp1,params,rp1) (function _ -> ())
-  | Ast.Array(ty,lb,size,rb) ->
-      fullType ty; mcode print_string lb; print_option expression size;
-      mcode print_string rb
-  | Ast.StructUnionName(kind,name) ->
-      mcode structUnion kind;
-      print_option (function x -> ident x; print_string " ") name
-  | Ast.StructUnionDef(ty,lb,decls,rb) ->
-      fullType ty; mcode print_string lb;
-      dots force_newline declaration decls;
-      mcode print_string rb
-  | Ast.TypeName(name) -> mcode print_string name; print_string " "
-  | Ast.MetaType(name,_,_) ->
-      mcode print_meta name; print_string " "
-
-and baseType = function
-    Ast.VoidType -> print_string "void "
-  | Ast.CharType -> print_string "char "
-  | Ast.ShortType -> print_string "short "
-  | Ast.IntType -> print_string "int "
-  | Ast.DoubleType -> print_string "double "
-  | Ast.FloatType -> print_string "float "
-  | Ast.LongType -> print_string "long "
-
-and structUnion = function
-    Ast.Struct -> print_string "struct "
-  | Ast.Union -> print_string "union "
-
-and sign = function
-    Ast.Signed -> print_string "signed "
-  | Ast.Unsigned -> print_string "unsigned "
-
-and const_vol = function
-    Ast.Const -> print_string "const"
-  | Ast.Volatile -> print_string "volatile"
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and print_named_type ty id =
-  match Ast.unwrap ty with
-    Ast.Type(None,ty1) ->
-      (match Ast.unwrap ty1 with
-       Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-         print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
-           (function _ -> print_string " "; ident id)
-      | Ast.FunctionType(_,ty,lp1,params,rp1) ->
-         print_function_type (ty,lp1,params,rp1)
-           (function _ -> print_string " "; ident id)
-      | Ast.Array(ty,lb,size,rb) ->
-         let rec loop ty k =
-           match Ast.unwrap ty with
-             Ast.Array(ty,lb,size,rb) ->
-               (match Ast.unwrap ty with
-                 Ast.Type(None,ty) ->
-                   loop ty
-                     (function _ ->
-                       k ();
-                       mcode print_string lb;
-                       print_option expression size;
-                       mcode print_string rb)
-               | _ -> failwith "complex array types not supported")
-           | _ -> typeC ty; ident id; k () in
-         loop ty1 (function _ -> ())
-      | _ -> fullType ty; ident id)
-  | _ -> fullType ty; ident id
-
-and declaration d =
-  match Ast.unwrap d with
-    Ast.Init(stg,ty,id,eq,ini,sem) ->
-      print_option (mcode storage) stg; print_named_type ty id;
-      print_string " "; mcode print_string eq;
-      print_string " "; initialiser ini; mcode print_string sem
-  | Ast.UnInit(stg,ty,id,sem) ->
-      print_option (mcode storage) stg; print_named_type ty id;
-      mcode print_string sem
-  | Ast.MacroDecl(name,lp,args,rp,sem) ->
-      ident name; mcode print_string_box lp;
-      dots (function _ -> ()) expression args;
-      close_box(); mcode print_string rp; mcode print_string sem
-  | Ast.TyDecl(ty,sem) -> fullType ty; mcode print_string sem
-  | Ast.Typedef(stg,ty,id,sem) ->
-      mcode print_string stg; print_string " "; fullType ty; typeC id;
-      mcode print_string sem
-  | Ast.DisjDecl(decls) -> print_disj_list declaration decls
-  | Ast.Ddots(dots,Some whencode) -> 
-      mcode print_string dots; print_string "   when != "; declaration whencode
-  | Ast.Ddots(dots,None) -> mcode print_string dots
-  | Ast.MetaDecl(name,_,_) -> mcode print_meta name
-  | Ast.OptDecl(decl) -> print_string "?"; declaration decl
-  | Ast.UniqueDecl(decl) -> print_string "!"; declaration decl
-
-(* --------------------------------------------------------------------- *)
-(* Initialiser *)
-
-and initialiser i =
-  match Ast.unwrap i with
-    Ast.InitExpr(exp) -> expression exp
-  | Ast.InitList(lb,initlist,rb,whencode) ->
-      mcode print_string lb; open_box 0;
-      if not (whencode = [])
-      then
-       (print_string "   WHEN != ";
-        print_between (function _ -> print_string " v ")
-          initialiser whencode;
-        force_newline());
-      List.iter initialiser initlist; close_box();
-      mcode print_string rb
-  | Ast.InitGccDotName(dot,name,eq,ini) ->
-      mcode print_string dot; ident name; print_string " ";
-      mcode print_string eq; print_string " "; initialiser ini
-  | Ast.InitGccName(name,eq,ini) ->
-      ident name; mcode print_string eq; initialiser ini
-  | Ast.InitGccIndex(lb,exp,rb,eq,ini) ->
-      mcode print_string lb; expression exp; mcode print_string rb;
-      print_string " "; mcode print_string eq; print_string " ";
-      initialiser ini
-  | Ast.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-      mcode print_string lb; expression exp1; mcode print_string dots;
-      expression exp2; mcode print_string rb;
-      print_string " "; mcode print_string eq; print_string " ";
-      initialiser ini
-  | Ast.IComma(comma) -> mcode print_string comma; force_newline()
-  | Ast.OptIni(ini) -> print_string "?"; initialiser ini
-  | Ast.UniqueIni(ini) -> print_string "!"; initialiser ini
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and parameterTypeDef p =
-  match Ast.unwrap p with
-    Ast.VoidParam(ty) -> fullType ty
-  | Ast.Param(ty,Some id) -> print_named_type ty id
-  | Ast.Param(ty,None) -> fullType ty
-  | Ast.MetaParam(name,_,_) -> mcode print_meta name
-  | Ast.MetaParamList(name,_,_,_) -> mcode print_meta name
-  | Ast.PComma(cm) -> mcode print_string cm; print_space()
-  | Ast.Pdots(dots) -> mcode print_string dots
-  | Ast.Pcircles(dots) -> mcode print_string dots
-  | Ast.OptParam(param) -> print_string "?"; parameterTypeDef param
-  | Ast.UniqueParam(param) -> print_string "!"; parameterTypeDef param
-
-and parameter_list l = dots (function _ -> ()) parameterTypeDef l
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-let rec rule_elem arity re =
-  match Ast.unwrap re with
-    Ast.FunHeader(bef,allminus,fninfo,name,lp,params,rp) ->
-      mcode (function _ -> ()) ((),Ast.no_info,bef,Ast.NoMetaPos);
-      print_string arity; List.iter print_fninfo fninfo;
-      ident name; mcode print_string_box lp;
-      parameter_list params; close_box(); mcode print_string rp;
-      print_string " "
-  | Ast.Decl(bef,allminus,decl) ->
-      mcode (function _ -> ()) ((),Ast.no_info,bef,Ast.NoMetaPos);
-      print_string arity;
-      declaration decl
-  | Ast.SeqStart(brace) ->
-      print_string arity; mcode print_string brace;
-      if !print_newlines_disj then start_block()
-  | Ast.SeqEnd(brace) ->
-      if !print_newlines_disj then end_block();
-      print_string arity; mcode print_string brace
-  | Ast.ExprStatement(exp,sem) ->
-      print_string arity; expression exp; mcode print_string sem
-  | Ast.IfHeader(iff,lp,exp,rp) ->
-      print_string arity;
-      mcode print_string iff; print_string " "; mcode print_string_box lp;
-      expression exp; close_box(); mcode print_string rp; print_string " "
-  | Ast.Else(els) ->
-      print_string arity; mcode print_string els; print_string " "
-  | Ast.WhileHeader(whl,lp,exp,rp) ->
-      print_string arity;
-      mcode print_string whl; print_string " "; mcode print_string_box lp;
-      expression exp; close_box(); mcode print_string rp; print_string " "
-  | Ast.DoHeader(d) ->
-      print_string arity; mcode print_string d; print_string " "
-  | Ast.WhileTail(whl,lp,exp,rp,sem) ->
-      print_string arity;
-      mcode print_string whl; print_string " "; mcode print_string_box lp;
-      expression exp; close_box(); mcode print_string rp;
-      mcode print_string sem
-  | Ast.ForHeader(fr,lp,e1,sem1,e2,sem2,e3,rp) ->
-      print_string arity;
-      mcode print_string fr; mcode print_string_box lp;
-      print_option expression e1; mcode print_string sem1;
-      print_option expression e2; mcode print_string sem2;
-      print_option expression e3; close_box();
-      mcode print_string rp; print_string " "
-  | Ast.IteratorHeader(nm,lp,args,rp) ->
-      print_string arity;
-      ident nm; print_string " "; mcode print_string_box lp;
-      dots (function _ -> ()) expression args; close_box();
-      mcode print_string rp; print_string " "
-  | Ast.SwitchHeader(switch,lp,exp,rp) ->
-      print_string arity;
-      mcode print_string switch; print_string " "; mcode print_string_box lp;
-      expression exp; close_box(); mcode print_string rp; print_string " "
-  | Ast.Break(br,sem) ->
-      print_string arity; mcode print_string br; mcode print_string sem
-  | Ast.Continue(cont,sem) ->
-      print_string arity; mcode print_string cont; mcode print_string sem
-  | Ast.Label(l,dd) -> ident l; mcode print_string dd
-  | Ast.Goto(goto,l,sem) ->
-      mcode print_string goto; ident l; mcode print_string sem
-  | Ast.Return(ret,sem) ->
-      print_string arity; mcode print_string ret; mcode print_string sem
-  | Ast.ReturnExpr(ret,exp,sem) ->
-      print_string arity; mcode print_string ret; print_string " ";
-      expression exp; mcode print_string sem
-  | Ast.MetaRuleElem(name,_,_) ->
-      print_string arity; mcode print_meta name
-  | Ast.MetaStmt(name,_,_,_) ->
-      print_string arity; mcode print_meta name
-  | Ast.MetaStmtList(name,_,_) ->
-      print_string arity;  mcode print_meta name
-  | Ast.Exp(exp) -> print_string arity; expression exp
-  | Ast.TopExp(exp) -> print_string arity; expression exp
-  | Ast.Ty(ty) -> print_string arity; fullType ty
-  | Ast.Include(inc,s) ->
-      mcode print_string inc; print_string " "; mcode inc_file s
-  | Ast.DefineHeader(def,id,params) ->
-      mcode print_string def; print_string " "; ident id;
-      print_define_parameters params
-  | Ast.Default(def,colon) ->
-      mcode print_string def; mcode print_string colon; print_string " "
-  | Ast.Case(case,exp,colon) ->
-      mcode print_string case; print_string " "; expression exp;
-      mcode print_string colon; print_string " "
-  | Ast.DisjRuleElem(res) ->
-      print_string arity;
-      force_newline(); print_string "("; force_newline();
-      print_between
-       (function _ -> force_newline();print_string "|"; force_newline())
-       (rule_elem arity)
-       res;
-      force_newline(); print_string ")"
-
-
-and print_define_parameters params =
-  match Ast.unwrap params with
-    Ast.NoParams -> ()
-  | Ast.DParams(lp,params,rp) ->
-      mcode print_string lp;
-      dots (function _ -> ()) print_define_param params; mcode print_string rp
-
-and print_define_param param =
-  match Ast.unwrap param with
-    Ast.DParam(id) -> ident id
-  | Ast.DPComma(comma) -> mcode print_string comma
-  | Ast.DPdots(dots) -> mcode print_string dots
-  | Ast.DPcircles(circles) -> mcode print_string circles
-  | Ast.OptDParam(dp) -> print_string "?"; print_define_param dp
-  | Ast.UniqueDParam(dp) -> print_string "!"; print_define_param dp
-
-and statement arity s =
-  match Ast.unwrap s with
-    Ast.Seq(lbrace,decls,body,rbrace) ->
-      rule_elem arity lbrace;
-      dots force_newline (statement arity) decls;
-      dots force_newline (statement arity) body;
-      rule_elem arity rbrace
-  | Ast.IfThen(header,branch,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity branch;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
-  | Ast.IfThenElse(header,branch1,els,branch2,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity branch1; print_string " ";
-      rule_elem arity els; statement arity branch2;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
-  | Ast.While(header,body,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity body;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
-  | Ast.Do(header,body,tail) ->
-      rule_elem arity header; statement arity body;
-      rule_elem arity tail
-  | Ast.For(header,body,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity body;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
-  | Ast.Iterator(header,body,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity body;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
-  | Ast.Switch(header,lb,cases,rb) ->
-      rule_elem arity header; rule_elem arity lb;
-      List.iter (function x -> case_line arity x; force_newline()) cases;
-      rule_elem arity rb
-  | Ast.Atomic(re) -> rule_elem arity re
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      rule_elem arity header; rule_elem arity lbrace;
-      dots force_newline (statement arity) decls;
-      dots force_newline (statement arity) body;
-      rule_elem arity rbrace
-  | Ast.Disj([stmt_dots]) ->
-      print_string arity;
-      dots (function _ -> if !print_newlines_disj then force_newline())
-       (statement arity) stmt_dots
-  | Ast.Disj(stmt_dots_list) -> (* ignores newline directive for readability *)
-      print_string arity;
-      force_newline(); print_string "("; force_newline();
-      print_between
-       (function _ -> force_newline();print_string "|"; force_newline())
-       (dots force_newline (statement arity))
-       stmt_dots_list;
-      force_newline(); print_string ")"
-  | Ast.Define(header,body) ->
-      rule_elem arity header; print_string " ";
-      dots force_newline (statement arity) body
-  | Ast.Nest(stmt_dots,whn,multi,_,_) ->
-      print_string arity;
-      nest_dots multi (statement arity)
-       (function _ ->
-         open_box 0;
-         print_between force_newline
-           (whencode (dots force_newline (statement "")) (statement "")) whn;
-         close_box(); force_newline())
-       stmt_dots
-  | Ast.Dots(d,whn,_,_) | Ast.Circles(d,whn,_,_) | Ast.Stars(d,whn,_,_) ->
-      print_string arity; mcode print_string d;
-      open_box 0;
-      print_between force_newline
-       (whencode (dots force_newline (statement "")) (statement "")) whn;
-      close_box(); force_newline()
-  | Ast.OptStm(s) -> statement "?" s
-  | Ast.UniqueStm(s) -> statement "!" s
-
-and print_statement_when whencode =
-  print_string "   WHEN != ";
-  open_box 0;
-  print_between (function _ -> print_string " &"; force_newline())
-    (dots force_newline (statement "")) whencode;
-  close_box()
-
-
-and whencode notfn alwaysfn = function
-    Ast.WhenNot a ->
-      print_string "   WHEN != "; open_box 0; notfn a; close_box()
-  | Ast.WhenAlways a ->
-      print_string "   WHEN = "; open_box 0; alwaysfn a; close_box()
-  | Ast.WhenModifier x -> print_string "   WHEN "; print_when_modif x
-
-and print_when_modif = function
-  | Ast.WhenAny    -> print_string "ANY"
-  | Ast.WhenStrict -> print_string "STRICT"
-  | Ast.WhenForall -> print_string "FORALL"
-  | Ast.WhenExists -> print_string "EXISTS"
-
-and case_line arity c =
-  match Ast.unwrap c with
-    Ast.CaseLine(header,code) ->
-      rule_elem arity header; print_string " ";
-      dots force_newline (statement arity) code
-  | Ast.OptCase(case) -> case_line "?" case
-
-(* --------------------------------------------------------------------- *)
-(* CPP code *)
-
-and inc_file = function
-    Ast.Local(elems) ->
-      print_string "\"";
-      print_between (function _ -> print_string "/") inc_elem elems;
-      print_string "\""
-  | Ast.NonLocal(elems) ->
-      print_string "<";
-      print_between (function _ -> print_string "/") inc_elem elems;
-      print_string ">"
-
-and inc_elem = function
-    Ast.IncPath s -> print_string s
-  | Ast.IncDots -> print_string "..."
-
-(* for export only *)
-let statement_dots l = dots force_newline (statement "") l
-
-let top_level t =
-  match Ast.unwrap t with
-    Ast.FILEINFO(old_file,new_file) ->
-      print_string "--- "; mcode print_string old_file; force_newline();
-      print_string "+++ "; mcode print_string new_file
-  | Ast.DECL(stmt) -> statement "" stmt
-  | Ast.CODE(stmt_dots) ->
-      dots force_newline (statement "") stmt_dots
-  | Ast.ERRORWORDS(exps) ->
-      print_string "error words = [";
-      print_between (function _ -> print_string ", ") expression exps;
-      print_string "]"
-
-let rule =
-  print_between (function _ -> force_newline(); force_newline()) top_level
-
-let pp_print_anything x = !anything x
-
-let _ =
-  anything := function
-      Ast.FullTypeTag(x) -> fullType x
-    | Ast.BaseTypeTag(x) -> baseType x
-    | Ast.StructUnionTag(x) -> structUnion x
-    | Ast.SignTag(x) -> sign x
-    | Ast.IdentTag(x) -> ident x
-    | Ast.ExpressionTag(x) -> expression x
-    | Ast.ConstantTag(x) -> constant x
-    | Ast.UnaryOpTag(x) -> unaryOp x
-    | Ast.AssignOpTag(x) -> assignOp x
-    | Ast.FixOpTag(x) -> fixOp x
-    | Ast.BinaryOpTag(x) -> binaryOp x
-    | Ast.ArithOpTag(x) -> arithOp x
-    | Ast.LogicalOpTag(x) -> logicalOp x
-    | Ast.InitTag(x) -> initialiser x
-    | Ast.DeclarationTag(x) -> declaration x
-    | Ast.StorageTag(x) -> storage x
-    | Ast.IncFileTag(x) -> inc_file x
-    | Ast.Rule_elemTag(x) -> rule_elem "" x
-    | Ast.StatementTag(x) -> statement "" x
-    | Ast.CaseLineTag(x) -> case_line "" x
-    | Ast.ConstVolTag(x) -> const_vol x
-    | Ast.Token(x,Some info) -> print_string_befaft print_string x info
-    | Ast.Token(x,None) -> print_string x
-    | Ast.Code(x) -> let _ = top_level x in ()
-    | Ast.ExprDotsTag(x) -> dots (function _ -> ()) expression x
-    | Ast.ParamDotsTag(x) -> parameter_list x
-    | Ast.StmtDotsTag(x) -> dots (function _ -> ()) (statement "") x
-    | Ast.DeclDotsTag(x) -> dots (function _ -> ()) declaration x
-    | Ast.TypeCTag(x) -> typeC x
-    | Ast.ParamTag(x) -> parameterTypeDef x
-    | Ast.SgrepStartTag(x) -> print_string x
-    | Ast.SgrepEndTag(x) -> print_string x
-
-let rec dep in_and = function
-    Ast.Dep(s) -> print_string s
-  | Ast.AntiDep(s) -> print_string "!"; print_string s
-  | Ast.EverDep(s) -> print_string "ever "; print_string s
-  | Ast.NeverDep(s) -> print_string "never "; print_string s
-  | Ast.AndDep(s1,s2) ->
-      let print_and _ = dep true s1; print_string " && "; dep true s2 in
-      if in_and
-      then print_and ()
-      else (print_string "("; print_and(); print_string ")")
-  | Ast.OrDep(s1,s2) ->
-      let print_or _ = dep false s1; print_string " || "; dep false s2 in
-      if not in_and
-      then print_or ()
-      else (print_string "("; print_or(); print_string ")")
-  | Ast.NoDep -> failwith "not possible"
-
-let unparse z =
-  match z with
-    Ast.ScriptRule (lang,deps,bindings,code) ->
-    print_string "@@";
-    force_newline();
-    print_string ("script:" ^ lang);
-    (match deps with
-      Ast.NoDep -> ()
-    | _ -> print_string " depends on "; dep true deps);
-    force_newline();
-    print_string "@@";
-    force_newline();
-    print_string code;
-    force_newline()
-  | Ast.CocciRule (nm, (deps, drops, exists), x, _) ->
-    print_string "@@";
-    force_newline();
-    print_string nm;
-    (match deps with
-      Ast.NoDep -> ()
-    | _ -> print_string " depends on "; dep true deps);
-    (*
-    print_string "line ";
-    print_int (Ast.get_line (List.hd x));
-    *)
-    force_newline();
-    print_string "@@";
-    print_newlines_disj := true;
-    force_newline();
-    force_newline();
-    rule x;
-    force_newline()
-
-let rule_elem_to_string x =
-  print_newlines_disj := true;
-  Common.format_to_string (function _ -> rule_elem "" x)
-
-let ident_to_string x =
-  print_newlines_disj := true;
-  Common.format_to_string (function _ -> ident x)
-
-let unparse_to_string x =
-  print_newlines_disj := true;
-  Common.format_to_string (function _ -> unparse x)
-
-let print_rule_elem re =
-  let nl = !print_newlines_disj in
-  print_newlines_disj := false;
-  rule_elem "" re;
-  print_newlines_disj := nl
-
diff --git a/parsing_cocci/.#pretty_print_cocci.ml.1.128 b/parsing_cocci/.#pretty_print_cocci.ml.1.128
deleted file mode 100644 (file)
index 5ca7b08..0000000
+++ /dev/null
@@ -1,859 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-open Format
-module Ast = Ast_cocci
-
-let print_plus_flag = ref true
-let print_minus_flag = ref true
-let print_newlines_disj = ref true
-
-let start_block str =
-  force_newline(); print_string "  "; open_box 0
-
-let end_block str =
-  close_box(); force_newline ()
-
-let print_string_box s = print_string s; open_box 0
-
-
-let print_option = Common.do_option
-let print_between = Common.print_between
-
-(* --------------------------------------------------------------------- *)
-(* Modified code *)
-
-(* avoid polyvariance problems *)
-let anything : (Ast.anything -> unit) ref = ref (function _ -> ())
-
-let rec print_anything str = function
-    [] -> ()
-  | stream ->
-      start_block();
-      print_between force_newline
-       (function x ->
-         print_string str; open_box 0; print_anything_list x; close_box())
-       stream;
-      end_block()
-
-and print_anything_list = function
-    [] -> ()
-  | [x] -> !anything x
-  | bef::((aft::_) as rest) ->
-      !anything bef;
-      let space =
-       (match bef with
-         Ast.Rule_elemTag(_) | Ast.AssignOpTag(_) | Ast.BinaryOpTag(_)
-       | Ast.ArithOpTag(_) | Ast.LogicalOpTag(_)
-       | Ast.Token("if",_) | Ast.Token("while",_) -> true | _ -> false) or
-       (match aft with
-         Ast.Rule_elemTag(_) | Ast.AssignOpTag(_) | Ast.BinaryOpTag(_)
-       | Ast.ArithOpTag(_) | Ast.LogicalOpTag(_) | Ast.Token("{",_) -> true
-       | _ -> false) in
-      if space then print_string " ";
-      print_anything_list rest
-
-let print_around printer term = function
-    Ast.NOTHING -> printer term
-  | Ast.BEFORE(bef) -> print_anything "<<< " bef; printer term
-  | Ast.AFTER(aft) -> printer term; print_anything ">>> " aft
-  | Ast.BEFOREAFTER(bef,aft) ->
-      print_anything "<<< " bef; printer term; print_anything ">>> " aft
-
-let print_string_befaft fn x info =
-  List.iter (function s -> print_string s; force_newline())
-    info.Ast.strbef;
-  fn x;
-  List.iter (function s -> force_newline(); print_string s)
-    info.Ast.straft
-
-let print_meta (r,x) = print_string r; print_string ":"; print_string x
-
-let print_pos = function
-    Ast.MetaPos(name,_,_,_,_) ->
-      let name = Ast.unwrap_mcode name in
-      print_string "@"; print_meta name
-  | _ -> ()
-
-let mcode fn = function
-    (x, _, Ast.MINUS(_,plus_stream), pos) ->
-      if !print_minus_flag
-      then print_string (if !Flag.sgrep_mode2 then "*" else "-");
-      fn x; print_pos pos;
-      if !print_plus_flag 
-      then print_anything ">>> " plus_stream
-  | (x, _, Ast.CONTEXT(_,plus_streams), pos) -> 
-      if !print_plus_flag
-      then
-       let fn x = fn x; print_pos pos in
-       print_around fn x plus_streams
-      else (fn x; print_pos pos)
-  | (x, info, Ast.PLUS, pos) ->
-      let fn x = fn x; print_pos pos in
-      print_string_befaft fn x info
-
-let print_mcodekind = function 
-    Ast.MINUS(_,plus_stream) ->
-      print_string "MINUS";
-      print_anything ">>> " plus_stream
-  | Ast.CONTEXT(_,plus_streams) ->
-      print_around (function _ -> print_string "CONTEXT") () plus_streams
-  | Ast.PLUS -> print_string "PLUS"
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-let dots between fn d =
-  match Ast.unwrap d with
-    Ast.DOTS(l) -> print_between between fn l
-  | Ast.CIRCLES(l) -> print_between between fn l
-  | Ast.STARS(l) -> print_between between fn l
-
-let nest_dots multi fn f d =
-  let mo s = if multi then "<+"^s else "<"^s in
-  let mc s = if multi then s^"+>" else s^">" in
-  match Ast.unwrap d with
-    Ast.DOTS(l) ->
-      print_string (mo "..."); f(); start_block();
-      print_between force_newline fn l;
-      end_block(); print_string (mc "...")
-  | Ast.CIRCLES(l) ->
-      print_string (mo "ooo"); f(); start_block();
-      print_between force_newline fn l;
-      end_block(); print_string (mc "ooo")
-  | Ast.STARS(l) ->
-      print_string (mo "***"); f(); start_block();
-      print_between force_newline fn l;
-      end_block(); print_string (mc "***")
-
-(* --------------------------------------------------------------------- *)
-
-let print_type keep info = function
-    None -> ()
-       (* print_string "/* ";
-           print_string "keep:"; print_unitary keep;
-           print_string " inherited:"; print_bool inherited;
-           print_string " */"*)
-  | Some ty -> ()
-      (*;
-      print_string "/* ";
-      print_between (function _ -> print_string ", ") Type_cocci.typeC ty;(*
-      print_string "keep:"; print_unitary keep;
-      print_string " inherited:"; print_bool inherited;*)
-      print_string " */"*)
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-let rec ident i =
-  match Ast.unwrap i with
-    Ast.Id(name) -> mcode print_string name
-  | Ast.MetaId(name,_,keep,inherited) -> mcode print_meta name
-  | Ast.MetaFunc(name,_,_,_) -> mcode print_meta name
-  | Ast.MetaLocalFunc(name,_,_,_) -> mcode print_meta name
-  | Ast.OptIdent(id) -> print_string "?"; ident id
-  | Ast.UniqueIdent(id) -> print_string "!"; ident id
-
-and print_unitary = function
-    Type_cocci.Unitary -> print_string "unitary"
-  | Type_cocci.Nonunitary -> print_string "nonunitary"
-  | Type_cocci.Saved -> print_string "saved"
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let print_disj_list fn l =
-  if !print_newlines_disj
-  then (force_newline(); print_string "("; force_newline())
-  else print_string "(";
-  print_between
-    (function _ ->
-      if !print_newlines_disj
-      then (force_newline(); print_string "|"; force_newline())
-      else print_string " | ")
-    fn l;
-  if !print_newlines_disj
-  then (force_newline(); print_string ")"; force_newline())
-  else print_string ")"
-
-let rec expression e =
-  match Ast.unwrap e with
-    Ast.Ident(id) -> ident id
-  | Ast.Constant(const) -> mcode constant const
-  | Ast.FunCall(fn,lp,args,rp) ->
-      expression fn; mcode print_string_box lp;
-      dots (function _ -> ()) expression args;
-      close_box(); mcode print_string rp
-  | Ast.Assignment(left,op,right,simple) ->
-      expression left; print_string " "; mcode assignOp op;
-      print_string " "; expression right
-  | Ast.CondExpr(exp1,why,exp2,colon,exp3) ->
-      expression exp1; print_string " "; mcode print_string why;
-      print_option (function e -> print_string " "; expression e) exp2;
-      print_string " "; mcode print_string colon; expression exp3
-  | Ast.Postfix(exp,op) -> expression exp; mcode fixOp op
-  | Ast.Infix(exp,op) -> mcode fixOp op; expression exp
-  | Ast.Unary(exp,op) -> mcode unaryOp op; expression exp
-  | Ast.Binary(left,op,right) ->
-      expression left; print_string " "; mcode binaryOp op; print_string " ";
-      expression right
-  | Ast.Nested(left,op,right) ->
-      expression left; print_string " "; mcode binaryOp op; print_string " ";
-      expression right
-  | Ast.Paren(lp,exp,rp) ->
-      mcode print_string_box lp; expression exp; close_box();
-      mcode print_string rp
-  | Ast.ArrayAccess(exp1,lb,exp2,rb) ->
-      expression exp1; mcode print_string_box lb; expression exp2; close_box();
-      mcode print_string rb
-  | Ast.RecordAccess(exp,pt,field) ->
-      expression exp; mcode print_string pt; ident field
-  | Ast.RecordPtAccess(exp,ar,field) ->
-      expression exp; mcode print_string ar; ident field
-  | Ast.Cast(lp,ty,rp,exp) ->
-      mcode print_string_box lp; fullType ty; close_box();
-      mcode print_string rp; expression exp
-  | Ast.SizeOfExpr(sizeof,exp) ->
-      mcode print_string sizeof; expression exp
-  | Ast.SizeOfType(sizeof,lp,ty,rp) ->
-      mcode print_string sizeof;
-      mcode print_string_box lp; fullType ty; close_box();
-      mcode print_string rp
-  | Ast.TypeExp(ty) -> fullType ty
-
-  | Ast.MetaErr(name,_,_,_) -> mcode print_meta name
-  | Ast.MetaExpr(name,_,keep,ty,form,inherited) ->
-      mcode print_meta name; print_type keep inherited ty
-  | Ast.MetaExprList(name,_,_,_) -> mcode print_meta name
-  | Ast.EComma(cm) -> mcode print_string cm; print_space()
-  | Ast.DisjExpr(exp_list) -> print_disj_list expression exp_list
-  | Ast.NestExpr(expr_dots,Some whencode,multi) ->
-      nest_dots multi expression
-       (function _ -> print_string "   when != "; expression whencode)
-       expr_dots
-  | Ast.NestExpr(expr_dots,None,multi) ->
-      nest_dots multi expression (function _ -> ()) expr_dots
-  | Ast.Edots(dots,Some whencode)
-  | Ast.Ecircles(dots,Some whencode)
-  | Ast.Estars(dots,Some whencode) ->
-      mcode print_string dots; print_string "   when != "; expression whencode
-  | Ast.Edots(dots,None)
-  | Ast.Ecircles(dots,None)
-  | Ast.Estars(dots,None) -> mcode print_string dots
-  | Ast.OptExp(exp) -> print_string "?"; expression exp
-  | Ast.UniqueExp(exp) -> print_string "!"; expression exp
-
-and  unaryOp = function
-    Ast.GetRef -> print_string "&"
-  | Ast.DeRef -> print_string "*"
-  | Ast.UnPlus -> print_string "+"
-  | Ast.UnMinus -> print_string "-"
-  | Ast.Tilde -> print_string "~"
-  | Ast.Not -> print_string "!"
-
-and  assignOp = function
-    Ast.SimpleAssign -> print_string "="
-  | Ast.OpAssign(aop) -> arithOp aop; print_string "="
-
-and  fixOp = function
-    Ast.Dec -> print_string "--"
-  | Ast.Inc -> print_string "++"
-
-and  binaryOp = function
-    Ast.Arith(aop) -> arithOp aop
-  | Ast.Logical(lop) -> logicalOp lop
-
-and  arithOp = function
-    Ast.Plus -> print_string "+"
-  | Ast.Minus -> print_string "-"
-  | Ast.Mul -> print_string "*"
-  | Ast.Div -> print_string "/"
-  | Ast.Mod -> print_string "%"
-  | Ast.DecLeft -> print_string "<<"
-  | Ast.DecRight -> print_string ">>"
-  | Ast.And -> print_string "&"
-  | Ast.Or -> print_string "|"
-  | Ast.Xor -> print_string "^"
-
-and  logicalOp = function
-    Ast.Inf -> print_string "<"
-  | Ast.Sup -> print_string ">"
-  | Ast.InfEq -> print_string "<="
-  | Ast.SupEq -> print_string ">="
-  | Ast.Eq -> print_string "=="
-  | Ast.NotEq -> print_string "!="
-  | Ast.AndLog -> print_string "&&"
-  | Ast.OrLog -> print_string "||"
-
-and constant = function
-    Ast.String(s) -> print_string "\""; print_string s; print_string "\""
-  | Ast.Char(s) -> print_string "'"; print_string s; print_string "'"
-  | Ast.Int(s) -> print_string s
-  | Ast.Float(s) -> print_string s
-
-(* --------------------------------------------------------------------- *)
-(* Declarations *)
-
-and storage = function
-    Ast.Static -> print_string "static "
-  | Ast.Auto -> print_string "auto "
-  | Ast.Register -> print_string "register "
-  | Ast.Extern -> print_string "extern "
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and fullType ft =
-  match Ast.unwrap ft with
-    Ast.Type(cv,ty) ->
-      print_option (function x -> mcode const_vol x; print_string " ") cv;
-      typeC ty
-  | Ast.DisjType(decls) -> print_disj_list fullType decls
-  | Ast.OptType(ty) -> print_string "?"; fullType ty
-  | Ast.UniqueType(ty) -> print_string "!"; fullType ty
-
-and print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2) fn =
-  fullType ty; mcode print_string lp1; mcode print_string star; fn();
-  mcode print_string rp1; mcode print_string lp1;
-  parameter_list params; mcode print_string rp2
-
-and print_function_type (ty,lp1,params,rp1) fn =
-  print_option fullType ty; fn(); mcode print_string lp1;
-  parameter_list params; mcode print_string rp1
-
-and print_fninfo = function
-    Ast.FStorage(stg) -> mcode storage stg
-  | Ast.FType(ty) -> fullType ty
-  | Ast.FInline(inline) -> mcode print_string inline; print_string " "
-  | Ast.FAttr(attr) -> mcode print_string attr; print_string " "
-
-and typeC ty =
-  match Ast.unwrap ty with
-    Ast.BaseType(ty,sgn) -> print_option (mcode sign) sgn; mcode baseType ty
-  | Ast.ImplicitInt(sgn) -> mcode sign sgn
-  | Ast.Pointer(ty,star) -> fullType ty; mcode print_string star
-  | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
-       (function _ -> ())
-  | Ast.FunctionType (_,ty,lp1,params,rp1) ->
-      print_function_type (ty,lp1,params,rp1) (function _ -> ())
-  | Ast.Array(ty,lb,size,rb) ->
-      fullType ty; mcode print_string lb; print_option expression size;
-      mcode print_string rb
-  | Ast.StructUnionName(kind,name) ->
-      mcode structUnion kind;
-      print_option (function x -> ident x; print_string " ") name
-  | Ast.StructUnionDef(ty,lb,decls,rb) ->
-      fullType ty; mcode print_string lb;
-      dots force_newline declaration decls;
-      mcode print_string rb
-  | Ast.TypeName(name) -> mcode print_string name; print_string " "
-  | Ast.MetaType(name,_,_) ->
-      mcode print_meta name; print_string " "
-
-and baseType = function
-    Ast.VoidType -> print_string "void "
-  | Ast.CharType -> print_string "char "
-  | Ast.ShortType -> print_string "short "
-  | Ast.IntType -> print_string "int "
-  | Ast.DoubleType -> print_string "double "
-  | Ast.FloatType -> print_string "float "
-  | Ast.LongType -> print_string "long "
-
-and structUnion = function
-    Ast.Struct -> print_string "struct "
-  | Ast.Union -> print_string "union "
-
-and sign = function
-    Ast.Signed -> print_string "signed "
-  | Ast.Unsigned -> print_string "unsigned "
-
-and const_vol = function
-    Ast.Const -> print_string "const"
-  | Ast.Volatile -> print_string "volatile"
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and print_named_type ty id =
-  match Ast.unwrap ty with
-    Ast.Type(None,ty1) ->
-      (match Ast.unwrap ty1 with
-       Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-         print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
-           (function _ -> print_string " "; ident id)
-      | Ast.FunctionType(_,ty,lp1,params,rp1) ->
-         print_function_type (ty,lp1,params,rp1)
-           (function _ -> print_string " "; ident id)
-      | Ast.Array(ty,lb,size,rb) ->
-         let rec loop ty k =
-           match Ast.unwrap ty with
-             Ast.Array(ty,lb,size,rb) ->
-               (match Ast.unwrap ty with
-                 Ast.Type(None,ty) ->
-                   loop ty
-                     (function _ ->
-                       k ();
-                       mcode print_string lb;
-                       print_option expression size;
-                       mcode print_string rb)
-               | _ -> failwith "complex array types not supported")
-           | _ -> typeC ty; ident id; k () in
-         loop ty1 (function _ -> ())
-      | _ -> fullType ty; ident id)
-  | _ -> fullType ty; ident id
-
-and declaration d =
-  match Ast.unwrap d with
-    Ast.Init(stg,ty,id,eq,ini,sem) ->
-      print_option (mcode storage) stg; print_named_type ty id;
-      print_string " "; mcode print_string eq;
-      print_string " "; initialiser ini; mcode print_string sem
-  | Ast.UnInit(stg,ty,id,sem) ->
-      print_option (mcode storage) stg; print_named_type ty id;
-      mcode print_string sem
-  | Ast.MacroDecl(name,lp,args,rp,sem) ->
-      ident name; mcode print_string_box lp;
-      dots (function _ -> ()) expression args;
-      close_box(); mcode print_string rp; mcode print_string sem
-  | Ast.TyDecl(ty,sem) -> fullType ty; mcode print_string sem
-  | Ast.Typedef(stg,ty,id,sem) ->
-      mcode print_string stg; print_string " "; fullType ty; typeC id;
-      mcode print_string sem
-  | Ast.DisjDecl(decls) -> print_disj_list declaration decls
-  | Ast.Ddots(dots,Some whencode) -> 
-      mcode print_string dots; print_string "   when != "; declaration whencode
-  | Ast.Ddots(dots,None) -> mcode print_string dots
-  | Ast.MetaDecl(name,_,_) -> mcode print_meta name
-  | Ast.OptDecl(decl) -> print_string "?"; declaration decl
-  | Ast.UniqueDecl(decl) -> print_string "!"; declaration decl
-
-(* --------------------------------------------------------------------- *)
-(* Initialiser *)
-
-and initialiser i =
-  match Ast.unwrap i with
-    Ast.InitExpr(exp) -> expression exp
-  | Ast.InitList(lb,initlist,rb,whencode) ->
-      mcode print_string lb; open_box 0;
-      if not (whencode = [])
-      then
-       (print_string "   WHEN != ";
-        print_between (function _ -> print_string " v ")
-          initialiser whencode;
-        force_newline());
-      List.iter initialiser initlist; close_box();
-      mcode print_string rb
-  | Ast.InitGccDotName(dot,name,eq,ini) ->
-      mcode print_string dot; ident name; print_string " ";
-      mcode print_string eq; print_string " "; initialiser ini
-  | Ast.InitGccName(name,eq,ini) ->
-      ident name; mcode print_string eq; initialiser ini
-  | Ast.InitGccIndex(lb,exp,rb,eq,ini) ->
-      mcode print_string lb; expression exp; mcode print_string rb;
-      print_string " "; mcode print_string eq; print_string " ";
-      initialiser ini
-  | Ast.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-      mcode print_string lb; expression exp1; mcode print_string dots;
-      expression exp2; mcode print_string rb;
-      print_string " "; mcode print_string eq; print_string " ";
-      initialiser ini
-  | Ast.IComma(comma) -> mcode print_string comma; force_newline()
-  | Ast.OptIni(ini) -> print_string "?"; initialiser ini
-  | Ast.UniqueIni(ini) -> print_string "!"; initialiser ini
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and parameterTypeDef p =
-  match Ast.unwrap p with
-    Ast.VoidParam(ty) -> fullType ty
-  | Ast.Param(ty,Some id) -> print_named_type ty id
-  | Ast.Param(ty,None) -> fullType ty
-  | Ast.MetaParam(name,_,_) -> mcode print_meta name
-  | Ast.MetaParamList(name,_,_,_) -> mcode print_meta name
-  | Ast.PComma(cm) -> mcode print_string cm; print_space()
-  | Ast.Pdots(dots) -> mcode print_string dots
-  | Ast.Pcircles(dots) -> mcode print_string dots
-  | Ast.OptParam(param) -> print_string "?"; parameterTypeDef param
-  | Ast.UniqueParam(param) -> print_string "!"; parameterTypeDef param
-
-and parameter_list l = dots (function _ -> ()) parameterTypeDef l
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-let rec rule_elem arity re =
-  match Ast.unwrap re with
-    Ast.FunHeader(bef,allminus,fninfo,name,lp,params,rp) ->
-      mcode (function _ -> ()) ((),Ast.no_info,bef,Ast.NoMetaPos);
-      print_string arity; List.iter print_fninfo fninfo;
-      ident name; mcode print_string_box lp;
-      parameter_list params; close_box(); mcode print_string rp;
-      print_string " "
-  | Ast.Decl(bef,allminus,decl) ->
-      mcode (function _ -> ()) ((),Ast.no_info,bef,Ast.NoMetaPos);
-      print_string arity;
-      declaration decl
-  | Ast.SeqStart(brace) ->
-      print_string arity; mcode print_string brace;
-      if !print_newlines_disj then start_block()
-  | Ast.SeqEnd(brace) ->
-      if !print_newlines_disj then end_block();
-      print_string arity; mcode print_string brace
-  | Ast.ExprStatement(exp,sem) ->
-      print_string arity; expression exp; mcode print_string sem
-  | Ast.IfHeader(iff,lp,exp,rp) ->
-      print_string arity;
-      mcode print_string iff; print_string " "; mcode print_string_box lp;
-      expression exp; close_box(); mcode print_string rp; print_string " "
-  | Ast.Else(els) ->
-      print_string arity; mcode print_string els; print_string " "
-  | Ast.WhileHeader(whl,lp,exp,rp) ->
-      print_string arity;
-      mcode print_string whl; print_string " "; mcode print_string_box lp;
-      expression exp; close_box(); mcode print_string rp; print_string " "
-  | Ast.DoHeader(d) ->
-      print_string arity; mcode print_string d; print_string " "
-  | Ast.WhileTail(whl,lp,exp,rp,sem) ->
-      print_string arity;
-      mcode print_string whl; print_string " "; mcode print_string_box lp;
-      expression exp; close_box(); mcode print_string rp;
-      mcode print_string sem
-  | Ast.ForHeader(fr,lp,e1,sem1,e2,sem2,e3,rp) ->
-      print_string arity;
-      mcode print_string fr; mcode print_string_box lp;
-      print_option expression e1; mcode print_string sem1;
-      print_option expression e2; mcode print_string sem2;
-      print_option expression e3; close_box();
-      mcode print_string rp; print_string " "
-  | Ast.IteratorHeader(nm,lp,args,rp) ->
-      print_string arity;
-      ident nm; print_string " "; mcode print_string_box lp;
-      dots (function _ -> ()) expression args; close_box();
-      mcode print_string rp; print_string " "
-  | Ast.SwitchHeader(switch,lp,exp,rp) ->
-      print_string arity;
-      mcode print_string switch; print_string " "; mcode print_string_box lp;
-      expression exp; close_box(); mcode print_string rp; print_string " "
-  | Ast.Break(br,sem) ->
-      print_string arity; mcode print_string br; mcode print_string sem
-  | Ast.Continue(cont,sem) ->
-      print_string arity; mcode print_string cont; mcode print_string sem
-  | Ast.Label(l,dd) -> ident l; mcode print_string dd
-  | Ast.Goto(goto,l,sem) ->
-      mcode print_string goto; ident l; mcode print_string sem
-  | Ast.Return(ret,sem) ->
-      print_string arity; mcode print_string ret; mcode print_string sem
-  | Ast.ReturnExpr(ret,exp,sem) ->
-      print_string arity; mcode print_string ret; print_string " ";
-      expression exp; mcode print_string sem
-  | Ast.MetaRuleElem(name,_,_) ->
-      print_string arity; mcode print_meta name
-  | Ast.MetaStmt(name,_,_,_) ->
-      print_string arity; mcode print_meta name
-  | Ast.MetaStmtList(name,_,_) ->
-      print_string arity;  mcode print_meta name
-  | Ast.Exp(exp) -> print_string arity; expression exp
-  | Ast.TopExp(exp) -> print_string arity; expression exp
-  | Ast.Ty(ty) -> print_string arity; fullType ty
-  | Ast.Include(inc,s) ->
-      mcode print_string inc; print_string " "; mcode inc_file s
-  | Ast.DefineHeader(def,id,params) ->
-      mcode print_string def; print_string " "; ident id;
-      print_define_parameters params
-  | Ast.Default(def,colon) ->
-      mcode print_string def; mcode print_string colon; print_string " "
-  | Ast.Case(case,exp,colon) ->
-      mcode print_string case; print_string " "; expression exp;
-      mcode print_string colon; print_string " "
-  | Ast.DisjRuleElem(res) ->
-      print_string arity;
-      force_newline(); print_string "("; force_newline();
-      print_between
-       (function _ -> force_newline();print_string "|"; force_newline())
-       (rule_elem arity)
-       res;
-      force_newline(); print_string ")"
-
-
-and print_define_parameters params =
-  match Ast.unwrap params with
-    Ast.NoParams -> ()
-  | Ast.DParams(lp,params,rp) ->
-      mcode print_string lp;
-      dots (function _ -> ()) print_define_param params; mcode print_string rp
-
-and print_define_param param =
-  match Ast.unwrap param with
-    Ast.DParam(id) -> ident id
-  | Ast.DPComma(comma) -> mcode print_string comma
-  | Ast.DPdots(dots) -> mcode print_string dots
-  | Ast.DPcircles(circles) -> mcode print_string circles
-  | Ast.OptDParam(dp) -> print_string "?"; print_define_param dp
-  | Ast.UniqueDParam(dp) -> print_string "!"; print_define_param dp
-
-and statement arity s =
-  match Ast.unwrap s with
-    Ast.Seq(lbrace,decls,body,rbrace) ->
-      rule_elem arity lbrace;
-      dots force_newline (statement arity) decls;
-      dots force_newline (statement arity) body;
-      rule_elem arity rbrace
-  | Ast.IfThen(header,branch,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity branch;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
-  | Ast.IfThenElse(header,branch1,els,branch2,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity branch1; print_string " ";
-      rule_elem arity els; statement arity branch2;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
-  | Ast.While(header,body,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity body;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
-  | Ast.Do(header,body,tail) ->
-      rule_elem arity header; statement arity body;
-      rule_elem arity tail
-  | Ast.For(header,body,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity body;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
-  | Ast.Iterator(header,body,(_,_,_,aft)) ->
-      rule_elem arity header; statement arity body;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
-  | Ast.Switch(header,lb,cases,rb) ->
-      rule_elem arity header; rule_elem arity lb;
-      List.iter (function x -> case_line arity x; force_newline()) cases;
-      rule_elem arity rb
-  | Ast.Atomic(re) -> rule_elem arity re
-  | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-      rule_elem arity header; rule_elem arity lbrace;
-      dots force_newline (statement arity) decls;
-      dots force_newline (statement arity) body;
-      rule_elem arity rbrace
-  | Ast.Disj([stmt_dots]) ->
-      print_string arity;
-      dots (function _ -> if !print_newlines_disj then force_newline())
-       (statement arity) stmt_dots
-  | Ast.Disj(stmt_dots_list) -> (* ignores newline directive for readability *)
-      print_string arity;
-      force_newline(); print_string "("; force_newline();
-      print_between
-       (function _ -> force_newline();print_string "|"; force_newline())
-       (dots force_newline (statement arity))
-       stmt_dots_list;
-      force_newline(); print_string ")"
-  | Ast.Define(header,body) ->
-      rule_elem arity header; print_string " ";
-      dots force_newline (statement arity) body
-  | Ast.Nest(stmt_dots,whn,multi,_,_) ->
-      print_string arity;
-      nest_dots multi (statement arity)
-       (function _ ->
-         open_box 0;
-         print_between force_newline
-           (whencode (dots force_newline (statement "")) (statement "")) whn;
-         close_box(); force_newline())
-       stmt_dots
-  | Ast.Dots(d,whn,_,_) | Ast.Circles(d,whn,_,_) | Ast.Stars(d,whn,_,_) ->
-      print_string arity; mcode print_string d;
-      open_box 0;
-      print_between force_newline
-       (whencode (dots force_newline (statement "")) (statement "")) whn;
-      close_box(); force_newline()
-  | Ast.OptStm(s) -> statement "?" s
-  | Ast.UniqueStm(s) -> statement "!" s
-
-and print_statement_when whencode =
-  print_string "   WHEN != ";
-  open_box 0;
-  print_between (function _ -> print_string " &"; force_newline())
-    (dots force_newline (statement "")) whencode;
-  close_box()
-
-
-and whencode notfn alwaysfn = function
-    Ast.WhenNot a ->
-      print_string "   WHEN != "; open_box 0; notfn a; close_box()
-  | Ast.WhenAlways a ->
-      print_string "   WHEN = "; open_box 0; alwaysfn a; close_box()
-  | Ast.WhenModifier x -> print_string "   WHEN "; print_when_modif x
-  | Ast.WhenNotTrue a ->
-      print_string "   WHEN != TRUE "; open_box 0; rule_elem "" a; close_box()
-  | Ast.WhenNotFalse a ->
-      print_string "   WHEN != FALSE "; open_box 0; rule_elem "" a; close_box()
-
-and print_when_modif = function
-  | Ast.WhenAny    -> print_string "ANY"
-  | Ast.WhenStrict -> print_string "STRICT"
-  | Ast.WhenForall -> print_string "FORALL"
-  | Ast.WhenExists -> print_string "EXISTS"
-
-and case_line arity c =
-  match Ast.unwrap c with
-    Ast.CaseLine(header,code) ->
-      rule_elem arity header; print_string " ";
-      dots force_newline (statement arity) code
-  | Ast.OptCase(case) -> case_line "?" case
-
-(* --------------------------------------------------------------------- *)
-(* CPP code *)
-
-and inc_file = function
-    Ast.Local(elems) ->
-      print_string "\"";
-      print_between (function _ -> print_string "/") inc_elem elems;
-      print_string "\""
-  | Ast.NonLocal(elems) ->
-      print_string "<";
-      print_between (function _ -> print_string "/") inc_elem elems;
-      print_string ">"
-
-and inc_elem = function
-    Ast.IncPath s -> print_string s
-  | Ast.IncDots -> print_string "..."
-
-(* for export only *)
-let statement_dots l = dots force_newline (statement "") l
-
-let top_level t =
-  match Ast.unwrap t with
-    Ast.FILEINFO(old_file,new_file) ->
-      print_string "--- "; mcode print_string old_file; force_newline();
-      print_string "+++ "; mcode print_string new_file
-  | Ast.DECL(stmt) -> statement "" stmt
-  | Ast.CODE(stmt_dots) ->
-      dots force_newline (statement "") stmt_dots
-  | Ast.ERRORWORDS(exps) ->
-      print_string "error words = [";
-      print_between (function _ -> print_string ", ") expression exps;
-      print_string "]"
-
-let rule =
-  print_between (function _ -> force_newline(); force_newline()) top_level
-
-let pp_print_anything x = !anything x
-
-let _ =
-  anything := function
-      Ast.FullTypeTag(x) -> fullType x
-    | Ast.BaseTypeTag(x) -> baseType x
-    | Ast.StructUnionTag(x) -> structUnion x
-    | Ast.SignTag(x) -> sign x
-    | Ast.IdentTag(x) -> ident x
-    | Ast.ExpressionTag(x) -> expression x
-    | Ast.ConstantTag(x) -> constant x
-    | Ast.UnaryOpTag(x) -> unaryOp x
-    | Ast.AssignOpTag(x) -> assignOp x
-    | Ast.FixOpTag(x) -> fixOp x
-    | Ast.BinaryOpTag(x) -> binaryOp x
-    | Ast.ArithOpTag(x) -> arithOp x
-    | Ast.LogicalOpTag(x) -> logicalOp x
-    | Ast.InitTag(x) -> initialiser x
-    | Ast.DeclarationTag(x) -> declaration x
-    | Ast.StorageTag(x) -> storage x
-    | Ast.IncFileTag(x) -> inc_file x
-    | Ast.Rule_elemTag(x) -> rule_elem "" x
-    | Ast.StatementTag(x) -> statement "" x
-    | Ast.CaseLineTag(x) -> case_line "" x
-    | Ast.ConstVolTag(x) -> const_vol x
-    | Ast.Token(x,Some info) -> print_string_befaft print_string x info
-    | Ast.Token(x,None) -> print_string x
-    | Ast.Code(x) -> let _ = top_level x in ()
-    | Ast.ExprDotsTag(x) -> dots (function _ -> ()) expression x
-    | Ast.ParamDotsTag(x) -> parameter_list x
-    | Ast.StmtDotsTag(x) -> dots (function _ -> ()) (statement "") x
-    | Ast.DeclDotsTag(x) -> dots (function _ -> ()) declaration x
-    | Ast.TypeCTag(x) -> typeC x
-    | Ast.ParamTag(x) -> parameterTypeDef x
-    | Ast.SgrepStartTag(x) -> print_string x
-    | Ast.SgrepEndTag(x) -> print_string x
-
-let rec dep in_and = function
-    Ast.Dep(s) -> print_string s
-  | Ast.AntiDep(s) -> print_string "!"; print_string s
-  | Ast.EverDep(s) -> print_string "ever "; print_string s
-  | Ast.NeverDep(s) -> print_string "never "; print_string s
-  | Ast.AndDep(s1,s2) ->
-      let print_and _ = dep true s1; print_string " && "; dep true s2 in
-      if in_and
-      then print_and ()
-      else (print_string "("; print_and(); print_string ")")
-  | Ast.OrDep(s1,s2) ->
-      let print_or _ = dep false s1; print_string " || "; dep false s2 in
-      if not in_and
-      then print_or ()
-      else (print_string "("; print_or(); print_string ")")
-  | Ast.NoDep -> failwith "not possible"
-
-let unparse z =
-  match z with
-    Ast.ScriptRule (lang,deps,bindings,code) ->
-    print_string "@@";
-    force_newline();
-    print_string ("script:" ^ lang);
-    (match deps with
-      Ast.NoDep -> ()
-    | _ -> print_string " depends on "; dep true deps);
-    force_newline();
-    print_string "@@";
-    force_newline();
-    print_string code;
-    force_newline()
-  | Ast.CocciRule (nm, (deps, drops, exists), x, _) ->
-    print_string "@@";
-    force_newline();
-    print_string nm;
-    (match deps with
-      Ast.NoDep -> ()
-    | _ -> print_string " depends on "; dep true deps);
-    (*
-    print_string "line ";
-    print_int (Ast.get_line (List.hd x));
-    *)
-    force_newline();
-    print_string "@@";
-    print_newlines_disj := true;
-    force_newline();
-    force_newline();
-    rule x;
-    force_newline()
-
-let rule_elem_to_string x =
-  print_newlines_disj := true;
-  Common.format_to_string (function _ -> rule_elem "" x)
-
-let ident_to_string x =
-  print_newlines_disj := true;
-  Common.format_to_string (function _ -> ident x)
-
-let unparse_to_string x =
-  print_newlines_disj := true;
-  Common.format_to_string (function _ -> unparse x)
-
-let print_rule_elem re =
-  let nl = !print_newlines_disj in
-  print_newlines_disj := false;
-  rule_elem "" re;
-  print_newlines_disj := nl
-
diff --git a/parsing_cocci/.#single_statement.ml.1.51 b/parsing_cocci/.#single_statement.ml.1.51
deleted file mode 100644 (file)
index d8b86c0..0000000
+++ /dev/null
@@ -1,596 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* detect statements that are between dots in the minus code, because they
-may need a special treatment if they are if branches *)
-
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-module V0 = Visitor_ast0
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Helpers *)
-
-let left_dots f l =
-  match Ast0.undots l with
-    [] -> false
-  | x::xs -> f x
-
-let right_dots f l =
-  match List.rev (Ast0.undots l) with
-    [] -> false
-  | x::xs -> f x
-
-let modif_before_mcode mc =
-  match Ast0.get_mcode_mcodekind mc with
-    Ast0.MINUS mc -> true (*conservative; don't want to hunt right for + code*)
-  | Ast0.PLUS -> failwith "not possible"
-  | Ast0.CONTEXT mc ->
-      (match !mc with
-       (Ast.BEFORE _,_,_) -> true
-      |        (Ast.BEFOREAFTER _,_,_) -> true
-      |        _ -> false)
-  | Ast0.MIXED mc -> true (* don't think mcode can be mixed *)
-
-let modif_after_mcodekind = function
-    Ast0.MINUS mc -> true (*conservative; don't want to hunt right for + code*)
-  | Ast0.PLUS -> failwith "not possible"
-  | Ast0.CONTEXT mc ->
-      (match !mc with
-       (Ast.AFTER _,_,_) -> true
-      |        (Ast.BEFOREAFTER _,_,_) -> true
-      |        _ -> false)
-  | Ast0.MIXED mc -> true (* don't think mcode can be mixed *)
-
-let modif_after_mcode mc = modif_after_mcodekind (Ast0.get_mcode_mcodekind mc)
-
-let any_statements =
-  List.exists
-    (List.exists
-       (function
-          Ast.StatementTag(_) | Ast.StmtDotsTag(_)
-        | Ast.DeclarationTag(_) | Ast.DeclDotsTag(_) -> true | _ -> false))
-
-let modif_before x =
-  match Ast0.get_mcodekind x with
-    Ast0.PLUS -> failwith "not possible"
-  | Ast0.MINUS mc ->
-      (match !mc with
-       (* do better for the common case of replacing a stmt by another one *)
-       ([[Ast.StatementTag(s)]],_) ->
-         (match Ast.unwrap s with
-           Ast.IfThen(_,_,_) -> true (* potentially dangerous *)
-         | _ -> false)
-      |        (_,_) -> true)
-  | Ast0.CONTEXT mc | Ast0.MIXED mc ->
-      (match !mc with
-       (Ast.BEFORE _,_,_) -> true
-      |        (Ast.BEFOREAFTER _,_,_) -> true
-      |        _ -> false)
-
-let modif_after x =
-  match Ast0.get_mcodekind x with
-    Ast0.PLUS -> failwith "not possible"
-  | Ast0.MINUS mc ->
-      (match !mc with
-       (* do better for the common case of replacing a stmt by another one *)
-       ([[Ast.StatementTag(s)]],_) ->
-         (match Ast.unwrap s with
-           Ast.IfThen(_,_,_) -> true (* potentially dangerous *)
-         | _ -> false)
-      |        (l,_) -> any_statements l)
-  | Ast0.CONTEXT mc | Ast0.MIXED mc ->
-      (match !mc with
-       (Ast.AFTER _,_,_) -> true
-      |        (Ast.BEFOREAFTER _,_,_) -> true
-      |        _ -> false)    
-
-(* Identifier *)
-let rec left_ident i =
-  modif_before i or
-  match Ast0.unwrap i with
-    Ast0.Id(name) -> modif_before_mcode name
-  | Ast0.MetaId(name,_,_) -> modif_before_mcode name
-  | Ast0.MetaFunc(name,_,_) -> modif_before_mcode name
-  | Ast0.MetaLocalFunc(name,_,_) -> modif_before_mcode name
-  | Ast0.OptIdent(id) -> left_ident id
-  | Ast0.UniqueIdent(id) -> left_ident id
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let rec left_expression e =
-  modif_before e or
-  match Ast0.unwrap e with
-    Ast0.Ident(id) -> left_ident id
-  | Ast0.Constant(const) -> modif_before_mcode const
-  | Ast0.FunCall(fn,lp,args,rp) -> left_expression fn
-  | Ast0.Assignment(left,op,right,_) -> left_expression left
-  | Ast0.CondExpr(exp1,why,exp2,colon,exp3) -> left_expression exp1
-  | Ast0.Postfix(exp,op) -> left_expression exp
-  | Ast0.Infix(exp,op) -> modif_before_mcode op
-  | Ast0.Unary(exp,op) -> modif_before_mcode op
-  | Ast0.Binary(left,op,right) -> left_expression left
-  | Ast0.Nested(left,op,right) -> left_expression left
-  | Ast0.Paren(lp,exp,rp) -> modif_before_mcode lp
-  | Ast0.ArrayAccess(exp1,lb,exp2,rb) -> left_expression exp1
-  | Ast0.RecordAccess(exp,pt,field) -> left_expression exp
-  | Ast0.RecordPtAccess(exp,ar,field) -> left_expression exp
-  | Ast0.Cast(lp,ty,rp,exp) -> modif_before_mcode lp
-  | Ast0.SizeOfExpr(szf,exp) -> modif_before_mcode szf
-  | Ast0.SizeOfType(szf,lp,ty,rp) -> modif_before_mcode szf
-  | Ast0.TypeExp(ty) -> left_typeC ty
-  | Ast0.MetaErr(name,_,_) -> modif_before_mcode name
-  | Ast0.MetaExpr(name,_,ty,_,_) -> modif_before_mcode name
-  | Ast0.MetaExprList(name,_,_) -> modif_before_mcode name
-  | Ast0.EComma(cm) -> modif_before_mcode cm
-  | Ast0.DisjExpr(_,exp_list,_,_) -> List.exists left_expression exp_list
-  | Ast0.NestExpr(starter,expr_dots,ender,_,multi) ->
-      left_dots left_expression expr_dots
-  | Ast0.Edots(dots,_) | Ast0.Ecircles(dots,_) | Ast0.Estars(dots,_) -> false
-  | Ast0.OptExp(exp) -> left_expression exp
-  | Ast0.UniqueExp(exp) -> left_expression exp
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and left_typeC t =
-  modif_before t or
-  match Ast0.unwrap t with
-    Ast0.ConstVol(cv,ty) -> modif_before_mcode cv
-  | Ast0.BaseType(ty,Some sgn) -> modif_before_mcode sgn
-  | Ast0.BaseType(ty,None) -> modif_before_mcode ty
-  | Ast0.ImplicitInt(sgn) -> modif_before_mcode sgn
-  | Ast0.Pointer(ty,star) -> left_typeC ty
-  | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) -> left_typeC ty
-  | Ast0.FunctionType(Some ty,lp1,params,rp1) -> left_typeC ty
-  | Ast0.FunctionType(None,lp1,params,rp1) -> modif_before_mcode lp1
-  | Ast0.Array(ty,lb,size,rb) -> left_typeC ty
-  | Ast0.StructUnionName(kind,name) -> modif_before_mcode kind
-  | Ast0.StructUnionDef(ty,lb,decls,rb) -> left_typeC ty
-  | Ast0.TypeName(name) -> modif_before_mcode name
-  | Ast0.MetaType(name,_) -> modif_before_mcode name
-  | Ast0.DisjType(lp,types,mids,rp) -> List.exists left_typeC types
-  | Ast0.OptType(ty) -> left_typeC ty
-  | Ast0.UniqueType(ty) -> left_typeC ty
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and left_declaration d =
-  modif_before d or
-  match Ast0.unwrap d with
-    Ast0.Init(Some stg,ty,id,eq,ini,sem) -> modif_before_mcode stg
-  | Ast0.Init(None,ty,id,eq,ini,sem) -> left_typeC ty
-  | Ast0.UnInit(Some stg,ty,id,sem) -> modif_before_mcode stg
-  | Ast0.UnInit(None,ty,id,sem) -> left_typeC ty
-  | Ast0.MacroDecl(name,lp,args,rp,sem) -> left_ident name
-  | Ast0.TyDecl(ty,sem) -> left_typeC ty
-  | Ast0.Typedef(stg,ty,id,sem) -> modif_before_mcode stg
-  | Ast0.DisjDecl(_,decls,_,_) -> List.exists left_declaration decls
-  | Ast0.Ddots(dots,_) -> false
-  | Ast0.OptDecl(decl) -> left_declaration decl
-  | Ast0.UniqueDecl(decl) -> left_declaration decl
-
-and right_declaration d =
-  modif_before d or
-  match Ast0.unwrap d with
-    Ast0.Init(_,ty,id,eq,ini,sem) -> modif_after_mcode sem
-  | Ast0.UnInit(_,ty,id,sem) -> modif_after_mcode sem
-  | Ast0.MacroDecl(name,lp,args,rp,sem) -> modif_after_mcode sem
-  | Ast0.TyDecl(ty,sem) -> modif_after_mcode sem
-  | Ast0.Typedef(stg,ty,id,sem) -> modif_after_mcode sem
-  | Ast0.DisjDecl(_,decls,_,_) -> List.exists right_declaration decls
-  | Ast0.Ddots(dots,_) -> false
-  | Ast0.OptDecl(decl) -> right_declaration decl
-  | Ast0.UniqueDecl(decl) -> right_declaration decl
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and left_statement s =
-  modif_before s or
-  match Ast0.unwrap s with
-    Ast0.FunDecl(_,fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-      (* irrelevant *) false
-  | Ast0.Decl(_,decl) -> left_declaration decl
-  | Ast0.Seq(lbrace,body,rbrace) -> modif_before_mcode lbrace
-  | Ast0.ExprStatement(exp,sem) -> left_expression exp
-  | Ast0.IfThen(iff,lp,exp,rp,branch1,(info,aft)) -> modif_before_mcode iff
-  | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,(info,aft)) ->
-      modif_before_mcode iff
-  | Ast0.While(whl,lp,exp,rp,body,(info,aft)) -> modif_before_mcode whl
-  | Ast0.Do(d,body,whl,lp,exp,rp,sem) -> modif_before_mcode d
-  | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,(info,aft)) ->
-      modif_before_mcode fr
-  | Ast0.Iterator(nm,lp,args,rp,body,(info,aft)) -> left_ident nm
-  | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) -> modif_before_mcode switch
-  | Ast0.Break(br,sem) -> modif_before_mcode br
-  | Ast0.Continue(cont,sem) -> modif_before_mcode cont
-  | Ast0.Label(l,dd) -> left_ident l
-  | Ast0.Goto(goto,l,sem) -> modif_before_mcode goto
-  | Ast0.Return(ret,sem) -> modif_before_mcode ret
-  | Ast0.ReturnExpr(ret,exp,sem) -> modif_before_mcode ret
-  | Ast0.MetaStmt(name,pure) -> modif_before_mcode name
-  | Ast0.MetaStmtList(name,_) -> modif_before_mcode name
-  | Ast0.Disj(_,statement_dots_list,_,_) ->
-      List.exists (left_dots left_statement) statement_dots_list
-  | Ast0.Nest(starter,stmt_dots,ender,whencode,multi) ->
-      left_dots left_statement stmt_dots
-  | Ast0.Exp(exp) -> false (* can only be replaced by an expression *)
-  | Ast0.TopExp(exp) -> false (* as above *)
-  | Ast0.Ty(ty) -> false (* can only be replaced by a type *)
-  | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) -> false
-  | Ast0.Include(inc,s) -> modif_before_mcode inc
-  | Ast0.Define(def,id,params,body) -> modif_before_mcode def
-  | Ast0.OptStm(re) -> left_statement re
-  | Ast0.UniqueStm(re) -> left_statement re
-
-and right_statement s =
-  modif_after s or
-  match Ast0.unwrap s with
-    Ast0.FunDecl(_,fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-      (* irrelevant *) false
-  | Ast0.Decl(_,decl) -> right_declaration decl
-  | Ast0.Seq(lbrace,body,rbrace) -> modif_after_mcode rbrace
-  | Ast0.ExprStatement(exp,sem) -> modif_after_mcode sem
-  | Ast0.IfThen(iff,lp,exp,rp,branch1,(info,aft)) -> modif_after_mcodekind aft
-  | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,(info,aft)) ->
-      modif_after_mcodekind aft
-  | Ast0.While(whl,lp,exp,rp,body,(info,aft)) -> modif_after_mcodekind aft
-  | Ast0.Do(d,body,whl,lp,exp,rp,sem) -> modif_after_mcode sem
-  | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,(info,aft)) ->
-      modif_after_mcodekind aft
-  | Ast0.Iterator(nm,lp,args,rp,body,(info,aft)) ->
-      modif_after_mcodekind aft
-  | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) -> modif_after_mcode rb
-  | Ast0.Break(br,sem) -> modif_after_mcode sem
-  | Ast0.Continue(cont,sem) -> modif_after_mcode sem
-  | Ast0.Label(l,dd) -> modif_after_mcode dd
-  | Ast0.Goto(goto,l,sem) -> modif_after_mcode sem
-  | Ast0.Return(ret,sem) -> modif_after_mcode sem
-  | Ast0.ReturnExpr(ret,exp,sem) -> modif_after_mcode sem
-  | Ast0.MetaStmt(name,pure) -> modif_after_mcode name
-  | Ast0.MetaStmtList(name,_) -> modif_after_mcode name
-  | Ast0.Disj(_,statement_dots_list,_,_) ->
-      List.exists (right_dots right_statement) statement_dots_list
-  | Ast0.Nest(starter,stmt_dots,ender,whencode,multi) ->
-      right_dots right_statement stmt_dots
-  | Ast0.Exp(exp) -> false (* can only be replaced by an expression *)
-  | Ast0.TopExp(exp) -> false (* as above *)
-  | Ast0.Ty(ty) -> false (* can only be replaced by a type *)
-  | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) -> false
-  | Ast0.Include(inc,s) -> modif_after_mcode s
-  | Ast0.Define(def,id,params,body) -> right_dots right_statement body
-  | Ast0.OptStm(re) -> right_statement re
-  | Ast0.UniqueStm(re) -> right_statement re
-
-(* --------------------------------------------------------------------- *)
-
-
-(* A very coarse approximation.  We would really only like to return true
-if a new statement is added.  For this it would be best to correlate with the
-plus slice. Or at least be sure that the new stuff is on the far left or
-far right. *)
-
-let rec adding_something s =
-  match Ast0.get_mcodekind s with
-    Ast0.MINUS(mc) ->
-      (match !mc with
-       (* do better for the common case of replacing a stmt by another one *)
-       ([[Ast.StatementTag(s)]],_) ->
-         (match Ast.unwrap s with
-           Ast.IfThen(_,_,_) -> true (* potentially dangerous *)
-         | _ -> false)
-      |        (_,_) -> true)
-  | Ast0.CONTEXT(mc) ->
-      let (text,tinfo1,tinfo2) = !mc in
-      (match text with Ast.NOTHING -> false | _ -> true)
-  | Ast0.MIXED(_) ->
-      not(contains_only_minus.V0.combiner_statement s) (*&&
-      (left_statement s) or (right_statement s)*)
-  | _ -> failwith "unexpected plus code"
-
-(* why do we need this; MINUS should mean the same thing *)
-and contains_only_minus =
-  let bind x y = x && y in
-  let option_default = true in
-  let mcodekind = function
-      Ast0.MINUS(mc) ->
-       (match !mc with
-         ([],_) -> true
-       | _ -> false)
-    | Ast0.CONTEXT(mc) -> false
-    | _ -> false in
-  let mcode (_,_,_,mc,_) = mcodekind mc in
-
-  let donothing r k e = mcodekind (Ast0.get_mcodekind e) && k e in
-
-  let dots r k e =
-    match Ast0.unwrap e with
-      Ast0.DOTS([]) | Ast0.CIRCLES([]) | Ast0.STARS([]) -> true
-    | _ -> k e in
-
-  let expression r k e =
-    mcodekind (Ast0.get_mcodekind e) &&
-    match Ast0.unwrap e with
-      Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-       List.for_all r.V0.combiner_expression expr_list
-    | _ -> k e in
-
-  let declaration r k e =
-    mcodekind (Ast0.get_mcodekind e) &&
-    match Ast0.unwrap e with
-      Ast0.DisjDecl(starter,decls,mids,ender) ->
-       List.for_all r.V0.combiner_declaration decls
-    | _ -> k e in
-
-  let typeC r k e =
-    mcodekind (Ast0.get_mcodekind e) &&
-    match Ast0.unwrap e with
-      Ast0.DisjType(starter,types,mids,ender) ->
-       List.for_all r.V0.combiner_typeC types
-    | _ -> k e in
-
-  let statement r k e =
-    mcodekind (Ast0.get_mcodekind e) &&
-    match Ast0.unwrap e with
-      Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-       List.for_all r.V0.combiner_statement_dots statement_dots_list
-    | _ -> k e in
-
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    dots dots dots dots dots dots
-    donothing expression typeC donothing donothing declaration
-    statement donothing donothing
-
-
-(* needs a special case when there is a Disj or an empty DOTS *)
-(* ---------------------------------------------------------------------- *)
-
-(*
-Doesn't really work:
-
-  if (acpi_device_dir(device))
-+ {
-    remove_proc_entry(acpi_device_bid(device), acpi_ac_dir);
-+   acpi_device_dir(device) = NULL;
-+ }
-
-The last two + lines get associated with the end of the if, not with the
-branch, so the braces get added in oddly.
-*)
-
-let add_braces orig_s =
-  let s = (Iso_pattern.rebuild_mcode None).V0.rebuilder_statement orig_s in
-  let new_mcodekind =
-    match Ast0.get_mcodekind s with
-      Ast0.MINUS(mc) ->
-       let (text,tinfo) = !mc in
-       Ast0.MINUS(ref([Ast.mkToken "{"]::text@[[Ast.mkToken "}"]],tinfo))
-    | Ast0.CONTEXT(mc) ->
-       let (text,tinfo1,tinfo2) = !mc in
-       let new_text =
-         match text with
-           Ast.BEFORE(bef) ->
-             Ast.BEFOREAFTER([Ast.mkToken "{"]::bef,[[Ast.mkToken "}"]])
-         | Ast.AFTER(aft) ->
-             Ast.BEFOREAFTER([[Ast.mkToken "{"]],aft@[[Ast.mkToken "}"]])
-         | Ast.BEFOREAFTER(bef,aft) ->
-             Ast.BEFOREAFTER([Ast.mkToken "{"]::bef,aft@[[Ast.mkToken "}"]])
-         | Ast.NOTHING ->
-             Ast.BEFOREAFTER([[Ast.mkToken "{"]],[[Ast.mkToken "}"]]) in
-       Ast0.CONTEXT(ref(new_text,tinfo1,tinfo2))
-    | Ast0.MIXED(mc) ->
-       let (text,tinfo1,tinfo2) = !mc in
-       let new_text =
-         match text with
-           Ast.BEFORE(bef) ->
-             Ast.BEFOREAFTER([Ast.mkToken "{"]::bef,[[Ast.mkToken "}"]])
-         | Ast.AFTER(aft) ->
-             Ast.BEFOREAFTER([[Ast.mkToken "{"]],aft@[[Ast.mkToken "}"]])
-         | Ast.BEFOREAFTER(bef,aft) ->
-             Ast.BEFOREAFTER([Ast.mkToken "{"]::bef,aft@[[Ast.mkToken "}"]])
-         | Ast.NOTHING ->
-             Ast.BEFOREAFTER([[Ast.mkToken "{"]],[[Ast.mkToken "}"]]) in
-       Ast0.MIXED(ref(new_text,tinfo1,tinfo2))
-    | _ -> failwith "unexpected plus code" in
-  Ast0.set_mcodekind s new_mcodekind;
-  Compute_lines.statement s
-
-(* ---------------------------------------------------------------------- *)
-
-let is_dots x =
-  match Ast0.unwrap x with
-    Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_)
-  | Ast0.Nest(_,_,_,_,_) -> true
-  | _ -> false
-
-let all_minus s =
-  match Ast0.get_mcodekind s with
-    Ast0.MINUS(_) -> true
-  | _ -> false
-
-let rec unchanged_minus s =
-  match Ast0.get_mcodekind s with
-    Ast0.MINUS(mc) -> (match !mc with ([],_) -> true | _ -> false)
-  | _ -> false
-
-let rec do_branch s =
-  if unchanged_minus s
-  then
-    Ast0.set_dots_bef_aft s (Ast0.DroppingBetweenDots(add_braces s))
-  else
-    match Ast0.unwrap s with
-      Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-       let stmts =
-         List.map
-           (function s ->
-             match Ast0.unwrap s with
-               Ast0.DOTS([s]) ->
-                 Ast0.rewrap s (Ast0.DOTS([do_branch s]))
-             | Ast0.DOTS(_) -> s
-             | _ -> failwith "not supported")
-           statement_dots_list in
-       Ast0.rewrap s (Ast0.Disj(starter,stmts,mids,ender))
-    | _ -> s
-
-let rec statement dots_before dots_after s =
-  let do_one s =
-    if dots_before && dots_after
-    then
-      if unchanged_minus s
-      then
-       (let with_braces = add_braces s in
-       Ast0.set_dots_bef_aft s (Ast0.DroppingBetweenDots(with_braces)))
-      else if adding_something s
-      then
-       (let with_braces = add_braces s in
-       Ast0.set_dots_bef_aft s (Ast0.AddingBetweenDots(with_braces)))
-      else s
-    else s in
-
-  match Ast0.unwrap s with
-    Ast0.FunDecl(x,fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-      (* true for close brace, because that represents any way we can
-        exit the function, which is not necessarily followed by an explicit
-        close brace. *)
-      Ast0.rewrap s
-       (Ast0.FunDecl(x,fninfo,name,lp,params,rp,lbrace,
-                     statement_dots false true body,
-                     rbrace))
-  | Ast0.Decl(_,_) -> s
-  | Ast0.Seq(lbrace,body,rbrace) ->
-      Ast0.rewrap s
-       (Ast0.Seq(lbrace,statement_dots false false body,rbrace))
-  | Ast0.ExprStatement(exp,sem) -> do_one s
-  | Ast0.IfThen(iff,lp,exp,rp,branch1,x) ->
-      do_one
-       (Ast0.rewrap s
-          (Ast0.IfThen(iff,lp,exp,rp,statement false false branch1,x)))
-  | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,x) ->
-      do_one
-       (Ast0.rewrap s
-          (Ast0.IfThenElse
-             (iff,lp,exp,rp,
-               statement false false branch1,els,
-               statement false false branch2,x)))
-  | Ast0.While(whl,lp,exp,rp,body,x) ->
-      do_one
-       (Ast0.rewrap s
-          (Ast0.While(whl,lp,exp,rp,statement false false body,x)))
-  | Ast0.Do(d,body,whl,lp,exp,rp,sem) ->
-      do_one
-       (Ast0.rewrap s
-          (Ast0.Do(d,statement false false body,whl,lp,exp,rp,sem)))
-  | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,x) ->
-      do_one
-       (Ast0.rewrap s
-          (Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,
-                    statement false false body,x)))
-  | Ast0.Iterator(nm,lp,args,rp,body,x) ->
-      do_one
-       (Ast0.rewrap s
-          (Ast0.Iterator(nm,lp,args,rp,statement false false body,x)))
-  | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-      do_one
-       (Ast0.rewrap s
-          (Ast0.Switch(switch,lp,exp,rp,lb,
-                       Ast0.rewrap cases
-                         (Ast0.DOTS(List.map case_line (Ast0.undots cases))),
-                       rb)))
-  | Ast0.Break(br,sem) -> do_one s
-  | Ast0.Continue(cont,sem) -> do_one s
-  | Ast0.Label(l,dd) -> do_one s
-  | Ast0.Goto(goto,l,sem) -> do_one s
-  | Ast0.Return(ret,sem) -> do_one s
-  | Ast0.ReturnExpr(ret,exp,sem) -> do_one s
-  | Ast0.MetaStmt(name,_) -> do_one s
-  | Ast0.MetaStmtList(name,_) -> do_one s
-  | Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-      Ast0.rewrap s
-       (Ast0.Disj(starter,
-                  List.map (statement_dots dots_before dots_after)
-                    statement_dots_list,
-                  mids,ender))
-  | Ast0.Nest(starter,stmt_dots,ender,whencode,multi) ->
-      Ast0.rewrap s
-       (Ast0.Nest
-          (starter,statement_dots true true stmt_dots,ender,whencode,multi))
-  | Ast0.Exp(exp) -> s
-  | Ast0.TopExp(exp) -> s
-  | Ast0.Ty(ty) -> s
-  | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) -> s
-  | Ast0.Include(inc,string) -> s (* doesn't affect the need for braces *)
-  | Ast0.Define(def,id,params,body) -> s (* same as include *)
-  | Ast0.OptStm(re) -> 
-      Ast0.rewrap s
-       (Ast0.OptStm(statement dots_before dots_after re))
-  | Ast0.UniqueStm(re) ->
-      Ast0.rewrap s
-       (Ast0.UniqueStm(statement dots_before dots_after re))
-
-and case_line c =
-  Ast0.rewrap c
-    (match Ast0.unwrap c with
-      Ast0.Default(def,colon,code) ->
-       Ast0.Default(def,colon,statement_dots false false code)
-    | Ast0.Case(case,exp,colon,code) ->
-       Ast0.Case(case,exp,colon,statement_dots false false code)
-    | Ast0.OptCase(case) -> Ast0.OptCase(case_line c))
-  
-and do_statement_dots dots_before dots_after = function
-    [] -> []
-  | [x] -> [statement dots_before dots_after x]
-  | dots::rest when is_dots dots ->
-      dots::(do_statement_dots true dots_after rest)
-  | x::(dots::_ as rest) when is_dots dots ->
-      (statement dots_before true x)::
-      do_statement_dots false dots_after rest
-  | x::rest ->
-      (statement dots_before false x)::
-      do_statement_dots false dots_after rest
-       
-and statement_dots dots_before dots_after d =
-  Ast0.rewrap d
-    (match Ast0.unwrap d with
-      Ast0.DOTS(l) ->
-       Ast0.DOTS(do_statement_dots dots_before dots_after l)
-    | Ast0.CIRCLES(l) ->
-       Ast0.CIRCLES(do_statement_dots dots_before dots_after l)
-    | Ast0.STARS(l) ->
-       Ast0.STARS(do_statement_dots dots_before dots_after l))
-
-let top_level t =
-  Ast0.rewrap t
-    (match Ast0.unwrap t with
-      Ast0.DECL(stmt_dots) -> Ast0.DECL(statement true true stmt_dots)
-    | Ast0.CODE(stmt_dots) -> Ast0.CODE(statement_dots true true stmt_dots)
-    | t -> t)
-
-let single_statement l =
-  if !Flag_parsing_cocci.sgrep_mode then l else List.map top_level l
diff --git a/parsing_cocci/.#test_exps.ml.1.3 b/parsing_cocci/.#test_exps.ml.1.3
deleted file mode 100644 (file)
index 528d7e2..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-
-(* call set_test_pos on test expressions *)
-
-(* The goal of this is to identify test expressions in the SmPL file, so that
-isomorphisms like X != NULL => X are only applied in a test expression context.
-
-There is a related check in cocci_vs_c3.ml that in x || ..., a match
-without the || is only accepted in a test expression context.  This uses
-the annotations in the C file. *)
-
-let rec process_exp e =
-  let e = Ast0.set_test_pos e in
-  match Ast0.unwrap e with
-    Ast0.Paren(lp,e,rp) ->
-      Ast0.rewrap e (Ast0.Paren(lp,process_exp e,rp))
-  | _ -> e
-
-let set_test_poss =
-  let donothing r k e = k e in
-  let mcode x = x in
-
-  let expression r k e =
-    let e = k e in
-    match Ast0.unwrap e with
-      Ast0.CondExpr(e1,q,e2,c,e3) ->
-       Ast0.rewrap e (Ast0.CondExpr(process_exp e1,q,e2,c,e3))
-    | Ast0.Binary(e1,op,e2) ->
-       (match Ast0.unwrap_mcode op with
-         Ast.Logical(Ast.AndLog) | Ast.Logical(Ast.OrLog) ->
-           Ast0.rewrap e (Ast0.Binary(process_exp e1,op,process_exp e2))
-       | _ -> e)
-    | Ast0.Unary(e1,op) ->
-       (match Ast0.unwrap_mcode op with
-         Ast.Not -> Ast0.rewrap e (Ast0.Unary(process_exp e1,op))
-       | _ -> e)
-    | _ -> e in
-
-  let statement r k s =
-    let s = k s in
-    match Ast0.unwrap s with
-      Ast0.IfThen(i,lp,e,rp,s1,aft) ->
-       Ast0.rewrap s (Ast0.IfThen(i,lp,process_exp e,rp,s1,aft))
-    | Ast0.IfThenElse(i,lp,e,rp,s1,e1,s2,aft) ->
-       Ast0.rewrap s (Ast0.IfThenElse(i,lp,process_exp e,rp,s1,e1,s2,aft))
-    | Ast0.While(i,lp,e,rp,s1,aft) ->
-       Ast0.rewrap s (Ast0.While(i,lp,process_exp e,rp,s1,aft))
-    | Ast0.Do(d,s1,w,lp,e,rp,sc) ->
-       Ast0.rewrap s (Ast0.Do(d,s1,w,lp,process_exp e,rp,sc))
-    | Ast0.For(f,lp,e1,sc1,Some e2,sc2,e3,rp,s1,aft) ->
-       Ast0.rewrap s
-         (Ast0.For(f,lp,e1,sc1,Some (process_exp e2),sc2,e3,rp,s1,aft))
-    | _ -> s in
-
-  V0.rebuilder
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      donothing expression donothing donothing donothing donothing statement
-      donothing donothing
-
-let process = List.map set_test_poss.V0.rebuilder_top_level
-
-let process_anything = set_test_poss.V0.rebuilder_anything
-
diff --git a/parsing_cocci/.#type_infer.ml.1.54 b/parsing_cocci/.#type_infer.ml.1.54
deleted file mode 100644 (file)
index 7ae9f85..0000000
+++ /dev/null
@@ -1,356 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module T = Type_cocci
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-
-(* Type inference:
-Just propagates information based on declarations.  Could try to infer
-more precise information about expression metavariables, but not sure it is
-worth it.  The most obvious goal is to distinguish between test expressions
-that have pointer, integer, and boolean type when matching isomorphisms,
-but perhaps other needs will become apparent. *)
-
-(* "functions" that return a boolean value *)
-let bool_functions = ["likely";"unlikely"]
-
-let err wrapped ty s =
-  T.typeC ty; Format.print_newline();
-  failwith (Printf.sprintf "line %d: %s" (Ast0.get_line wrapped) s)
-
-type id = Id of string | Meta of (string * string)
-
-let rec lub_type t1 t2 =
-  match (t1,t2) with
-    (None,None) -> None
-  | (None,Some t) -> t2
-  | (Some t,None) -> t1
-  | (Some t1,Some t2) ->
-      let rec loop = function
-         (T.Unknown,t2) -> t2
-       | (t1,T.Unknown) -> t1
-       | (T.ConstVol(cv1,ty1),T.ConstVol(cv2,ty2)) when cv1 = cv2 ->
-           T.ConstVol(cv1,loop(ty1,ty2))
-       | (T.Pointer(ty1),T.Pointer(ty2)) ->
-           T.Pointer(loop(ty1,ty2))
-       | (ty1,T.Pointer(ty2)) -> T.Pointer(ty2)
-       | (T.Pointer(ty1),ty2) -> T.Pointer(ty1)
-       | (T.Array(ty1),T.Array(ty2)) -> T.Array(loop(ty1,ty2))
-       | (T.TypeName(s1),t2) -> t2
-       | (t1,T.TypeName(s1)) -> t1
-       | (t1,_) -> t1 in (* arbitrarily pick the first, assume type correct *)
-      Some (loop (t1,t2))
-
-let lub_envs envs =
-  List.fold_left
-    (function acc ->
-      function env ->
-       List.fold_left
-         (function acc ->
-           function (var,ty) ->
-             let (relevant,irrelevant) =
-               List.partition (function (x,_) -> x = var) acc in
-             match relevant with
-               [] -> (var,ty)::acc
-             | [(x,ty1)] ->
-                 (match lub_type (Some ty) (Some ty1) with
-                   Some new_ty -> (var,new_ty)::irrelevant
-                 | None -> irrelevant)
-             | _ -> failwith "bad type environment")
-         acc env)
-    [] envs
-
-let rec propagate_types env =
-  let option_default = None in
-  let bind x y = option_default in (* no generic way of combining types *)
-
-  let mcode x = option_default in
-
-  let ident r k i =
-    match Ast0.unwrap i with
-      Ast0.Id(id) ->
-       (try Some(List.assoc (Id(Ast0.unwrap_mcode id)) env)
-       with Not_found -> None)
-    | Ast0.MetaId(id,_,_) ->
-       (try Some(List.assoc (Meta(Ast0.unwrap_mcode id)) env)
-       with Not_found -> None)
-    | _ -> k i in
-
-  let strip_cv = function
-      Some (T.ConstVol(_,t)) -> Some t
-    | t -> t in
-
-  let expression r k e =
-    let res = k e in
-    let ty =
-      match Ast0.unwrap e with
-       Ast0.Ident(id) -> Ast0.set_type e res; res
-      | Ast0.Constant(const) ->
-         (match Ast0.unwrap_mcode const with
-           Ast.String(_) -> Some (T.Pointer(T.BaseType(T.CharType,None)))
-         | Ast.Char(_) -> Some (T.BaseType(T.CharType,None))
-         | Ast.Int(_) -> Some (T.BaseType(T.IntType,None))
-         | Ast.Float(_) ->  Some (T.BaseType(T.FloatType,None)))
-      | Ast0.FunCall(fn,lp,args,rp) ->
-         (match Ast0.get_type fn with
-           Some (T.FunctionPointer(ty)) -> Some ty
-         |  _ ->
-             (match Ast0.unwrap fn with
-               Ast0.Ident(id) ->
-                 (match Ast0.unwrap id with
-                   Ast0.Id(id) ->
-                     if List.mem (Ast0.unwrap_mcode id) bool_functions
-                     then Some(T.BaseType(T.BoolType,None))
-                     else None
-                 | _ -> None)
-             | _ -> None))
-      | Ast0.Assignment(exp1,op,exp2,_) ->
-         let ty = lub_type (Ast0.get_type exp1) (Ast0.get_type exp2) in
-         Ast0.set_type exp1 ty; Ast0.set_type exp2 ty; ty
-      | Ast0.CondExpr(exp1,why,Some exp2,colon,exp3) ->
-         let ty = lub_type (Ast0.get_type exp2) (Ast0.get_type exp3) in
-         Ast0.set_type exp2 ty; Ast0.set_type exp3 ty; ty
-      | Ast0.CondExpr(exp1,why,None,colon,exp3) -> Ast0.get_type exp3
-      | Ast0.Postfix(exp,op) | Ast0.Infix(exp,op) -> (* op is dec or inc *)
-         Ast0.get_type exp
-      | Ast0.Unary(exp,op) ->
-         (match Ast0.unwrap_mcode op with
-           Ast.GetRef ->
-             (match Ast0.get_type exp with
-               None -> Some (T.Pointer(T.Unknown))
-             | Some t -> Some (T.Pointer(t)))
-         | Ast.DeRef ->
-             (match Ast0.get_type exp with
-               Some (T.Pointer(t)) -> Some t
-             | _ -> None)
-         | Ast.UnPlus -> Ast0.get_type exp
-         | Ast.UnMinus -> Ast0.get_type exp
-         | Ast.Tilde -> Ast0.get_type exp
-         | Ast.Not -> Some(T.BaseType(T.BoolType,None)))
-      | Ast0.Nested(exp1,op,exp2) -> failwith "nested in type inf not possible"
-      | Ast0.Binary(exp1,op,exp2) ->
-         let ty1 = Ast0.get_type exp1 in
-         let ty2 = Ast0.get_type exp2 in
-         let same_type = function
-             (None,None) -> Some (T.BaseType(T.IntType,None))
-           | (Some (T.Pointer ty1),Some ty2) ->
-               Some (T.Pointer ty1)
-           | (Some ty1,Some (T.Pointer ty2)) ->
-               Some (T.Pointer ty2)
-           | (t1,t2) ->
-               let ty = lub_type t1 t2 in
-               Ast0.set_type exp1 ty; Ast0.set_type exp2 ty; ty in
-         (match Ast0.unwrap_mcode op with
-           Ast.Arith(op) -> same_type (ty1, ty2)
-         | Ast.Logical(op) ->
-             let ty = lub_type ty1 ty2 in
-             Ast0.set_type exp1 ty; Ast0.set_type exp2 ty;
-             Some(T.BaseType(T.BoolType,None)))
-      | Ast0.Paren(lp,exp,rp) -> Ast0.get_type exp
-      | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-         (match strip_cv (Ast0.get_type exp2) with
-           None -> Ast0.set_type exp2 (Some(T.BaseType(T.IntType,None)))
-         | Some(T.BaseType(T.IntType,None)) -> ()
-         | Some (T.MetaType(_,_,_)) -> ()
-         | Some (T.TypeName _) -> ()
-         | Some ty -> err exp2 ty "bad type for an array index");
-         (match strip_cv (Ast0.get_type exp1) with
-           None -> None
-         | Some (T.Array(ty)) -> Some ty
-         | Some (T.Pointer(ty)) -> Some ty
-         | Some (T.MetaType(_,_,_)) -> None
-         | Some x -> err exp1 x "ill-typed array reference")
-      | Ast0.RecordAccess(exp,pt,field) ->
-         (match strip_cv (Ast0.get_type exp) with
-           None -> None
-         | Some (T.StructUnionName(_,_,_)) -> None
-         | Some (T.TypeName(_)) -> None
-         | Some (T.MetaType(_,_,_)) -> None
-         | Some x -> err exp x "non-structure type in field ref")
-      | Ast0.RecordPtAccess(exp,ar,field) ->
-         (match strip_cv (Ast0.get_type exp) with
-           None -> None
-         | Some (T.Pointer(t)) ->
-             (match strip_cv (Some t) with
-             | Some (T.Unknown) -> None
-             | Some (T.MetaType(_,_,_)) -> None
-             | Some (T.TypeName(_)) -> None
-             | Some (T.StructUnionName(_,_,_)) -> None
-             | Some x ->
-                 err exp (T.Pointer(t))
-                   "non-structure pointer type in field ref"
-             | _ -> failwith "not possible")
-         | Some (T.MetaType(_,_,_)) -> None
-         | Some (T.TypeName(_)) -> None
-         | Some x -> err exp x "non-structure pointer type in field ref")
-      | Ast0.Cast(lp,ty,rp,exp) -> Some(Ast0.ast0_type_to_type ty)
-      | Ast0.SizeOfExpr(szf,exp) -> Some(T.BaseType(T.IntType,None))
-      | Ast0.SizeOfType(szf,lp,ty,rp) -> Some(T.BaseType(T.IntType,None))
-      | Ast0.TypeExp(ty) -> None
-      | Ast0.MetaErr(name,_,_) -> None
-      | Ast0.MetaExpr(name,_,Some [ty],_,_) -> Some ty
-      | Ast0.MetaExpr(name,_,ty,_,_) -> None
-      | Ast0.MetaExprList(name,_,_) -> None
-      | Ast0.EComma(cm) -> None
-      | Ast0.DisjExpr(_,exp_list,_,_) ->
-         let types = List.map Ast0.get_type exp_list in
-         let combined = List.fold_left lub_type None types in
-         (match combined with
-           None -> None
-         | Some t ->
-             List.iter (function e -> Ast0.set_type e (Some t)) exp_list;
-             Some t)
-      | Ast0.NestExpr(starter,expr_dots,ender,None,multi) ->
-         let _ = r.V0.combiner_expression_dots expr_dots in None
-      | Ast0.NestExpr(starter,expr_dots,ender,Some e,multi) ->
-         let _ = r.V0.combiner_expression_dots expr_dots in
-         let _ = r.V0.combiner_expression e in None
-      | Ast0.Edots(_,None) | Ast0.Ecircles(_,None) | Ast0.Estars(_,None) ->
-         None
-      | Ast0.Edots(_,Some e) | Ast0.Ecircles(_,Some e)
-      | Ast0.Estars(_,Some e) ->
-         let _ = r.V0.combiner_expression e in None
-      | Ast0.OptExp(exp) -> Ast0.get_type exp
-      | Ast0.UniqueExp(exp) -> Ast0.get_type exp in
-    Ast0.set_type e ty;
-    ty in
-
-  let donothing r k e = k e in
-
-  let rec strip id =
-    match Ast0.unwrap id with
-      Ast0.Id(name)              -> Id(Ast0.unwrap_mcode name)
-    | Ast0.MetaId(name,_,_)        -> Meta(Ast0.unwrap_mcode name)
-    | Ast0.MetaFunc(name,_,_)      -> Meta(Ast0.unwrap_mcode name)
-    | Ast0.MetaLocalFunc(name,_,_) -> Meta(Ast0.unwrap_mcode name)
-    | Ast0.OptIdent(id)    -> strip id
-    | Ast0.UniqueIdent(id) -> strip id in
-
-  let process_whencode notfn allfn = function
-      Ast0.WhenNot(x) -> let _ = notfn x in ()
-    | Ast0.WhenAlways(x) -> let _ = allfn x in ()
-    | Ast0.WhenModifier(_) -> () in
-
-  (* assume that all of the declarations are at the beginning of a statement
-     list, which is required by C, but not actually required by the cocci
-     parser *)
-  let rec process_statement_list r acc = function
-      [] -> acc
-    | (s::ss) ->
-       (match Ast0.unwrap s with
-         Ast0.Decl(_,decl) ->
-           let rec process_decl decl =
-             match Ast0.unwrap decl with
-               Ast0.Init(_,ty,id,_,exp,_) ->
-                 let _ =
-                   (propagate_types acc).V0.combiner_initialiser exp in
-                 [(strip id,Ast0.ast0_type_to_type ty)]
-             | Ast0.UnInit(_,ty,id,_) ->
-                 [(strip id,Ast0.ast0_type_to_type ty)]
-             | Ast0.MacroDecl(_,_,_,_,_) -> []
-             | Ast0.TyDecl(ty,_) -> []
-             | Ast0.Typedef(_,_,_,_) -> []
-             | Ast0.DisjDecl(_,disjs,_,_) ->
-                 List.concat(List.map process_decl disjs)
-             | Ast0.Ddots(_,_) -> [] (* not in a statement list anyway *)
-             | Ast0.OptDecl(decl) -> process_decl decl
-             | Ast0.UniqueDecl(decl) -> process_decl decl in
-           let new_acc = (process_decl decl)@acc in
-           process_statement_list r new_acc ss
-       | Ast0.Dots(_,wc) ->
-           List.iter
-             (process_whencode r.V0.combiner_statement_dots
-                r.V0.combiner_statement)
-             wc;
-           process_statement_list r acc ss
-       | Ast0.Disj(_,statement_dots_list,_,_) ->
-           let new_acc =
-             lub_envs
-               (List.map
-                  (function x -> process_statement_list r acc (Ast0.undots x))
-                  statement_dots_list) in
-           process_statement_list r new_acc ss
-       | _ ->
-           let _ = (propagate_types acc).V0.combiner_statement s in
-           process_statement_list r acc ss) in
-
-  let statement_dots r k d =
-    match Ast0.unwrap d with
-      Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-       let _ = process_statement_list r env l in option_default in
-  let statement r k s =
-    match Ast0.unwrap s with
-      Ast0.FunDecl(_,fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-       let rec get_binding p =
-         match Ast0.unwrap p with
-           Ast0.Param(ty,Some id) ->
-             [(strip id,Ast0.ast0_type_to_type ty)]
-         | Ast0.OptParam(param) -> get_binding param
-         | _ -> [] in
-       let fenv = List.concat (List.map get_binding (Ast0.undots params)) in
-       (propagate_types (fenv@env)).V0.combiner_statement_dots body
-    | Ast0.IfThen(_,_,exp,_,_,_) | Ast0.IfThenElse(_,_,exp,_,_,_,_,_)
-    | Ast0.While(_,_,exp,_,_,_) | Ast0.Do(_,_,_,_,exp,_,_)
-    | Ast0.For(_,_,_,_,Some exp,_,_,_,_,_) | Ast0.Switch(_,_,exp,_,_,_,_) ->
-       let _ = k s in
-       let rec process_test exp =
-         match (Ast0.unwrap exp,Ast0.get_type exp) with
-           (Ast0.Edots(_,_),_) -> None
-         | (Ast0.NestExpr(_,_,_,_,_),_) -> None
-         | (Ast0.MetaExpr(_,_,_,_,_),_) ->
-           (* if a type is known, it is specified in the decl *)
-             None
-         | (Ast0.Paren(lp,exp,rp),None) -> process_test exp
-         | (_,None) -> Some (T.BaseType(T.IntType,None))
-         | _ -> None in
-       let new_expty = process_test exp in
-       (match new_expty with
-         None -> () (* leave things as they are *)
-       | Some ty -> Ast0.set_type exp new_expty);
-       None
-    |  _ -> k s
-
-  and case_line r k c =
-    match Ast0.unwrap c with
-      Ast0.Default(def,colon,code) -> let _ = k c in None
-    | Ast0.Case(case,exp,colon,code) ->
-       let _ = k c in
-       (match Ast0.get_type exp with
-         None -> Ast0.set_type exp (Some (T.BaseType(T.IntType,None)))
-       | _ -> ());
-       None
-    | Ast0.OptCase(case) -> k c in
-
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing statement_dots donothing donothing
-    ident expression donothing donothing donothing donothing statement
-    case_line donothing
-
-let type_infer code =
-  let prop = propagate_types [(Id("NULL"),T.Pointer(T.Unknown))] in
-  let fn = prop.V0.combiner_top_level in
-  let _ = List.map fn code in
-  ()
diff --git a/parsing_cocci/.#type_infer.ml.1.55 b/parsing_cocci/.#type_infer.ml.1.55
deleted file mode 100644 (file)
index 1d566ea..0000000
+++ /dev/null
@@ -1,359 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module T = Type_cocci
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-module V0 = Visitor_ast0
-
-(* Type inference:
-Just propagates information based on declarations.  Could try to infer
-more precise information about expression metavariables, but not sure it is
-worth it.  The most obvious goal is to distinguish between test expressions
-that have pointer, integer, and boolean type when matching isomorphisms,
-but perhaps other needs will become apparent. *)
-
-(* "functions" that return a boolean value *)
-let bool_functions = ["likely";"unlikely"]
-
-let err wrapped ty s =
-  T.typeC ty; Format.print_newline();
-  failwith (Printf.sprintf "line %d: %s" (Ast0.get_line wrapped) s)
-
-type id = Id of string | Meta of (string * string)
-
-let rec lub_type t1 t2 =
-  match (t1,t2) with
-    (None,None) -> None
-  | (None,Some t) -> t2
-  | (Some t,None) -> t1
-  | (Some t1,Some t2) ->
-      let rec loop = function
-         (T.Unknown,t2) -> t2
-       | (t1,T.Unknown) -> t1
-       | (T.ConstVol(cv1,ty1),T.ConstVol(cv2,ty2)) when cv1 = cv2 ->
-           T.ConstVol(cv1,loop(ty1,ty2))
-       | (T.Pointer(ty1),T.Pointer(ty2)) ->
-           T.Pointer(loop(ty1,ty2))
-       | (ty1,T.Pointer(ty2)) -> T.Pointer(ty2)
-       | (T.Pointer(ty1),ty2) -> T.Pointer(ty1)
-       | (T.Array(ty1),T.Array(ty2)) -> T.Array(loop(ty1,ty2))
-       | (T.TypeName(s1),t2) -> t2
-       | (t1,T.TypeName(s1)) -> t1
-       | (t1,_) -> t1 in (* arbitrarily pick the first, assume type correct *)
-      Some (loop (t1,t2))
-
-let lub_envs envs =
-  List.fold_left
-    (function acc ->
-      function env ->
-       List.fold_left
-         (function acc ->
-           function (var,ty) ->
-             let (relevant,irrelevant) =
-               List.partition (function (x,_) -> x = var) acc in
-             match relevant with
-               [] -> (var,ty)::acc
-             | [(x,ty1)] ->
-                 (match lub_type (Some ty) (Some ty1) with
-                   Some new_ty -> (var,new_ty)::irrelevant
-                 | None -> irrelevant)
-             | _ -> failwith "bad type environment")
-         acc env)
-    [] envs
-
-let rec propagate_types env =
-  let option_default = None in
-  let bind x y = option_default in (* no generic way of combining types *)
-
-  let mcode x = option_default in
-
-  let ident r k i =
-    match Ast0.unwrap i with
-      Ast0.Id(id) ->
-       (try Some(List.assoc (Id(Ast0.unwrap_mcode id)) env)
-       with Not_found -> None)
-    | Ast0.MetaId(id,_,_) ->
-       (try Some(List.assoc (Meta(Ast0.unwrap_mcode id)) env)
-       with Not_found -> None)
-    | _ -> k i in
-
-  let strip_cv = function
-      Some (T.ConstVol(_,t)) -> Some t
-    | t -> t in
-
-  let expression r k e =
-    let res = k e in
-    let ty =
-      match Ast0.unwrap e with
-       Ast0.Ident(id) -> Ast0.set_type e res; res
-      | Ast0.Constant(const) ->
-         (match Ast0.unwrap_mcode const with
-           Ast.String(_) -> Some (T.Pointer(T.BaseType(T.CharType,None)))
-         | Ast.Char(_) -> Some (T.BaseType(T.CharType,None))
-         | Ast.Int(_) -> Some (T.BaseType(T.IntType,None))
-         | Ast.Float(_) ->  Some (T.BaseType(T.FloatType,None)))
-      | Ast0.FunCall(fn,lp,args,rp) ->
-         (match Ast0.get_type fn with
-           Some (T.FunctionPointer(ty)) -> Some ty
-         |  _ ->
-             (match Ast0.unwrap fn with
-               Ast0.Ident(id) ->
-                 (match Ast0.unwrap id with
-                   Ast0.Id(id) ->
-                     if List.mem (Ast0.unwrap_mcode id) bool_functions
-                     then Some(T.BaseType(T.BoolType,None))
-                     else None
-                 | _ -> None)
-             | _ -> None))
-      | Ast0.Assignment(exp1,op,exp2,_) ->
-         let ty = lub_type (Ast0.get_type exp1) (Ast0.get_type exp2) in
-         Ast0.set_type exp1 ty; Ast0.set_type exp2 ty; ty
-      | Ast0.CondExpr(exp1,why,Some exp2,colon,exp3) ->
-         let ty = lub_type (Ast0.get_type exp2) (Ast0.get_type exp3) in
-         Ast0.set_type exp2 ty; Ast0.set_type exp3 ty; ty
-      | Ast0.CondExpr(exp1,why,None,colon,exp3) -> Ast0.get_type exp3
-      | Ast0.Postfix(exp,op) | Ast0.Infix(exp,op) -> (* op is dec or inc *)
-         Ast0.get_type exp
-      | Ast0.Unary(exp,op) ->
-         (match Ast0.unwrap_mcode op with
-           Ast.GetRef ->
-             (match Ast0.get_type exp with
-               None -> Some (T.Pointer(T.Unknown))
-             | Some t -> Some (T.Pointer(t)))
-         | Ast.DeRef ->
-             (match Ast0.get_type exp with
-               Some (T.Pointer(t)) -> Some t
-             | _ -> None)
-         | Ast.UnPlus -> Ast0.get_type exp
-         | Ast.UnMinus -> Ast0.get_type exp
-         | Ast.Tilde -> Ast0.get_type exp
-         | Ast.Not -> Some(T.BaseType(T.BoolType,None)))
-      | Ast0.Nested(exp1,op,exp2) -> failwith "nested in type inf not possible"
-      | Ast0.Binary(exp1,op,exp2) ->
-         let ty1 = Ast0.get_type exp1 in
-         let ty2 = Ast0.get_type exp2 in
-         let same_type = function
-             (None,None) -> Some (T.BaseType(T.IntType,None))
-           | (Some (T.Pointer ty1),Some ty2) ->
-               Some (T.Pointer ty1)
-           | (Some ty1,Some (T.Pointer ty2)) ->
-               Some (T.Pointer ty2)
-           | (t1,t2) ->
-               let ty = lub_type t1 t2 in
-               Ast0.set_type exp1 ty; Ast0.set_type exp2 ty; ty in
-         (match Ast0.unwrap_mcode op with
-           Ast.Arith(op) -> same_type (ty1, ty2)
-         | Ast.Logical(op) ->
-             let ty = lub_type ty1 ty2 in
-             Ast0.set_type exp1 ty; Ast0.set_type exp2 ty;
-             Some(T.BaseType(T.BoolType,None)))
-      | Ast0.Paren(lp,exp,rp) -> Ast0.get_type exp
-      | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-         (match strip_cv (Ast0.get_type exp2) with
-           None -> Ast0.set_type exp2 (Some(T.BaseType(T.IntType,None)))
-         | Some(T.BaseType(T.IntType,None)) -> ()
-         | Some (T.MetaType(_,_,_)) -> ()
-         | Some (T.TypeName _) -> ()
-         | Some ty -> err exp2 ty "bad type for an array index");
-         (match strip_cv (Ast0.get_type exp1) with
-           None -> None
-         | Some (T.Array(ty)) -> Some ty
-         | Some (T.Pointer(ty)) -> Some ty
-         | Some (T.MetaType(_,_,_)) -> None
-         | Some x -> err exp1 x "ill-typed array reference")
-      | Ast0.RecordAccess(exp,pt,field) ->
-         (match strip_cv (Ast0.get_type exp) with
-           None -> None
-         | Some (T.StructUnionName(_,_,_)) -> None
-         | Some (T.TypeName(_)) -> None
-         | Some (T.MetaType(_,_,_)) -> None
-         | Some x -> err exp x "non-structure type in field ref")
-      | Ast0.RecordPtAccess(exp,ar,field) ->
-         (match strip_cv (Ast0.get_type exp) with
-           None -> None
-         | Some (T.Pointer(t)) ->
-             (match strip_cv (Some t) with
-             | Some (T.Unknown) -> None
-             | Some (T.MetaType(_,_,_)) -> None
-             | Some (T.TypeName(_)) -> None
-             | Some (T.StructUnionName(_,_,_)) -> None
-             | Some x ->
-                 err exp (T.Pointer(t))
-                   "non-structure pointer type in field ref"
-             | _ -> failwith "not possible")
-         | Some (T.MetaType(_,_,_)) -> None
-         | Some (T.TypeName(_)) -> None
-         | Some x -> err exp x "non-structure pointer type in field ref")
-      | Ast0.Cast(lp,ty,rp,exp) -> Some(Ast0.ast0_type_to_type ty)
-      | Ast0.SizeOfExpr(szf,exp) -> Some(T.BaseType(T.IntType,None))
-      | Ast0.SizeOfType(szf,lp,ty,rp) -> Some(T.BaseType(T.IntType,None))
-      | Ast0.TypeExp(ty) -> None
-      | Ast0.MetaErr(name,_,_) -> None
-      | Ast0.MetaExpr(name,_,Some [ty],_,_) -> Some ty
-      | Ast0.MetaExpr(name,_,ty,_,_) -> None
-      | Ast0.MetaExprList(name,_,_) -> None
-      | Ast0.EComma(cm) -> None
-      | Ast0.DisjExpr(_,exp_list,_,_) ->
-         let types = List.map Ast0.get_type exp_list in
-         let combined = List.fold_left lub_type None types in
-         (match combined with
-           None -> None
-         | Some t ->
-             List.iter (function e -> Ast0.set_type e (Some t)) exp_list;
-             Some t)
-      | Ast0.NestExpr(starter,expr_dots,ender,None,multi) ->
-         let _ = r.V0.combiner_expression_dots expr_dots in None
-      | Ast0.NestExpr(starter,expr_dots,ender,Some e,multi) ->
-         let _ = r.V0.combiner_expression_dots expr_dots in
-         let _ = r.V0.combiner_expression e in None
-      | Ast0.Edots(_,None) | Ast0.Ecircles(_,None) | Ast0.Estars(_,None) ->
-         None
-      | Ast0.Edots(_,Some e) | Ast0.Ecircles(_,Some e)
-      | Ast0.Estars(_,Some e) ->
-         let _ = r.V0.combiner_expression e in None
-      | Ast0.OptExp(exp) -> Ast0.get_type exp
-      | Ast0.UniqueExp(exp) -> Ast0.get_type exp in
-    Ast0.set_type e ty;
-    ty in
-
-  let donothing r k e = k e in
-
-  let rec strip id =
-    match Ast0.unwrap id with
-      Ast0.Id(name)              -> Id(Ast0.unwrap_mcode name)
-    | Ast0.MetaId(name,_,_)        -> Meta(Ast0.unwrap_mcode name)
-    | Ast0.MetaFunc(name,_,_)      -> Meta(Ast0.unwrap_mcode name)
-    | Ast0.MetaLocalFunc(name,_,_) -> Meta(Ast0.unwrap_mcode name)
-    | Ast0.OptIdent(id)    -> strip id
-    | Ast0.UniqueIdent(id) -> strip id in
-
-  let process_whencode notfn allfn exp = function
-      Ast0.WhenNot(x) -> let _ = notfn x in ()
-    | Ast0.WhenAlways(x) -> let _ = allfn x in ()
-    | Ast0.WhenModifier(_) -> ()
-    | Ast0.WhenNotTrue(x) -> let _ = exp x in ()
-    | Ast0.WhenNotFalse(x) -> let _ = exp x in () in
-
-  (* assume that all of the declarations are at the beginning of a statement
-     list, which is required by C, but not actually required by the cocci
-     parser *)
-  let rec process_statement_list r acc = function
-      [] -> acc
-    | (s::ss) ->
-       (match Ast0.unwrap s with
-         Ast0.Decl(_,decl) ->
-           let rec process_decl decl =
-             match Ast0.unwrap decl with
-               Ast0.Init(_,ty,id,_,exp,_) ->
-                 let _ =
-                   (propagate_types acc).V0.combiner_initialiser exp in
-                 [(strip id,Ast0.ast0_type_to_type ty)]
-             | Ast0.UnInit(_,ty,id,_) ->
-                 [(strip id,Ast0.ast0_type_to_type ty)]
-             | Ast0.MacroDecl(_,_,_,_,_) -> []
-             | Ast0.TyDecl(ty,_) -> []
-             | Ast0.Typedef(_,_,_,_) -> []
-             | Ast0.DisjDecl(_,disjs,_,_) ->
-                 List.concat(List.map process_decl disjs)
-             | Ast0.Ddots(_,_) -> [] (* not in a statement list anyway *)
-             | Ast0.OptDecl(decl) -> process_decl decl
-             | Ast0.UniqueDecl(decl) -> process_decl decl in
-           let new_acc = (process_decl decl)@acc in
-           process_statement_list r new_acc ss
-       | Ast0.Dots(_,wc) ->
-           (* why is this case here?  why is there none for nests? *)
-           List.iter
-             (process_whencode r.V0.combiner_statement_dots
-                r.V0.combiner_statement r.V0.combiner_expression)
-             wc;
-           process_statement_list r acc ss
-       | Ast0.Disj(_,statement_dots_list,_,_) ->
-           let new_acc =
-             lub_envs
-               (List.map
-                  (function x -> process_statement_list r acc (Ast0.undots x))
-                  statement_dots_list) in
-           process_statement_list r new_acc ss
-       | _ ->
-           let _ = (propagate_types acc).V0.combiner_statement s in
-           process_statement_list r acc ss) in
-
-  let statement_dots r k d =
-    match Ast0.unwrap d with
-      Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-       let _ = process_statement_list r env l in option_default in
-  let statement r k s =
-    match Ast0.unwrap s with
-      Ast0.FunDecl(_,fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-       let rec get_binding p =
-         match Ast0.unwrap p with
-           Ast0.Param(ty,Some id) ->
-             [(strip id,Ast0.ast0_type_to_type ty)]
-         | Ast0.OptParam(param) -> get_binding param
-         | _ -> [] in
-       let fenv = List.concat (List.map get_binding (Ast0.undots params)) in
-       (propagate_types (fenv@env)).V0.combiner_statement_dots body
-    | Ast0.IfThen(_,_,exp,_,_,_) | Ast0.IfThenElse(_,_,exp,_,_,_,_,_)
-    | Ast0.While(_,_,exp,_,_,_) | Ast0.Do(_,_,_,_,exp,_,_)
-    | Ast0.For(_,_,_,_,Some exp,_,_,_,_,_) | Ast0.Switch(_,_,exp,_,_,_,_) ->
-       let _ = k s in
-       let rec process_test exp =
-         match (Ast0.unwrap exp,Ast0.get_type exp) with
-           (Ast0.Edots(_,_),_) -> None
-         | (Ast0.NestExpr(_,_,_,_,_),_) -> None
-         | (Ast0.MetaExpr(_,_,_,_,_),_) ->
-           (* if a type is known, it is specified in the decl *)
-             None
-         | (Ast0.Paren(lp,exp,rp),None) -> process_test exp
-         | (_,None) -> Some (T.BaseType(T.IntType,None))
-         | _ -> None in
-       let new_expty = process_test exp in
-       (match new_expty with
-         None -> () (* leave things as they are *)
-       | Some ty -> Ast0.set_type exp new_expty);
-       None
-    |  _ -> k s
-
-  and case_line r k c =
-    match Ast0.unwrap c with
-      Ast0.Default(def,colon,code) -> let _ = k c in None
-    | Ast0.Case(case,exp,colon,code) ->
-       let _ = k c in
-       (match Ast0.get_type exp with
-         None -> Ast0.set_type exp (Some (T.BaseType(T.IntType,None)))
-       | _ -> ());
-       None
-    | Ast0.OptCase(case) -> k c in
-
-  V0.combiner bind option_default
-    mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
-    donothing donothing donothing statement_dots donothing donothing
-    ident expression donothing donothing donothing donothing statement
-    case_line donothing
-
-let type_infer code =
-  let prop = propagate_types [(Id("NULL"),T.Pointer(T.Unknown))] in
-  let fn = prop.V0.combiner_top_level in
-  let _ = List.map fn code in
-  ()
diff --git a/parsing_cocci/.#unify_ast.ml.1.70 b/parsing_cocci/.#unify_ast.ml.1.70
deleted file mode 100644 (file)
index a32476b..0000000
+++ /dev/null
@@ -1,565 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* --------------------------------------------------------------------- *)
-(* Given two patterns, A and B, determine whether B can match any matched
-subterms of A.  For simplicity, this doesn't maintain an environment; it
-just assume metavariables match.  Thus the result is either NO or MAYBE. *)
-
-module Ast = Ast_cocci
-module V = Visitor_ast
-
-(* --------------------------------------------------------------------- *)
-
-type res = NO | MAYBE
-
-let return b = if b then MAYBE else NO
-
-let unify_mcode (x,_,_,_) (y,_,_,_) = x = y
-
-let unify_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> return true
-  | _ -> return false
-
-let unify_true_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> return true
-  | _ -> return true
-
-let bool_unify_option f t1 t2 =
-  match (t1,t2) with
-    (Some t1, Some t2) -> f t1 t2
-  | (None, None) -> true
-  | _ -> false
-
-let conjunct_bindings b1 b2 =
-  match b1 with NO -> b1 | MAYBE -> b2
-
-let disjunct_bindings b1 b2 =
-  match b1 with MAYBE -> b1 | NO -> b2
-
-let disjunct_all_bindings = List.fold_left disjunct_bindings NO 
-
-(* --------------------------------------------------------------------- *)
-
-(* compute the common prefix.  if in at least one case, this ends with the
-end of the pattern or a ..., then return true. *)
-
-let unify_lists fn dfn la lb =
-  let rec loop = function
-      ([],_) | (_,[]) -> return true
-    | (cura::resta,curb::restb) ->
-       (match fn cura curb with
-         MAYBE -> loop (resta,restb)
-       | NO -> if dfn cura or dfn curb then MAYBE else NO) in
-  loop (la,lb)
-
-let unify_dots fn dfn d1 d2 =
-  match (Ast.unwrap d1,Ast.unwrap d2) with
-    (Ast.DOTS(l1),Ast.DOTS(l2))
-  | (Ast.CIRCLES(l1),Ast.CIRCLES(l2))
-  | (Ast.STARS(l1),Ast.STARS(l2)) -> unify_lists fn dfn l1 l2
-  | _ -> return false
-
-let edots e =
-  match Ast.unwrap e with
-    Ast.Edots(_,_) | Ast.Ecircles(_,_) | Ast.Estars(_,_) -> true
-  | _ -> false
-
-let ddots e =
-  match Ast.unwrap e with
-    Ast.Ddots(_,_) -> true
-  | _ -> false
-
-let pdots p =
-  match Ast.unwrap p with
-    Ast.Pdots(_) | Ast.Pcircles(_) -> true
-  | _ -> false
-
-let dpdots e =
-  match Ast.unwrap e with
-    Ast.DPdots(_) | Ast.DPcircles(_) -> true
-  | _ -> false
-
-let sdots s =
-  match Ast.unwrap s with
-    Ast.Dots(_,_,_,_) | Ast.Circles(_,_,_,_) | Ast.Stars(_,_,_,_) -> true
-  | _ -> false
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-and unify_ident i1 i2 =
-  match (Ast.unwrap i1,Ast.unwrap i2) with
-    (Ast.Id(i1),Ast.Id(i2)) -> return (unify_mcode i1 i2)
-
-  | (Ast.MetaId(_,_,_,_),_)
-  | (Ast.MetaFunc(_,_,_,_),_)
-  | (Ast.MetaLocalFunc(_,_,_,_),_)
-  | (_,Ast.MetaId(_,_,_,_))
-  | (_,Ast.MetaFunc(_,_,_,_))
-  | (_,Ast.MetaLocalFunc(_,_,_,_)) -> return true
-
-  | (Ast.OptIdent(_),_)
-  | (Ast.UniqueIdent(_),_)
-  | (_,Ast.OptIdent(_))
-  | (_,Ast.UniqueIdent(_)) -> failwith "unsupported ident"
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let rec unify_expression e1 e2 =
-  match (Ast.unwrap e1,Ast.unwrap e2) with
-    (Ast.Ident(i1),Ast.Ident(i2)) -> unify_ident i1 i2
-  | (Ast.Constant(c1),Ast.Constant(c2))-> return (unify_mcode c1 c2)
-  | (Ast.FunCall(f1,lp1,args1,rp1),Ast.FunCall(f2,lp2,args2,rp2)) ->
-      conjunct_bindings
-       (unify_expression f1 f2)
-       (unify_dots unify_expression edots args1 args2)
-  | (Ast.Assignment(l1,op1,r1,_),Ast.Assignment(l2,op2,r2,_)) ->
-      if unify_mcode op1 op2
-      then conjunct_bindings (unify_expression l1 l2) (unify_expression r1 r2)
-      else return false
-  | (Ast.CondExpr(tst1,q1,thn1,c1,els1),Ast.CondExpr(tst2,q2,thn2,c2,els2)) ->
-      conjunct_bindings (unify_expression tst1 tst2)
-       (conjunct_bindings (unify_option unify_expression thn1 thn2)
-          (unify_expression els1 els2))
-  | (Ast.Postfix(e1,op1),Ast.Postfix(e2,op2)) ->
-      if unify_mcode op1 op2 then unify_expression e1 e2 else return false
-  | (Ast.Infix(e1,op1),Ast.Infix(e2,op2)) ->
-      if unify_mcode op1 op2 then unify_expression e1 e2 else return false
-  | (Ast.Unary(e1,op1),Ast.Unary(e2,op2)) ->
-      if unify_mcode op1 op2 then unify_expression e1 e2 else return false
-  | (Ast.Binary(l1,op1,r1),Ast.Binary(l2,op2,r2)) ->
-      if unify_mcode op1 op2
-      then conjunct_bindings (unify_expression l1 l2) (unify_expression r1 r2)
-      else return false
-  | (Ast.ArrayAccess(ar1,lb1,e1,rb1),Ast.ArrayAccess(ar2,lb2,e2,rb2)) ->
-      conjunct_bindings (unify_expression ar1 ar2) (unify_expression e1 e2)
-  | (Ast.RecordAccess(e1,d1,fld1),Ast.RecordAccess(e2,d2,fld2)) ->
-      conjunct_bindings (unify_expression e1 e2) (unify_ident fld1 fld2)
-  | (Ast.RecordPtAccess(e1,pt1,fld1),Ast.RecordPtAccess(e2,pt2,fld2)) ->
-      conjunct_bindings (unify_expression e1 e2) (unify_ident fld1 fld2)
-  | (Ast.Cast(lp1,ty1,rp1,e1),Ast.Cast(lp2,ty2,rp2,e2)) ->
-      conjunct_bindings (unify_fullType ty1 ty2) (unify_expression e1 e2)
-  | (Ast.SizeOfExpr(szf1,e1),Ast.SizeOfExpr(szf2,e2)) ->
-      unify_expression e1 e2
-  | (Ast.SizeOfType(szf1,lp1,ty1,rp1),Ast.SizeOfType(szf2,lp2,ty2,rp2)) ->
-      unify_fullType ty1 ty2
-  | (Ast.TypeExp(ty1),Ast.TypeExp(ty2)) -> unify_fullType ty1 ty2
-  | (Ast.Paren(lp1,e1,rp1),Ast.Paren(lp2,e2,rp2)) ->
-      unify_expression e1 e2
-
-  | (Ast.MetaErr(_,_,_,_),_)
-  | (Ast.MetaExpr(_,_,_,_,_,_),_)
-  | (Ast.MetaExprList(_,_,_,_),_)
-  | (_,Ast.MetaErr(_,_,_,_))
-  | (_,Ast.MetaExpr(_,_,_,_,_,_))
-  | (_,Ast.MetaExprList(_,_,_,_)) -> return true
-
-  | (Ast.EComma(cm1),Ast.EComma(cm2)) -> return true
-
-  | (Ast.DisjExpr(e1),_) ->
-      disjunct_all_bindings (List.map (function x -> unify_expression x e2) e1)
-  | (_,Ast.DisjExpr(e2)) ->
-      disjunct_all_bindings (List.map (function x -> unify_expression e1 x) e2)
-  | (Ast.NestExpr(e1,_,_),Ast.NestExpr(e2,_,_)) ->
-      unify_dots unify_expression edots e1 e2
-
-  (* dots can match against anything.  return true to be safe. *)
-  | (Ast.Edots(_,_),_) | (_,Ast.Edots(_,_))
-  | (Ast.Ecircles(_,_),_) | (_,Ast.Ecircles(_,_))
-  | (Ast.Estars(_,_),_) | (_,Ast.Estars(_,_)) -> return true
-
-  | (Ast.OptExp(_),_)
-  | (Ast.UniqueExp(_),_)
-  | (_,Ast.OptExp(_))
-  | (_,Ast.UniqueExp(_)) -> failwith "unsupported expression"
-  | _ -> return false
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and unify_fullType ft1 ft2 =
-  match (Ast.unwrap ft1,Ast.unwrap ft2) with
-    (Ast.Type(cv1,ty1),Ast.Type(cv2,ty2)) ->
-      if bool_unify_option unify_mcode cv1 cv2
-      then unify_typeC ty1 ty2
-      else return false
-  | (Ast.DisjType(ft1),_) ->
-      disjunct_all_bindings (List.map (function x -> unify_fullType x ft2) ft1)
-  | (_,Ast.DisjType(ft2)) ->
-      disjunct_all_bindings (List.map (function x -> unify_fullType ft1 x) ft2)
-
-  | (Ast.OptType(_),_)
-  | (Ast.UniqueType(_),_)
-  | (_,Ast.OptType(_))
-  | (_,Ast.UniqueType(_)) -> failwith "unsupported type"
-
-and unify_typeC t1 t2 =
-  match (Ast.unwrap t1,Ast.unwrap t2) with
-    (Ast.BaseType(ty1,sgn1),Ast.BaseType(ty2,sgn2)) ->
-      return (unify_mcode ty1 ty2 && bool_unify_option unify_mcode sgn1 sgn2)
-  | (Ast.ImplicitInt(sgn1),Ast.ImplicitInt(sgn2)) ->
-      return (unify_mcode sgn1 sgn2)
-  | (Ast.Pointer(ty1,s1),Ast.Pointer(ty2,s2)) -> unify_fullType ty1 ty2
-  | (Ast.FunctionPointer(tya,lp1a,stara,rp1a,lp2a,paramsa,rp2a),
-     Ast.FunctionPointer(tyb,lp1b,starb,rp1b,lp2b,paramsb,rp2b)) ->
-       if List.for_all2 unify_mcode
-          [lp1a;stara;rp1a;lp2a;rp2a] [lp1b;starb;rp1b;lp2b;rp2b]
-       then
-        conjunct_bindings (unify_fullType tya tyb)
-          (unify_dots unify_parameterTypeDef pdots paramsa paramsb)
-       else return false
-  | (Ast.FunctionType(_,tya,lp1a,paramsa,rp1a),
-     Ast.FunctionType(_,tyb,lp1b,paramsb,rp1b)) ->
-       if List.for_all2 unify_mcode [lp1a;rp1a] [lp1b;rp1b]
-       then
-        conjunct_bindings (unify_option unify_fullType tya tyb)
-          (unify_dots unify_parameterTypeDef pdots paramsa paramsb)
-       else return false
-  | (Ast.FunctionType _ , _) -> failwith "not supported"
-  | (Ast.Array(ty1,lb1,e1,rb1),Ast.Array(ty2,lb2,e2,rb2)) ->
-      conjunct_bindings
-       (unify_fullType ty1 ty2) (unify_option unify_expression e1 e2)
-  | (Ast.StructUnionName(s1,Some ts1),Ast.StructUnionName(s2,Some ts2)) ->
-      if unify_mcode s1 s2 then unify_ident ts1 ts2 else return false
-  | (Ast.StructUnionName(s1,None),Ast.StructUnionName(s2,None)) ->
-      return true
-  | (Ast.StructUnionDef(ty1,lb1,decls1,rb1),
-     Ast.StructUnionDef(ty2,lb2,decls2,rb2)) ->
-       conjunct_bindings (unify_fullType ty1 ty2)
-        (unify_dots unify_declaration ddots decls1 decls2)
-  | (Ast.TypeName(t1),Ast.TypeName(t2)) -> return (unify_mcode t1 t2)
-
-  | (Ast.MetaType(_,_,_),_)
-  | (_,Ast.MetaType(_,_,_)) -> return true
-  | _ -> return false
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and unify_declaration d1 d2 =
-  match (Ast.unwrap d1,Ast.unwrap d2) with
-    (Ast.Init(stg1,ft1,id1,eq1,i1,s1),Ast.Init(stg2,ft2,id2,eq2,i2,s2)) ->
-      if bool_unify_option unify_mcode stg1 stg2
-      then
-       conjunct_bindings (unify_fullType ft1 ft2)
-         (conjunct_bindings (unify_ident id1 id2) (unify_initialiser i1 i2))
-      else return false
-  | (Ast.UnInit(stg1,ft1,id1,s1),Ast.UnInit(stg2,ft2,id2,s2)) ->
-      if bool_unify_option unify_mcode stg1 stg2
-      then conjunct_bindings (unify_fullType ft1 ft2) (unify_ident id1 id2)
-      else return false
-  | (Ast.MacroDecl(n1,lp1,args1,rp1,sem1),
-     Ast.MacroDecl(n2,lp2,args2,rp2,sem2)) ->
-       conjunct_bindings (unify_ident n1 n2)
-        (unify_dots unify_expression edots args1 args2)
-  | (Ast.TyDecl(ft1,s1),Ast.TyDecl(ft2,s2)) -> unify_fullType ft1 ft2
-  | (Ast.Typedef(stg1,ft1,id1,s1),Ast.Typedef(stg2,ft2,id2,s2)) ->
-      conjunct_bindings (unify_fullType ft1 ft2) (unify_typeC id1 id2)
-  | (Ast.DisjDecl(d1),_) ->
-      disjunct_all_bindings
-       (List.map (function x -> unify_declaration x d2) d1)
-  | (_,Ast.DisjDecl(d2)) ->
-      disjunct_all_bindings
-       (List.map (function x -> unify_declaration d1 x) d2)
-  (* dots can match against anything.  return true to be safe. *)
-  | (Ast.Ddots(_,_),_) | (_,Ast.Ddots(_,_)) -> return true
-
-  | (Ast.OptDecl(_),_)
-  | (Ast.UniqueDecl(_),_)
-  | (_,Ast.OptDecl(_))
-  | (_,Ast.UniqueDecl(_)) -> failwith "unsupported decl"
-  | _ -> return false
-
-(* --------------------------------------------------------------------- *)
-(* Initializer *)
-
-and unify_initialiser i1 i2 =
-  match (Ast.unwrap i1,Ast.unwrap i2) with
-    (Ast.InitExpr(expa),Ast.InitExpr(expb)) ->
-      unify_expression expa expb
-  | (Ast.InitList(_,initlista,_,whena),
-     Ast.InitList(_,initlistb,_,whenb)) ->
-      (* ignore whencode - returns true safely *)
-      unify_lists unify_initialiser (function _ -> false) initlista initlistb
-  | (Ast.InitGccDotName(_,namea,_,inia),
-     Ast.InitGccDotName(_,nameb,_,inib)) ->
-       conjunct_bindings
-        (unify_ident namea nameb) (unify_initialiser inia inib)
-  | (Ast.InitGccName(namea,_,inia),Ast.InitGccName(nameb,_,inib)) ->
-      conjunct_bindings (unify_ident namea nameb) (unify_initialiser inia inib)
-  | (Ast.InitGccIndex(_,expa,_,_,inia),
-     Ast.InitGccIndex(_,expb,_,_,inib)) ->
-       conjunct_bindings
-        (unify_expression expa expb) (unify_initialiser inia inib)
-  | (Ast.InitGccRange(_,exp1a,_,exp2a,_,_,inia),
-     Ast.InitGccRange(_,exp1b,_,exp2b,_,_,inib)) ->
-       conjunct_bindings (unify_expression exp1a exp1b)
-        (conjunct_bindings (unify_expression exp2a exp2b)
-           (unify_initialiser inia inib))
-       
-  | (Ast.OptIni(_),_)
-  | (Ast.UniqueIni(_),_)
-  | (_,Ast.OptIni(_))
-  | (_,Ast.UniqueIni(_)) -> failwith "unsupported decl"
-  | _ -> return false
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and unify_parameterTypeDef p1 p2 =
-  match (Ast.unwrap p1,Ast.unwrap p2) with
-    (Ast.VoidParam(ft1),Ast.VoidParam(ft2)) -> unify_fullType ft1 ft2
-  | (Ast.Param(ft1,i1),Ast.Param(ft2,i2)) ->
-      conjunct_bindings (unify_fullType ft1 ft2)
-       (unify_option unify_ident i1 i2)
-
-  | (Ast.MetaParam(_,_,_),_)
-  | (Ast.MetaParamList(_,_,_,_),_)
-  | (_,Ast.MetaParam(_,_,_))
-  | (_,Ast.MetaParamList(_,_,_,_)) -> return true
-
-  | (Ast.PComma(_),Ast.PComma(_)) -> return true
-
-  (* dots can match against anything.  return true to be safe. *)
-  | (Ast.Pdots(_),_) | (_,Ast.Pdots(_))
-  | (Ast.Pcircles(_),_) | (_,Ast.Pcircles(_)) -> return true
-
-  | (Ast.OptParam(_),_)
-  | (Ast.UniqueParam(_),_)
-  | (_,Ast.OptParam(_))
-  | (_,Ast.UniqueParam(_)) -> failwith "unsupported parameter"
-  | _ -> return false
-
-(* --------------------------------------------------------------------- *)
-(* Define parameter *)
-
-and unify_define_parameters p1 p2 =
- match (Ast.unwrap p1,Ast.unwrap p2) with
-    (Ast.NoParams,Ast.NoParams) -> return true
-  | (Ast.DParams(lp1,params1,rp1),Ast.DParams(lp2,params2,rp2)) ->
-      unify_dots unify_define_param dpdots params1 params2
-  | _ -> return false
-
-and unify_define_param p1 p2 =
-  match (Ast.unwrap p1,Ast.unwrap p2) with
-    (Ast.DParam(i1),Ast.DParam(i2)) ->
-       (unify_ident i1 i2)
-  | (Ast.DPComma(_),Ast.DPComma(_)) -> return true
-
-  (* dots can match against anything.  return true to be safe. *)
-  | (Ast.DPdots(_),_) | (_,Ast.DPdots(_))
-  | (Ast.DPcircles(_),_) | (_,Ast.DPcircles(_)) -> return true
-
-  | (Ast.OptDParam(_),_)
-  | (Ast.UniqueDParam(_),_)
-  | (_,Ast.OptDParam(_))
-  | (_,Ast.UniqueDParam(_)) -> failwith "unsupported parameter"
-  | _ -> return false
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and unify_rule_elem re1 re2 =
-  match (Ast.unwrap re1,Ast.unwrap re2) with
-    (Ast.FunHeader(_,_,fi1,nm1,lp1,params1,rp1),
-     Ast.FunHeader(_,_,fi2,nm2,lp2,params2,rp2)) ->
-       conjunct_bindings (unify_fninfo fi1 fi2)
-        (conjunct_bindings (unify_ident nm1 nm2)
-           (unify_dots unify_parameterTypeDef pdots params1 params2))
-  | (Ast.Decl(_,_,d1),Ast.Decl(_,_,d2)) -> unify_declaration d1 d2
-
-  | (Ast.SeqStart(lb1),Ast.SeqStart(lb2)) -> return true
-  | (Ast.SeqEnd(rb1),Ast.SeqEnd(rb2)) -> return true
-
-  | (Ast.ExprStatement(e1,s1),Ast.ExprStatement(e2,s2)) ->
-      unify_expression e1 e2
-  | (Ast.IfHeader(if1,lp1,e1,rp1),Ast.IfHeader(if2,lp2,e2,rp2)) ->
-      unify_expression e1 e2
-  | (Ast.Else(e1),Ast.Else(e2)) -> return true
-  | (Ast.WhileHeader(wh1,lp1,e1,rp1),Ast.WhileHeader(wh2,lp2,e2,rp2)) ->
-      unify_expression e1 e2
-  | (Ast.DoHeader(d1),Ast.DoHeader(d2)) -> return true
-  | (Ast.WhileTail(wh1,lp1,e1,rp1,s1),Ast.WhileTail(wh2,lp2,e2,rp2,s2)) ->
-      unify_expression e1 e2
-  | (Ast.ForHeader(fr1,lp1,e11,s11,e21,s21,e31,rp1),
-     Ast.ForHeader(fr2,lp2,e12,s12,e22,s22,e32,rp2)) ->
-       conjunct_bindings
-        (unify_option unify_expression e11 e12)
-        (conjunct_bindings
-           (unify_option unify_expression e21 e22)
-           (unify_option unify_expression e31 e32))
-  | (Ast.IteratorHeader(nm1,lp1,args1,rp1),
-     Ast.IteratorHeader(nm2,lp2,args2,rp2)) ->
-      conjunct_bindings (unify_ident nm1 nm2)
-        (unify_dots unify_expression edots args1 args2)
-  | (Ast.DefineHeader(_,n1,p1),Ast.DefineHeader(_,n2,p2)) ->
-      conjunct_bindings (unify_ident n1 n2)
-       (unify_define_parameters p1 p2)
-  | (Ast.Break(r1,s1),Ast.Break(r2,s2)) -> return true
-  | (Ast.Continue(r1,s1),Ast.Continue(r2,s2)) -> return true
-  | (Ast.Label(l1,dd1),Ast.Label(l2,dd2)) -> unify_ident l1 l2
-  | (Ast.Goto(g1,l1,dd1),Ast.Goto(g2,l2,dd2)) -> unify_ident l1 l2
-  | (Ast.Return(r1,s1),Ast.Return(r2,s2)) -> return true
-  | (Ast.ReturnExpr(r1,e1,s1),Ast.ReturnExpr(r2,e2,s2)) ->
-      unify_expression e1 e2
-
-  | (Ast.DisjRuleElem(res1),_) ->
-      disjunct_all_bindings
-       (List.map (function x -> unify_rule_elem x re2) res1)
-  | (_,Ast.DisjRuleElem(res2)) ->
-      disjunct_all_bindings
-       (List.map (function x -> unify_rule_elem re1 x) res2)
-
-  | (Ast.MetaRuleElem(_,_,_),_)
-  | (Ast.MetaStmt(_,_,_,_),_)
-  | (Ast.MetaStmtList(_,_,_),_)
-  | (_,Ast.MetaRuleElem(_,_,_))
-  | (_,Ast.MetaStmt(_,_,_,_))
-  | (_,Ast.MetaStmtList(_,_,_)) -> return true
-
-    (* can match a rule_elem in different parts *)
-  | (Ast.Exp(e1),Ast.Exp(e2)) -> return true
-  | (Ast.Exp(e1),_) -> subexp (unify_expression e1) re2
-  | (_,Ast.Exp(e2)) -> subexp (unify_expression e2) re1
-
-  | (Ast.TopExp(e1),Ast.TopExp(e2)) -> unify_expression e1 e2
-
-    (* can match a rule_elem in different parts *)
-  | (Ast.Ty(t1),Ast.Ty(t2)) -> return true
-  | (Ast.Ty(t1),_) -> subtype (unify_fullType t1) re2
-  | (_,Ast.Ty(t2)) -> subtype (unify_fullType t2) re1
-  | _ -> return false
-
-and unify_fninfo patterninfo cinfo =
-  let patterninfo = List.sort compare patterninfo in
-  let cinfo = List.sort compare cinfo in
-  let rec loop = function
-      (Ast.FStorage(sta)::resta,Ast.FStorage(stb)::restb) ->
-      if unify_mcode sta stb then loop (resta,restb) else return false
-    | (Ast.FType(tya)::resta,Ast.FType(tyb)::restb) ->
-       conjunct_bindings (unify_fullType tya tyb) (loop (resta,restb))
-    | (Ast.FInline(ia)::resta,Ast.FInline(ib)::restb) ->
-       if unify_mcode ia ib then loop (resta,restb) else return false
-    | (Ast.FAttr(ia)::resta,Ast.FAttr(ib)::restb) ->
-       if unify_mcode ia ib then loop (resta,restb) else return false
-    | (x::resta,((y::_) as restb)) ->
-       (match compare x y with
-         -1 -> return false
-       | 1 -> loop (resta,restb)
-       | _ -> failwith "not possible")
-    | _ -> return false in
-  loop (patterninfo,cinfo)
-
-and subexp f =
-  let bind = conjunct_bindings in
-  let option_default = return false in
-  let mcode r e = option_default in
-  let expr r k e = conjunct_bindings (f e) (k e) in
-  let donothing r k e = k e in
-  let recursor = V.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing
-      donothing expr donothing donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing in
-  recursor.V.combiner_rule_elem
-
-and subtype f =
-  let bind = conjunct_bindings in
-  let option_default = return false in
-  let mcode r e = option_default in
-  let fullType r k e = conjunct_bindings (f e) (k e) in
-  let donothing r k e = k e in
-  let recursor = V.combiner bind option_default
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing
-      donothing donothing fullType donothing donothing donothing donothing
-      donothing donothing donothing donothing donothing in
-  recursor.V.combiner_rule_elem
-
-let rec unify_statement s1 s2 =
-  match (Ast.unwrap s1,Ast.unwrap s2) with
-    (Ast.Seq(lb1,d1,s1,rb1),Ast.Seq(lb2,d2,s2,rb2)) ->
-      conjunct_bindings (unify_rule_elem lb1 lb2)
-       (conjunct_bindings
-          (unify_dots unify_statement sdots s1 s2)
-          (conjunct_bindings
-             (unify_dots unify_statement sdots d1 d2)
-             (unify_rule_elem rb1 rb2)))
-  | (Ast.IfThen(h1,thn1,_),Ast.IfThen(h2,thn2,_)) ->
-      conjunct_bindings (unify_rule_elem h1 h2) (unify_statement thn1 thn2)
-  | (Ast.IfThenElse(h1,thn1,e1,els1,_),Ast.IfThenElse(h2,thn2,e2,els2,_)) ->
-      conjunct_bindings (unify_rule_elem h1 h2)
-       (conjunct_bindings (unify_statement thn1 thn2)
-          (conjunct_bindings (unify_rule_elem e1 e2)
-             (unify_statement els1 els2)))
-  | (Ast.While(h1,s1,_),Ast.While(h2,s2,_)) ->
-      conjunct_bindings (unify_rule_elem h1 h2) (unify_statement s1 s2)
-  | (Ast.Do(h1,s1,t1),Ast.Do(h2,s2,t2)) ->
-      conjunct_bindings (unify_rule_elem h1 h2)
-       (conjunct_bindings (unify_statement s1 s2) (unify_rule_elem t1 t2))
-  | (Ast.For(h1,s1,_),Ast.For(h2,s2,_)) ->
-      conjunct_bindings (unify_rule_elem h1 h2) (unify_statement s1 s2)
-  | (Ast.Atomic(re1),Ast.Atomic(re2)) -> unify_rule_elem re1 re2
-  | (Ast.Disj(s1),_) ->
-      let s2 = Ast.rewrap s2 (Ast.DOTS[s2]) in
-      disjunct_all_bindings
-       (List.map
-          (function x -> unify_dots unify_statement sdots x s2)
-          s1)
-  | (_,Ast.Disj(s2)) ->
-      let s1 = Ast.rewrap s1 (Ast.DOTS[s1]) in
-      disjunct_all_bindings
-       (List.map
-          (function x -> unify_dots unify_statement sdots s1 x)
-          s2)
-  | (Ast.Nest(s1,_,_,_,_),Ast.Nest(s2,_,_,_,_)) ->
-      unify_dots unify_statement sdots s1 s2
-  | (Ast.FunDecl(h1,lb1,d1,s1,rb1),Ast.FunDecl(h2,lb2,d2,s2,rb2)) ->
-      conjunct_bindings (unify_rule_elem h1 h2)
-       (conjunct_bindings (unify_rule_elem lb1 lb2)
-          (conjunct_bindings (unify_dots unify_statement sdots d1 d2)
-             (conjunct_bindings (unify_dots unify_statement sdots s1 s2)
-                (unify_rule_elem rb1 rb2))))
-  | (Ast.Define(h1,s1),Ast.Define(h2,s2)) ->
-      conjunct_bindings (unify_rule_elem h1 h2)
-       (unify_dots unify_statement sdots s1 s2)
-  (* dots can match against anything.  return true to be safe. *)
-  | (Ast.Dots(_,_,_,_),_) | (_,Ast.Dots(_,_,_,_))
-  | (Ast.Circles(_,_,_,_),_) | (_,Ast.Circles(_,_,_,_))
-  | (Ast.Stars(_,_,_,_),_) | (_,Ast.Stars(_,_,_,_)) -> return true
-  | (Ast.OptStm(_),_)
-  | (Ast.UniqueStm(_),_)
-  | (_,Ast.OptStm(_))
-  | (_,Ast.UniqueStm(_)) -> failwith "unsupported statement"
-  | _ -> return false
-
-let unify_statement_dots = unify_dots unify_statement sdots
diff --git a/parsing_cocci/.#unitary_ast0.ml.1.28 b/parsing_cocci/.#unitary_ast0.ml.1.28
deleted file mode 100644 (file)
index 1110f58..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* find unitary metavariables *)
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-module V0 = Visitor_ast0
-
-let set_minus s minus = List.filter (function n -> not (List.mem n minus)) s
-
-let rec nub = function
-    [] -> []
-  | (x::xs) when (List.mem x xs) -> nub xs
-  | (x::xs) -> x::(nub xs)
-
-(* ----------------------------------------------------------------------- *)
-(* Find the variables that occur free and occur free in a unitary way *)
-
-(* take everything *)
-let minus_checker name = let id = Ast0.unwrap_mcode name in [id]
-
-(* take only what is in the plus code *)
-let plus_checker (nm,_,_,mc,_) =
-  match mc with Ast0.PLUS -> [nm] | _ -> []  
-      
-let get_free checker t =
-  let bind x y = x @ y in
-  let option_default = [] in
-  let donothing r k e = k e in
-  let mcode _ = option_default in
-  
-  (* considers a single list *)
-  let collect_unitary_nonunitary free_usage =
-    let free_usage = List.sort compare free_usage in
-    let rec loop1 todrop = function
-       [] -> []
-      | (x::xs) as all -> if x = todrop then loop1 todrop xs else all in
-    let rec loop2 = function
-       [] -> ([],[])
-      | [x] -> ([x],[])
-      | x::y::xs ->
-         if x = y
-         then
-           let (unitary,non_unitary) = loop2(loop1 x xs) in
-           (unitary,x::non_unitary)
-         else
-           let (unitary,non_unitary) = loop2 (y::xs) in
-           (x::unitary,non_unitary) in
-    loop2 free_usage in
-  
-  (* considers a list of lists *)
-  let detect_unitary_frees l =
-    let (unitary,nonunitary) =
-      List.split (List.map collect_unitary_nonunitary l) in
-    let unitary = nub (List.concat unitary) in
-    let nonunitary = nub (List.concat nonunitary) in
-    let unitary =
-      List.filter (function x -> not (List.mem x nonunitary)) unitary in
-    unitary@nonunitary@nonunitary in
-
-  let whencode afn bfn = function
-      Ast0.WhenNot(a) -> afn a
-    | Ast0.WhenAlways(b) -> bfn b
-    | Ast0.WhenModifier(_) -> option_default in
-  
-  let ident r k i =
-    match Ast0.unwrap i with
-      Ast0.MetaId(name,_,_) | Ast0.MetaFunc(name,_,_)
-    | Ast0.MetaLocalFunc(name,_,_) -> checker name
-    | _ -> k i in
-  
-  let expression r k e =
-    match Ast0.unwrap e with
-      Ast0.MetaErr(name,_,_) | Ast0.MetaExpr(name,_,_,_,_)
-    | Ast0.MetaExprList(name,_,_) -> checker name
-    | Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-       detect_unitary_frees(List.map r.V0.combiner_expression expr_list)
-    | _ -> k e in
-  
-  let typeC r k t =
-    match Ast0.unwrap t with
-      Ast0.MetaType(name,_) -> checker name
-    | Ast0.DisjType(starter,types,mids,ender) ->
-       detect_unitary_frees(List.map r.V0.combiner_typeC types)
-    | _ -> k t in
-  
-  let parameter r k p =
-    match Ast0.unwrap p with
-      Ast0.MetaParam(name,_) | Ast0.MetaParamList(name,_,_) -> checker name
-    | _ -> k p in
-  
-  let declaration r k d =
-    match Ast0.unwrap d with
-      Ast0.DisjDecl(starter,decls,mids,ender) ->
-       detect_unitary_frees(List.map r.V0.combiner_declaration decls)
-    | _ -> k d in
-
-  let statement r k s =
-    match Ast0.unwrap s with
-      Ast0.MetaStmt(name,_) | Ast0.MetaStmtList(name,_) -> checker name
-    | Ast0.Disj(starter,stmt_list,mids,ender) ->
-       detect_unitary_frees(List.map r.V0.combiner_statement_dots stmt_list)
-    | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-       bind (r.V0.combiner_statement_dots stmt_dots)
-         (detect_unitary_frees 
-            (List.map
-               (whencode r.V0.combiner_statement_dots r.V0.combiner_statement)
-               whn))
-    | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) ->
-       detect_unitary_frees
-         (List.map
-            (whencode r.V0.combiner_statement_dots r.V0.combiner_statement)
-            whn)
-    | _ -> k s in
-  
-  let res = V0.combiner bind option_default 
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      ident expression typeC donothing parameter declaration statement
-      donothing donothing in
-  
-  collect_unitary_nonunitary
-    (List.concat (List.map res.V0.combiner_top_level t))
-    
-(* ----------------------------------------------------------------------- *)
-(* update the variables that are unitary *)
-    
-let update_unitary unitary =
-  let donothing r k e = k e in
-  let mcode x = x in
-  
-  let is_unitary name =
-    match (List.mem (Ast0.unwrap_mcode name) unitary,
-          Ast0.get_mcode_mcodekind name) with
-      (true,Ast0.CONTEXT(mc)) -> Ast0.PureContext
-    | (true,_) -> Ast0.Pure
-    | (false,Ast0.CONTEXT(mc)) -> Ast0.Context
-    | (false,_) -> Ast0.Impure in
-
-  let ident r k i =
-    match Ast0.unwrap i with
-      Ast0.MetaId(name,constraints,_) ->
-       Ast0.rewrap i (Ast0.MetaId(name,constraints,is_unitary name))
-    | Ast0.MetaFunc(name,constraints,_) ->
-       Ast0.rewrap i (Ast0.MetaFunc(name,constraints,is_unitary name))
-    | Ast0.MetaLocalFunc(name,constraints,_) ->
-       Ast0.rewrap i (Ast0.MetaLocalFunc(name,constraints,is_unitary name))
-    | _ -> k i in
-
-  let expression r k e =
-    match Ast0.unwrap e with
-      Ast0.MetaErr(name,constraints,_) ->
-       Ast0.rewrap e (Ast0.MetaErr(name,constraints,is_unitary name))
-    | Ast0.MetaExpr(name,constraints,ty,form,_) ->
-       Ast0.rewrap e (Ast0.MetaExpr(name,constraints,ty,form,is_unitary name))
-    | Ast0.MetaExprList(name,lenname,_) ->
-       Ast0.rewrap e (Ast0.MetaExprList(name,lenname,is_unitary name))
-    | _ -> k e in
-  
-  let typeC r k t =
-    match Ast0.unwrap t with
-      Ast0.MetaType(name,_) ->
-       Ast0.rewrap t (Ast0.MetaType(name,is_unitary name))
-    | _ -> k t in
-  
-  let parameter r k p =
-    match Ast0.unwrap p with
-      Ast0.MetaParam(name,_) ->
-       Ast0.rewrap p (Ast0.MetaParam(name,is_unitary name))
-    | Ast0.MetaParamList(name,lenname,_) ->
-       Ast0.rewrap p (Ast0.MetaParamList(name,lenname,is_unitary name))
-    | _ -> k p in
-  
-  let statement r k s =
-    match Ast0.unwrap s with
-      Ast0.MetaStmt(name,_) ->
-       Ast0.rewrap s (Ast0.MetaStmt(name,is_unitary name))
-    | Ast0.MetaStmtList(name,_) ->
-       Ast0.rewrap s (Ast0.MetaStmtList(name,is_unitary name))
-    | _ -> k s in
-  
-  let res = V0.rebuilder
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      ident expression typeC donothing parameter donothing statement
-      donothing donothing in
-
-  List.map res.V0.rebuilder_top_level
-
-(* ----------------------------------------------------------------------- *)
-
-let rec split3 = function
-    [] -> ([],[],[])
-  | (a,b,c)::xs -> let (l1,l2,l3) = split3 xs in (a::l1,b::l2,c::l3)
-
-let rec combine3 = function
-    ([],[],[]) -> []
-  | (a::l1,b::l2,c::l3) -> (a,b,c) :: combine3 (l1,l2,l3)
-  | _ -> failwith "not possible"
-
-(* ----------------------------------------------------------------------- *)
-(* process all rules *)
-
-let do_unitary rules =
-  let rec loop = function
-      [] -> ([],[])
-    | (r::rules) ->
-      match r with
-        Ast0.ScriptRule (a,b,c,d) ->
-          let (x,rules) = loop rules in
-          (x, r::rules)
-      | Ast0.CocciRule ((minus,metavars,chosen_isos),((plus,_) as plusz)) ->
-          let mm1 = List.map Ast.get_meta_name metavars in
-          let (used_after, rest) = loop rules in
-          let (m_unitary, m_nonunitary) = get_free minus_checker minus in
-          let (p_unitary, p_nonunitary) = get_free plus_checker plus in
-          let p_free = 
-            if !Flag.sgrep_mode2 then []
-            else p_unitary @ p_nonunitary in
-          let (in_p, m_unitary) =
-            List.partition (function x -> List.mem x p_free) m_unitary in
-          let m_nonunitary = in_p @ m_nonunitary in
-          let (m_unitary, not_local) =
-            List.partition (function x -> List.mem x mm1) m_unitary in
-          let m_unitary =
-            List.filter (function x -> not (List.mem x used_after))
-             m_unitary in
-          let rebuilt = update_unitary m_unitary minus in
-          (set_minus (m_nonunitary @ used_after) mm1,
-             (Ast0.CocciRule
-               ((rebuilt, metavars, chosen_isos),plusz))::rest) in
-  let (_,rules) = loop rules in
-  rules
-
-(*
-let do_unitary minus plus =
-  let (minus,metavars,chosen_isos) = split3 minus in
-  let (plus,_) = List.split plus in
-  let rec loop = function
-      ([],[],[]) -> ([],[])
-    | (mm1::metavars,m1::minus,p1::plus) ->
-       let mm1 = List.map Ast.get_meta_name mm1 in
-       let (used_after,rest) = loop (metavars,minus,plus) in
-       let (m_unitary,m_nonunitary) = get_free minus_checker m1 in
-       let (p_unitary,p_nonunitary) = get_free plus_checker p1 in
-       let p_free =
-         if !Flag.sgrep_mode2
-         then []
-         else p_unitary @ p_nonunitary in
-       let (in_p,m_unitary) =
-         List.partition (function x -> List.mem x p_free) m_unitary in
-       let m_nonunitary = in_p@m_nonunitary in
-       let (m_unitary,not_local) =
-         List.partition (function x -> List.mem x mm1) m_unitary in
-       let m_unitary =
-         List.filter (function x -> not(List.mem x used_after)) m_unitary in
-       let rebuilt = update_unitary m_unitary m1 in
-       (set_minus (m_nonunitary @ used_after) mm1,
-        rebuilt::rest)
-    | _ -> failwith "not possible" in
-  let (_,rules) = loop (metavars,minus,plus) in
-  combine3 (rules,metavars,chosen_isos)
-*)
diff --git a/parsing_cocci/.#unitary_ast0.ml.1.29 b/parsing_cocci/.#unitary_ast0.ml.1.29
deleted file mode 100644 (file)
index 31ad2c0..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-(* find unitary metavariables *)
-module Ast0 = Ast0_cocci
-module Ast = Ast_cocci
-module V0 = Visitor_ast0
-
-let set_minus s minus = List.filter (function n -> not (List.mem n minus)) s
-
-let rec nub = function
-    [] -> []
-  | (x::xs) when (List.mem x xs) -> nub xs
-  | (x::xs) -> x::(nub xs)
-
-(* ----------------------------------------------------------------------- *)
-(* Find the variables that occur free and occur free in a unitary way *)
-
-(* take everything *)
-let minus_checker name = let id = Ast0.unwrap_mcode name in [id]
-
-(* take only what is in the plus code *)
-let plus_checker (nm,_,_,mc,_) =
-  match mc with Ast0.PLUS -> [nm] | _ -> []  
-      
-let get_free checker t =
-  let bind x y = x @ y in
-  let option_default = [] in
-  let donothing r k e = k e in
-  let mcode _ = option_default in
-  
-  (* considers a single list *)
-  let collect_unitary_nonunitary free_usage =
-    let free_usage = List.sort compare free_usage in
-    let rec loop1 todrop = function
-       [] -> []
-      | (x::xs) as all -> if x = todrop then loop1 todrop xs else all in
-    let rec loop2 = function
-       [] -> ([],[])
-      | [x] -> ([x],[])
-      | x::y::xs ->
-         if x = y
-         then
-           let (unitary,non_unitary) = loop2(loop1 x xs) in
-           (unitary,x::non_unitary)
-         else
-           let (unitary,non_unitary) = loop2 (y::xs) in
-           (x::unitary,non_unitary) in
-    loop2 free_usage in
-  
-  (* considers a list of lists *)
-  let detect_unitary_frees l =
-    let (unitary,nonunitary) =
-      List.split (List.map collect_unitary_nonunitary l) in
-    let unitary = nub (List.concat unitary) in
-    let nonunitary = nub (List.concat nonunitary) in
-    let unitary =
-      List.filter (function x -> not (List.mem x nonunitary)) unitary in
-    unitary@nonunitary@nonunitary in
-
-  let whencode afn bfn expression = function
-      Ast0.WhenNot(a) -> afn a
-    | Ast0.WhenAlways(b) -> bfn b
-    | Ast0.WhenModifier(_) -> option_default
-    | Ast0.WhenNotTrue(a) -> expression a
-    | Ast0.WhenNotFalse(a) -> expression a in
-  
-  let ident r k i =
-    match Ast0.unwrap i with
-      Ast0.MetaId(name,_,_) | Ast0.MetaFunc(name,_,_)
-    | Ast0.MetaLocalFunc(name,_,_) -> checker name
-    | _ -> k i in
-  
-  let expression r k e =
-    match Ast0.unwrap e with
-      Ast0.MetaErr(name,_,_) | Ast0.MetaExpr(name,_,_,_,_)
-    | Ast0.MetaExprList(name,_,_) -> checker name
-    | Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-       detect_unitary_frees(List.map r.V0.combiner_expression expr_list)
-    | _ -> k e in
-  
-  let typeC r k t =
-    match Ast0.unwrap t with
-      Ast0.MetaType(name,_) -> checker name
-    | Ast0.DisjType(starter,types,mids,ender) ->
-       detect_unitary_frees(List.map r.V0.combiner_typeC types)
-    | _ -> k t in
-  
-  let parameter r k p =
-    match Ast0.unwrap p with
-      Ast0.MetaParam(name,_) | Ast0.MetaParamList(name,_,_) -> checker name
-    | _ -> k p in
-  
-  let declaration r k d =
-    match Ast0.unwrap d with
-      Ast0.DisjDecl(starter,decls,mids,ender) ->
-       detect_unitary_frees(List.map r.V0.combiner_declaration decls)
-    | _ -> k d in
-
-  let statement r k s =
-    match Ast0.unwrap s with
-      Ast0.MetaStmt(name,_) | Ast0.MetaStmtList(name,_) -> checker name
-    | Ast0.Disj(starter,stmt_list,mids,ender) ->
-       detect_unitary_frees(List.map r.V0.combiner_statement_dots stmt_list)
-    | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-       bind (r.V0.combiner_statement_dots stmt_dots)
-         (detect_unitary_frees 
-            (List.map
-               (whencode r.V0.combiner_statement_dots r.V0.combiner_statement
-                   r.V0.combiner_expression)
-               whn))
-    | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) ->
-       detect_unitary_frees
-         (List.map
-            (whencode r.V0.combiner_statement_dots r.V0.combiner_statement
-               r.V0.combiner_expression)
-            whn)
-    | _ -> k s in
-  
-  let res = V0.combiner bind option_default 
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      ident expression typeC donothing parameter declaration statement
-      donothing donothing in
-  
-  collect_unitary_nonunitary
-    (List.concat (List.map res.V0.combiner_top_level t))
-    
-(* ----------------------------------------------------------------------- *)
-(* update the variables that are unitary *)
-    
-let update_unitary unitary =
-  let donothing r k e = k e in
-  let mcode x = x in
-  
-  let is_unitary name =
-    match (List.mem (Ast0.unwrap_mcode name) unitary,
-          Ast0.get_mcode_mcodekind name) with
-      (true,Ast0.CONTEXT(mc)) -> Ast0.PureContext
-    | (true,_) -> Ast0.Pure
-    | (false,Ast0.CONTEXT(mc)) -> Ast0.Context
-    | (false,_) -> Ast0.Impure in
-
-  let ident r k i =
-    match Ast0.unwrap i with
-      Ast0.MetaId(name,constraints,_) ->
-       Ast0.rewrap i (Ast0.MetaId(name,constraints,is_unitary name))
-    | Ast0.MetaFunc(name,constraints,_) ->
-       Ast0.rewrap i (Ast0.MetaFunc(name,constraints,is_unitary name))
-    | Ast0.MetaLocalFunc(name,constraints,_) ->
-       Ast0.rewrap i (Ast0.MetaLocalFunc(name,constraints,is_unitary name))
-    | _ -> k i in
-
-  let expression r k e =
-    match Ast0.unwrap e with
-      Ast0.MetaErr(name,constraints,_) ->
-       Ast0.rewrap e (Ast0.MetaErr(name,constraints,is_unitary name))
-    | Ast0.MetaExpr(name,constraints,ty,form,_) ->
-       Ast0.rewrap e (Ast0.MetaExpr(name,constraints,ty,form,is_unitary name))
-    | Ast0.MetaExprList(name,lenname,_) ->
-       Ast0.rewrap e (Ast0.MetaExprList(name,lenname,is_unitary name))
-    | _ -> k e in
-  
-  let typeC r k t =
-    match Ast0.unwrap t with
-      Ast0.MetaType(name,_) ->
-       Ast0.rewrap t (Ast0.MetaType(name,is_unitary name))
-    | _ -> k t in
-  
-  let parameter r k p =
-    match Ast0.unwrap p with
-      Ast0.MetaParam(name,_) ->
-       Ast0.rewrap p (Ast0.MetaParam(name,is_unitary name))
-    | Ast0.MetaParamList(name,lenname,_) ->
-       Ast0.rewrap p (Ast0.MetaParamList(name,lenname,is_unitary name))
-    | _ -> k p in
-  
-  let statement r k s =
-    match Ast0.unwrap s with
-      Ast0.MetaStmt(name,_) ->
-       Ast0.rewrap s (Ast0.MetaStmt(name,is_unitary name))
-    | Ast0.MetaStmtList(name,_) ->
-       Ast0.rewrap s (Ast0.MetaStmtList(name,is_unitary name))
-    | _ -> k s in
-  
-  let res = V0.rebuilder
-      mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
-      donothing donothing donothing donothing donothing donothing
-      ident expression typeC donothing parameter donothing statement
-      donothing donothing in
-
-  List.map res.V0.rebuilder_top_level
-
-(* ----------------------------------------------------------------------- *)
-
-let rec split3 = function
-    [] -> ([],[],[])
-  | (a,b,c)::xs -> let (l1,l2,l3) = split3 xs in (a::l1,b::l2,c::l3)
-
-let rec combine3 = function
-    ([],[],[]) -> []
-  | (a::l1,b::l2,c::l3) -> (a,b,c) :: combine3 (l1,l2,l3)
-  | _ -> failwith "not possible"
-
-(* ----------------------------------------------------------------------- *)
-(* process all rules *)
-
-let do_unitary rules =
-  let rec loop = function
-      [] -> ([],[])
-    | (r::rules) ->
-      match r with
-        Ast0.ScriptRule (a,b,c,d) ->
-          let (x,rules) = loop rules in
-          (x, r::rules)
-      | Ast0.CocciRule ((minus,metavars,chosen_isos),((plus,_) as plusz)) ->
-          let mm1 = List.map Ast.get_meta_name metavars in
-          let (used_after, rest) = loop rules in
-          let (m_unitary, m_nonunitary) = get_free minus_checker minus in
-          let (p_unitary, p_nonunitary) = get_free plus_checker plus in
-          let p_free = 
-            if !Flag.sgrep_mode2 then []
-            else p_unitary @ p_nonunitary in
-          let (in_p, m_unitary) =
-            List.partition (function x -> List.mem x p_free) m_unitary in
-          let m_nonunitary = in_p @ m_nonunitary in
-          let (m_unitary, not_local) =
-            List.partition (function x -> List.mem x mm1) m_unitary in
-          let m_unitary =
-            List.filter (function x -> not (List.mem x used_after))
-             m_unitary in
-          let rebuilt = update_unitary m_unitary minus in
-          (set_minus (m_nonunitary @ used_after) mm1,
-             (Ast0.CocciRule
-               ((rebuilt, metavars, chosen_isos),plusz))::rest) in
-  let (_,rules) = loop rules in
-  rules
-
-(*
-let do_unitary minus plus =
-  let (minus,metavars,chosen_isos) = split3 minus in
-  let (plus,_) = List.split plus in
-  let rec loop = function
-      ([],[],[]) -> ([],[])
-    | (mm1::metavars,m1::minus,p1::plus) ->
-       let mm1 = List.map Ast.get_meta_name mm1 in
-       let (used_after,rest) = loop (metavars,minus,plus) in
-       let (m_unitary,m_nonunitary) = get_free minus_checker m1 in
-       let (p_unitary,p_nonunitary) = get_free plus_checker p1 in
-       let p_free =
-         if !Flag.sgrep_mode2
-         then []
-         else p_unitary @ p_nonunitary in
-       let (in_p,m_unitary) =
-         List.partition (function x -> List.mem x p_free) m_unitary in
-       let m_nonunitary = in_p@m_nonunitary in
-       let (m_unitary,not_local) =
-         List.partition (function x -> List.mem x mm1) m_unitary in
-       let m_unitary =
-         List.filter (function x -> not(List.mem x used_after)) m_unitary in
-       let rebuilt = update_unitary m_unitary m1 in
-       (set_minus (m_nonunitary @ used_after) mm1,
-        rebuilt::rest)
-    | _ -> failwith "not possible" in
-  let (_,rules) = loop (metavars,minus,plus) in
-  combine3 (rules,metavars,chosen_isos)
-*)
diff --git a/parsing_cocci/.#unparse_ast0.ml.1.107 b/parsing_cocci/.#unparse_ast0.ml.1.107
deleted file mode 100644 (file)
index 80ece57..0000000
+++ /dev/null
@@ -1,651 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-open Format
-module Ast0 = Ast0_cocci
-module U = Pretty_print_cocci
-
-let quiet = ref true (* true = no decoration on - context, etc *)
-
-let start_block str =
-  force_newline(); print_string "  "; open_box 0
-
-let end_block str =
-  close_box(); force_newline ()
-
-let print_option = Common.do_option
-let print_between = Common.print_between
-
-(* --------------------------------------------------------------------- *)
-(* Positions *)
-
-let meta_pos = function
-    Ast0.MetaPos(name,_,_) ->
-      print_string "@";
-      let (_,name) = Ast0.unwrap_mcode name in
-      print_string name
-  | Ast0.NoMetaPos -> ()
-
-(* --------------------------------------------------------------------- *)
-(* Modified code *)
-
-let mcodekind brackets fn x info = function
-    Ast0.MINUS(plus_stream) ->
-      let (lb,rb) =
-       if !quiet
-       then ("","")
-       else
-         match brackets with
-           Some x -> ("[","]^"^(string_of_int x))
-         | None -> ("","") in
-      let (plus_stream,_) = !plus_stream in
-      if !quiet
-      then fn x
-      else (print_string "-";
-           print_string lb; fn x; print_string rb);
-      U.print_anything ">>> " plus_stream
-  | Ast0.CONTEXT(plus_streams) ->
-      let (lb,rb) =
-       if !quiet
-       then ("","")
-       else
-         match brackets with
-           Some x -> ("[",("]^"^(string_of_int x))) | None -> ("","") in
-      let (plus_streams,t1,t2) = !plus_streams in
-      U.print_around
-       (function x ->
-         print_string lb; fn x; print_string rb)
-       x plus_streams
-  | Ast0.PLUS ->
-      List.iter (function s -> print_string s; force_newline())
-       info.Ast0.strings_before;
-      fn x;
-      List.iter (function s -> force_newline(); print_string s)
-       info.Ast0.strings_after
-  | Ast0.MIXED(plus_streams) ->
-      let (lb,rb) =
-       if !quiet
-       then ("","")
-       else
-         let n = 
-           match brackets with Some x -> "^"^(string_of_int x) | None -> "" in
-         ("§","½"^n) in
-      let (plus_streams,_,_) = !plus_streams in
-      U.print_around (function x -> print_string lb; fn x; print_string rb)
-       x plus_streams
-
-let mcode fn (x,_,info,mc,pos) =
-  let fn x = fn x; meta_pos !pos in
-  mcodekind (Some info.Ast0.line_start)(*None*) fn x info mc
-
-let print_context x fn =
-  mcodekind (Some (Ast0.get_line x)) fn () (Ast0.get_info x)
-    (Ast0.get_mcodekind x)
-
-let print_meta (_,name) = print_string name
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-let dots between fn d =
-  print_context d
-    (function _ ->
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) -> print_between between fn l
-      | Ast0.CIRCLES(l) -> print_between between fn l
-      | Ast0.STARS(l) -> print_between between fn l)
-
-(* --------------------------------------------------------------------- *)
-
-let print_types = function
-    None -> ()
-  | Some ty ->
-      print_string "/* ";
-      Format.print_flush();
-      print_between (function _ -> print_string ", ") Type_cocci.typeC ty;
-      Format.print_flush();
-      print_string " */"
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-let rec ident i =
-  print_context i
-    (function _ ->
-      match Ast0.unwrap i with
-       Ast0.Id(name) -> mcode print_string name
-      | Ast0.MetaId(name,_,_) -> mcode print_meta name
-      | Ast0.MetaFunc(name,_,_) -> mcode print_meta name
-      | Ast0.MetaLocalFunc(name,_,_) -> mcode print_meta name
-      | Ast0.OptIdent(id) -> print_string "?"; ident id
-      | Ast0.UniqueIdent(id) -> print_string "!"; ident id)
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let print_string_box s = print_string s; open_box 0
-
-let rec expression e =
-  print_option Type_cocci.typeC (Ast0.get_type e);
-  print_context e
-    (function _ ->
-      match Ast0.unwrap e with
-       Ast0.Ident(id) -> ident id
-      | Ast0.Constant(const) -> mcode U.constant const
-      | Ast0.FunCall(fn,lp,args,rp) ->
-         expression fn; mcode print_string_box lp;
-         let _ = dots (function _ -> ()) expression args in
-         close_box(); mcode print_string rp
-      | Ast0.Assignment(left,op,right,_) ->
-         expression left; print_string " "; mcode U.assignOp op;
-         print_string " "; expression right
-      | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-         expression exp1; print_string " "; mcode print_string why;
-         print_option (function e -> print_string " "; expression e) exp2;
-         print_string " "; mcode print_string colon; expression exp3
-      | Ast0.Postfix(exp,op) -> expression exp; mcode U.fixOp op
-      | Ast0.Infix(exp,op) -> mcode U.fixOp op; expression exp
-      | Ast0.Unary(exp,op) -> mcode U.unaryOp op; expression exp
-      | Ast0.Binary(left,op,right) ->
-         print_string "(";
-         expression left; print_string " "; mcode U.binaryOp op;
-         print_string " "; expression right;
-         print_string ")"
-      | Ast0.Nested(left,op,right) ->
-         print_string "(";
-         expression left; print_string " "; mcode U.binaryOp op;
-         print_string " "; expression right;
-         print_string ")"
-      | Ast0.Paren(lp,exp,rp) ->
-         mcode print_string_box lp; expression exp; close_box();
-         mcode print_string rp
-      | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-         expression exp1; mcode print_string_box lb; expression exp2;
-         close_box(); mcode print_string rb
-      | Ast0.RecordAccess(exp,pt,field) ->
-         expression exp; mcode print_string pt; ident field
-      | Ast0.RecordPtAccess(exp,ar,field) ->
-         expression exp; mcode print_string ar; ident field
-      | Ast0.Cast(lp,ty,rp,exp) ->
-         mcode print_string_box lp; typeC ty; close_box();
-         mcode print_string rp; expression exp
-      | Ast0.SizeOfExpr(szf,exp) ->
-         mcode print_string szf; expression exp
-      | Ast0.SizeOfType(szf,lp,ty,rp) ->
-          mcode print_string szf;
-         mcode print_string_box lp; typeC ty; close_box();
-         mcode print_string rp
-      | Ast0.TypeExp(ty) -> typeC ty
-      | Ast0.MetaErr(name,_,_) -> mcode print_meta name
-      | Ast0.MetaExpr(name,_,ty,_,_) ->
-         mcode print_meta name; print_types ty
-      | Ast0.MetaExprList(name,_,_) -> mcode print_meta name
-      | Ast0.EComma(cm) -> mcode print_string cm; print_space()
-      | Ast0.DisjExpr(_,exp_list,_,_) ->
-         print_string "\n("; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           expression exp_list;
-         print_string "\n)"
-      | Ast0.NestExpr(starter,expr_dots,ender,None,multi) ->
-         mcode print_string starter;
-         start_block(); dots force_newline expression expr_dots; end_block();
-         mcode print_string ender
-      | Ast0.NestExpr(starter,expr_dots,ender,Some whencode,multi) ->
-         mcode print_string starter; print_string "   WHEN != ";
-         expression whencode;
-         start_block(); dots force_newline expression expr_dots; end_block();
-         mcode print_string ender
-      | Ast0.Edots(dots,Some whencode)
-      | Ast0.Ecircles(dots,Some whencode)
-      | Ast0.Estars(dots,Some whencode) ->
-         mcode print_string dots; print_string "   WHEN != ";
-         expression whencode
-      | Ast0.Edots(dots,None)
-      | Ast0.Ecircles(dots,None)
-      | Ast0.Estars(dots,None) -> mcode print_string dots
-      | Ast0.OptExp(exp) -> print_string "?"; expression exp
-      | Ast0.UniqueExp(exp) -> print_string "!"; expression exp)
-
-and expression_dots x = dots (function _ -> ()) expression x
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2) fn =
-  typeC ty; mcode print_string lp1; mcode print_string star; fn();
-  mcode print_string rp1; mcode print_string lp2;
-  parameter_list params; mcode print_string rp2
-
-and print_function_type (ty,lp1,params,rp1) fn =
-  print_option typeC ty; fn(); mcode print_string lp1;
-  parameter_list params; mcode print_string rp1
-
-and typeC t =
-  print_context t
-    (function _ ->
-      match Ast0.unwrap t with
-       Ast0.ConstVol(cv,ty) ->
-         mcode U.const_vol cv; print_string " "; typeC ty
-      |        Ast0.BaseType(ty,sgn) ->
-         print_option (mcode U.sign) sgn; mcode U.baseType ty
-      |        Ast0.ImplicitInt(sgn) -> mcode U.sign sgn
-      | Ast0.Pointer(ty,star) -> typeC ty; mcode print_string star
-      | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-         print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
-           (function _ -> ())
-      | Ast0.FunctionType(ty,lp1,params,rp1) ->
-         print_function_type (ty,lp1,params,rp1) (function _ -> ())
-      | Ast0.Array(ty,lb,size,rb) ->
-         typeC ty; mcode print_string lb; print_option expression size;
-         mcode print_string rb
-      | Ast0.StructUnionName(kind,name) ->
-         mcode U.structUnion kind;
-         print_option (function x -> ident x; print_string " ") name
-      | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-         typeC ty; mcode print_string lb;
-         dots force_newline declaration decls;
-         mcode print_string rb
-      | Ast0.TypeName(name)-> mcode print_string name; print_string " "
-      | Ast0.MetaType(name,_)-> mcode print_meta name; print_string " "
-      | Ast0.DisjType(lp,types,mids,rp) ->
-         print_string "\n"; mcode print_string lp; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           typeC types;
-         print_string "\n"; mcode print_string rp
-      | Ast0.OptType(ty) -> print_string "?"; typeC ty
-      | Ast0.UniqueType(ty) -> print_string "!"; typeC ty)
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and print_named_type ty id =
-  match Ast0.unwrap ty with
-    Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
-       (function _ -> print_string " "; ident id)
-  | Ast0.FunctionType(ty,lp1,params,rp1) ->
-      print_function_type (ty,lp1,params,rp1)
-       (function _ -> print_string " "; ident id)
-  | Ast0.Array(ty,lb,size,rb) ->
-      let rec loop ty k =
-       match Ast0.unwrap ty with
-         Ast0.Array(ty,lb,size,rb) ->
-           loop ty
-             (function _ ->
-               k ();
-               mcode print_string lb;
-               print_option expression size;
-               mcode print_string rb)
-       | _ -> typeC ty; ident id; k () in
-      loop ty (function _ -> ())
-  | _ -> typeC ty; ident id
-
-and declaration d =
-  print_context d
-    (function _ ->
-      match Ast0.unwrap d with
-       Ast0.Init(stg,ty,id,eq,ini,sem) ->
-         print_option (mcode U.storage) stg;
-         print_named_type ty id;
-         print_string " ";
-         mcode print_string eq; print_string " "; initialiser ini;
-         mcode print_string sem
-      | Ast0.UnInit(stg,ty,id,sem) ->
-         print_option (mcode U.storage) stg; print_named_type ty id;
-         mcode print_string sem
-      | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-         ident name; mcode print_string_box lp;
-         let _ = dots (function _ -> ()) expression args in
-         close_box(); mcode print_string rp; mcode print_string sem
-      | Ast0.TyDecl(ty,sem) -> typeC ty; mcode print_string sem
-      | Ast0.Typedef(stg,ty,id,sem) ->
-         mcode print_string stg; typeC ty; typeC id;
-         mcode print_string sem
-      | Ast0.DisjDecl(_,decls,_,_) ->
-         print_string "\n("; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           declaration decls;
-         print_string "\n)"
-      | Ast0.Ddots(dots,Some whencode) -> 
-         mcode print_string dots; print_string "   when != ";
-         declaration whencode
-      | Ast0.Ddots(dots,None) -> mcode print_string dots
-      | Ast0.OptDecl(decl) -> print_string "?"; declaration decl
-      | Ast0.UniqueDecl(decl) -> print_string "!"; declaration decl)
-
-and declaration_dots l = dots (function _ -> ()) declaration l
-
-(* --------------------------------------------------------------------- *)
-(* Initialiser *)
-
-and initialiser i =
-  print_context i
-    (function _ ->
-      match Ast0.unwrap i with
-       Ast0.InitExpr(exp) -> expression exp
-      | Ast0.InitList(lb,initlist,rb) ->
-         mcode print_string lb; open_box 0;
-         let _ = dots (function _ -> ()) initialiser initlist in
-         close_box(); mcode print_string rb
-      | Ast0.InitGccDotName(dot,name,eq,ini) ->
-         mcode print_string dot; ident name; print_string " ";
-         mcode print_string eq; print_string " "; initialiser ini
-      | Ast0.InitGccName(name,eq,ini) ->
-         ident name; mcode print_string eq; initialiser ini
-      | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-         mcode print_string lb; expression exp; mcode print_string rb;
-         print_string " "; mcode print_string eq; print_string " ";
-         initialiser ini
-      | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-         mcode print_string lb; expression exp1; mcode print_string dots;
-         expression exp2; mcode print_string rb;
-         print_string " "; mcode print_string eq; print_string " ";
-         initialiser ini
-      | Ast0.IComma(cm) -> mcode print_string cm; force_newline()
-      | Ast0.Idots(d,Some whencode) ->
-         mcode print_string d; print_string "   WHEN != ";
-         initialiser whencode
-      | Ast0.Idots(d,None) -> mcode print_string d
-      | Ast0.OptIni(ini) -> print_string "?"; initialiser ini
-      | Ast0.UniqueIni(ini) -> print_string "!"; initialiser ini)
-
-and initialiser_list l = dots (function _ -> ()) initialiser l
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and parameterTypeDef p =
-  print_context p
-    (function _ ->
-      match Ast0.unwrap p with
-       Ast0.VoidParam(ty) -> typeC ty
-      | Ast0.Param(ty,Some id) -> print_named_type ty id
-      |        Ast0.Param(ty,None) -> typeC ty
-      | Ast0.MetaParam(name,_) -> mcode print_meta name
-      | Ast0.MetaParamList(name,_,_) -> mcode print_meta name
-      | Ast0.PComma(cm) -> mcode print_string cm; print_space()
-      | Ast0.Pdots(dots) -> mcode print_string dots
-      | Ast0.Pcircles(dots) -> mcode print_string dots
-      | Ast0.OptParam(param) -> print_string "?"; parameterTypeDef param
-      | Ast0.UniqueParam(param) -> print_string "!"; parameterTypeDef param)
-
-and parameter_list l = dots (function _ -> ()) parameterTypeDef l
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and statement arity s =
-  print_context s
-    (function _ ->
-      match Ast0.unwrap s with
-       Ast0.FunDecl(_,fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-         print_string arity;
-         List.iter print_fninfo fninfo;
-         ident name; mcode print_string_box lp;
-         parameter_list params; close_box(); mcode print_string rp;
-         print_string " ";
-         print_string arity; mcode print_string lbrace; start_block();
-         dots force_newline (statement arity) body;
-         end_block(); print_string arity; mcode print_string rbrace
-      | Ast0.Decl(_,decl) -> print_string arity; declaration decl
-      | Ast0.Seq(lbrace,body,rbrace) ->
-         print_string arity; mcode print_string lbrace; start_block();
-         dots force_newline (statement arity) body;
-         end_block(); print_string arity; mcode print_string rbrace
-      | Ast0.ExprStatement(exp,sem) ->
-         print_string arity; expression exp; mcode print_string sem
-      | Ast0.IfThen(iff,lp,exp,rp,branch1,(info,aft)) ->
-         print_string arity;
-         mcode print_string iff; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp; print_string " ";
-         statement arity branch1;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,(info,aft)) ->
-         print_string arity;
-         mcode print_string iff; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp; print_string " ";
-         statement arity branch1;
-         print_string arity; mcode print_string els; print_string " ";
-         statement arity branch2;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.While(whl,lp,exp,rp,body,(info,aft)) ->
-         print_string arity;
-         mcode print_string whl; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp; print_string " ";
-         statement arity body;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.Do(d,body,whl,lp,exp,rp,sem) ->
-         print_string arity; mcode print_string d; print_string " ";
-         statement arity body;
-         print_string arity;
-         mcode print_string whl; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp;
-         mcode print_string sem
-      | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,(info,aft)) ->
-         print_string arity;
-         mcode print_string fr; mcode print_string_box lp;
-         print_option expression e1; mcode print_string sem1;
-         print_option expression e2; mcode print_string sem2;
-         print_option expression e3; close_box();
-         mcode print_string rp; print_string " "; statement arity body;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.Iterator(nm,lp,args,rp,body,(info,aft)) ->
-         print_string arity;
-         ident nm; print_string " "; mcode print_string_box lp;
-         let _ = dots (function _ -> ()) expression args in
-         close_box(); mcode print_string rp; print_string " ";
-         statement arity body;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      |        Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-         print_string arity;
-         mcode print_string switch; print_string " ";
-         mcode print_string_box lp; expression exp; close_box();
-         mcode print_string rp; print_string " "; mcode print_string lb;
-         dots force_newline (case_line arity) cases;
-         mcode print_string rb
-      | Ast0.Break(br,sem) ->
-         print_string arity; mcode print_string br; mcode print_string sem
-      | Ast0.Continue(cont,sem) ->
-         print_string arity; mcode print_string cont; mcode print_string sem
-      |        Ast0.Label(l,dd) -> ident l; print_string ":"
-      | Ast0.Goto(goto,l,sem) ->
-         mcode print_string goto; ident l; mcode print_string sem
-      | Ast0.Return(ret,sem) ->
-         print_string arity; mcode print_string ret; mcode print_string sem
-      | Ast0.ReturnExpr(ret,exp,sem) ->
-         print_string arity; mcode print_string ret; print_string " ";
-         expression exp; mcode print_string sem
-      | Ast0.MetaStmt(name,pure) ->
-         print_string arity; mcode print_meta name;(*
-         print_string "^";
-         (match pure with
-           Ast0.Pure -> print_string "pure"
-         | Ast0.Impure -> print_string "impure"
-         | Ast0.Context -> print_string "context"
-         | Ast0.PureContext -> print_string "pure_context")*)
-      | Ast0.MetaStmtList(name,_) ->
-         print_string arity;  mcode print_meta name
-      | Ast0.Disj(_,statement_dots_list,_,_) ->
-         print_string arity;
-         print_string "\n("; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           (dots force_newline (statement arity))
-           statement_dots_list;
-         print_string "\n)"
-      | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-         print_string arity;
-         mcode print_string starter;
-         open_box 0;
-         List.iter
-           (whencode (dots force_newline (statement "")) (statement ""))
-           whn;
-         close_box();
-         start_block();
-         dots force_newline (statement arity) stmt_dots;
-         end_block();
-         mcode print_string ender
-      | Ast0.Exp(exp) -> print_string arity; expression exp
-      | Ast0.TopExp(exp) -> print_string arity; expression exp
-      | Ast0.Ty(ty) -> print_string arity; typeC ty
-      | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) ->
-         print_string arity; mcode print_string d;
-         List.iter
-           (whencode (dots force_newline (statement "")) (statement ""))
-           whn
-      | Ast0.Include(inc,s) ->
-         mcode print_string inc; print_string " "; mcode U.inc_file s
-      | Ast0.Define(def,id,params,body) ->
-         mcode print_string def; print_string " "; ident id;
-         print_define_parameters params;
-         print_string " ";
-         dots force_newline (statement arity) body
-      | Ast0.OptStm(re) -> statement "?" re
-      | Ast0.UniqueStm(re) -> statement "!" re)
-
-and print_define_parameters params =
-  match Ast0.unwrap params with
-    Ast0.NoParams -> ()
-  | Ast0.DParams(lp,params,rp) ->
-      mcode print_string lp;
-      dots (function _ -> ()) print_define_param params; mcode print_string rp
-
-and print_define_param param =
-  match Ast0.unwrap param with
-    Ast0.DParam(id) -> ident id
-  | Ast0.DPComma(comma) -> mcode print_string comma
-  | Ast0.DPdots(dots) -> mcode print_string dots
-  | Ast0.DPcircles(circles) -> mcode print_string circles
-  | Ast0.OptDParam(dp) -> print_string "?"; print_define_param dp
-  | Ast0.UniqueDParam(dp) -> print_string "!"; print_define_param dp
-
-and print_fninfo = function
-    Ast0.FStorage(stg) -> mcode U.storage stg
-  | Ast0.FType(ty) -> typeC ty
-  | Ast0.FInline(inline) -> mcode print_string inline
-  | Ast0.FAttr(attr) -> mcode print_string attr
-
-and whencode notfn alwaysfn = function
-    Ast0.WhenNot a ->
-      print_string "   WHEN != "; open_box 0; notfn a; close_box()
-  | Ast0.WhenAlways a ->
-      print_string "   WHEN = "; open_box 0; alwaysfn a; close_box()
-  | Ast0.WhenModifier x -> print_string "   WHEN "; U.print_when_modif x
-
-and case_line arity c =
-  print_context c
-    (function _ ->
-      match Ast0.unwrap c with
-       Ast0.Default(def,colon,code) ->
-         print_string arity;
-         mcode print_string def; mcode print_string colon; print_string " ";
-         dots force_newline (statement arity) code
-      | Ast0.Case(case,exp,colon,code) ->
-         print_string arity;
-         mcode print_string case; print_string " "; expression exp;
-         mcode print_string colon; print_string " ";
-         dots force_newline (statement arity) code
-      | Ast0.OptCase(case) -> case_line "?" case)
-
-and statement_dots l = dots (function _ -> ()) (statement "") l
-and case_dots l = dots (function _ -> ()) (case_line "") l
-
-(* --------------------------------------------------------------------- *)
-(* Top level code *)
-
-let top_level t =
-  print_context t
-    (function _ ->
-      match Ast0.unwrap t with
-       Ast0.FILEINFO(old_file,new_file) ->
-         print_string "--- "; mcode print_string old_file; force_newline();
-         print_string "+++ "; mcode print_string new_file
-      | Ast0.DECL(stmt) -> statement "" stmt
-      | Ast0.CODE(stmt_dots) ->
-         dots force_newline (statement "") stmt_dots
-      | Ast0.ERRORWORDS(exps) ->
-         print_string "error words = [";
-         print_between (function _ -> print_string ", ") expression exps;
-         print_string "]"
-      | Ast0.OTHER(s) ->
-         print_string "OTHER("; statement "" s; print_string ")")
-
-let rule =
-  print_between (function _ -> force_newline(); force_newline()) top_level
-
-let unparse_anything x =
-  let q = !quiet in
-  quiet := true;
-  (match x with
-    Ast0.DotsExprTag(d) ->
-      print_string "ExpDots:"; force_newline();
-      expression_dots d
-  | Ast0.DotsParamTag(d) ->
-      parameter_list d
-  | Ast0.DotsInitTag(d) ->
-      initialiser_list d
-  | Ast0.DotsStmtTag(d) ->
-      print_string "StmDots:"; force_newline();
-      statement_dots d
-  | Ast0.DotsDeclTag(d) ->
-      declaration_dots d
-  | Ast0.DotsCaseTag(d) ->
-      case_dots d
-  | Ast0.IdentTag(d) ->
-      ident d
-  | Ast0.ExprTag(d) | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      print_string "Exp:"; force_newline();
-      expression d
-  | Ast0.TypeCTag(d) ->
-      typeC d
-  | Ast0.ParamTag(d) ->
-      parameterTypeDef d
-  | Ast0.InitTag(d) ->
-      initialiser d
-  | Ast0.DeclTag(d) ->
-      declaration d
-  | Ast0.StmtTag(d) ->
-      print_string "Stm:"; force_newline();
-      statement "" d
-  | Ast0.CaseLineTag(d) ->
-      case_line "" d
-  | Ast0.TopTag(d) ->
-      top_level d
-  | Ast0.IsoWhenTag(x) -> U.print_when_modif x
-  | Ast0.MetaPosTag(var) -> meta_pos var);
-  quiet := q;
-  print_newline()
-
-let unparse x =
-  print_string "\n@@\n@@";
-  force_newline();
-  force_newline();
-  rule x;
-  print_newline()
-
-let unparse_to_string x = Common.format_to_string (function _ -> unparse x)
diff --git a/parsing_cocci/.#unparse_ast0.ml.1.108 b/parsing_cocci/.#unparse_ast0.ml.1.108
deleted file mode 100644 (file)
index b76d3b9..0000000
+++ /dev/null
@@ -1,657 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-open Format
-module Ast0 = Ast0_cocci
-module U = Pretty_print_cocci
-
-let quiet = ref true (* true = no decoration on - context, etc *)
-
-let start_block str =
-  force_newline(); print_string "  "; open_box 0
-
-let end_block str =
-  close_box(); force_newline ()
-
-let print_option = Common.do_option
-let print_between = Common.print_between
-
-(* --------------------------------------------------------------------- *)
-(* Positions *)
-
-let meta_pos = function
-    Ast0.MetaPos(name,_,_) ->
-      print_string "@";
-      let (_,name) = Ast0.unwrap_mcode name in
-      print_string name
-  | Ast0.NoMetaPos -> ()
-
-(* --------------------------------------------------------------------- *)
-(* Modified code *)
-
-let mcodekind brackets fn x info = function
-    Ast0.MINUS(plus_stream) ->
-      let (lb,rb) =
-       if !quiet
-       then ("","")
-       else
-         match brackets with
-           Some x -> ("[","]^"^(string_of_int x))
-         | None -> ("","") in
-      let (plus_stream,_) = !plus_stream in
-      if !quiet
-      then fn x
-      else (print_string "-";
-           print_string lb; fn x; print_string rb);
-      U.print_anything ">>> " plus_stream
-  | Ast0.CONTEXT(plus_streams) ->
-      let (lb,rb) =
-       if !quiet
-       then ("","")
-       else
-         match brackets with
-           Some x -> ("[",("]^"^(string_of_int x))) | None -> ("","") in
-      let (plus_streams,t1,t2) = !plus_streams in
-      U.print_around
-       (function x ->
-         print_string lb; fn x; print_string rb)
-       x plus_streams
-  | Ast0.PLUS ->
-      List.iter (function s -> print_string s; force_newline())
-       info.Ast0.strings_before;
-      fn x;
-      List.iter (function s -> force_newline(); print_string s)
-       info.Ast0.strings_after
-  | Ast0.MIXED(plus_streams) ->
-      let (lb,rb) =
-       if !quiet
-       then ("","")
-       else
-         let n = 
-           match brackets with Some x -> "^"^(string_of_int x) | None -> "" in
-         ("§","½"^n) in
-      let (plus_streams,_,_) = !plus_streams in
-      U.print_around (function x -> print_string lb; fn x; print_string rb)
-       x plus_streams
-
-let mcode fn (x,_,info,mc,pos) =
-  let fn x = fn x; meta_pos !pos in
-  mcodekind (Some info.Ast0.line_start)(*None*) fn x info mc
-
-let print_context x fn =
-  mcodekind (Some (Ast0.get_line x)) fn () (Ast0.get_info x)
-    (Ast0.get_mcodekind x)
-
-let print_meta (_,name) = print_string name
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-let dots between fn d =
-  print_context d
-    (function _ ->
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) -> print_between between fn l
-      | Ast0.CIRCLES(l) -> print_between between fn l
-      | Ast0.STARS(l) -> print_between between fn l)
-
-(* --------------------------------------------------------------------- *)
-
-let print_types = function
-    None -> ()
-  | Some ty ->
-      print_string "/* ";
-      Format.print_flush();
-      print_between (function _ -> print_string ", ") Type_cocci.typeC ty;
-      Format.print_flush();
-      print_string " */"
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-let rec ident i =
-  print_context i
-    (function _ ->
-      match Ast0.unwrap i with
-       Ast0.Id(name) -> mcode print_string name
-      | Ast0.MetaId(name,_,_) -> mcode print_meta name
-      | Ast0.MetaFunc(name,_,_) -> mcode print_meta name
-      | Ast0.MetaLocalFunc(name,_,_) -> mcode print_meta name
-      | Ast0.OptIdent(id) -> print_string "?"; ident id
-      | Ast0.UniqueIdent(id) -> print_string "!"; ident id)
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let print_string_box s = print_string s; open_box 0
-
-let rec expression e =
-  print_option Type_cocci.typeC (Ast0.get_type e);
-  print_context e
-    (function _ ->
-      match Ast0.unwrap e with
-       Ast0.Ident(id) -> ident id
-      | Ast0.Constant(const) -> mcode U.constant const
-      | Ast0.FunCall(fn,lp,args,rp) ->
-         expression fn; mcode print_string_box lp;
-         let _ = dots (function _ -> ()) expression args in
-         close_box(); mcode print_string rp
-      | Ast0.Assignment(left,op,right,_) ->
-         expression left; print_string " "; mcode U.assignOp op;
-         print_string " "; expression right
-      | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-         expression exp1; print_string " "; mcode print_string why;
-         print_option (function e -> print_string " "; expression e) exp2;
-         print_string " "; mcode print_string colon; expression exp3
-      | Ast0.Postfix(exp,op) -> expression exp; mcode U.fixOp op
-      | Ast0.Infix(exp,op) -> mcode U.fixOp op; expression exp
-      | Ast0.Unary(exp,op) -> mcode U.unaryOp op; expression exp
-      | Ast0.Binary(left,op,right) ->
-         print_string "(";
-         expression left; print_string " "; mcode U.binaryOp op;
-         print_string " "; expression right;
-         print_string ")"
-      | Ast0.Nested(left,op,right) ->
-         print_string "(";
-         expression left; print_string " "; mcode U.binaryOp op;
-         print_string " "; expression right;
-         print_string ")"
-      | Ast0.Paren(lp,exp,rp) ->
-         mcode print_string_box lp; expression exp; close_box();
-         mcode print_string rp
-      | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-         expression exp1; mcode print_string_box lb; expression exp2;
-         close_box(); mcode print_string rb
-      | Ast0.RecordAccess(exp,pt,field) ->
-         expression exp; mcode print_string pt; ident field
-      | Ast0.RecordPtAccess(exp,ar,field) ->
-         expression exp; mcode print_string ar; ident field
-      | Ast0.Cast(lp,ty,rp,exp) ->
-         mcode print_string_box lp; typeC ty; close_box();
-         mcode print_string rp; expression exp
-      | Ast0.SizeOfExpr(szf,exp) ->
-         mcode print_string szf; expression exp
-      | Ast0.SizeOfType(szf,lp,ty,rp) ->
-          mcode print_string szf;
-         mcode print_string_box lp; typeC ty; close_box();
-         mcode print_string rp
-      | Ast0.TypeExp(ty) -> typeC ty
-      | Ast0.MetaErr(name,_,_) -> mcode print_meta name
-      | Ast0.MetaExpr(name,_,ty,_,_) ->
-         mcode print_meta name; print_types ty
-      | Ast0.MetaExprList(name,_,_) -> mcode print_meta name
-      | Ast0.EComma(cm) -> mcode print_string cm; print_space()
-      | Ast0.DisjExpr(_,exp_list,_,_) ->
-         print_string "\n("; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           expression exp_list;
-         print_string "\n)"
-      | Ast0.NestExpr(starter,expr_dots,ender,None,multi) ->
-         mcode print_string starter;
-         start_block(); dots force_newline expression expr_dots; end_block();
-         mcode print_string ender
-      | Ast0.NestExpr(starter,expr_dots,ender,Some whencode,multi) ->
-         mcode print_string starter; print_string "   WHEN != ";
-         expression whencode;
-         start_block(); dots force_newline expression expr_dots; end_block();
-         mcode print_string ender
-      | Ast0.Edots(dots,Some whencode)
-      | Ast0.Ecircles(dots,Some whencode)
-      | Ast0.Estars(dots,Some whencode) ->
-         mcode print_string dots; print_string "   WHEN != ";
-         expression whencode
-      | Ast0.Edots(dots,None)
-      | Ast0.Ecircles(dots,None)
-      | Ast0.Estars(dots,None) -> mcode print_string dots
-      | Ast0.OptExp(exp) -> print_string "?"; expression exp
-      | Ast0.UniqueExp(exp) -> print_string "!"; expression exp)
-
-and expression_dots x = dots (function _ -> ()) expression x
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2) fn =
-  typeC ty; mcode print_string lp1; mcode print_string star; fn();
-  mcode print_string rp1; mcode print_string lp2;
-  parameter_list params; mcode print_string rp2
-
-and print_function_type (ty,lp1,params,rp1) fn =
-  print_option typeC ty; fn(); mcode print_string lp1;
-  parameter_list params; mcode print_string rp1
-
-and typeC t =
-  print_context t
-    (function _ ->
-      match Ast0.unwrap t with
-       Ast0.ConstVol(cv,ty) ->
-         mcode U.const_vol cv; print_string " "; typeC ty
-      |        Ast0.BaseType(ty,sgn) ->
-         print_option (mcode U.sign) sgn; mcode U.baseType ty
-      |        Ast0.ImplicitInt(sgn) -> mcode U.sign sgn
-      | Ast0.Pointer(ty,star) -> typeC ty; mcode print_string star
-      | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-         print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
-           (function _ -> ())
-      | Ast0.FunctionType(ty,lp1,params,rp1) ->
-         print_function_type (ty,lp1,params,rp1) (function _ -> ())
-      | Ast0.Array(ty,lb,size,rb) ->
-         typeC ty; mcode print_string lb; print_option expression size;
-         mcode print_string rb
-      | Ast0.StructUnionName(kind,name) ->
-         mcode U.structUnion kind;
-         print_option (function x -> ident x; print_string " ") name
-      | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-         typeC ty; mcode print_string lb;
-         dots force_newline declaration decls;
-         mcode print_string rb
-      | Ast0.TypeName(name)-> mcode print_string name; print_string " "
-      | Ast0.MetaType(name,_)-> mcode print_meta name; print_string " "
-      | Ast0.DisjType(lp,types,mids,rp) ->
-         print_string "\n"; mcode print_string lp; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           typeC types;
-         print_string "\n"; mcode print_string rp
-      | Ast0.OptType(ty) -> print_string "?"; typeC ty
-      | Ast0.UniqueType(ty) -> print_string "!"; typeC ty)
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and print_named_type ty id =
-  match Ast0.unwrap ty with
-    Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
-       (function _ -> print_string " "; ident id)
-  | Ast0.FunctionType(ty,lp1,params,rp1) ->
-      print_function_type (ty,lp1,params,rp1)
-       (function _ -> print_string " "; ident id)
-  | Ast0.Array(ty,lb,size,rb) ->
-      let rec loop ty k =
-       match Ast0.unwrap ty with
-         Ast0.Array(ty,lb,size,rb) ->
-           loop ty
-             (function _ ->
-               k ();
-               mcode print_string lb;
-               print_option expression size;
-               mcode print_string rb)
-       | _ -> typeC ty; ident id; k () in
-      loop ty (function _ -> ())
-  | _ -> typeC ty; ident id
-
-and declaration d =
-  print_context d
-    (function _ ->
-      match Ast0.unwrap d with
-       Ast0.Init(stg,ty,id,eq,ini,sem) ->
-         print_option (mcode U.storage) stg;
-         print_named_type ty id;
-         print_string " ";
-         mcode print_string eq; print_string " "; initialiser ini;
-         mcode print_string sem
-      | Ast0.UnInit(stg,ty,id,sem) ->
-         print_option (mcode U.storage) stg; print_named_type ty id;
-         mcode print_string sem
-      | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-         ident name; mcode print_string_box lp;
-         let _ = dots (function _ -> ()) expression args in
-         close_box(); mcode print_string rp; mcode print_string sem
-      | Ast0.TyDecl(ty,sem) -> typeC ty; mcode print_string sem
-      | Ast0.Typedef(stg,ty,id,sem) ->
-         mcode print_string stg; typeC ty; typeC id;
-         mcode print_string sem
-      | Ast0.DisjDecl(_,decls,_,_) ->
-         print_string "\n("; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           declaration decls;
-         print_string "\n)"
-      | Ast0.Ddots(dots,Some whencode) -> 
-         mcode print_string dots; print_string "   when != ";
-         declaration whencode
-      | Ast0.Ddots(dots,None) -> mcode print_string dots
-      | Ast0.OptDecl(decl) -> print_string "?"; declaration decl
-      | Ast0.UniqueDecl(decl) -> print_string "!"; declaration decl)
-
-and declaration_dots l = dots (function _ -> ()) declaration l
-
-(* --------------------------------------------------------------------- *)
-(* Initialiser *)
-
-and initialiser i =
-  print_context i
-    (function _ ->
-      match Ast0.unwrap i with
-       Ast0.InitExpr(exp) -> expression exp
-      | Ast0.InitList(lb,initlist,rb) ->
-         mcode print_string lb; open_box 0;
-         let _ = dots (function _ -> ()) initialiser initlist in
-         close_box(); mcode print_string rb
-      | Ast0.InitGccDotName(dot,name,eq,ini) ->
-         mcode print_string dot; ident name; print_string " ";
-         mcode print_string eq; print_string " "; initialiser ini
-      | Ast0.InitGccName(name,eq,ini) ->
-         ident name; mcode print_string eq; initialiser ini
-      | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-         mcode print_string lb; expression exp; mcode print_string rb;
-         print_string " "; mcode print_string eq; print_string " ";
-         initialiser ini
-      | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-         mcode print_string lb; expression exp1; mcode print_string dots;
-         expression exp2; mcode print_string rb;
-         print_string " "; mcode print_string eq; print_string " ";
-         initialiser ini
-      | Ast0.IComma(cm) -> mcode print_string cm; force_newline()
-      | Ast0.Idots(d,Some whencode) ->
-         mcode print_string d; print_string "   WHEN != ";
-         initialiser whencode
-      | Ast0.Idots(d,None) -> mcode print_string d
-      | Ast0.OptIni(ini) -> print_string "?"; initialiser ini
-      | Ast0.UniqueIni(ini) -> print_string "!"; initialiser ini)
-
-and initialiser_list l = dots (function _ -> ()) initialiser l
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and parameterTypeDef p =
-  print_context p
-    (function _ ->
-      match Ast0.unwrap p with
-       Ast0.VoidParam(ty) -> typeC ty
-      | Ast0.Param(ty,Some id) -> print_named_type ty id
-      |        Ast0.Param(ty,None) -> typeC ty
-      | Ast0.MetaParam(name,_) -> mcode print_meta name
-      | Ast0.MetaParamList(name,_,_) -> mcode print_meta name
-      | Ast0.PComma(cm) -> mcode print_string cm; print_space()
-      | Ast0.Pdots(dots) -> mcode print_string dots
-      | Ast0.Pcircles(dots) -> mcode print_string dots
-      | Ast0.OptParam(param) -> print_string "?"; parameterTypeDef param
-      | Ast0.UniqueParam(param) -> print_string "!"; parameterTypeDef param)
-
-and parameter_list l = dots (function _ -> ()) parameterTypeDef l
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and statement arity s =
-  print_context s
-    (function _ ->
-      match Ast0.unwrap s with
-       Ast0.FunDecl(_,fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-         print_string arity;
-         List.iter print_fninfo fninfo;
-         ident name; mcode print_string_box lp;
-         parameter_list params; close_box(); mcode print_string rp;
-         print_string " ";
-         print_string arity; mcode print_string lbrace; start_block();
-         dots force_newline (statement arity) body;
-         end_block(); print_string arity; mcode print_string rbrace
-      | Ast0.Decl(_,decl) -> print_string arity; declaration decl
-      | Ast0.Seq(lbrace,body,rbrace) ->
-         print_string arity; mcode print_string lbrace; start_block();
-         dots force_newline (statement arity) body;
-         end_block(); print_string arity; mcode print_string rbrace
-      | Ast0.ExprStatement(exp,sem) ->
-         print_string arity; expression exp; mcode print_string sem
-      | Ast0.IfThen(iff,lp,exp,rp,branch1,(info,aft)) ->
-         print_string arity;
-         mcode print_string iff; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp; print_string " ";
-         statement arity branch1;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,(info,aft)) ->
-         print_string arity;
-         mcode print_string iff; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp; print_string " ";
-         statement arity branch1;
-         print_string arity; mcode print_string els; print_string " ";
-         statement arity branch2;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.While(whl,lp,exp,rp,body,(info,aft)) ->
-         print_string arity;
-         mcode print_string whl; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp; print_string " ";
-         statement arity body;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.Do(d,body,whl,lp,exp,rp,sem) ->
-         print_string arity; mcode print_string d; print_string " ";
-         statement arity body;
-         print_string arity;
-         mcode print_string whl; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp;
-         mcode print_string sem
-      | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,(info,aft)) ->
-         print_string arity;
-         mcode print_string fr; mcode print_string_box lp;
-         print_option expression e1; mcode print_string sem1;
-         print_option expression e2; mcode print_string sem2;
-         print_option expression e3; close_box();
-         mcode print_string rp; print_string " "; statement arity body;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.Iterator(nm,lp,args,rp,body,(info,aft)) ->
-         print_string arity;
-         ident nm; print_string " "; mcode print_string_box lp;
-         let _ = dots (function _ -> ()) expression args in
-         close_box(); mcode print_string rp; print_string " ";
-         statement arity body;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      |        Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-         print_string arity;
-         mcode print_string switch; print_string " ";
-         mcode print_string_box lp; expression exp; close_box();
-         mcode print_string rp; print_string " "; mcode print_string lb;
-         dots force_newline (case_line arity) cases;
-         mcode print_string rb
-      | Ast0.Break(br,sem) ->
-         print_string arity; mcode print_string br; mcode print_string sem
-      | Ast0.Continue(cont,sem) ->
-         print_string arity; mcode print_string cont; mcode print_string sem
-      |        Ast0.Label(l,dd) -> ident l; print_string ":"
-      | Ast0.Goto(goto,l,sem) ->
-         mcode print_string goto; ident l; mcode print_string sem
-      | Ast0.Return(ret,sem) ->
-         print_string arity; mcode print_string ret; mcode print_string sem
-      | Ast0.ReturnExpr(ret,exp,sem) ->
-         print_string arity; mcode print_string ret; print_string " ";
-         expression exp; mcode print_string sem
-      | Ast0.MetaStmt(name,pure) ->
-         print_string arity; mcode print_meta name;(*
-         print_string "^";
-         (match pure with
-           Ast0.Pure -> print_string "pure"
-         | Ast0.Impure -> print_string "impure"
-         | Ast0.Context -> print_string "context"
-         | Ast0.PureContext -> print_string "pure_context")*)
-      | Ast0.MetaStmtList(name,_) ->
-         print_string arity;  mcode print_meta name
-      | Ast0.Disj(_,statement_dots_list,_,_) ->
-         print_string arity;
-         print_string "\n("; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           (dots force_newline (statement arity))
-           statement_dots_list;
-         print_string "\n)"
-      | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-         print_string arity;
-         mcode print_string starter;
-         open_box 0;
-         List.iter
-           (whencode (dots force_newline (statement "")) (statement ""))
-           whn;
-         close_box();
-         start_block();
-         dots force_newline (statement arity) stmt_dots;
-         end_block();
-         mcode print_string ender
-      | Ast0.Exp(exp) -> print_string arity; expression exp
-      | Ast0.TopExp(exp) -> print_string arity; expression exp
-      | Ast0.Ty(ty) -> print_string arity; typeC ty
-      | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) ->
-         print_string arity; mcode print_string d;
-         List.iter
-           (whencode (dots force_newline (statement "")) (statement ""))
-           whn
-      | Ast0.Include(inc,s) ->
-         mcode print_string inc; print_string " "; mcode U.inc_file s
-      | Ast0.Define(def,id,params,body) ->
-         mcode print_string def; print_string " "; ident id;
-         print_define_parameters params;
-         print_string " ";
-         dots force_newline (statement arity) body
-      | Ast0.OptStm(re) -> statement "?" re
-      | Ast0.UniqueStm(re) -> statement "!" re)
-
-and print_define_parameters params =
-  match Ast0.unwrap params with
-    Ast0.NoParams -> ()
-  | Ast0.DParams(lp,params,rp) ->
-      mcode print_string lp;
-      dots (function _ -> ()) print_define_param params; mcode print_string rp
-
-and print_define_param param =
-  match Ast0.unwrap param with
-    Ast0.DParam(id) -> ident id
-  | Ast0.DPComma(comma) -> mcode print_string comma
-  | Ast0.DPdots(dots) -> mcode print_string dots
-  | Ast0.DPcircles(circles) -> mcode print_string circles
-  | Ast0.OptDParam(dp) -> print_string "?"; print_define_param dp
-  | Ast0.UniqueDParam(dp) -> print_string "!"; print_define_param dp
-
-and print_fninfo = function
-    Ast0.FStorage(stg) -> mcode U.storage stg
-  | Ast0.FType(ty) -> typeC ty
-  | Ast0.FInline(inline) -> mcode print_string inline
-  | Ast0.FAttr(attr) -> mcode print_string attr
-
-and whencode notfn alwaysfn = function
-    Ast0.WhenNot a ->
-      print_string "   WHEN != "; open_box 0; notfn a; close_box()
-  | Ast0.WhenAlways a ->
-      print_string "   WHEN = "; open_box 0; alwaysfn a; close_box()
-  | Ast0.WhenModifier x -> print_string "   WHEN "; U.print_when_modif x
-  | Ast0.WhenNotTrue a ->
-      print_string "   WHEN != TRUE "; open_box 0; expression a; close_box()
-  | Ast0.WhenNotFalse a ->
-      print_string "   WHEN != FALSE "; open_box 0; expression a; close_box()
-
-and case_line arity c =
-  print_context c
-    (function _ ->
-      match Ast0.unwrap c with
-       Ast0.Default(def,colon,code) ->
-         print_string arity;
-         mcode print_string def; mcode print_string colon; print_string " ";
-         dots force_newline (statement arity) code
-      | Ast0.Case(case,exp,colon,code) ->
-         print_string arity;
-         mcode print_string case; print_string " "; expression exp;
-         mcode print_string colon; print_string " ";
-         dots force_newline (statement arity) code
-      | Ast0.OptCase(case) -> case_line "?" case)
-
-and statement_dots l = dots (function _ -> ()) (statement "") l
-and case_dots l = dots (function _ -> ()) (case_line "") l
-
-(* --------------------------------------------------------------------- *)
-(* Top level code *)
-
-let top_level t =
-  print_context t
-    (function _ ->
-      match Ast0.unwrap t with
-       Ast0.FILEINFO(old_file,new_file) ->
-         print_string "--- "; mcode print_string old_file; force_newline();
-         print_string "+++ "; mcode print_string new_file
-      | Ast0.DECL(stmt) -> statement "" stmt
-      | Ast0.CODE(stmt_dots) ->
-         dots force_newline (statement "") stmt_dots
-      | Ast0.ERRORWORDS(exps) ->
-         print_string "error words = [";
-         print_between (function _ -> print_string ", ") expression exps;
-         print_string "]"
-      | Ast0.OTHER(s) ->
-         print_string "OTHER("; statement "" s; print_string ")")
-
-let rule =
-  print_between (function _ -> force_newline(); force_newline()) top_level
-
-let unparse_anything x =
-  let q = !quiet in
-  quiet := true;
-  (match x with
-    Ast0.DotsExprTag(d) ->
-      print_string "ExpDots:"; force_newline();
-      expression_dots d
-  | Ast0.DotsParamTag(d) ->
-      parameter_list d
-  | Ast0.DotsInitTag(d) ->
-      initialiser_list d
-  | Ast0.DotsStmtTag(d) ->
-      print_string "StmDots:"; force_newline();
-      statement_dots d
-  | Ast0.DotsDeclTag(d) ->
-      declaration_dots d
-  | Ast0.DotsCaseTag(d) ->
-      case_dots d
-  | Ast0.IdentTag(d) ->
-      ident d
-  | Ast0.ExprTag(d) | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      print_string "Exp:"; force_newline();
-      expression d
-  | Ast0.TypeCTag(d) ->
-      typeC d
-  | Ast0.ParamTag(d) ->
-      parameterTypeDef d
-  | Ast0.InitTag(d) ->
-      initialiser d
-  | Ast0.DeclTag(d) ->
-      declaration d
-  | Ast0.StmtTag(d) ->
-      print_string "Stm:"; force_newline();
-      statement "" d
-  | Ast0.CaseLineTag(d) ->
-      case_line "" d
-  | Ast0.TopTag(d) ->
-      top_level d
-  | Ast0.IsoWhenTag(x) -> U.print_when_modif x
-  | Ast0.IsoWhenTTag(e) -> expression e
-  | Ast0.IsoWhenFTag(e) -> expression e
-  | Ast0.MetaPosTag(var) -> meta_pos var);
-  quiet := q;
-  print_newline()
-
-let unparse x =
-  print_string "\n@@\n@@";
-  force_newline();
-  force_newline();
-  rule x;
-  print_newline()
-
-let unparse_to_string x = Common.format_to_string (function _ -> unparse x)
diff --git a/parsing_cocci/.#unparse_ast0.ml.1.109 b/parsing_cocci/.#unparse_ast0.ml.1.109
deleted file mode 100644 (file)
index 7fb2c75..0000000
+++ /dev/null
@@ -1,658 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-open Format
-module Ast0 = Ast0_cocci
-module U = Pretty_print_cocci
-
-let quiet = ref true (* true = no decoration on - context, etc *)
-
-let start_block str =
-  force_newline(); print_string "  "; open_box 0
-
-let end_block str =
-  close_box(); force_newline ()
-
-let print_option = Common.do_option
-let print_between = Common.print_between
-
-(* --------------------------------------------------------------------- *)
-(* Positions *)
-
-let meta_pos = function
-    Ast0.MetaPos(name,_,_) ->
-      print_string "@";
-      let (_,name) = Ast0.unwrap_mcode name in
-      print_string name
-  | Ast0.NoMetaPos -> ()
-
-(* --------------------------------------------------------------------- *)
-(* Modified code *)
-
-let mcodekind brackets fn x info = function
-    Ast0.MINUS(plus_stream) ->
-      let (lb,rb) =
-       if !quiet
-       then ("","")
-       else
-         match brackets with
-           Some x -> ("[","]^"^(string_of_int x))
-         | None -> ("","") in
-      let (plus_stream,_) = !plus_stream in
-      if !quiet
-      then fn x
-      else (print_string "-";
-           print_string lb; fn x; print_string rb);
-      U.print_anything ">>> " plus_stream
-  | Ast0.CONTEXT(plus_streams) ->
-      let (lb,rb) =
-       if !quiet
-       then ("","")
-       else
-         match brackets with
-           Some x -> ("[",("]^"^(string_of_int x))) | None -> ("","") in
-      let (plus_streams,t1,t2) = !plus_streams in
-      U.print_around
-       (function x ->
-         print_string lb; fn x; print_string rb)
-       x plus_streams
-  | Ast0.PLUS ->
-      List.iter (function s -> print_string s; force_newline())
-       info.Ast0.strings_before;
-      fn x;
-      List.iter (function s -> force_newline(); print_string s)
-       info.Ast0.strings_after
-  | Ast0.MIXED(plus_streams) ->
-      let (lb,rb) =
-       if !quiet
-       then ("","")
-       else
-         let n = 
-           match brackets with Some x -> "^"^(string_of_int x) | None -> "" in
-         ("§","½"^n) in
-      let (plus_streams,_,_) = !plus_streams in
-      U.print_around (function x -> print_string lb; fn x; print_string rb)
-       x plus_streams
-
-let mcode fn (x,_,info,mc,pos) =
-  let fn x = fn x; meta_pos !pos in
-  mcodekind (Some info.Ast0.line_start)(*None*) fn x info mc
-
-let print_context x fn =
-  mcodekind (Some (Ast0.get_line x)) fn () (Ast0.get_info x)
-    (Ast0.get_mcodekind x)
-
-let print_meta (_,name) = print_string name
-
-(* --------------------------------------------------------------------- *)
-(* --------------------------------------------------------------------- *)
-(* Dots *)
-
-let dots between fn d =
-  print_context d
-    (function _ ->
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) -> print_between between fn l
-      | Ast0.CIRCLES(l) -> print_between between fn l
-      | Ast0.STARS(l) -> print_between between fn l)
-
-(* --------------------------------------------------------------------- *)
-
-let print_types = function
-    None -> ()
-  | Some ty ->
-      print_string "/* ";
-      Format.print_flush();
-      print_between (function _ -> print_string ", ") Type_cocci.typeC ty;
-      Format.print_flush();
-      print_string " */"
-
-(* --------------------------------------------------------------------- *)
-(* Identifier *)
-
-let rec ident i =
-  print_context i
-    (function _ ->
-      match Ast0.unwrap i with
-       Ast0.Id(name) -> mcode print_string name
-      | Ast0.MetaId(name,_,_) -> mcode print_meta name
-      | Ast0.MetaFunc(name,_,_) -> mcode print_meta name
-      | Ast0.MetaLocalFunc(name,_,_) -> mcode print_meta name
-      | Ast0.OptIdent(id) -> print_string "?"; ident id
-      | Ast0.UniqueIdent(id) -> print_string "!"; ident id)
-
-(* --------------------------------------------------------------------- *)
-(* Expression *)
-
-let print_string_box s = print_string s; open_box 0
-
-let rec expression e =
-  print_option Type_cocci.typeC (Ast0.get_type e);
-  print_context e
-    (function _ ->
-      match Ast0.unwrap e with
-       Ast0.Ident(id) -> ident id
-      | Ast0.Constant(const) -> mcode U.constant const
-      | Ast0.FunCall(fn,lp,args,rp) ->
-         expression fn; mcode print_string_box lp;
-         let _ = dots (function _ -> ()) expression args in
-         close_box(); mcode print_string rp
-      | Ast0.Assignment(left,op,right,_) ->
-         expression left; print_string " "; mcode U.assignOp op;
-         print_string " "; expression right
-      | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-         expression exp1; print_string " "; mcode print_string why;
-         print_option (function e -> print_string " "; expression e) exp2;
-         print_string " "; mcode print_string colon; expression exp3
-      | Ast0.Postfix(exp,op) -> expression exp; mcode U.fixOp op
-      | Ast0.Infix(exp,op) -> mcode U.fixOp op; expression exp
-      | Ast0.Unary(exp,op) -> mcode U.unaryOp op; expression exp
-      | Ast0.Binary(left,op,right) ->
-         print_string "(";
-         expression left; print_string " "; mcode U.binaryOp op;
-         print_string " "; expression right;
-         print_string ")"
-      | Ast0.Nested(left,op,right) ->
-         print_string "(";
-         expression left; print_string " "; mcode U.binaryOp op;
-         print_string " "; expression right;
-         print_string ")"
-      | Ast0.Paren(lp,exp,rp) ->
-         mcode print_string_box lp; expression exp; close_box();
-         mcode print_string rp
-      | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-         expression exp1; mcode print_string_box lb; expression exp2;
-         close_box(); mcode print_string rb
-      | Ast0.RecordAccess(exp,pt,field) ->
-         expression exp; mcode print_string pt; ident field
-      | Ast0.RecordPtAccess(exp,ar,field) ->
-         expression exp; mcode print_string ar; ident field
-      | Ast0.Cast(lp,ty,rp,exp) ->
-         mcode print_string_box lp; typeC ty; close_box();
-         mcode print_string rp; expression exp
-      | Ast0.SizeOfExpr(szf,exp) ->
-         mcode print_string szf; expression exp
-      | Ast0.SizeOfType(szf,lp,ty,rp) ->
-          mcode print_string szf;
-         mcode print_string_box lp; typeC ty; close_box();
-         mcode print_string rp
-      | Ast0.TypeExp(ty) -> typeC ty
-      | Ast0.MetaErr(name,_,_) -> mcode print_meta name
-      | Ast0.MetaExpr(name,_,ty,_,_) ->
-         mcode print_meta name; print_types ty
-      | Ast0.MetaExprList(name,_,_) -> mcode print_meta name
-      | Ast0.EComma(cm) -> mcode print_string cm; print_space()
-      | Ast0.DisjExpr(_,exp_list,_,_) ->
-         print_string "\n("; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           expression exp_list;
-         print_string "\n)"
-      | Ast0.NestExpr(starter,expr_dots,ender,None,multi) ->
-         mcode print_string starter;
-         start_block(); dots force_newline expression expr_dots; end_block();
-         mcode print_string ender
-      | Ast0.NestExpr(starter,expr_dots,ender,Some whencode,multi) ->
-         mcode print_string starter; print_string "   WHEN != ";
-         expression whencode;
-         start_block(); dots force_newline expression expr_dots; end_block();
-         mcode print_string ender
-      | Ast0.Edots(dots,Some whencode)
-      | Ast0.Ecircles(dots,Some whencode)
-      | Ast0.Estars(dots,Some whencode) ->
-         mcode print_string dots; print_string "   WHEN != ";
-         expression whencode
-      | Ast0.Edots(dots,None)
-      | Ast0.Ecircles(dots,None)
-      | Ast0.Estars(dots,None) -> mcode print_string dots
-      | Ast0.OptExp(exp) -> print_string "?"; expression exp
-      | Ast0.UniqueExp(exp) -> print_string "!"; expression exp)
-
-and expression_dots x = dots (function _ -> ()) expression x
-
-(* --------------------------------------------------------------------- *)
-(* Types *)
-
-and print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2) fn =
-  typeC ty; mcode print_string lp1; mcode print_string star; fn();
-  mcode print_string rp1; mcode print_string lp2;
-  parameter_list params; mcode print_string rp2
-
-and print_function_type (ty,lp1,params,rp1) fn =
-  print_option typeC ty; fn(); mcode print_string lp1;
-  parameter_list params; mcode print_string rp1
-
-and typeC t =
-  print_context t
-    (function _ ->
-      match Ast0.unwrap t with
-       Ast0.ConstVol(cv,ty) ->
-         mcode U.const_vol cv; print_string " "; typeC ty
-      |        Ast0.BaseType(ty,sgn) ->
-         print_option (mcode U.sign) sgn; mcode U.baseType ty
-      |        Ast0.ImplicitInt(sgn) -> mcode U.sign sgn
-      | Ast0.Pointer(ty,star) -> typeC ty; mcode print_string star
-      | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-         print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
-           (function _ -> ())
-      | Ast0.FunctionType(ty,lp1,params,rp1) ->
-         print_function_type (ty,lp1,params,rp1) (function _ -> ())
-      | Ast0.Array(ty,lb,size,rb) ->
-         typeC ty; mcode print_string lb; print_option expression size;
-         mcode print_string rb
-      | Ast0.StructUnionName(kind,name) ->
-         mcode U.structUnion kind;
-         print_option (function x -> ident x; print_string " ") name
-      | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-         typeC ty; mcode print_string lb;
-         dots force_newline declaration decls;
-         mcode print_string rb
-      | Ast0.TypeName(name)-> mcode print_string name; print_string " "
-      | Ast0.MetaType(name,_)-> mcode print_meta name; print_string " "
-      | Ast0.DisjType(lp,types,mids,rp) ->
-         print_string "\n"; mcode print_string lp; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           typeC types;
-         print_string "\n"; mcode print_string rp
-      | Ast0.OptType(ty) -> print_string "?"; typeC ty
-      | Ast0.UniqueType(ty) -> print_string "!"; typeC ty)
-
-(* --------------------------------------------------------------------- *)
-(* Variable declaration *)
-(* Even if the Cocci program specifies a list of declarations, they are
-   split out into multiple declarations of a single variable each. *)
-
-and print_named_type ty id =
-  match Ast0.unwrap ty with
-    Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-      print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
-       (function _ -> print_string " "; ident id)
-  | Ast0.FunctionType(ty,lp1,params,rp1) ->
-      print_function_type (ty,lp1,params,rp1)
-       (function _ -> print_string " "; ident id)
-  | Ast0.Array(ty,lb,size,rb) ->
-      let rec loop ty k =
-       match Ast0.unwrap ty with
-         Ast0.Array(ty,lb,size,rb) ->
-           loop ty
-             (function _ ->
-               k ();
-               mcode print_string lb;
-               print_option expression size;
-               mcode print_string rb)
-       | _ -> typeC ty; ident id; k () in
-      loop ty (function _ -> ())
-  | _ -> typeC ty; ident id
-
-and declaration d =
-  print_context d
-    (function _ ->
-      match Ast0.unwrap d with
-       Ast0.Init(stg,ty,id,eq,ini,sem) ->
-         print_option (mcode U.storage) stg;
-         print_named_type ty id;
-         print_string " ";
-         mcode print_string eq; print_string " "; initialiser ini;
-         mcode print_string sem
-      | Ast0.UnInit(stg,ty,id,sem) ->
-         print_option (mcode U.storage) stg; print_named_type ty id;
-         mcode print_string sem
-      | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-         ident name; mcode print_string_box lp;
-         let _ = dots (function _ -> ()) expression args in
-         close_box(); mcode print_string rp; mcode print_string sem
-      | Ast0.TyDecl(ty,sem) -> typeC ty; mcode print_string sem
-      | Ast0.Typedef(stg,ty,id,sem) ->
-         mcode print_string stg; typeC ty; typeC id;
-         mcode print_string sem
-      | Ast0.DisjDecl(_,decls,_,_) ->
-         print_string "\n("; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           declaration decls;
-         print_string "\n)"
-      | Ast0.Ddots(dots,Some whencode) -> 
-         mcode print_string dots; print_string "   when != ";
-         declaration whencode
-      | Ast0.Ddots(dots,None) -> mcode print_string dots
-      | Ast0.OptDecl(decl) -> print_string "?"; declaration decl
-      | Ast0.UniqueDecl(decl) -> print_string "!"; declaration decl)
-
-and declaration_dots l = dots (function _ -> ()) declaration l
-
-(* --------------------------------------------------------------------- *)
-(* Initialiser *)
-
-and initialiser i =
-  print_context i
-    (function _ ->
-      match Ast0.unwrap i with
-       Ast0.InitExpr(exp) -> expression exp
-      | Ast0.InitList(lb,initlist,rb) ->
-         mcode print_string lb; open_box 0;
-         let _ = dots (function _ -> ()) initialiser initlist in
-         close_box(); mcode print_string rb
-      | Ast0.InitGccDotName(dot,name,eq,ini) ->
-         mcode print_string dot; ident name; print_string " ";
-         mcode print_string eq; print_string " "; initialiser ini
-      | Ast0.InitGccName(name,eq,ini) ->
-         ident name; mcode print_string eq; initialiser ini
-      | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-         mcode print_string lb; expression exp; mcode print_string rb;
-         print_string " "; mcode print_string eq; print_string " ";
-         initialiser ini
-      | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-         mcode print_string lb; expression exp1; mcode print_string dots;
-         expression exp2; mcode print_string rb;
-         print_string " "; mcode print_string eq; print_string " ";
-         initialiser ini
-      | Ast0.IComma(cm) -> mcode print_string cm; force_newline()
-      | Ast0.Idots(d,Some whencode) ->
-         mcode print_string d; print_string "   WHEN != ";
-         initialiser whencode
-      | Ast0.Idots(d,None) -> mcode print_string d
-      | Ast0.OptIni(ini) -> print_string "?"; initialiser ini
-      | Ast0.UniqueIni(ini) -> print_string "!"; initialiser ini)
-
-and initialiser_list l = dots (function _ -> ()) initialiser l
-
-(* --------------------------------------------------------------------- *)
-(* Parameter *)
-
-and parameterTypeDef p =
-  print_context p
-    (function _ ->
-      match Ast0.unwrap p with
-       Ast0.VoidParam(ty) -> typeC ty
-      | Ast0.Param(ty,Some id) -> print_named_type ty id
-      |        Ast0.Param(ty,None) -> typeC ty
-      | Ast0.MetaParam(name,_) -> mcode print_meta name
-      | Ast0.MetaParamList(name,_,_) -> mcode print_meta name
-      | Ast0.PComma(cm) -> mcode print_string cm; print_space()
-      | Ast0.Pdots(dots) -> mcode print_string dots
-      | Ast0.Pcircles(dots) -> mcode print_string dots
-      | Ast0.OptParam(param) -> print_string "?"; parameterTypeDef param
-      | Ast0.UniqueParam(param) -> print_string "!"; parameterTypeDef param)
-
-and parameter_list l = dots (function _ -> ()) parameterTypeDef l
-
-(* --------------------------------------------------------------------- *)
-(* Top-level code *)
-
-and statement arity s =
-  print_context s
-    (function _ ->
-      match Ast0.unwrap s with
-       Ast0.FunDecl(_,fninfo,name,lp,params,rp,lbrace,body,rbrace) ->
-         print_string arity;
-         List.iter print_fninfo fninfo;
-         ident name; mcode print_string_box lp;
-         parameter_list params; close_box(); mcode print_string rp;
-         print_string " ";
-         print_string arity; mcode print_string lbrace; start_block();
-         dots force_newline (statement arity) body;
-         end_block(); print_string arity; mcode print_string rbrace
-      | Ast0.Decl(_,decl) -> print_string arity; declaration decl
-      | Ast0.Seq(lbrace,body,rbrace) ->
-         print_string arity; mcode print_string lbrace; start_block();
-         dots force_newline (statement arity) body;
-         end_block(); print_string arity; mcode print_string rbrace
-      | Ast0.ExprStatement(exp,sem) ->
-         print_string arity; expression exp; mcode print_string sem
-      | Ast0.IfThen(iff,lp,exp,rp,branch1,(info,aft)) ->
-         print_string arity;
-         mcode print_string iff; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp; print_string " ";
-         statement arity branch1;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,(info,aft)) ->
-         print_string arity;
-         mcode print_string iff; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp; print_string " ";
-         statement arity branch1;
-         print_string arity; mcode print_string els; print_string " ";
-         statement arity branch2;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.While(whl,lp,exp,rp,body,(info,aft)) ->
-         print_string arity;
-         mcode print_string whl; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp; print_string " ";
-         statement arity body;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.Do(d,body,whl,lp,exp,rp,sem) ->
-         print_string arity; mcode print_string d; print_string " ";
-         statement arity body;
-         print_string arity;
-         mcode print_string whl; print_string " "; mcode print_string_box lp;
-         expression exp; close_box(); mcode print_string rp;
-         mcode print_string sem
-      | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,(info,aft)) ->
-         print_string arity;
-         mcode print_string fr; mcode print_string_box lp;
-         print_option expression e1; mcode print_string sem1;
-         print_option expression e2; mcode print_string sem2;
-         print_option expression e3; close_box();
-         mcode print_string rp; print_string " "; statement arity body;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      | Ast0.Iterator(nm,lp,args,rp,body,(info,aft)) ->
-         print_string arity;
-         ident nm; print_string " "; mcode print_string_box lp;
-         let _ = dots (function _ -> ()) expression args in
-         close_box(); mcode print_string rp; print_string " ";
-         statement arity body;
-         mcode (function _ -> ()) ((),(),info,aft,ref Ast0.NoMetaPos)
-      |        Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-         print_string arity;
-         mcode print_string switch; print_string " ";
-         mcode print_string_box lp; expression exp; close_box();
-         mcode print_string rp; print_string " "; mcode print_string lb;
-         dots force_newline (case_line arity) cases;
-         mcode print_string rb
-      | Ast0.Break(br,sem) ->
-         print_string arity; mcode print_string br; mcode print_string sem
-      | Ast0.Continue(cont,sem) ->
-         print_string arity; mcode print_string cont; mcode print_string sem
-      |        Ast0.Label(l,dd) -> ident l; print_string ":"
-      | Ast0.Goto(goto,l,sem) ->
-         mcode print_string goto; ident l; mcode print_string sem
-      | Ast0.Return(ret,sem) ->
-         print_string arity; mcode print_string ret; mcode print_string sem
-      | Ast0.ReturnExpr(ret,exp,sem) ->
-         print_string arity; mcode print_string ret; print_string " ";
-         expression exp; mcode print_string sem
-      | Ast0.MetaStmt(name,pure) ->
-         print_string arity; mcode print_meta name;(*
-         print_string "^";
-         (match pure with
-           Ast0.Pure -> print_string "pure"
-         | Ast0.Impure -> print_string "impure"
-         | Ast0.Context -> print_string "context"
-         | Ast0.PureContext -> print_string "pure_context")*)
-      | Ast0.MetaStmtList(name,_) ->
-         print_string arity;  mcode print_meta name
-      | Ast0.Disj(_,statement_dots_list,_,_) ->
-         print_string arity;
-         print_string "\n("; force_newline();
-         print_between
-           (function _ -> print_string "\n|"; force_newline())
-           (dots force_newline (statement arity))
-           statement_dots_list;
-         print_string "\n)"
-      | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-         print_string arity;
-         mcode print_string starter;
-         open_box 0;
-         List.iter
-           (whencode (dots force_newline (statement "")) (statement ""))
-           whn;
-         close_box();
-         start_block();
-         dots force_newline (statement arity) stmt_dots;
-         end_block();
-         mcode print_string ender
-      | Ast0.Exp(exp) -> print_string arity; expression exp
-      | Ast0.TopExp(exp) -> print_string arity; expression exp
-      | Ast0.Ty(ty) -> print_string arity; typeC ty
-      |        Ast0.TopInit(init) -> initialiser init
-      | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) ->
-         print_string arity; mcode print_string d;
-         List.iter
-           (whencode (dots force_newline (statement "")) (statement ""))
-           whn
-      | Ast0.Include(inc,s) ->
-         mcode print_string inc; print_string " "; mcode U.inc_file s
-      | Ast0.Define(def,id,params,body) ->
-         mcode print_string def; print_string " "; ident id;
-         print_define_parameters params;
-         print_string " ";
-         dots force_newline (statement arity) body
-      | Ast0.OptStm(re) -> statement "?" re
-      | Ast0.UniqueStm(re) -> statement "!" re)
-
-and print_define_parameters params =
-  match Ast0.unwrap params with
-    Ast0.NoParams -> ()
-  | Ast0.DParams(lp,params,rp) ->
-      mcode print_string lp;
-      dots (function _ -> ()) print_define_param params; mcode print_string rp
-
-and print_define_param param =
-  match Ast0.unwrap param with
-    Ast0.DParam(id) -> ident id
-  | Ast0.DPComma(comma) -> mcode print_string comma
-  | Ast0.DPdots(dots) -> mcode print_string dots
-  | Ast0.DPcircles(circles) -> mcode print_string circles
-  | Ast0.OptDParam(dp) -> print_string "?"; print_define_param dp
-  | Ast0.UniqueDParam(dp) -> print_string "!"; print_define_param dp
-
-and print_fninfo = function
-    Ast0.FStorage(stg) -> mcode U.storage stg
-  | Ast0.FType(ty) -> typeC ty
-  | Ast0.FInline(inline) -> mcode print_string inline
-  | Ast0.FAttr(attr) -> mcode print_string attr
-
-and whencode notfn alwaysfn = function
-    Ast0.WhenNot a ->
-      print_string "   WHEN != "; open_box 0; notfn a; close_box()
-  | Ast0.WhenAlways a ->
-      print_string "   WHEN = "; open_box 0; alwaysfn a; close_box()
-  | Ast0.WhenModifier x -> print_string "   WHEN "; U.print_when_modif x
-  | Ast0.WhenNotTrue a ->
-      print_string "   WHEN != TRUE "; open_box 0; expression a; close_box()
-  | Ast0.WhenNotFalse a ->
-      print_string "   WHEN != FALSE "; open_box 0; expression a; close_box()
-
-and case_line arity c =
-  print_context c
-    (function _ ->
-      match Ast0.unwrap c with
-       Ast0.Default(def,colon,code) ->
-         print_string arity;
-         mcode print_string def; mcode print_string colon; print_string " ";
-         dots force_newline (statement arity) code
-      | Ast0.Case(case,exp,colon,code) ->
-         print_string arity;
-         mcode print_string case; print_string " "; expression exp;
-         mcode print_string colon; print_string " ";
-         dots force_newline (statement arity) code
-      | Ast0.OptCase(case) -> case_line "?" case)
-
-and statement_dots l = dots (function _ -> ()) (statement "") l
-and case_dots l = dots (function _ -> ()) (case_line "") l
-
-(* --------------------------------------------------------------------- *)
-(* Top level code *)
-
-let top_level t =
-  print_context t
-    (function _ ->
-      match Ast0.unwrap t with
-       Ast0.FILEINFO(old_file,new_file) ->
-         print_string "--- "; mcode print_string old_file; force_newline();
-         print_string "+++ "; mcode print_string new_file
-      | Ast0.DECL(stmt) -> statement "" stmt
-      | Ast0.CODE(stmt_dots) ->
-         dots force_newline (statement "") stmt_dots
-      | Ast0.ERRORWORDS(exps) ->
-         print_string "error words = [";
-         print_between (function _ -> print_string ", ") expression exps;
-         print_string "]"
-      | Ast0.OTHER(s) ->
-         print_string "OTHER("; statement "" s; print_string ")")
-
-let rule =
-  print_between (function _ -> force_newline(); force_newline()) top_level
-
-let unparse_anything x =
-  let q = !quiet in
-  quiet := true;
-  (match x with
-    Ast0.DotsExprTag(d) ->
-      print_string "ExpDots:"; force_newline();
-      expression_dots d
-  | Ast0.DotsParamTag(d) ->
-      parameter_list d
-  | Ast0.DotsInitTag(d) ->
-      initialiser_list d
-  | Ast0.DotsStmtTag(d) ->
-      print_string "StmDots:"; force_newline();
-      statement_dots d
-  | Ast0.DotsDeclTag(d) ->
-      declaration_dots d
-  | Ast0.DotsCaseTag(d) ->
-      case_dots d
-  | Ast0.IdentTag(d) ->
-      ident d
-  | Ast0.ExprTag(d) | Ast0.ArgExprTag(d) | Ast0.TestExprTag(d) ->
-      print_string "Exp:"; force_newline();
-      expression d
-  | Ast0.TypeCTag(d) ->
-      typeC d
-  | Ast0.ParamTag(d) ->
-      parameterTypeDef d
-  | Ast0.InitTag(d) ->
-      initialiser d
-  | Ast0.DeclTag(d) ->
-      declaration d
-  | Ast0.StmtTag(d) ->
-      print_string "Stm:"; force_newline();
-      statement "" d
-  | Ast0.CaseLineTag(d) ->
-      case_line "" d
-  | Ast0.TopTag(d) ->
-      top_level d
-  | Ast0.IsoWhenTag(x) -> U.print_when_modif x
-  | Ast0.IsoWhenTTag(e) -> expression e
-  | Ast0.IsoWhenFTag(e) -> expression e
-  | Ast0.MetaPosTag(var) -> meta_pos var);
-  quiet := q;
-  print_newline()
-
-let unparse x =
-  print_string "\n@@\n@@";
-  force_newline();
-  force_newline();
-  rule x;
-  print_newline()
-
-let unparse_to_string x = Common.format_to_string (function _ -> unparse x)
diff --git a/parsing_cocci/.#visitor_ast.ml.1.89 b/parsing_cocci/.#visitor_ast.ml.1.89
deleted file mode 100644 (file)
index 6338874..0000000
+++ /dev/null
@@ -1,1048 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module Ast = Ast_cocci
-
-(* --------------------------------------------------------------------- *)
-(* Generic traversal: combiner *)
-(* parameters:
-   combining function
-   treatment of: mcode, identifiers, expressions, fullTypes, types,
-   declarations, statements, toplevels
-   default value for options *)
-
-type 'a combiner =
-    {combiner_ident : Ast.ident -> 'a;
-     combiner_expression : Ast.expression -> 'a;
-     combiner_fullType : Ast.fullType -> 'a;
-     combiner_typeC : Ast.typeC -> 'a;
-     combiner_declaration : Ast.declaration -> 'a;
-     combiner_initialiser : Ast.initialiser -> 'a;
-     combiner_parameter : Ast.parameterTypeDef -> 'a;
-     combiner_parameter_list : Ast.parameter_list -> 'a;
-     combiner_rule_elem : Ast.rule_elem -> 'a;
-     combiner_statement : Ast.statement -> 'a;
-     combiner_case_line : Ast.case_line -> 'a;
-     combiner_top_level : Ast.top_level -> 'a;
-     combiner_anything : Ast.anything  -> 'a;
-     combiner_expression_dots : Ast.expression Ast.dots -> 'a;
-     combiner_statement_dots : Ast.statement Ast.dots -> 'a;
-     combiner_declaration_dots : Ast.declaration Ast.dots -> 'a}
-
-type ('mc,'a) cmcode = 'a combiner -> 'mc Ast_cocci.mcode -> 'a
-type ('cd,'a) ccode = 'a combiner -> ('cd -> 'a) -> 'cd -> 'a
-
-
-let combiner bind option_default 
-    meta_mcodefn string_mcodefn const_mcodefn assign_mcodefn fix_mcodefn
-    unary_mcodefn binary_mcodefn
-    cv_mcodefn base_mcodefn sign_mcodefn struct_mcodefn storage_mcodefn
-    inc_file_mcodefn
-    expdotsfn paramdotsfn stmtdotsfn decldotsfn
-    identfn exprfn ftfn tyfn initfn paramfn declfn rulefn stmtfn casefn
-    topfn anyfn =
-  let multibind l =
-    let rec loop = function
-       [] -> option_default
-      |        [x] -> x
-      |        x::xs -> bind x (loop xs) in
-    loop l in
-  let get_option f = function
-      Some x -> f x
-    | None -> option_default in
-
-  let rec meta_mcode x = meta_mcodefn all_functions x
-  and string_mcode x = string_mcodefn all_functions x
-  and const_mcode x = const_mcodefn all_functions x
-  and assign_mcode x = assign_mcodefn all_functions x
-  and fix_mcode x = fix_mcodefn all_functions x
-  and unary_mcode x = unary_mcodefn all_functions x
-  and binary_mcode x = binary_mcodefn all_functions x
-  and cv_mcode x = cv_mcodefn all_functions x
-  and base_mcode x = base_mcodefn all_functions x
-  and sign_mcode x = sign_mcodefn all_functions x
-  and struct_mcode x = struct_mcodefn all_functions x
-  and storage_mcode x = storage_mcodefn all_functions x
-  and inc_file_mcode x = inc_file_mcodefn all_functions x
-
-  and expression_dots d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.DOTS(l) | Ast.CIRCLES(l) | Ast.STARS(l) ->
-         multibind (List.map expression l) in
-    expdotsfn all_functions k d
-
-  and parameter_dots d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.DOTS(l) | Ast.CIRCLES(l) | Ast.STARS(l) ->
-         multibind (List.map parameterTypeDef l) in
-    paramdotsfn all_functions k d
-
-  and statement_dots d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.DOTS(l) | Ast.CIRCLES(l) | Ast.STARS(l) ->
-         multibind (List.map statement l) in
-    stmtdotsfn all_functions k d
-
-  and declaration_dots d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.DOTS(l) | Ast.CIRCLES(l) | Ast.STARS(l) ->
-         multibind (List.map declaration l) in
-    decldotsfn all_functions k d
-
-  and ident i =
-    let k i =
-      match Ast.unwrap i with
-       Ast.Id(name) -> string_mcode name
-      | Ast.MetaId(name,_,_,_) -> meta_mcode name
-      | Ast.MetaFunc(name,_,_,_) -> meta_mcode name
-      | Ast.MetaLocalFunc(name,_,_,_) -> meta_mcode name
-      | Ast.OptIdent(id) -> ident id
-      | Ast.UniqueIdent(id) -> ident id in
-    identfn all_functions k i
-    
-  and expression e =
-    let k e =
-      match Ast.unwrap e with
-       Ast.Ident(id) -> ident id
-      | Ast.Constant(const) -> const_mcode const
-      | Ast.FunCall(fn,lp,args,rp) ->
-         multibind [expression fn; string_mcode lp; expression_dots args;
-                     string_mcode rp]
-      | Ast.Assignment(left,op,right,simple) ->
-         multibind [expression left; assign_mcode op; expression right]
-      | Ast.CondExpr(exp1,why,exp2,colon,exp3) ->
-         multibind [expression exp1; string_mcode why;
-                     get_option expression exp2; string_mcode colon;
-                     expression exp3]
-      | Ast.Postfix(exp,op) -> bind (expression exp) (fix_mcode op)
-      | Ast.Infix(exp,op) -> bind (fix_mcode op) (expression exp)
-      | Ast.Unary(exp,op) -> bind (unary_mcode op) (expression exp)
-      | Ast.Binary(left,op,right) ->
-         multibind [expression left; binary_mcode op; expression right]
-      | Ast.Nested(left,op,right) ->
-         multibind [expression left; binary_mcode op; expression right]
-      | Ast.Paren(lp,exp,rp) ->
-         multibind [string_mcode lp; expression exp; string_mcode rp]
-      | Ast.ArrayAccess(exp1,lb,exp2,rb) ->
-         multibind
-           [expression exp1; string_mcode lb; expression exp2;
-             string_mcode rb]
-      | Ast.RecordAccess(exp,pt,field) ->
-         multibind [expression exp; string_mcode pt; ident field]
-      | Ast.RecordPtAccess(exp,ar,field) ->
-         multibind [expression exp; string_mcode ar; ident field]
-      | Ast.Cast(lp,ty,rp,exp) ->
-         multibind
-           [string_mcode lp; fullType ty; string_mcode rp; expression exp]
-      | Ast.SizeOfExpr(szf,exp) ->
-         multibind [string_mcode szf; expression exp]
-      | Ast.SizeOfType(szf,lp,ty,rp) ->
-         multibind
-           [string_mcode szf; string_mcode lp; fullType ty; string_mcode rp]
-      | Ast.TypeExp(ty) -> fullType ty
-      | Ast.MetaErr(name,_,_,_)
-      | Ast.MetaExpr(name,_,_,_,_,_)
-      | Ast.MetaExprList(name,_,_,_) -> meta_mcode name
-      | Ast.EComma(cm) -> string_mcode cm
-      | Ast.DisjExpr(exp_list) -> multibind (List.map expression exp_list)
-      | Ast.NestExpr(expr_dots,whencode,multi) ->
-         bind (expression_dots expr_dots) (get_option expression whencode)
-      | Ast.Edots(dots,whencode) | Ast.Ecircles(dots,whencode)
-      | Ast.Estars(dots,whencode) ->
-         bind (string_mcode dots) (get_option expression whencode)
-      | Ast.OptExp(exp) | Ast.UniqueExp(exp) ->
-         expression exp in
-    exprfn all_functions k e
-         
-  and fullType ft =
-    let k ft =
-      match Ast.unwrap ft with
-       Ast.Type(cv,ty) -> bind (get_option cv_mcode cv) (typeC ty)
-      | Ast.DisjType(types) -> multibind (List.map fullType types)
-      | Ast.OptType(ty) -> fullType ty
-      | Ast.UniqueType(ty) -> fullType ty in
-    ftfn all_functions k ft
-
-  and function_pointer (ty,lp1,star,rp1,lp2,params,rp2) extra =
-    (* have to put the treatment of the identifier into the right position *)
-    multibind
-      ([fullType ty; string_mcode lp1; string_mcode star] @ extra @
-       [string_mcode rp1;
-        string_mcode lp2; parameter_dots params; string_mcode rp2])
-         
-  and function_type (ty,lp1,params,rp1) extra =
-    (* have to put the treatment of the identifier into the right position *)
-    multibind
-      ([get_option fullType ty] @ extra @
-       [string_mcode lp1; parameter_dots params; string_mcode rp1])
-
-  and array_type (ty,lb,size,rb) extra =
-    multibind
-      ([fullType ty] @ extra @
-       [string_mcode lb; get_option expression size; string_mcode rb])
-         
-  and typeC ty =
-    let k ty =
-      match Ast.unwrap ty with
-       Ast.BaseType(ty,sgn) ->
-         bind (get_option sign_mcode sgn) (base_mcode ty)
-      | Ast.ImplicitInt(sgn) -> sign_mcode sgn
-      | Ast.Pointer(ty,star) ->
-         bind (fullType ty) (string_mcode star)
-      | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-         function_pointer (ty,lp1,star,rp1,lp2,params,rp2) []
-      |        Ast.FunctionType (_,ty,lp1,params,rp1) ->
-         function_type (ty,lp1,params,rp1) []
-      | Ast.Array(ty,lb,size,rb) -> array_type (ty,lb,size,rb) []
-      | Ast.StructUnionName(kind,name) ->
-         bind (struct_mcode kind) (get_option ident name)
-      | Ast.StructUnionDef(ty,lb,decls,rb) ->
-         multibind
-           [fullType ty; string_mcode lb; declaration_dots decls;
-             string_mcode rb]
-      | Ast.TypeName(name) -> string_mcode name
-      | Ast.MetaType(name,_,_) -> meta_mcode name in
-    tyfn all_functions k ty
-
-  and named_type ty id =
-    match Ast.unwrap ty with
-      Ast.Type(None,ty1) ->
-       (match Ast.unwrap ty1 with
-         Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-           function_pointer (ty,lp1,star,rp1,lp2,params,rp2) [ident id]
-       | Ast.FunctionType(_,ty,lp1,params,rp1) ->
-           function_type (ty,lp1,params,rp1) [ident id]
-       | Ast.Array(ty,lb,size,rb) -> array_type (ty,lb,size,rb) [ident id]
-       | _ -> bind (fullType ty) (ident id))
-    | _ -> bind (fullType ty) (ident id)
-
-  and declaration d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.Init(stg,ty,id,eq,ini,sem) ->
-         bind (get_option storage_mcode stg)
-           (bind (named_type ty id)
-              (multibind
-                 [string_mcode eq; initialiser ini; string_mcode sem]))
-      | Ast.UnInit(stg,ty,id,sem) ->
-         bind (get_option storage_mcode stg)
-           (bind (named_type ty id) (string_mcode sem))
-      | Ast.MacroDecl(name,lp,args,rp,sem) ->
-         multibind
-           [ident name; string_mcode lp; expression_dots args;
-             string_mcode rp; string_mcode sem]
-      | Ast.TyDecl(ty,sem) -> bind (fullType ty) (string_mcode sem)
-      | Ast.Typedef(stg,ty,id,sem) ->
-         bind (string_mcode stg)
-           (bind (fullType ty) (bind (typeC id) (string_mcode sem)))
-      | Ast.DisjDecl(decls) -> multibind (List.map declaration decls)
-      |        Ast.Ddots(dots,whencode) ->
-         bind (string_mcode dots) (get_option declaration whencode)
-      | Ast.MetaDecl(name,_,_) -> meta_mcode name
-      | Ast.OptDecl(decl) -> declaration decl
-      | Ast.UniqueDecl(decl) -> declaration decl in
-    declfn all_functions k d
-
-  and initialiser i =
-    let k i =
-      match Ast.unwrap i with
-       Ast.InitExpr(exp) -> expression exp
-      | Ast.InitList(lb,initlist,rb,whencode) ->
-         multibind
-           [string_mcode lb;
-             multibind (List.map initialiser initlist);
-             string_mcode rb;
-             multibind (List.map initialiser whencode)]
-      | Ast.InitGccDotName(dot,name,eq,ini) ->
-         multibind
-           [string_mcode dot; ident name; string_mcode eq; initialiser ini]
-      | Ast.InitGccName(name,eq,ini) ->
-         multibind [ident name; string_mcode eq; initialiser ini]
-      | Ast.InitGccIndex(lb,exp,rb,eq,ini) ->
-         multibind
-           [string_mcode lb; expression exp; string_mcode rb;
-             string_mcode eq; initialiser ini]
-      | Ast.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-         multibind
-           [string_mcode lb; expression exp1; string_mcode dots;
-             expression exp2; string_mcode rb; string_mcode eq;
-             initialiser ini]
-      | Ast.IComma(cm) -> string_mcode cm
-      | Ast.OptIni(i) -> initialiser i
-      | Ast.UniqueIni(i) -> initialiser i in
-    initfn all_functions k i
-
-  and parameterTypeDef p =
-    let k p =
-      match Ast.unwrap p with
-       Ast.VoidParam(ty) -> fullType ty
-      | Ast.Param(ty,Some id) -> named_type ty id
-      | Ast.Param(ty,None) -> fullType ty
-      | Ast.MetaParam(name,_,_) -> meta_mcode name
-      | Ast.MetaParamList(name,_,_,_) -> meta_mcode name
-      | Ast.PComma(cm) -> string_mcode cm
-      | Ast.Pdots(dots) -> string_mcode dots
-      | Ast.Pcircles(dots) -> string_mcode dots
-      | Ast.OptParam(param) -> parameterTypeDef param
-      | Ast.UniqueParam(param) -> parameterTypeDef param in
-    paramfn all_functions k p
-
-  and rule_elem re =
-    let k re =
-      match Ast.unwrap re with
-       Ast.FunHeader(_,_,fi,name,lp,params,rp) ->
-         multibind
-           ((List.map fninfo fi) @
-            [ident name;string_mcode lp;parameter_dots params;
-              string_mcode rp])
-      | Ast.Decl(_,_,decl) -> declaration decl
-      | Ast.SeqStart(brace) -> string_mcode brace
-      | Ast.SeqEnd(brace) -> string_mcode brace
-      | Ast.ExprStatement(exp,sem) ->
-         bind (expression exp) (string_mcode sem)
-      | Ast.IfHeader(iff,lp,exp,rp) ->
-         multibind [string_mcode iff; string_mcode lp; expression exp;
-                     string_mcode rp]
-      | Ast.Else(els) -> string_mcode els
-      | Ast.WhileHeader(whl,lp,exp,rp) ->
-         multibind [string_mcode whl; string_mcode lp; expression exp; 
-                     string_mcode rp]
-      | Ast.DoHeader(d) -> string_mcode d
-      | Ast.WhileTail(whl,lp,exp,rp,sem) ->
-         multibind [string_mcode whl; string_mcode lp; expression exp; 
-                     string_mcode rp; string_mcode sem]
-      | Ast.ForHeader(fr,lp,e1,sem1,e2,sem2,e3,rp) ->
-         multibind [string_mcode fr; string_mcode lp; 
-                     get_option expression e1; string_mcode sem1; 
-                     get_option expression e2; string_mcode sem2; 
-                     get_option expression e3; string_mcode rp]
-      | Ast.IteratorHeader(nm,lp,args,rp) ->
-         multibind [ident nm; string_mcode lp;
-                     expression_dots args; string_mcode rp]
-      | Ast.SwitchHeader(switch,lp,exp,rp) ->
-         multibind [string_mcode switch; string_mcode lp; expression exp; 
-                     string_mcode rp]
-      | Ast.Break(br,sem) -> bind (string_mcode br) (string_mcode sem)
-      | Ast.Continue(cont,sem) -> bind (string_mcode cont) (string_mcode sem)
-      |        Ast.Label(l,dd) -> bind (ident l) (string_mcode dd)
-      |        Ast.Goto(goto,l,sem) ->
-         bind (string_mcode goto) (bind (ident l) (string_mcode sem))
-      | Ast.Return(ret,sem) -> bind (string_mcode ret) (string_mcode sem)
-      | Ast.ReturnExpr(ret,exp,sem) ->
-         multibind [string_mcode ret; expression exp; string_mcode sem]
-      | Ast.MetaStmt(name,_,_,_) -> meta_mcode name
-      | Ast.MetaStmtList(name,_,_) -> meta_mcode name
-      | Ast.MetaRuleElem(name,_,_) -> meta_mcode name
-      | Ast.Exp(exp) -> expression exp
-      | Ast.TopExp(exp) -> expression exp
-      | Ast.Ty(ty) -> fullType ty
-      |        Ast.Include(inc,name) -> bind (string_mcode inc) (inc_file_mcode name)
-      |        Ast.DefineHeader(def,id,params) ->
-         multibind [string_mcode def; ident id; define_parameters params]
-      |        Ast.Default(def,colon) -> bind (string_mcode def) (string_mcode colon)
-      |        Ast.Case(case,exp,colon) ->
-         multibind [string_mcode case; expression exp; string_mcode colon]
-      |        Ast.DisjRuleElem(res) -> multibind (List.map rule_elem res) in
-    rulefn all_functions k re
-
-  (* not parameterizable for now... *)
-  and define_parameters p =
-    let k p =
-      match Ast.unwrap p with
-       Ast.NoParams -> option_default
-      | Ast.DParams(lp,params,rp) ->
-         multibind
-           [string_mcode lp; define_param_dots params; string_mcode rp] in
-    k p
-
-  and define_param_dots d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.DOTS(l) | Ast.CIRCLES(l) | Ast.STARS(l) ->
-         multibind (List.map define_param l) in
-    k d
-
-  and define_param p =
-    let k p =
-      match Ast.unwrap p with
-       Ast.DParam(id) -> ident id
-      | Ast.DPComma(comma) -> string_mcode comma
-      | Ast.DPdots(d) -> string_mcode d
-      | Ast.DPcircles(c) -> string_mcode c
-      | Ast.OptDParam(dp) -> define_param dp
-      | Ast.UniqueDParam(dp) -> define_param dp in
-    k p 
-
-  (* discard the result, because the statement is assumed to be already
-     represented elsewhere in the code *)
-  and process_bef_aft s =
-    match Ast.get_dots_bef_aft s with
-      Ast.NoDots -> ()
-    | Ast.DroppingBetweenDots(stm,ind) -> let _ = statement stm in ()
-    | Ast.AddingBetweenDots(stm,ind) -> let _ = statement stm in ()
-         
-  and statement s =
-    process_bef_aft s;
-    let k s =
-      match Ast.unwrap s with
-       Ast.Seq(lbrace,decls,body,rbrace) ->
-         multibind [rule_elem lbrace; statement_dots decls;
-                     statement_dots body; rule_elem rbrace]
-      | Ast.IfThen(header,branch,_) ->
-         multibind [rule_elem header; statement branch]
-      | Ast.IfThenElse(header,branch1,els,branch2,_) ->
-         multibind [rule_elem header; statement branch1; rule_elem els;
-                     statement branch2]
-      | Ast.While(header,body,_) ->
-         multibind [rule_elem header; statement body]
-      | Ast.Do(header,body,tail) ->
-         multibind [rule_elem header; statement body; rule_elem tail]
-      | Ast.For(header,body,_) -> multibind [rule_elem header; statement body]
-      | Ast.Iterator(header,body,_) ->
-         multibind [rule_elem header; statement body]
-      |        Ast.Switch(header,lb,cases,rb) ->
-         multibind [rule_elem header;rule_elem lb;
-                     multibind (List.map case_line cases);
-                     rule_elem rb]
-      | Ast.Atomic(re) -> rule_elem re
-      | Ast.Disj(stmt_dots_list) ->
-         multibind (List.map statement_dots stmt_dots_list)
-      | Ast.Nest(stmt_dots,whn,_,_,_) ->
-         bind (statement_dots stmt_dots)
-           (multibind (List.map (whencode statement_dots statement) whn))
-      | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-         multibind [rule_elem header; rule_elem lbrace;
-                     statement_dots decls; statement_dots body;
-                     rule_elem rbrace]
-      | Ast.Define(header,body) ->
-         bind (rule_elem header) (statement_dots body)
-      | Ast.Dots(d,whn,_,_) | Ast.Circles(d,whn,_,_) | Ast.Stars(d,whn,_,_) ->
-         bind (string_mcode d)
-           (multibind (List.map (whencode statement_dots statement) whn))
-      | Ast.OptStm(stmt) | Ast.UniqueStm(stmt) ->
-         statement stmt in
-    stmtfn all_functions k s
-
-  and fninfo = function
-      Ast.FStorage(stg) -> storage_mcode stg
-    | Ast.FType(ty) -> fullType ty
-    | Ast.FInline(inline) -> string_mcode inline
-    | Ast.FAttr(attr) -> string_mcode attr
-
-  and whencode notfn alwaysfn = function
-      Ast.WhenNot a -> notfn a
-    | Ast.WhenAlways a -> alwaysfn a
-    | Ast.WhenModifier(_) -> option_default
-  and case_line c =
-    let k c =
-      match Ast.unwrap c with
-       Ast.CaseLine(header,code) ->
-         bind (rule_elem header) (statement_dots code)
-      |        Ast.OptCase(case) -> case_line case in
-    casefn all_functions k c
-
-  and top_level t =
-    let k t =
-      match Ast.unwrap t with
-       Ast.FILEINFO(old_file,new_file) ->
-         bind (string_mcode old_file) (string_mcode new_file)
-      | Ast.DECL(stmt) -> statement stmt
-      | Ast.CODE(stmt_dots) -> statement_dots stmt_dots
-      | Ast.ERRORWORDS(exps) -> multibind (List.map expression exps) in
-    topfn all_functions k t
-
-  and anything a =
-    let k = function
-       (*in many cases below, the thing is not even mcode, so we do nothing*)
-       Ast.FullTypeTag(ft) -> fullType ft
-      | Ast.BaseTypeTag(bt) -> option_default
-      | Ast.StructUnionTag(su) -> option_default
-      | Ast.SignTag(sgn) -> option_default
-      | Ast.IdentTag(id) -> ident id
-      | Ast.ExpressionTag(exp) -> expression exp
-      | Ast.ConstantTag(cst) -> option_default
-      | Ast.UnaryOpTag(unop) -> option_default
-      | Ast.AssignOpTag(asgnop) -> option_default
-      | Ast.FixOpTag(fixop) -> option_default
-      | Ast.BinaryOpTag(binop) -> option_default
-      | Ast.ArithOpTag(arithop) -> option_default
-      | Ast.LogicalOpTag(logop) -> option_default
-      | Ast.DeclarationTag(decl) -> declaration decl
-      | Ast.InitTag(ini) -> initialiser ini
-      | Ast.StorageTag(stg) -> option_default
-      | Ast.IncFileTag(stg) -> option_default
-      | Ast.Rule_elemTag(rule) -> rule_elem rule
-      | Ast.StatementTag(rule) -> statement rule
-      | Ast.CaseLineTag(case) -> case_line case
-      | Ast.ConstVolTag(cv) -> option_default
-      | Ast.Token(tok,info) -> option_default
-      | Ast.Code(cd) -> top_level cd
-      | Ast.ExprDotsTag(ed) -> expression_dots ed
-      | Ast.ParamDotsTag(pd) -> parameter_dots pd
-      | Ast.StmtDotsTag(sd) -> statement_dots sd
-      | Ast.DeclDotsTag(sd) -> declaration_dots sd
-      | Ast.TypeCTag(ty) -> typeC ty
-      | Ast.ParamTag(param) -> parameterTypeDef param
-      | Ast.SgrepStartTag(tok) -> option_default
-      | Ast.SgrepEndTag(tok) -> option_default in
-    anyfn all_functions k a
-
-  and all_functions =
-    {combiner_ident = ident;
-      combiner_expression = expression;
-      combiner_fullType = fullType;
-      combiner_typeC = typeC;
-      combiner_declaration = declaration;
-      combiner_initialiser = initialiser;
-      combiner_parameter = parameterTypeDef;
-      combiner_parameter_list = parameter_dots;
-      combiner_rule_elem = rule_elem;
-      combiner_statement = statement;
-      combiner_case_line = case_line;
-      combiner_top_level = top_level;
-      combiner_anything = anything;
-      combiner_expression_dots = expression_dots;
-      combiner_statement_dots = statement_dots;
-      combiner_declaration_dots = declaration_dots} in
-  all_functions
-
-(* ---------------------------------------------------------------------- *)
-
-type 'a inout = 'a -> 'a (* for specifying the type of rebuilder *)
-
-type rebuilder =
-    {rebuilder_ident : Ast.ident inout;
-      rebuilder_expression : Ast.expression inout;
-      rebuilder_fullType : Ast.fullType inout;
-      rebuilder_typeC : Ast.typeC inout;
-      rebuilder_declaration : Ast.declaration inout;
-      rebuilder_initialiser : Ast.initialiser inout;
-      rebuilder_parameter : Ast.parameterTypeDef inout;
-      rebuilder_parameter_list : Ast.parameter_list inout;
-      rebuilder_statement : Ast.statement inout;
-      rebuilder_case_line : Ast.case_line inout;
-      rebuilder_rule_elem : Ast.rule_elem inout;
-      rebuilder_top_level : Ast.top_level inout;
-      rebuilder_expression_dots : Ast.expression Ast.dots inout;
-      rebuilder_statement_dots : Ast.statement Ast.dots inout;
-      rebuilder_declaration_dots : Ast.declaration Ast.dots inout;
-      rebuilder_define_param_dots : Ast.define_param Ast.dots inout;
-      rebuilder_define_param : Ast.define_param inout;
-      rebuilder_define_parameters : Ast.define_parameters inout;
-      rebuilder_anything : Ast.anything inout}
-
-type 'mc rmcode = 'mc Ast.mcode inout
-type 'cd rcode = rebuilder -> ('cd inout) -> 'cd inout
-
-
-let rebuilder
-    meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
-    inc_file_mcode
-    expdotsfn paramdotsfn stmtdotsfn decldotsfn
-    identfn exprfn ftfn tyfn initfn paramfn declfn rulefn stmtfn casefn
-    topfn anyfn =
-  let get_option f = function
-      Some x -> Some (f x)
-    | None -> None in
-  let rec expression_dots d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.DOTS(l) -> Ast.DOTS(List.map expression l)
-       | Ast.CIRCLES(l) -> Ast.CIRCLES(List.map expression l)
-       | Ast.STARS(l) -> Ast.STARS(List.map expression l)) in
-    expdotsfn all_functions k d
-
-  and parameter_dots d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.DOTS(l) -> Ast.DOTS(List.map parameterTypeDef l)
-       | Ast.CIRCLES(l) -> Ast.CIRCLES(List.map parameterTypeDef l)
-       | Ast.STARS(l) -> Ast.STARS(List.map parameterTypeDef l)) in
-    paramdotsfn all_functions k d
-
-  and statement_dots d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.DOTS(l) -> Ast.DOTS(List.map statement l)
-       | Ast.CIRCLES(l) -> Ast.CIRCLES(List.map statement l)
-       | Ast.STARS(l) -> Ast.STARS(List.map statement l)) in
-    stmtdotsfn all_functions k d
-
-  and declaration_dots d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.DOTS(l) -> Ast.DOTS(List.map declaration l)
-       | Ast.CIRCLES(l) -> Ast.CIRCLES(List.map declaration l)
-       | Ast.STARS(l) -> Ast.STARS(List.map declaration l)) in
-    decldotsfn all_functions k d
-
-  and ident i =
-    let k i =
-      Ast.rewrap i
-       (match Ast.unwrap i with
-         Ast.Id(name) -> Ast.Id(string_mcode name)
-       | Ast.MetaId(name,constraints,keep,inherited) ->
-           Ast.MetaId(meta_mcode name,constraints,keep,inherited)
-       | Ast.MetaFunc(name,constraints,keep,inherited) ->
-           Ast.MetaFunc(meta_mcode name,constraints,keep,inherited)
-       | Ast.MetaLocalFunc(name,constraints,keep,inherited) ->
-           Ast.MetaLocalFunc(meta_mcode name,constraints,keep,inherited)
-       | Ast.OptIdent(id) -> Ast.OptIdent(ident id)
-       | Ast.UniqueIdent(id) -> Ast.UniqueIdent(ident id)) in
-    identfn all_functions k i
-      
-  and expression e =
-    let k e =
-      Ast.rewrap e
-       (match Ast.unwrap e with
-         Ast.Ident(id) -> Ast.Ident(ident id)
-       | Ast.Constant(const) -> Ast.Constant(const_mcode const)
-       | Ast.FunCall(fn,lp,args,rp) ->
-           Ast.FunCall(expression fn, string_mcode lp, expression_dots args,
-                       string_mcode rp)
-       | Ast.Assignment(left,op,right,simple) ->
-           Ast.Assignment(expression left, assign_mcode op, expression right,
-                          simple)
-       | Ast.CondExpr(exp1,why,exp2,colon,exp3) ->
-           Ast.CondExpr(expression exp1, string_mcode why,
-                        get_option expression exp2, string_mcode colon,
-                        expression exp3)
-       | Ast.Postfix(exp,op) -> Ast.Postfix(expression exp,fix_mcode op)
-       | Ast.Infix(exp,op) -> Ast.Infix(expression exp,fix_mcode op)
-       | Ast.Unary(exp,op) -> Ast.Unary(expression exp,unary_mcode op)
-       | Ast.Binary(left,op,right) ->
-           Ast.Binary(expression left, binary_mcode op, expression right)
-       | Ast.Nested(left,op,right) ->
-           Ast.Nested(expression left, binary_mcode op, expression right)
-       | Ast.Paren(lp,exp,rp) ->
-           Ast.Paren(string_mcode lp, expression exp, string_mcode rp)
-       | Ast.ArrayAccess(exp1,lb,exp2,rb) ->
-           Ast.ArrayAccess(expression exp1, string_mcode lb, expression exp2,
-                           string_mcode rb)
-       | Ast.RecordAccess(exp,pt,field) ->
-           Ast.RecordAccess(expression exp, string_mcode pt, ident field)
-       | Ast.RecordPtAccess(exp,ar,field) ->
-           Ast.RecordPtAccess(expression exp, string_mcode ar, ident field)
-       | Ast.Cast(lp,ty,rp,exp) ->
-           Ast.Cast(string_mcode lp, fullType ty, string_mcode rp,
-                    expression exp)
-       | Ast.SizeOfExpr(szf,exp) ->
-           Ast.SizeOfExpr(string_mcode szf, expression exp)
-       | Ast.SizeOfType(szf,lp,ty,rp) ->
-           Ast.SizeOfType(string_mcode szf,string_mcode lp, fullType ty, 
-                           string_mcode rp)
-       | Ast.TypeExp(ty) -> Ast.TypeExp(fullType ty)
-       | Ast.MetaErr(name,constraints,keep,inherited) ->
-           Ast.MetaErr(meta_mcode name,constraints,keep,inherited)
-       | Ast.MetaExpr(name,constraints,keep,ty,form,inherited) ->
-           Ast.MetaExpr(meta_mcode name,constraints,keep,ty,form,inherited)
-       | Ast.MetaExprList(name,lenname_inh,keep,inherited) ->
-           Ast.MetaExprList(meta_mcode name,lenname_inh,keep,inherited)
-       | Ast.EComma(cm) -> Ast.EComma(string_mcode cm)
-       | Ast.DisjExpr(exp_list) -> Ast.DisjExpr(List.map expression exp_list)
-       | Ast.NestExpr(expr_dots,whencode,multi) ->
-           Ast.NestExpr(expression_dots expr_dots,
-                        get_option expression whencode,multi)
-       | Ast.Edots(dots,whencode) ->
-           Ast.Edots(string_mcode dots,get_option expression whencode)
-       | Ast.Ecircles(dots,whencode) ->
-           Ast.Ecircles(string_mcode dots,get_option expression whencode)
-       | Ast.Estars(dots,whencode) ->
-           Ast.Estars(string_mcode dots,get_option expression whencode)
-       | Ast.OptExp(exp) -> Ast.OptExp(expression exp)
-       | Ast.UniqueExp(exp) -> Ast.UniqueExp(expression exp)) in
-    exprfn all_functions k e
-         
-  and fullType ft =
-    let k ft =
-      Ast.rewrap ft
-       (match Ast.unwrap ft with
-         Ast.Type(cv,ty) -> Ast.Type (get_option cv_mcode cv, typeC ty)
-       | Ast.DisjType(types) -> Ast.DisjType(List.map fullType types)
-       | Ast.OptType(ty) -> Ast.OptType(fullType ty)
-       | Ast.UniqueType(ty) -> Ast.UniqueType(fullType ty)) in
-    ftfn all_functions k ft
-         
-  and typeC ty =
-    let k ty =
-      Ast.rewrap ty
-       (match Ast.unwrap ty with
-         Ast.BaseType(ty,sgn) ->
-           Ast.BaseType (base_mcode ty,get_option sign_mcode sgn)
-       | Ast.ImplicitInt(sgn) -> Ast.ImplicitInt (sign_mcode sgn)
-       | Ast.Pointer(ty,star) ->
-           Ast.Pointer (fullType ty, string_mcode star)
-       | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-           Ast.FunctionPointer(fullType ty,string_mcode lp1,string_mcode star,
-                               string_mcode rp1,string_mcode lp2,
-                               parameter_dots params,
-                               string_mcode rp2)
-       | Ast.FunctionType(allminus,ty,lp,params,rp) ->
-           Ast.FunctionType(allminus,get_option fullType ty,string_mcode lp,
-                            parameter_dots params,string_mcode rp)
-       | Ast.Array(ty,lb,size,rb) ->
-           Ast.Array(fullType ty, string_mcode lb,
-                     get_option expression size, string_mcode rb)
-       | Ast.StructUnionName(kind,name) ->
-           Ast.StructUnionName (struct_mcode kind, get_option ident name)
-       | Ast.StructUnionDef(ty,lb,decls,rb) ->
-           Ast.StructUnionDef (fullType ty,
-                               string_mcode lb, declaration_dots decls,
-                               string_mcode rb)
-       | Ast.TypeName(name) -> Ast.TypeName(string_mcode name)
-       | Ast.MetaType(name,keep,inherited) ->
-           Ast.MetaType(meta_mcode name,keep,inherited)) in
-    tyfn all_functions k ty
-         
-  and declaration d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.Init(stg,ty,id,eq,ini,sem) ->
-           Ast.Init(get_option storage_mcode stg, fullType ty, ident id,
-                    string_mcode eq, initialiser ini, string_mcode sem)
-       | Ast.UnInit(stg,ty,id,sem) ->
-           Ast.UnInit(get_option storage_mcode stg, fullType ty, ident id,
-                      string_mcode sem)
-       | Ast.MacroDecl(name,lp,args,rp,sem) ->
-           Ast.MacroDecl(ident name, string_mcode lp, expression_dots args,
-                         string_mcode rp,string_mcode sem)
-       | Ast.TyDecl(ty,sem) -> Ast.TyDecl(fullType ty, string_mcode sem)
-       | Ast.Typedef(stg,ty,id,sem) ->
-           Ast.Typedef(string_mcode stg, fullType ty, typeC id,
-                       string_mcode sem)
-       | Ast.DisjDecl(decls) -> Ast.DisjDecl(List.map declaration decls)
-       | Ast.Ddots(dots,whencode) ->
-           Ast.Ddots(string_mcode dots, get_option declaration whencode)
-       | Ast.MetaDecl(name,keep,inherited) ->
-           Ast.MetaDecl(meta_mcode name,keep,inherited)
-       | Ast.OptDecl(decl) -> Ast.OptDecl(declaration decl)
-       | Ast.UniqueDecl(decl) -> Ast.UniqueDecl(declaration decl)) in
-    declfn all_functions k d
-
-  and initialiser i =
-    let k i =
-      Ast.rewrap i
-       (match Ast.unwrap i with
-         Ast.InitExpr(exp) -> Ast.InitExpr(expression exp)
-       | Ast.InitList(lb,initlist,rb,whencode) ->
-           Ast.InitList(string_mcode lb, List.map initialiser initlist,
-                        string_mcode rb, List.map initialiser whencode)
-       | Ast.InitGccDotName(dot,name,eq,ini) ->
-           Ast.InitGccDotName
-             (string_mcode dot, ident name, string_mcode eq, initialiser ini)
-       | Ast.InitGccName(name,eq,ini) ->
-           Ast.InitGccName(ident name, string_mcode eq, initialiser ini)
-       | Ast.InitGccIndex(lb,exp,rb,eq,ini) ->
-           Ast.InitGccIndex
-             (string_mcode lb, expression exp, string_mcode rb,
-              string_mcode eq, initialiser ini)
-       | Ast.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-           Ast.InitGccRange
-             (string_mcode lb, expression exp1, string_mcode dots,
-              expression exp2, string_mcode rb, string_mcode eq,
-              initialiser ini)
-       | Ast.IComma(cm) -> Ast.IComma(string_mcode cm)
-       | Ast.OptIni(i) -> Ast.OptIni(initialiser i)
-       | Ast.UniqueIni(i) -> Ast.UniqueIni(initialiser i)) in
-    initfn all_functions k i
-         
-  and parameterTypeDef p =
-    let k p =
-      Ast.rewrap p
-       (match Ast.unwrap p with
-         Ast.VoidParam(ty) -> Ast.VoidParam(fullType ty)
-       | Ast.Param(ty,id) -> Ast.Param(fullType ty, get_option ident id)
-       | Ast.MetaParam(name,keep,inherited) ->
-           Ast.MetaParam(meta_mcode name,keep,inherited)
-       | Ast.MetaParamList(name,lenname_inh,keep,inherited) ->
-           Ast.MetaParamList(meta_mcode name,lenname_inh,keep,inherited)
-       | Ast.PComma(cm) -> Ast.PComma(string_mcode cm)
-       | Ast.Pdots(dots) -> Ast.Pdots(string_mcode dots)
-       | Ast.Pcircles(dots) -> Ast.Pcircles(string_mcode dots)
-       | Ast.OptParam(param) -> Ast.OptParam(parameterTypeDef param)
-       | Ast.UniqueParam(param) -> Ast.UniqueParam(parameterTypeDef param)) in
-    paramfn all_functions k p
-
-  and rule_elem re =
-    let k re =
-      Ast.rewrap re
-       (match Ast.unwrap re with
-         Ast.FunHeader(bef,allminus,fi,name,lp,params,rp) ->
-           Ast.FunHeader(bef,allminus,List.map fninfo fi,ident name,
-                         string_mcode lp, parameter_dots params,
-                         string_mcode rp)
-       | Ast.Decl(bef,allminus,decl) ->
-           Ast.Decl(bef,allminus,declaration decl)
-       | Ast.SeqStart(brace) -> Ast.SeqStart(string_mcode brace)
-       | Ast.SeqEnd(brace) -> Ast.SeqEnd(string_mcode brace)
-       | Ast.ExprStatement(exp,sem) ->
-           Ast.ExprStatement (expression exp, string_mcode sem)
-       | Ast.IfHeader(iff,lp,exp,rp) ->
-           Ast.IfHeader(string_mcode iff, string_mcode lp, expression exp,
-             string_mcode rp)
-       | Ast.Else(els) -> Ast.Else(string_mcode els)
-       | Ast.WhileHeader(whl,lp,exp,rp) ->
-           Ast.WhileHeader(string_mcode whl, string_mcode lp, expression exp, 
-                           string_mcode rp)
-       | Ast.DoHeader(d) -> Ast.DoHeader(string_mcode d)
-       | Ast.WhileTail(whl,lp,exp,rp,sem) ->
-           Ast.WhileTail(string_mcode whl, string_mcode lp, expression exp, 
-                         string_mcode rp, string_mcode sem)
-       | Ast.ForHeader(fr,lp,e1,sem1,e2,sem2,e3,rp) ->
-           Ast.ForHeader(string_mcode fr, string_mcode lp, 
-                         get_option expression e1, string_mcode sem1, 
-                         get_option expression e2, string_mcode sem2, 
-                         get_option expression e3, string_mcode rp)
-       | Ast.IteratorHeader(whl,lp,args,rp) ->
-           Ast.IteratorHeader(ident whl, string_mcode lp,
-                              expression_dots args, string_mcode rp)
-       | Ast.SwitchHeader(switch,lp,exp,rp) ->
-           Ast.SwitchHeader(string_mcode switch, string_mcode lp,
-                            expression exp, string_mcode rp)
-       | Ast.Break(br,sem) ->
-           Ast.Break(string_mcode br, string_mcode sem)
-       | Ast.Continue(cont,sem) ->
-           Ast.Continue(string_mcode cont, string_mcode sem)
-       | Ast.Label(l,dd) -> Ast.Label(ident l, string_mcode dd)
-       | Ast.Goto(goto,l,sem) ->
-           Ast.Goto(string_mcode goto,ident l,string_mcode sem)
-       | Ast.Return(ret,sem) ->
-           Ast.Return(string_mcode ret, string_mcode sem)
-       | Ast.ReturnExpr(ret,exp,sem) ->
-           Ast.ReturnExpr(string_mcode ret, expression exp, string_mcode sem)
-       | Ast.MetaStmt(name,keep,seqible,inherited) ->
-           Ast.MetaStmt(meta_mcode name,keep,seqible,inherited)
-       | Ast.MetaStmtList(name,keep,inherited) ->
-           Ast.MetaStmtList(meta_mcode name,keep,inherited)
-       | Ast.MetaRuleElem(name,keep,inherited) ->
-           Ast.MetaRuleElem(meta_mcode name,keep,inherited)
-       | Ast.Exp(exp) -> Ast.Exp(expression exp)
-       | Ast.TopExp(exp) -> Ast.TopExp(expression exp)
-       | Ast.Ty(ty) -> Ast.Ty(fullType ty)
-       | Ast.Include(inc,name) ->
-           Ast.Include(string_mcode inc,inc_file_mcode name)
-       | Ast.DefineHeader(def,id,params) ->
-           Ast.DefineHeader(string_mcode def,ident id,
-                            define_parameters params)
-       | Ast.Default(def,colon) ->
-           Ast.Default(string_mcode def,string_mcode colon)
-       | Ast.Case(case,exp,colon) ->
-           Ast.Case(string_mcode case,expression exp,string_mcode colon)
-       | Ast.DisjRuleElem(res) -> Ast.DisjRuleElem(List.map rule_elem res)) in
-    rulefn all_functions k re
-
-  (* not parameterizable for now... *)
-  and define_parameters p =
-    let k p =
-      Ast.rewrap p
-       (match Ast.unwrap p with
-         Ast.NoParams -> Ast.NoParams
-       | Ast.DParams(lp,params,rp) ->
-           Ast.DParams(string_mcode lp,define_param_dots params,
-                       string_mcode rp)) in
-    k p
-
-  and define_param_dots d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.DOTS(l) -> Ast.DOTS(List.map define_param l)
-       | Ast.CIRCLES(l) -> Ast.CIRCLES(List.map define_param l)
-       | Ast.STARS(l) -> Ast.STARS(List.map define_param l)) in
-    k d
-
-  and define_param p =
-    let k p =
-      Ast.rewrap p
-       (match Ast.unwrap p with
-         Ast.DParam(id) -> Ast.DParam(ident id)
-       | Ast.DPComma(comma) -> Ast.DPComma(string_mcode comma)
-       | Ast.DPdots(d) -> Ast.DPdots(string_mcode d)
-       | Ast.DPcircles(c) -> Ast.DPcircles(string_mcode c)
-       | Ast.OptDParam(dp) -> Ast.OptDParam(define_param dp)
-       | Ast.UniqueDParam(dp) -> Ast.UniqueDParam(define_param dp)) in
-    k p
-
-  and process_bef_aft s =
-    Ast.set_dots_bef_aft
-      (match Ast.get_dots_bef_aft s with
-       Ast.NoDots -> Ast.NoDots
-      | Ast.DroppingBetweenDots(stm,ind) ->
-         Ast.DroppingBetweenDots(statement stm,ind)
-      | Ast.AddingBetweenDots(stm,ind) ->
-         Ast.AddingBetweenDots(statement stm,ind))
-      s
-
-  and statement s =
-    let k s =
-      Ast.rewrap s
-       (match Ast.unwrap s with
-         Ast.Seq(lbrace,decls,body,rbrace) ->
-           Ast.Seq(rule_elem lbrace, statement_dots decls,
-                   statement_dots body, rule_elem rbrace)
-       | Ast.IfThen(header,branch,aft) ->
-           Ast.IfThen(rule_elem header, statement branch,aft)
-       | Ast.IfThenElse(header,branch1,els,branch2,aft) ->
-           Ast.IfThenElse(rule_elem header, statement branch1, rule_elem els,
-                          statement branch2, aft)
-       | Ast.While(header,body,aft) ->
-           Ast.While(rule_elem header, statement body, aft)
-       | Ast.Do(header,body,tail) ->
-           Ast.Do(rule_elem header, statement body, rule_elem tail)
-       | Ast.For(header,body,aft) ->
-           Ast.For(rule_elem header, statement body, aft)
-       | Ast.Iterator(header,body,aft) ->
-           Ast.Iterator(rule_elem header, statement body, aft)
-       | Ast.Switch(header,lb,cases,rb) ->
-           Ast.Switch(rule_elem header,rule_elem lb,
-                      List.map case_line cases,rule_elem rb)
-       | Ast.Atomic(re) -> Ast.Atomic(rule_elem re)
-       | Ast.Disj(stmt_dots_list) ->
-           Ast.Disj (List.map statement_dots stmt_dots_list)
-       | Ast.Nest(stmt_dots,whn,multi,bef,aft) ->
-           Ast.Nest(statement_dots stmt_dots,
-                    List.map (whencode statement_dots statement) whn,
-                    multi,bef,aft)
-       | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-           Ast.FunDecl(rule_elem header,rule_elem lbrace,
-                       statement_dots decls,
-                       statement_dots body, rule_elem rbrace)
-       | Ast.Define(header,body) ->
-           Ast.Define(rule_elem header,statement_dots body)
-       | Ast.Dots(d,whn,bef,aft) ->
-           Ast.Dots(string_mcode d,
-                    List.map (whencode statement_dots statement) whn,bef,aft)
-       | Ast.Circles(d,whn,bef,aft) ->
-           Ast.Circles(string_mcode d,
-                       List.map (whencode statement_dots statement) whn,
-                       bef,aft)
-       | Ast.Stars(d,whn,bef,aft) ->
-           Ast.Stars(string_mcode d,
-                     List.map (whencode statement_dots statement) whn,bef,aft)
-       | Ast.OptStm(stmt) -> Ast.OptStm(statement stmt)
-       | Ast.UniqueStm(stmt) -> Ast.UniqueStm(statement stmt)) in
-    let s = stmtfn all_functions k s in
-    (* better to do this after, in case there is an equality test on the whole
-       statement, eg in free_vars.  equality test would require that this
-       subterm not already be changed *)
-    process_bef_aft s
-
-  and fninfo = function
-      Ast.FStorage(stg) -> Ast.FStorage(storage_mcode stg)
-    | Ast.FType(ty) -> Ast.FType(fullType ty)
-    | Ast.FInline(inline) -> Ast.FInline(string_mcode inline)
-    | Ast.FAttr(attr) -> Ast.FAttr(string_mcode attr)
-
-  and whencode notfn alwaysfn = function
-      Ast.WhenNot a -> Ast.WhenNot (notfn a)
-    | Ast.WhenAlways a -> Ast.WhenAlways (alwaysfn a)
-    | Ast.WhenModifier(x)    -> Ast.WhenModifier(x)
-
-  and case_line c =
-    let k c =
-      Ast.rewrap c
-       (match Ast.unwrap c with
-         Ast.CaseLine(header,code) ->
-           Ast.CaseLine(rule_elem header,statement_dots code)
-       | Ast.OptCase(case) -> Ast.OptCase(case_line case)) in
-    casefn all_functions k c
-
-  and top_level t =
-    let k t =
-      Ast.rewrap t
-       (match Ast.unwrap t with
-         Ast.FILEINFO(old_file,new_file) ->
-           Ast.FILEINFO (string_mcode old_file, string_mcode new_file)
-       | Ast.DECL(stmt) -> Ast.DECL(statement stmt)
-       | Ast.CODE(stmt_dots) -> Ast.CODE(statement_dots stmt_dots)
-       | Ast.ERRORWORDS(exps) -> Ast.ERRORWORDS (List.map expression exps)) in
-    topfn all_functions k t
-
-  and anything a =
-    let k = function
-       (*in many cases below, the thing is not even mcode, so we do nothing*)
-       Ast.FullTypeTag(ft) -> Ast.FullTypeTag(fullType ft)
-      | Ast.BaseTypeTag(bt) as x -> x
-      | Ast.StructUnionTag(su) as x -> x
-      | Ast.SignTag(sgn) as x -> x
-      | Ast.IdentTag(id) -> Ast.IdentTag(ident id)
-      | Ast.ExpressionTag(exp) -> Ast.ExpressionTag(expression exp)
-      | Ast.ConstantTag(cst) as x -> x
-      | Ast.UnaryOpTag(unop) as x -> x
-      | Ast.AssignOpTag(asgnop) as x -> x
-      | Ast.FixOpTag(fixop) as x -> x
-      | Ast.BinaryOpTag(binop) as x -> x
-      | Ast.ArithOpTag(arithop) as x -> x
-      | Ast.LogicalOpTag(logop) as x -> x
-      | Ast.InitTag(decl) -> Ast.InitTag(initialiser decl)
-      | Ast.DeclarationTag(decl) -> Ast.DeclarationTag(declaration decl)
-      | Ast.StorageTag(stg) as x -> x
-      | Ast.IncFileTag(stg) as x -> x
-      | Ast.Rule_elemTag(rule) -> Ast.Rule_elemTag(rule_elem rule)
-      | Ast.StatementTag(rule) -> Ast.StatementTag(statement rule)
-      | Ast.CaseLineTag(case) -> Ast.CaseLineTag(case_line case)
-      | Ast.ConstVolTag(cv) as x -> x
-      | Ast.Token(tok,info) as x -> x
-      | Ast.Code(cd) -> Ast.Code(top_level cd)
-      | Ast.ExprDotsTag(ed) -> Ast.ExprDotsTag(expression_dots ed)
-      | Ast.ParamDotsTag(pd) -> Ast.ParamDotsTag(parameter_dots pd)
-      | Ast.StmtDotsTag(sd) -> Ast.StmtDotsTag(statement_dots sd)
-      | Ast.DeclDotsTag(sd) -> Ast.DeclDotsTag(declaration_dots sd)
-      | Ast.TypeCTag(ty) -> Ast.TypeCTag(typeC ty)
-      | Ast.ParamTag(param) -> Ast.ParamTag(parameterTypeDef param)
-      | Ast.SgrepStartTag(tok) as x -> x
-      | Ast.SgrepEndTag(tok) as x -> x in
-    anyfn all_functions k a
-
-  and all_functions =
-    {rebuilder_ident = ident;
-      rebuilder_expression = expression;
-      rebuilder_fullType= fullType;
-      rebuilder_typeC = typeC;
-      rebuilder_declaration = declaration;
-      rebuilder_initialiser = initialiser;
-      rebuilder_parameter = parameterTypeDef;
-      rebuilder_parameter_list = parameter_dots;
-      rebuilder_rule_elem = rule_elem;
-      rebuilder_statement = statement;
-      rebuilder_case_line = case_line;
-      rebuilder_top_level = top_level;
-      rebuilder_expression_dots = expression_dots;
-      rebuilder_statement_dots = statement_dots;
-      rebuilder_declaration_dots = declaration_dots;
-      rebuilder_define_param_dots = define_param_dots;
-      rebuilder_define_param = define_param;
-      rebuilder_define_parameters = define_parameters;
-      rebuilder_anything = anything} in
-  all_functions
-
diff --git a/parsing_cocci/.#visitor_ast.ml.1.90 b/parsing_cocci/.#visitor_ast.ml.1.90
deleted file mode 100644 (file)
index 6ac86e5..0000000
+++ /dev/null
@@ -1,1052 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module Ast = Ast_cocci
-
-(* --------------------------------------------------------------------- *)
-(* Generic traversal: combiner *)
-(* parameters:
-   combining function
-   treatment of: mcode, identifiers, expressions, fullTypes, types,
-   declarations, statements, toplevels
-   default value for options *)
-
-type 'a combiner =
-    {combiner_ident : Ast.ident -> 'a;
-     combiner_expression : Ast.expression -> 'a;
-     combiner_fullType : Ast.fullType -> 'a;
-     combiner_typeC : Ast.typeC -> 'a;
-     combiner_declaration : Ast.declaration -> 'a;
-     combiner_initialiser : Ast.initialiser -> 'a;
-     combiner_parameter : Ast.parameterTypeDef -> 'a;
-     combiner_parameter_list : Ast.parameter_list -> 'a;
-     combiner_rule_elem : Ast.rule_elem -> 'a;
-     combiner_statement : Ast.statement -> 'a;
-     combiner_case_line : Ast.case_line -> 'a;
-     combiner_top_level : Ast.top_level -> 'a;
-     combiner_anything : Ast.anything  -> 'a;
-     combiner_expression_dots : Ast.expression Ast.dots -> 'a;
-     combiner_statement_dots : Ast.statement Ast.dots -> 'a;
-     combiner_declaration_dots : Ast.declaration Ast.dots -> 'a}
-
-type ('mc,'a) cmcode = 'a combiner -> 'mc Ast_cocci.mcode -> 'a
-type ('cd,'a) ccode = 'a combiner -> ('cd -> 'a) -> 'cd -> 'a
-
-
-let combiner bind option_default 
-    meta_mcodefn string_mcodefn const_mcodefn assign_mcodefn fix_mcodefn
-    unary_mcodefn binary_mcodefn
-    cv_mcodefn base_mcodefn sign_mcodefn struct_mcodefn storage_mcodefn
-    inc_file_mcodefn
-    expdotsfn paramdotsfn stmtdotsfn decldotsfn
-    identfn exprfn ftfn tyfn initfn paramfn declfn rulefn stmtfn casefn
-    topfn anyfn =
-  let multibind l =
-    let rec loop = function
-       [] -> option_default
-      |        [x] -> x
-      |        x::xs -> bind x (loop xs) in
-    loop l in
-  let get_option f = function
-      Some x -> f x
-    | None -> option_default in
-
-  let rec meta_mcode x = meta_mcodefn all_functions x
-  and string_mcode x = string_mcodefn all_functions x
-  and const_mcode x = const_mcodefn all_functions x
-  and assign_mcode x = assign_mcodefn all_functions x
-  and fix_mcode x = fix_mcodefn all_functions x
-  and unary_mcode x = unary_mcodefn all_functions x
-  and binary_mcode x = binary_mcodefn all_functions x
-  and cv_mcode x = cv_mcodefn all_functions x
-  and base_mcode x = base_mcodefn all_functions x
-  and sign_mcode x = sign_mcodefn all_functions x
-  and struct_mcode x = struct_mcodefn all_functions x
-  and storage_mcode x = storage_mcodefn all_functions x
-  and inc_file_mcode x = inc_file_mcodefn all_functions x
-
-  and expression_dots d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.DOTS(l) | Ast.CIRCLES(l) | Ast.STARS(l) ->
-         multibind (List.map expression l) in
-    expdotsfn all_functions k d
-
-  and parameter_dots d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.DOTS(l) | Ast.CIRCLES(l) | Ast.STARS(l) ->
-         multibind (List.map parameterTypeDef l) in
-    paramdotsfn all_functions k d
-
-  and statement_dots d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.DOTS(l) | Ast.CIRCLES(l) | Ast.STARS(l) ->
-         multibind (List.map statement l) in
-    stmtdotsfn all_functions k d
-
-  and declaration_dots d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.DOTS(l) | Ast.CIRCLES(l) | Ast.STARS(l) ->
-         multibind (List.map declaration l) in
-    decldotsfn all_functions k d
-
-  and ident i =
-    let k i =
-      match Ast.unwrap i with
-       Ast.Id(name) -> string_mcode name
-      | Ast.MetaId(name,_,_,_) -> meta_mcode name
-      | Ast.MetaFunc(name,_,_,_) -> meta_mcode name
-      | Ast.MetaLocalFunc(name,_,_,_) -> meta_mcode name
-      | Ast.OptIdent(id) -> ident id
-      | Ast.UniqueIdent(id) -> ident id in
-    identfn all_functions k i
-    
-  and expression e =
-    let k e =
-      match Ast.unwrap e with
-       Ast.Ident(id) -> ident id
-      | Ast.Constant(const) -> const_mcode const
-      | Ast.FunCall(fn,lp,args,rp) ->
-         multibind [expression fn; string_mcode lp; expression_dots args;
-                     string_mcode rp]
-      | Ast.Assignment(left,op,right,simple) ->
-         multibind [expression left; assign_mcode op; expression right]
-      | Ast.CondExpr(exp1,why,exp2,colon,exp3) ->
-         multibind [expression exp1; string_mcode why;
-                     get_option expression exp2; string_mcode colon;
-                     expression exp3]
-      | Ast.Postfix(exp,op) -> bind (expression exp) (fix_mcode op)
-      | Ast.Infix(exp,op) -> bind (fix_mcode op) (expression exp)
-      | Ast.Unary(exp,op) -> bind (unary_mcode op) (expression exp)
-      | Ast.Binary(left,op,right) ->
-         multibind [expression left; binary_mcode op; expression right]
-      | Ast.Nested(left,op,right) ->
-         multibind [expression left; binary_mcode op; expression right]
-      | Ast.Paren(lp,exp,rp) ->
-         multibind [string_mcode lp; expression exp; string_mcode rp]
-      | Ast.ArrayAccess(exp1,lb,exp2,rb) ->
-         multibind
-           [expression exp1; string_mcode lb; expression exp2;
-             string_mcode rb]
-      | Ast.RecordAccess(exp,pt,field) ->
-         multibind [expression exp; string_mcode pt; ident field]
-      | Ast.RecordPtAccess(exp,ar,field) ->
-         multibind [expression exp; string_mcode ar; ident field]
-      | Ast.Cast(lp,ty,rp,exp) ->
-         multibind
-           [string_mcode lp; fullType ty; string_mcode rp; expression exp]
-      | Ast.SizeOfExpr(szf,exp) ->
-         multibind [string_mcode szf; expression exp]
-      | Ast.SizeOfType(szf,lp,ty,rp) ->
-         multibind
-           [string_mcode szf; string_mcode lp; fullType ty; string_mcode rp]
-      | Ast.TypeExp(ty) -> fullType ty
-      | Ast.MetaErr(name,_,_,_)
-      | Ast.MetaExpr(name,_,_,_,_,_)
-      | Ast.MetaExprList(name,_,_,_) -> meta_mcode name
-      | Ast.EComma(cm) -> string_mcode cm
-      | Ast.DisjExpr(exp_list) -> multibind (List.map expression exp_list)
-      | Ast.NestExpr(expr_dots,whencode,multi) ->
-         bind (expression_dots expr_dots) (get_option expression whencode)
-      | Ast.Edots(dots,whencode) | Ast.Ecircles(dots,whencode)
-      | Ast.Estars(dots,whencode) ->
-         bind (string_mcode dots) (get_option expression whencode)
-      | Ast.OptExp(exp) | Ast.UniqueExp(exp) ->
-         expression exp in
-    exprfn all_functions k e
-         
-  and fullType ft =
-    let k ft =
-      match Ast.unwrap ft with
-       Ast.Type(cv,ty) -> bind (get_option cv_mcode cv) (typeC ty)
-      | Ast.DisjType(types) -> multibind (List.map fullType types)
-      | Ast.OptType(ty) -> fullType ty
-      | Ast.UniqueType(ty) -> fullType ty in
-    ftfn all_functions k ft
-
-  and function_pointer (ty,lp1,star,rp1,lp2,params,rp2) extra =
-    (* have to put the treatment of the identifier into the right position *)
-    multibind
-      ([fullType ty; string_mcode lp1; string_mcode star] @ extra @
-       [string_mcode rp1;
-        string_mcode lp2; parameter_dots params; string_mcode rp2])
-         
-  and function_type (ty,lp1,params,rp1) extra =
-    (* have to put the treatment of the identifier into the right position *)
-    multibind
-      ([get_option fullType ty] @ extra @
-       [string_mcode lp1; parameter_dots params; string_mcode rp1])
-
-  and array_type (ty,lb,size,rb) extra =
-    multibind
-      ([fullType ty] @ extra @
-       [string_mcode lb; get_option expression size; string_mcode rb])
-         
-  and typeC ty =
-    let k ty =
-      match Ast.unwrap ty with
-       Ast.BaseType(ty,sgn) ->
-         bind (get_option sign_mcode sgn) (base_mcode ty)
-      | Ast.ImplicitInt(sgn) -> sign_mcode sgn
-      | Ast.Pointer(ty,star) ->
-         bind (fullType ty) (string_mcode star)
-      | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-         function_pointer (ty,lp1,star,rp1,lp2,params,rp2) []
-      |        Ast.FunctionType (_,ty,lp1,params,rp1) ->
-         function_type (ty,lp1,params,rp1) []
-      | Ast.Array(ty,lb,size,rb) -> array_type (ty,lb,size,rb) []
-      | Ast.StructUnionName(kind,name) ->
-         bind (struct_mcode kind) (get_option ident name)
-      | Ast.StructUnionDef(ty,lb,decls,rb) ->
-         multibind
-           [fullType ty; string_mcode lb; declaration_dots decls;
-             string_mcode rb]
-      | Ast.TypeName(name) -> string_mcode name
-      | Ast.MetaType(name,_,_) -> meta_mcode name in
-    tyfn all_functions k ty
-
-  and named_type ty id =
-    match Ast.unwrap ty with
-      Ast.Type(None,ty1) ->
-       (match Ast.unwrap ty1 with
-         Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-           function_pointer (ty,lp1,star,rp1,lp2,params,rp2) [ident id]
-       | Ast.FunctionType(_,ty,lp1,params,rp1) ->
-           function_type (ty,lp1,params,rp1) [ident id]
-       | Ast.Array(ty,lb,size,rb) -> array_type (ty,lb,size,rb) [ident id]
-       | _ -> bind (fullType ty) (ident id))
-    | _ -> bind (fullType ty) (ident id)
-
-  and declaration d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.Init(stg,ty,id,eq,ini,sem) ->
-         bind (get_option storage_mcode stg)
-           (bind (named_type ty id)
-              (multibind
-                 [string_mcode eq; initialiser ini; string_mcode sem]))
-      | Ast.UnInit(stg,ty,id,sem) ->
-         bind (get_option storage_mcode stg)
-           (bind (named_type ty id) (string_mcode sem))
-      | Ast.MacroDecl(name,lp,args,rp,sem) ->
-         multibind
-           [ident name; string_mcode lp; expression_dots args;
-             string_mcode rp; string_mcode sem]
-      | Ast.TyDecl(ty,sem) -> bind (fullType ty) (string_mcode sem)
-      | Ast.Typedef(stg,ty,id,sem) ->
-         bind (string_mcode stg)
-           (bind (fullType ty) (bind (typeC id) (string_mcode sem)))
-      | Ast.DisjDecl(decls) -> multibind (List.map declaration decls)
-      |        Ast.Ddots(dots,whencode) ->
-         bind (string_mcode dots) (get_option declaration whencode)
-      | Ast.MetaDecl(name,_,_) -> meta_mcode name
-      | Ast.OptDecl(decl) -> declaration decl
-      | Ast.UniqueDecl(decl) -> declaration decl in
-    declfn all_functions k d
-
-  and initialiser i =
-    let k i =
-      match Ast.unwrap i with
-       Ast.InitExpr(exp) -> expression exp
-      | Ast.InitList(lb,initlist,rb,whencode) ->
-         multibind
-           [string_mcode lb;
-             multibind (List.map initialiser initlist);
-             string_mcode rb;
-             multibind (List.map initialiser whencode)]
-      | Ast.InitGccDotName(dot,name,eq,ini) ->
-         multibind
-           [string_mcode dot; ident name; string_mcode eq; initialiser ini]
-      | Ast.InitGccName(name,eq,ini) ->
-         multibind [ident name; string_mcode eq; initialiser ini]
-      | Ast.InitGccIndex(lb,exp,rb,eq,ini) ->
-         multibind
-           [string_mcode lb; expression exp; string_mcode rb;
-             string_mcode eq; initialiser ini]
-      | Ast.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-         multibind
-           [string_mcode lb; expression exp1; string_mcode dots;
-             expression exp2; string_mcode rb; string_mcode eq;
-             initialiser ini]
-      | Ast.IComma(cm) -> string_mcode cm
-      | Ast.OptIni(i) -> initialiser i
-      | Ast.UniqueIni(i) -> initialiser i in
-    initfn all_functions k i
-
-  and parameterTypeDef p =
-    let k p =
-      match Ast.unwrap p with
-       Ast.VoidParam(ty) -> fullType ty
-      | Ast.Param(ty,Some id) -> named_type ty id
-      | Ast.Param(ty,None) -> fullType ty
-      | Ast.MetaParam(name,_,_) -> meta_mcode name
-      | Ast.MetaParamList(name,_,_,_) -> meta_mcode name
-      | Ast.PComma(cm) -> string_mcode cm
-      | Ast.Pdots(dots) -> string_mcode dots
-      | Ast.Pcircles(dots) -> string_mcode dots
-      | Ast.OptParam(param) -> parameterTypeDef param
-      | Ast.UniqueParam(param) -> parameterTypeDef param in
-    paramfn all_functions k p
-
-  and rule_elem re =
-    let k re =
-      match Ast.unwrap re with
-       Ast.FunHeader(_,_,fi,name,lp,params,rp) ->
-         multibind
-           ((List.map fninfo fi) @
-            [ident name;string_mcode lp;parameter_dots params;
-              string_mcode rp])
-      | Ast.Decl(_,_,decl) -> declaration decl
-      | Ast.SeqStart(brace) -> string_mcode brace
-      | Ast.SeqEnd(brace) -> string_mcode brace
-      | Ast.ExprStatement(exp,sem) ->
-         bind (expression exp) (string_mcode sem)
-      | Ast.IfHeader(iff,lp,exp,rp) ->
-         multibind [string_mcode iff; string_mcode lp; expression exp;
-                     string_mcode rp]
-      | Ast.Else(els) -> string_mcode els
-      | Ast.WhileHeader(whl,lp,exp,rp) ->
-         multibind [string_mcode whl; string_mcode lp; expression exp; 
-                     string_mcode rp]
-      | Ast.DoHeader(d) -> string_mcode d
-      | Ast.WhileTail(whl,lp,exp,rp,sem) ->
-         multibind [string_mcode whl; string_mcode lp; expression exp; 
-                     string_mcode rp; string_mcode sem]
-      | Ast.ForHeader(fr,lp,e1,sem1,e2,sem2,e3,rp) ->
-         multibind [string_mcode fr; string_mcode lp; 
-                     get_option expression e1; string_mcode sem1; 
-                     get_option expression e2; string_mcode sem2; 
-                     get_option expression e3; string_mcode rp]
-      | Ast.IteratorHeader(nm,lp,args,rp) ->
-         multibind [ident nm; string_mcode lp;
-                     expression_dots args; string_mcode rp]
-      | Ast.SwitchHeader(switch,lp,exp,rp) ->
-         multibind [string_mcode switch; string_mcode lp; expression exp; 
-                     string_mcode rp]
-      | Ast.Break(br,sem) -> bind (string_mcode br) (string_mcode sem)
-      | Ast.Continue(cont,sem) -> bind (string_mcode cont) (string_mcode sem)
-      |        Ast.Label(l,dd) -> bind (ident l) (string_mcode dd)
-      |        Ast.Goto(goto,l,sem) ->
-         bind (string_mcode goto) (bind (ident l) (string_mcode sem))
-      | Ast.Return(ret,sem) -> bind (string_mcode ret) (string_mcode sem)
-      | Ast.ReturnExpr(ret,exp,sem) ->
-         multibind [string_mcode ret; expression exp; string_mcode sem]
-      | Ast.MetaStmt(name,_,_,_) -> meta_mcode name
-      | Ast.MetaStmtList(name,_,_) -> meta_mcode name
-      | Ast.MetaRuleElem(name,_,_) -> meta_mcode name
-      | Ast.Exp(exp) -> expression exp
-      | Ast.TopExp(exp) -> expression exp
-      | Ast.Ty(ty) -> fullType ty
-      |        Ast.Include(inc,name) -> bind (string_mcode inc) (inc_file_mcode name)
-      |        Ast.DefineHeader(def,id,params) ->
-         multibind [string_mcode def; ident id; define_parameters params]
-      |        Ast.Default(def,colon) -> bind (string_mcode def) (string_mcode colon)
-      |        Ast.Case(case,exp,colon) ->
-         multibind [string_mcode case; expression exp; string_mcode colon]
-      |        Ast.DisjRuleElem(res) -> multibind (List.map rule_elem res) in
-    rulefn all_functions k re
-
-  (* not parameterizable for now... *)
-  and define_parameters p =
-    let k p =
-      match Ast.unwrap p with
-       Ast.NoParams -> option_default
-      | Ast.DParams(lp,params,rp) ->
-         multibind
-           [string_mcode lp; define_param_dots params; string_mcode rp] in
-    k p
-
-  and define_param_dots d =
-    let k d =
-      match Ast.unwrap d with
-       Ast.DOTS(l) | Ast.CIRCLES(l) | Ast.STARS(l) ->
-         multibind (List.map define_param l) in
-    k d
-
-  and define_param p =
-    let k p =
-      match Ast.unwrap p with
-       Ast.DParam(id) -> ident id
-      | Ast.DPComma(comma) -> string_mcode comma
-      | Ast.DPdots(d) -> string_mcode d
-      | Ast.DPcircles(c) -> string_mcode c
-      | Ast.OptDParam(dp) -> define_param dp
-      | Ast.UniqueDParam(dp) -> define_param dp in
-    k p 
-
-  (* discard the result, because the statement is assumed to be already
-     represented elsewhere in the code *)
-  and process_bef_aft s =
-    match Ast.get_dots_bef_aft s with
-      Ast.NoDots -> ()
-    | Ast.DroppingBetweenDots(stm,ind) -> let _ = statement stm in ()
-    | Ast.AddingBetweenDots(stm,ind) -> let _ = statement stm in ()
-         
-  and statement s =
-    process_bef_aft s;
-    let k s =
-      match Ast.unwrap s with
-       Ast.Seq(lbrace,decls,body,rbrace) ->
-         multibind [rule_elem lbrace; statement_dots decls;
-                     statement_dots body; rule_elem rbrace]
-      | Ast.IfThen(header,branch,_) ->
-         multibind [rule_elem header; statement branch]
-      | Ast.IfThenElse(header,branch1,els,branch2,_) ->
-         multibind [rule_elem header; statement branch1; rule_elem els;
-                     statement branch2]
-      | Ast.While(header,body,_) ->
-         multibind [rule_elem header; statement body]
-      | Ast.Do(header,body,tail) ->
-         multibind [rule_elem header; statement body; rule_elem tail]
-      | Ast.For(header,body,_) -> multibind [rule_elem header; statement body]
-      | Ast.Iterator(header,body,_) ->
-         multibind [rule_elem header; statement body]
-      |        Ast.Switch(header,lb,cases,rb) ->
-         multibind [rule_elem header;rule_elem lb;
-                     multibind (List.map case_line cases);
-                     rule_elem rb]
-      | Ast.Atomic(re) -> rule_elem re
-      | Ast.Disj(stmt_dots_list) ->
-         multibind (List.map statement_dots stmt_dots_list)
-      | Ast.Nest(stmt_dots,whn,_,_,_) ->
-         bind (statement_dots stmt_dots)
-           (multibind (List.map (whencode statement_dots statement) whn))
-      | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-         multibind [rule_elem header; rule_elem lbrace;
-                     statement_dots decls; statement_dots body;
-                     rule_elem rbrace]
-      | Ast.Define(header,body) ->
-         bind (rule_elem header) (statement_dots body)
-      | Ast.Dots(d,whn,_,_) | Ast.Circles(d,whn,_,_) | Ast.Stars(d,whn,_,_) ->
-         bind (string_mcode d)
-           (multibind (List.map (whencode statement_dots statement) whn))
-      | Ast.OptStm(stmt) | Ast.UniqueStm(stmt) ->
-         statement stmt in
-    stmtfn all_functions k s
-
-  and fninfo = function
-      Ast.FStorage(stg) -> storage_mcode stg
-    | Ast.FType(ty) -> fullType ty
-    | Ast.FInline(inline) -> string_mcode inline
-    | Ast.FAttr(attr) -> string_mcode attr
-
-  and whencode notfn alwaysfn = function
-      Ast.WhenNot a -> notfn a
-    | Ast.WhenAlways a -> alwaysfn a
-    | Ast.WhenModifier(_) -> option_default
-    | Ast.WhenNotTrue(e) -> rule_elem e
-    | Ast.WhenNotFalse(e) -> rule_elem e
-  and case_line c =
-    let k c =
-      match Ast.unwrap c with
-       Ast.CaseLine(header,code) ->
-         bind (rule_elem header) (statement_dots code)
-      |        Ast.OptCase(case) -> case_line case in
-    casefn all_functions k c
-
-  and top_level t =
-    let k t =
-      match Ast.unwrap t with
-       Ast.FILEINFO(old_file,new_file) ->
-         bind (string_mcode old_file) (string_mcode new_file)
-      | Ast.DECL(stmt) -> statement stmt
-      | Ast.CODE(stmt_dots) -> statement_dots stmt_dots
-      | Ast.ERRORWORDS(exps) -> multibind (List.map expression exps) in
-    topfn all_functions k t
-
-  and anything a =
-    let k = function
-       (*in many cases below, the thing is not even mcode, so we do nothing*)
-       Ast.FullTypeTag(ft) -> fullType ft
-      | Ast.BaseTypeTag(bt) -> option_default
-      | Ast.StructUnionTag(su) -> option_default
-      | Ast.SignTag(sgn) -> option_default
-      | Ast.IdentTag(id) -> ident id
-      | Ast.ExpressionTag(exp) -> expression exp
-      | Ast.ConstantTag(cst) -> option_default
-      | Ast.UnaryOpTag(unop) -> option_default
-      | Ast.AssignOpTag(asgnop) -> option_default
-      | Ast.FixOpTag(fixop) -> option_default
-      | Ast.BinaryOpTag(binop) -> option_default
-      | Ast.ArithOpTag(arithop) -> option_default
-      | Ast.LogicalOpTag(logop) -> option_default
-      | Ast.DeclarationTag(decl) -> declaration decl
-      | Ast.InitTag(ini) -> initialiser ini
-      | Ast.StorageTag(stg) -> option_default
-      | Ast.IncFileTag(stg) -> option_default
-      | Ast.Rule_elemTag(rule) -> rule_elem rule
-      | Ast.StatementTag(rule) -> statement rule
-      | Ast.CaseLineTag(case) -> case_line case
-      | Ast.ConstVolTag(cv) -> option_default
-      | Ast.Token(tok,info) -> option_default
-      | Ast.Code(cd) -> top_level cd
-      | Ast.ExprDotsTag(ed) -> expression_dots ed
-      | Ast.ParamDotsTag(pd) -> parameter_dots pd
-      | Ast.StmtDotsTag(sd) -> statement_dots sd
-      | Ast.DeclDotsTag(sd) -> declaration_dots sd
-      | Ast.TypeCTag(ty) -> typeC ty
-      | Ast.ParamTag(param) -> parameterTypeDef param
-      | Ast.SgrepStartTag(tok) -> option_default
-      | Ast.SgrepEndTag(tok) -> option_default in
-    anyfn all_functions k a
-
-  and all_functions =
-    {combiner_ident = ident;
-      combiner_expression = expression;
-      combiner_fullType = fullType;
-      combiner_typeC = typeC;
-      combiner_declaration = declaration;
-      combiner_initialiser = initialiser;
-      combiner_parameter = parameterTypeDef;
-      combiner_parameter_list = parameter_dots;
-      combiner_rule_elem = rule_elem;
-      combiner_statement = statement;
-      combiner_case_line = case_line;
-      combiner_top_level = top_level;
-      combiner_anything = anything;
-      combiner_expression_dots = expression_dots;
-      combiner_statement_dots = statement_dots;
-      combiner_declaration_dots = declaration_dots} in
-  all_functions
-
-(* ---------------------------------------------------------------------- *)
-
-type 'a inout = 'a -> 'a (* for specifying the type of rebuilder *)
-
-type rebuilder =
-    {rebuilder_ident : Ast.ident inout;
-      rebuilder_expression : Ast.expression inout;
-      rebuilder_fullType : Ast.fullType inout;
-      rebuilder_typeC : Ast.typeC inout;
-      rebuilder_declaration : Ast.declaration inout;
-      rebuilder_initialiser : Ast.initialiser inout;
-      rebuilder_parameter : Ast.parameterTypeDef inout;
-      rebuilder_parameter_list : Ast.parameter_list inout;
-      rebuilder_statement : Ast.statement inout;
-      rebuilder_case_line : Ast.case_line inout;
-      rebuilder_rule_elem : Ast.rule_elem inout;
-      rebuilder_top_level : Ast.top_level inout;
-      rebuilder_expression_dots : Ast.expression Ast.dots inout;
-      rebuilder_statement_dots : Ast.statement Ast.dots inout;
-      rebuilder_declaration_dots : Ast.declaration Ast.dots inout;
-      rebuilder_define_param_dots : Ast.define_param Ast.dots inout;
-      rebuilder_define_param : Ast.define_param inout;
-      rebuilder_define_parameters : Ast.define_parameters inout;
-      rebuilder_anything : Ast.anything inout}
-
-type 'mc rmcode = 'mc Ast.mcode inout
-type 'cd rcode = rebuilder -> ('cd inout) -> 'cd inout
-
-
-let rebuilder
-    meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
-    inc_file_mcode
-    expdotsfn paramdotsfn stmtdotsfn decldotsfn
-    identfn exprfn ftfn tyfn initfn paramfn declfn rulefn stmtfn casefn
-    topfn anyfn =
-  let get_option f = function
-      Some x -> Some (f x)
-    | None -> None in
-  let rec expression_dots d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.DOTS(l) -> Ast.DOTS(List.map expression l)
-       | Ast.CIRCLES(l) -> Ast.CIRCLES(List.map expression l)
-       | Ast.STARS(l) -> Ast.STARS(List.map expression l)) in
-    expdotsfn all_functions k d
-
-  and parameter_dots d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.DOTS(l) -> Ast.DOTS(List.map parameterTypeDef l)
-       | Ast.CIRCLES(l) -> Ast.CIRCLES(List.map parameterTypeDef l)
-       | Ast.STARS(l) -> Ast.STARS(List.map parameterTypeDef l)) in
-    paramdotsfn all_functions k d
-
-  and statement_dots d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.DOTS(l) -> Ast.DOTS(List.map statement l)
-       | Ast.CIRCLES(l) -> Ast.CIRCLES(List.map statement l)
-       | Ast.STARS(l) -> Ast.STARS(List.map statement l)) in
-    stmtdotsfn all_functions k d
-
-  and declaration_dots d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.DOTS(l) -> Ast.DOTS(List.map declaration l)
-       | Ast.CIRCLES(l) -> Ast.CIRCLES(List.map declaration l)
-       | Ast.STARS(l) -> Ast.STARS(List.map declaration l)) in
-    decldotsfn all_functions k d
-
-  and ident i =
-    let k i =
-      Ast.rewrap i
-       (match Ast.unwrap i with
-         Ast.Id(name) -> Ast.Id(string_mcode name)
-       | Ast.MetaId(name,constraints,keep,inherited) ->
-           Ast.MetaId(meta_mcode name,constraints,keep,inherited)
-       | Ast.MetaFunc(name,constraints,keep,inherited) ->
-           Ast.MetaFunc(meta_mcode name,constraints,keep,inherited)
-       | Ast.MetaLocalFunc(name,constraints,keep,inherited) ->
-           Ast.MetaLocalFunc(meta_mcode name,constraints,keep,inherited)
-       | Ast.OptIdent(id) -> Ast.OptIdent(ident id)
-       | Ast.UniqueIdent(id) -> Ast.UniqueIdent(ident id)) in
-    identfn all_functions k i
-      
-  and expression e =
-    let k e =
-      Ast.rewrap e
-       (match Ast.unwrap e with
-         Ast.Ident(id) -> Ast.Ident(ident id)
-       | Ast.Constant(const) -> Ast.Constant(const_mcode const)
-       | Ast.FunCall(fn,lp,args,rp) ->
-           Ast.FunCall(expression fn, string_mcode lp, expression_dots args,
-                       string_mcode rp)
-       | Ast.Assignment(left,op,right,simple) ->
-           Ast.Assignment(expression left, assign_mcode op, expression right,
-                          simple)
-       | Ast.CondExpr(exp1,why,exp2,colon,exp3) ->
-           Ast.CondExpr(expression exp1, string_mcode why,
-                        get_option expression exp2, string_mcode colon,
-                        expression exp3)
-       | Ast.Postfix(exp,op) -> Ast.Postfix(expression exp,fix_mcode op)
-       | Ast.Infix(exp,op) -> Ast.Infix(expression exp,fix_mcode op)
-       | Ast.Unary(exp,op) -> Ast.Unary(expression exp,unary_mcode op)
-       | Ast.Binary(left,op,right) ->
-           Ast.Binary(expression left, binary_mcode op, expression right)
-       | Ast.Nested(left,op,right) ->
-           Ast.Nested(expression left, binary_mcode op, expression right)
-       | Ast.Paren(lp,exp,rp) ->
-           Ast.Paren(string_mcode lp, expression exp, string_mcode rp)
-       | Ast.ArrayAccess(exp1,lb,exp2,rb) ->
-           Ast.ArrayAccess(expression exp1, string_mcode lb, expression exp2,
-                           string_mcode rb)
-       | Ast.RecordAccess(exp,pt,field) ->
-           Ast.RecordAccess(expression exp, string_mcode pt, ident field)
-       | Ast.RecordPtAccess(exp,ar,field) ->
-           Ast.RecordPtAccess(expression exp, string_mcode ar, ident field)
-       | Ast.Cast(lp,ty,rp,exp) ->
-           Ast.Cast(string_mcode lp, fullType ty, string_mcode rp,
-                    expression exp)
-       | Ast.SizeOfExpr(szf,exp) ->
-           Ast.SizeOfExpr(string_mcode szf, expression exp)
-       | Ast.SizeOfType(szf,lp,ty,rp) ->
-           Ast.SizeOfType(string_mcode szf,string_mcode lp, fullType ty, 
-                           string_mcode rp)
-       | Ast.TypeExp(ty) -> Ast.TypeExp(fullType ty)
-       | Ast.MetaErr(name,constraints,keep,inherited) ->
-           Ast.MetaErr(meta_mcode name,constraints,keep,inherited)
-       | Ast.MetaExpr(name,constraints,keep,ty,form,inherited) ->
-           Ast.MetaExpr(meta_mcode name,constraints,keep,ty,form,inherited)
-       | Ast.MetaExprList(name,lenname_inh,keep,inherited) ->
-           Ast.MetaExprList(meta_mcode name,lenname_inh,keep,inherited)
-       | Ast.EComma(cm) -> Ast.EComma(string_mcode cm)
-       | Ast.DisjExpr(exp_list) -> Ast.DisjExpr(List.map expression exp_list)
-       | Ast.NestExpr(expr_dots,whencode,multi) ->
-           Ast.NestExpr(expression_dots expr_dots,
-                        get_option expression whencode,multi)
-       | Ast.Edots(dots,whencode) ->
-           Ast.Edots(string_mcode dots,get_option expression whencode)
-       | Ast.Ecircles(dots,whencode) ->
-           Ast.Ecircles(string_mcode dots,get_option expression whencode)
-       | Ast.Estars(dots,whencode) ->
-           Ast.Estars(string_mcode dots,get_option expression whencode)
-       | Ast.OptExp(exp) -> Ast.OptExp(expression exp)
-       | Ast.UniqueExp(exp) -> Ast.UniqueExp(expression exp)) in
-    exprfn all_functions k e
-         
-  and fullType ft =
-    let k ft =
-      Ast.rewrap ft
-       (match Ast.unwrap ft with
-         Ast.Type(cv,ty) -> Ast.Type (get_option cv_mcode cv, typeC ty)
-       | Ast.DisjType(types) -> Ast.DisjType(List.map fullType types)
-       | Ast.OptType(ty) -> Ast.OptType(fullType ty)
-       | Ast.UniqueType(ty) -> Ast.UniqueType(fullType ty)) in
-    ftfn all_functions k ft
-         
-  and typeC ty =
-    let k ty =
-      Ast.rewrap ty
-       (match Ast.unwrap ty with
-         Ast.BaseType(ty,sgn) ->
-           Ast.BaseType (base_mcode ty,get_option sign_mcode sgn)
-       | Ast.ImplicitInt(sgn) -> Ast.ImplicitInt (sign_mcode sgn)
-       | Ast.Pointer(ty,star) ->
-           Ast.Pointer (fullType ty, string_mcode star)
-       | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-           Ast.FunctionPointer(fullType ty,string_mcode lp1,string_mcode star,
-                               string_mcode rp1,string_mcode lp2,
-                               parameter_dots params,
-                               string_mcode rp2)
-       | Ast.FunctionType(allminus,ty,lp,params,rp) ->
-           Ast.FunctionType(allminus,get_option fullType ty,string_mcode lp,
-                            parameter_dots params,string_mcode rp)
-       | Ast.Array(ty,lb,size,rb) ->
-           Ast.Array(fullType ty, string_mcode lb,
-                     get_option expression size, string_mcode rb)
-       | Ast.StructUnionName(kind,name) ->
-           Ast.StructUnionName (struct_mcode kind, get_option ident name)
-       | Ast.StructUnionDef(ty,lb,decls,rb) ->
-           Ast.StructUnionDef (fullType ty,
-                               string_mcode lb, declaration_dots decls,
-                               string_mcode rb)
-       | Ast.TypeName(name) -> Ast.TypeName(string_mcode name)
-       | Ast.MetaType(name,keep,inherited) ->
-           Ast.MetaType(meta_mcode name,keep,inherited)) in
-    tyfn all_functions k ty
-         
-  and declaration d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.Init(stg,ty,id,eq,ini,sem) ->
-           Ast.Init(get_option storage_mcode stg, fullType ty, ident id,
-                    string_mcode eq, initialiser ini, string_mcode sem)
-       | Ast.UnInit(stg,ty,id,sem) ->
-           Ast.UnInit(get_option storage_mcode stg, fullType ty, ident id,
-                      string_mcode sem)
-       | Ast.MacroDecl(name,lp,args,rp,sem) ->
-           Ast.MacroDecl(ident name, string_mcode lp, expression_dots args,
-                         string_mcode rp,string_mcode sem)
-       | Ast.TyDecl(ty,sem) -> Ast.TyDecl(fullType ty, string_mcode sem)
-       | Ast.Typedef(stg,ty,id,sem) ->
-           Ast.Typedef(string_mcode stg, fullType ty, typeC id,
-                       string_mcode sem)
-       | Ast.DisjDecl(decls) -> Ast.DisjDecl(List.map declaration decls)
-       | Ast.Ddots(dots,whencode) ->
-           Ast.Ddots(string_mcode dots, get_option declaration whencode)
-       | Ast.MetaDecl(name,keep,inherited) ->
-           Ast.MetaDecl(meta_mcode name,keep,inherited)
-       | Ast.OptDecl(decl) -> Ast.OptDecl(declaration decl)
-       | Ast.UniqueDecl(decl) -> Ast.UniqueDecl(declaration decl)) in
-    declfn all_functions k d
-
-  and initialiser i =
-    let k i =
-      Ast.rewrap i
-       (match Ast.unwrap i with
-         Ast.InitExpr(exp) -> Ast.InitExpr(expression exp)
-       | Ast.InitList(lb,initlist,rb,whencode) ->
-           Ast.InitList(string_mcode lb, List.map initialiser initlist,
-                        string_mcode rb, List.map initialiser whencode)
-       | Ast.InitGccDotName(dot,name,eq,ini) ->
-           Ast.InitGccDotName
-             (string_mcode dot, ident name, string_mcode eq, initialiser ini)
-       | Ast.InitGccName(name,eq,ini) ->
-           Ast.InitGccName(ident name, string_mcode eq, initialiser ini)
-       | Ast.InitGccIndex(lb,exp,rb,eq,ini) ->
-           Ast.InitGccIndex
-             (string_mcode lb, expression exp, string_mcode rb,
-              string_mcode eq, initialiser ini)
-       | Ast.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-           Ast.InitGccRange
-             (string_mcode lb, expression exp1, string_mcode dots,
-              expression exp2, string_mcode rb, string_mcode eq,
-              initialiser ini)
-       | Ast.IComma(cm) -> Ast.IComma(string_mcode cm)
-       | Ast.OptIni(i) -> Ast.OptIni(initialiser i)
-       | Ast.UniqueIni(i) -> Ast.UniqueIni(initialiser i)) in
-    initfn all_functions k i
-         
-  and parameterTypeDef p =
-    let k p =
-      Ast.rewrap p
-       (match Ast.unwrap p with
-         Ast.VoidParam(ty) -> Ast.VoidParam(fullType ty)
-       | Ast.Param(ty,id) -> Ast.Param(fullType ty, get_option ident id)
-       | Ast.MetaParam(name,keep,inherited) ->
-           Ast.MetaParam(meta_mcode name,keep,inherited)
-       | Ast.MetaParamList(name,lenname_inh,keep,inherited) ->
-           Ast.MetaParamList(meta_mcode name,lenname_inh,keep,inherited)
-       | Ast.PComma(cm) -> Ast.PComma(string_mcode cm)
-       | Ast.Pdots(dots) -> Ast.Pdots(string_mcode dots)
-       | Ast.Pcircles(dots) -> Ast.Pcircles(string_mcode dots)
-       | Ast.OptParam(param) -> Ast.OptParam(parameterTypeDef param)
-       | Ast.UniqueParam(param) -> Ast.UniqueParam(parameterTypeDef param)) in
-    paramfn all_functions k p
-
-  and rule_elem re =
-    let k re =
-      Ast.rewrap re
-       (match Ast.unwrap re with
-         Ast.FunHeader(bef,allminus,fi,name,lp,params,rp) ->
-           Ast.FunHeader(bef,allminus,List.map fninfo fi,ident name,
-                         string_mcode lp, parameter_dots params,
-                         string_mcode rp)
-       | Ast.Decl(bef,allminus,decl) ->
-           Ast.Decl(bef,allminus,declaration decl)
-       | Ast.SeqStart(brace) -> Ast.SeqStart(string_mcode brace)
-       | Ast.SeqEnd(brace) -> Ast.SeqEnd(string_mcode brace)
-       | Ast.ExprStatement(exp,sem) ->
-           Ast.ExprStatement (expression exp, string_mcode sem)
-       | Ast.IfHeader(iff,lp,exp,rp) ->
-           Ast.IfHeader(string_mcode iff, string_mcode lp, expression exp,
-             string_mcode rp)
-       | Ast.Else(els) -> Ast.Else(string_mcode els)
-       | Ast.WhileHeader(whl,lp,exp,rp) ->
-           Ast.WhileHeader(string_mcode whl, string_mcode lp, expression exp, 
-                           string_mcode rp)
-       | Ast.DoHeader(d) -> Ast.DoHeader(string_mcode d)
-       | Ast.WhileTail(whl,lp,exp,rp,sem) ->
-           Ast.WhileTail(string_mcode whl, string_mcode lp, expression exp, 
-                         string_mcode rp, string_mcode sem)
-       | Ast.ForHeader(fr,lp,e1,sem1,e2,sem2,e3,rp) ->
-           Ast.ForHeader(string_mcode fr, string_mcode lp, 
-                         get_option expression e1, string_mcode sem1, 
-                         get_option expression e2, string_mcode sem2, 
-                         get_option expression e3, string_mcode rp)
-       | Ast.IteratorHeader(whl,lp,args,rp) ->
-           Ast.IteratorHeader(ident whl, string_mcode lp,
-                              expression_dots args, string_mcode rp)
-       | Ast.SwitchHeader(switch,lp,exp,rp) ->
-           Ast.SwitchHeader(string_mcode switch, string_mcode lp,
-                            expression exp, string_mcode rp)
-       | Ast.Break(br,sem) ->
-           Ast.Break(string_mcode br, string_mcode sem)
-       | Ast.Continue(cont,sem) ->
-           Ast.Continue(string_mcode cont, string_mcode sem)
-       | Ast.Label(l,dd) -> Ast.Label(ident l, string_mcode dd)
-       | Ast.Goto(goto,l,sem) ->
-           Ast.Goto(string_mcode goto,ident l,string_mcode sem)
-       | Ast.Return(ret,sem) ->
-           Ast.Return(string_mcode ret, string_mcode sem)
-       | Ast.ReturnExpr(ret,exp,sem) ->
-           Ast.ReturnExpr(string_mcode ret, expression exp, string_mcode sem)
-       | Ast.MetaStmt(name,keep,seqible,inherited) ->
-           Ast.MetaStmt(meta_mcode name,keep,seqible,inherited)
-       | Ast.MetaStmtList(name,keep,inherited) ->
-           Ast.MetaStmtList(meta_mcode name,keep,inherited)
-       | Ast.MetaRuleElem(name,keep,inherited) ->
-           Ast.MetaRuleElem(meta_mcode name,keep,inherited)
-       | Ast.Exp(exp) -> Ast.Exp(expression exp)
-       | Ast.TopExp(exp) -> Ast.TopExp(expression exp)
-       | Ast.Ty(ty) -> Ast.Ty(fullType ty)
-       | Ast.Include(inc,name) ->
-           Ast.Include(string_mcode inc,inc_file_mcode name)
-       | Ast.DefineHeader(def,id,params) ->
-           Ast.DefineHeader(string_mcode def,ident id,
-                            define_parameters params)
-       | Ast.Default(def,colon) ->
-           Ast.Default(string_mcode def,string_mcode colon)
-       | Ast.Case(case,exp,colon) ->
-           Ast.Case(string_mcode case,expression exp,string_mcode colon)
-       | Ast.DisjRuleElem(res) -> Ast.DisjRuleElem(List.map rule_elem res)) in
-    rulefn all_functions k re
-
-  (* not parameterizable for now... *)
-  and define_parameters p =
-    let k p =
-      Ast.rewrap p
-       (match Ast.unwrap p with
-         Ast.NoParams -> Ast.NoParams
-       | Ast.DParams(lp,params,rp) ->
-           Ast.DParams(string_mcode lp,define_param_dots params,
-                       string_mcode rp)) in
-    k p
-
-  and define_param_dots d =
-    let k d =
-      Ast.rewrap d
-       (match Ast.unwrap d with
-         Ast.DOTS(l) -> Ast.DOTS(List.map define_param l)
-       | Ast.CIRCLES(l) -> Ast.CIRCLES(List.map define_param l)
-       | Ast.STARS(l) -> Ast.STARS(List.map define_param l)) in
-    k d
-
-  and define_param p =
-    let k p =
-      Ast.rewrap p
-       (match Ast.unwrap p with
-         Ast.DParam(id) -> Ast.DParam(ident id)
-       | Ast.DPComma(comma) -> Ast.DPComma(string_mcode comma)
-       | Ast.DPdots(d) -> Ast.DPdots(string_mcode d)
-       | Ast.DPcircles(c) -> Ast.DPcircles(string_mcode c)
-       | Ast.OptDParam(dp) -> Ast.OptDParam(define_param dp)
-       | Ast.UniqueDParam(dp) -> Ast.UniqueDParam(define_param dp)) in
-    k p
-
-  and process_bef_aft s =
-    Ast.set_dots_bef_aft
-      (match Ast.get_dots_bef_aft s with
-       Ast.NoDots -> Ast.NoDots
-      | Ast.DroppingBetweenDots(stm,ind) ->
-         Ast.DroppingBetweenDots(statement stm,ind)
-      | Ast.AddingBetweenDots(stm,ind) ->
-         Ast.AddingBetweenDots(statement stm,ind))
-      s
-
-  and statement s =
-    let k s =
-      Ast.rewrap s
-       (match Ast.unwrap s with
-         Ast.Seq(lbrace,decls,body,rbrace) ->
-           Ast.Seq(rule_elem lbrace, statement_dots decls,
-                   statement_dots body, rule_elem rbrace)
-       | Ast.IfThen(header,branch,aft) ->
-           Ast.IfThen(rule_elem header, statement branch,aft)
-       | Ast.IfThenElse(header,branch1,els,branch2,aft) ->
-           Ast.IfThenElse(rule_elem header, statement branch1, rule_elem els,
-                          statement branch2, aft)
-       | Ast.While(header,body,aft) ->
-           Ast.While(rule_elem header, statement body, aft)
-       | Ast.Do(header,body,tail) ->
-           Ast.Do(rule_elem header, statement body, rule_elem tail)
-       | Ast.For(header,body,aft) ->
-           Ast.For(rule_elem header, statement body, aft)
-       | Ast.Iterator(header,body,aft) ->
-           Ast.Iterator(rule_elem header, statement body, aft)
-       | Ast.Switch(header,lb,cases,rb) ->
-           Ast.Switch(rule_elem header,rule_elem lb,
-                      List.map case_line cases,rule_elem rb)
-       | Ast.Atomic(re) -> Ast.Atomic(rule_elem re)
-       | Ast.Disj(stmt_dots_list) ->
-           Ast.Disj (List.map statement_dots stmt_dots_list)
-       | Ast.Nest(stmt_dots,whn,multi,bef,aft) ->
-           Ast.Nest(statement_dots stmt_dots,
-                    List.map (whencode statement_dots statement) whn,
-                    multi,bef,aft)
-       | Ast.FunDecl(header,lbrace,decls,body,rbrace) ->
-           Ast.FunDecl(rule_elem header,rule_elem lbrace,
-                       statement_dots decls,
-                       statement_dots body, rule_elem rbrace)
-       | Ast.Define(header,body) ->
-           Ast.Define(rule_elem header,statement_dots body)
-       | Ast.Dots(d,whn,bef,aft) ->
-           Ast.Dots(string_mcode d,
-                    List.map (whencode statement_dots statement) whn,bef,aft)
-       | Ast.Circles(d,whn,bef,aft) ->
-           Ast.Circles(string_mcode d,
-                       List.map (whencode statement_dots statement) whn,
-                       bef,aft)
-       | Ast.Stars(d,whn,bef,aft) ->
-           Ast.Stars(string_mcode d,
-                     List.map (whencode statement_dots statement) whn,bef,aft)
-       | Ast.OptStm(stmt) -> Ast.OptStm(statement stmt)
-       | Ast.UniqueStm(stmt) -> Ast.UniqueStm(statement stmt)) in
-    let s = stmtfn all_functions k s in
-    (* better to do this after, in case there is an equality test on the whole
-       statement, eg in free_vars.  equality test would require that this
-       subterm not already be changed *)
-    process_bef_aft s
-
-  and fninfo = function
-      Ast.FStorage(stg) -> Ast.FStorage(storage_mcode stg)
-    | Ast.FType(ty) -> Ast.FType(fullType ty)
-    | Ast.FInline(inline) -> Ast.FInline(string_mcode inline)
-    | Ast.FAttr(attr) -> Ast.FAttr(string_mcode attr)
-
-  and whencode notfn alwaysfn = function
-      Ast.WhenNot a -> Ast.WhenNot (notfn a)
-    | Ast.WhenAlways a -> Ast.WhenAlways (alwaysfn a)
-    | Ast.WhenModifier(x)    -> Ast.WhenModifier(x)
-    | Ast.WhenNotTrue(e) -> Ast.WhenNotTrue(rule_elem e)
-    | Ast.WhenNotFalse(e) -> Ast.WhenNotFalse(rule_elem e)
-
-  and case_line c =
-    let k c =
-      Ast.rewrap c
-       (match Ast.unwrap c with
-         Ast.CaseLine(header,code) ->
-           Ast.CaseLine(rule_elem header,statement_dots code)
-       | Ast.OptCase(case) -> Ast.OptCase(case_line case)) in
-    casefn all_functions k c
-
-  and top_level t =
-    let k t =
-      Ast.rewrap t
-       (match Ast.unwrap t with
-         Ast.FILEINFO(old_file,new_file) ->
-           Ast.FILEINFO (string_mcode old_file, string_mcode new_file)
-       | Ast.DECL(stmt) -> Ast.DECL(statement stmt)
-       | Ast.CODE(stmt_dots) -> Ast.CODE(statement_dots stmt_dots)
-       | Ast.ERRORWORDS(exps) -> Ast.ERRORWORDS (List.map expression exps)) in
-    topfn all_functions k t
-
-  and anything a =
-    let k = function
-       (*in many cases below, the thing is not even mcode, so we do nothing*)
-       Ast.FullTypeTag(ft) -> Ast.FullTypeTag(fullType ft)
-      | Ast.BaseTypeTag(bt) as x -> x
-      | Ast.StructUnionTag(su) as x -> x
-      | Ast.SignTag(sgn) as x -> x
-      | Ast.IdentTag(id) -> Ast.IdentTag(ident id)
-      | Ast.ExpressionTag(exp) -> Ast.ExpressionTag(expression exp)
-      | Ast.ConstantTag(cst) as x -> x
-      | Ast.UnaryOpTag(unop) as x -> x
-      | Ast.AssignOpTag(asgnop) as x -> x
-      | Ast.FixOpTag(fixop) as x -> x
-      | Ast.BinaryOpTag(binop) as x -> x
-      | Ast.ArithOpTag(arithop) as x -> x
-      | Ast.LogicalOpTag(logop) as x -> x
-      | Ast.InitTag(decl) -> Ast.InitTag(initialiser decl)
-      | Ast.DeclarationTag(decl) -> Ast.DeclarationTag(declaration decl)
-      | Ast.StorageTag(stg) as x -> x
-      | Ast.IncFileTag(stg) as x -> x
-      | Ast.Rule_elemTag(rule) -> Ast.Rule_elemTag(rule_elem rule)
-      | Ast.StatementTag(rule) -> Ast.StatementTag(statement rule)
-      | Ast.CaseLineTag(case) -> Ast.CaseLineTag(case_line case)
-      | Ast.ConstVolTag(cv) as x -> x
-      | Ast.Token(tok,info) as x -> x
-      | Ast.Code(cd) -> Ast.Code(top_level cd)
-      | Ast.ExprDotsTag(ed) -> Ast.ExprDotsTag(expression_dots ed)
-      | Ast.ParamDotsTag(pd) -> Ast.ParamDotsTag(parameter_dots pd)
-      | Ast.StmtDotsTag(sd) -> Ast.StmtDotsTag(statement_dots sd)
-      | Ast.DeclDotsTag(sd) -> Ast.DeclDotsTag(declaration_dots sd)
-      | Ast.TypeCTag(ty) -> Ast.TypeCTag(typeC ty)
-      | Ast.ParamTag(param) -> Ast.ParamTag(parameterTypeDef param)
-      | Ast.SgrepStartTag(tok) as x -> x
-      | Ast.SgrepEndTag(tok) as x -> x in
-    anyfn all_functions k a
-
-  and all_functions =
-    {rebuilder_ident = ident;
-      rebuilder_expression = expression;
-      rebuilder_fullType= fullType;
-      rebuilder_typeC = typeC;
-      rebuilder_declaration = declaration;
-      rebuilder_initialiser = initialiser;
-      rebuilder_parameter = parameterTypeDef;
-      rebuilder_parameter_list = parameter_dots;
-      rebuilder_rule_elem = rule_elem;
-      rebuilder_statement = statement;
-      rebuilder_case_line = case_line;
-      rebuilder_top_level = top_level;
-      rebuilder_expression_dots = expression_dots;
-      rebuilder_statement_dots = statement_dots;
-      rebuilder_declaration_dots = declaration_dots;
-      rebuilder_define_param_dots = define_param_dots;
-      rebuilder_define_param = define_param;
-      rebuilder_define_parameters = define_parameters;
-      rebuilder_anything = anything} in
-  all_functions
-
diff --git a/parsing_cocci/.#visitor_ast0.ml.1.79 b/parsing_cocci/.#visitor_ast0.ml.1.79
deleted file mode 100644 (file)
index 6a70898..0000000
+++ /dev/null
@@ -1,1028 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-
-(* --------------------------------------------------------------------- *)
-(* Generic traversal: combiner *)
-(* parameters:
-   combining function
-   treatment of: mcode, identifiers, expressions, typeCs, types,
-   declarations, statements, toplevels
-   default value for options *)
-
-type 'a combiner =
-    {combiner_ident : Ast0.ident -> 'a;
-      combiner_expression : Ast0.expression -> 'a;
-      combiner_typeC : Ast0.typeC -> 'a;
-      combiner_declaration : Ast0.declaration -> 'a;
-      combiner_initialiser : Ast0.initialiser -> 'a;
-      combiner_initialiser_list : Ast0.initialiser_list -> 'a;
-      combiner_parameter : Ast0.parameterTypeDef -> 'a;
-      combiner_parameter_list : Ast0.parameter_list -> 'a;
-      combiner_statement : Ast0.statement -> 'a;
-      combiner_case_line : Ast0.case_line -> 'a;
-      combiner_top_level : Ast0.top_level -> 'a;
-      combiner_expression_dots :
-         Ast0.expression Ast0.dots -> 'a;
-      combiner_statement_dots :
-             Ast0.statement Ast0.dots -> 'a;
-      combiner_declaration_dots :
-                 Ast0.declaration Ast0.dots -> 'a;
-      combiner_case_line_dots :
-                 Ast0.case_line Ast0.dots -> 'a;
-      combiner_anything : Ast0.anything -> 'a}
-
-
-type ('mc,'a) cmcode = 'mc Ast0.mcode -> 'a
-type ('cd,'a) ccode = 'a combiner -> ('cd -> 'a) -> 'cd -> 'a
-
-let combiner bind option_default 
-    meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
-    inc_mcode
-    dotsexprfn dotsinitfn dotsparamfn dotsstmtfn dotsdeclfn dotscasefn
-    identfn exprfn
-    tyfn initfn paramfn declfn stmtfn casefn topfn =
-  let multibind l =
-    let rec loop = function
-       [] -> option_default
-      |        [x] -> x
-      |        x::xs -> bind x (loop xs) in
-    loop l in
-  let get_option f = function
-      Some x -> f x
-    | None -> option_default in
-  let rec expression_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map expression l) in
-    dotsexprfn all_functions k d
-  and initialiser_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map initialiser l) in
-    dotsinitfn all_functions k d
-  and parameter_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map parameterTypeDef l) in
-    dotsparamfn all_functions k d
-  and statement_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map statement l) in
-    dotsstmtfn all_functions k d
-  and declaration_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map declaration l) in
-    dotsdeclfn all_functions k d
-  and case_line_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map case_line l) in
-    dotscasefn all_functions k d
-  and ident i =
-    let k i =
-      match Ast0.unwrap i with
-       Ast0.Id(name) -> string_mcode name
-      | Ast0.MetaId(name,_,_) -> meta_mcode name
-      | Ast0.MetaFunc(name,_,_) -> meta_mcode name
-      | Ast0.MetaLocalFunc(name,_,_) -> meta_mcode name
-      | Ast0.OptIdent(id) -> ident id
-      | Ast0.UniqueIdent(id) -> ident id in
-  identfn all_functions k i
-  and expression e =
-    let k e =
-      match Ast0.unwrap e with
-       Ast0.Ident(id) -> ident id
-      | Ast0.Constant(const) -> const_mcode const
-      | Ast0.FunCall(fn,lp,args,rp) ->
-         multibind
-           [expression fn; string_mcode lp; expression_dots args;
-             string_mcode rp]
-      | Ast0.Assignment(left,op,right,_) ->
-         multibind [expression left; assign_mcode op; expression right]
-      | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-         multibind
-           [expression exp1; string_mcode why; get_option expression exp2;
-             string_mcode colon; expression exp3]
-      | Ast0.Postfix(exp,op) -> bind (expression exp) (fix_mcode op)
-      | Ast0.Infix(exp,op) -> bind (fix_mcode op) (expression exp)
-      | Ast0.Unary(exp,op) -> bind (unary_mcode op) (expression exp)
-      | Ast0.Binary(left,op,right) ->
-         multibind [expression left; binary_mcode op; expression right]
-      | Ast0.Nested(left,op,right) ->
-         multibind [expression left; binary_mcode op; expression right]
-      | Ast0.Paren(lp,exp,rp) ->
-         multibind [string_mcode lp; expression exp; string_mcode rp]
-      | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-         multibind
-           [expression exp1; string_mcode lb; expression exp2;
-             string_mcode rb]
-      | Ast0.RecordAccess(exp,pt,field) ->
-         multibind [expression exp; string_mcode pt; ident field]
-      | Ast0.RecordPtAccess(exp,ar,field) ->
-         multibind [expression exp; string_mcode ar; ident field]
-      | Ast0.Cast(lp,ty,rp,exp) ->
-         multibind
-           [string_mcode lp; typeC ty; string_mcode rp; expression exp]
-      | Ast0.SizeOfExpr(szf,exp) ->
-         multibind [string_mcode szf; expression exp]
-      | Ast0.SizeOfType(szf,lp,ty,rp) ->
-         multibind
-           [string_mcode szf; string_mcode lp; typeC ty; string_mcode rp]
-      | Ast0.TypeExp(ty) -> typeC ty
-      | Ast0.MetaErr(name,_,_)
-      | Ast0.MetaExpr(name,_,_,_,_)
-      | Ast0.MetaExprList(name,_,_) -> meta_mcode name
-      | Ast0.EComma(cm) -> string_mcode cm
-      | Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-         (match expr_list with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (expression x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (expression x))
-                           mids xs))
-                     (string_mcode ender))))
-      | Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-         bind (string_mcode starter)
-           (bind (expression_dots expr_dots)
-              (bind (string_mcode ender) (get_option expression whencode)))
-      | Ast0.Edots(dots,whencode) | Ast0.Ecircles(dots,whencode)
-      | Ast0.Estars(dots,whencode) ->
-         bind (string_mcode dots) (get_option expression whencode)
-      | Ast0.OptExp(exp) -> expression exp
-      | Ast0.UniqueExp(exp) -> expression exp in
-    exprfn all_functions k e
-  and function_pointer (ty,lp1,star,rp1,lp2,params,rp2) extra =
-    (* have to put the treatment of the identifier into the right position *)
-    multibind
-      ([typeC ty; string_mcode lp1; string_mcode star] @ extra @
-       [string_mcode rp1;
-        string_mcode lp2; parameter_dots params; string_mcode rp2])
-  and function_type (ty,lp1,params,rp1) extra =
-    (* have to put the treatment of the identifier into the right position *)
-    multibind ([get_option typeC ty] @ extra @
-              [string_mcode lp1; parameter_dots params; string_mcode rp1])
-  and array_type (ty,lb,size,rb) extra =
-    multibind
-      ([typeC ty] @ extra @
-       [string_mcode lb; get_option expression size; string_mcode rb])
-  and typeC t =
-    let k t =
-      match Ast0.unwrap t with
-       Ast0.ConstVol(cv,ty) -> bind (cv_mcode cv) (typeC ty)
-      |        Ast0.BaseType(ty,sign) ->
-         bind (get_option sign_mcode sign) (base_mcode ty)
-      |        Ast0.ImplicitInt(sign) -> (sign_mcode sign)
-      | Ast0.Pointer(ty,star) -> bind (typeC ty) (string_mcode star)
-      | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-         function_pointer (ty,lp1,star,rp1,lp2,params,rp2) []
-      | Ast0.FunctionType(ty,lp1,params,rp1) ->
-         function_type (ty,lp1,params,rp1) []
-      | Ast0.Array(ty,lb,size,rb) ->
-         array_type (ty,lb,size,rb) []
-      | Ast0.StructUnionName(kind,name) ->
-         bind (struct_mcode kind) (get_option ident name)
-      | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-         multibind
-           [typeC ty;string_mcode lb;declaration_dots decls;string_mcode rb]
-      | Ast0.TypeName(name) -> string_mcode name
-      | Ast0.MetaType(name,_) -> meta_mcode name
-      |        Ast0.DisjType(starter,types,mids,ender) ->
-         (match types with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (typeC x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (typeC x))
-                           mids xs))
-                     (string_mcode ender))))
-      | Ast0.OptType(ty) -> typeC ty
-      | Ast0.UniqueType(ty) -> typeC ty in
-    tyfn all_functions k t
-  and named_type ty id =
-    match Ast0.unwrap ty with
-      Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-       function_pointer (ty,lp1,star,rp1,lp2,params,rp2) [ident id]
-    | Ast0.FunctionType(ty,lp1,params,rp1) ->
-       function_type (ty,lp1,params,rp1) [ident id]
-    | Ast0.Array(ty,lb,size,rb) ->
-       array_type (ty,lb,size,rb) [ident id]
-    | _ -> bind (typeC ty) (ident id)
-  and declaration d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.Init(stg,ty,id,eq,ini,sem) ->
-         bind (get_option storage_mcode stg)
-           (bind (named_type ty id)
-              (multibind
-                 [string_mcode eq; initialiser ini; string_mcode sem]))
-      | Ast0.UnInit(stg,ty,id,sem) ->
-         bind (get_option storage_mcode stg)
-           (bind (named_type ty id) (string_mcode sem))
-      | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-         multibind
-           [ident name; string_mcode lp; expression_dots args;
-             string_mcode rp; string_mcode sem]
-      | Ast0.TyDecl(ty,sem) -> bind (typeC ty) (string_mcode sem)
-      | Ast0.Typedef(stg,ty,id,sem) ->
-         bind (string_mcode stg)
-           (bind (typeC ty) (bind (typeC id) (string_mcode sem)))
-      |        Ast0.DisjDecl(starter,decls,mids,ender) ->
-         (match decls with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (declaration x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (declaration x))
-                           mids xs))
-                     (string_mcode ender))))
-      |        Ast0.Ddots(dots,whencode) ->
-         bind (string_mcode dots) (get_option declaration whencode)
-      | Ast0.OptDecl(decl) -> declaration decl
-      | Ast0.UniqueDecl(decl) -> declaration decl in
-    declfn all_functions k d
-  and initialiser i =
-    let k i =
-      match Ast0.unwrap i with
-       Ast0.InitExpr(exp) -> expression exp
-      | Ast0.InitList(lb,initlist,rb) ->
-         multibind
-           [string_mcode lb; initialiser_dots initlist; string_mcode rb]
-      | Ast0.InitGccDotName(dot,name,eq,ini) ->
-         multibind
-           [string_mcode dot; ident name; string_mcode eq; initialiser ini]
-      | Ast0.InitGccName(name,eq,ini) ->
-         multibind [ident name; string_mcode eq; initialiser ini]
-      | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-         multibind
-           [string_mcode lb; expression exp; string_mcode rb;
-             string_mcode eq; initialiser ini]
-      | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-         multibind
-           [string_mcode lb; expression exp1; string_mcode dots;
-             expression exp2; string_mcode rb; string_mcode eq;
-             initialiser ini]
-      | Ast0.IComma(cm) -> string_mcode cm
-      | Ast0.Idots(dots,whencode) ->
-         bind (string_mcode dots) (get_option initialiser whencode)
-      | Ast0.OptIni(i) -> initialiser i
-      | Ast0.UniqueIni(i) -> initialiser i in
-    initfn all_functions k i
-  and parameterTypeDef p =
-    let k p =
-      match Ast0.unwrap p with
-       Ast0.VoidParam(ty) -> typeC ty
-      | Ast0.Param(ty,Some id) -> named_type ty id
-      | Ast0.Param(ty,None) -> typeC ty
-      | Ast0.MetaParam(name,_) -> meta_mcode name
-      | Ast0.MetaParamList(name,_,_) -> meta_mcode name
-      | Ast0.PComma(cm) -> string_mcode cm
-      | Ast0.Pdots(dots) -> string_mcode dots
-      | Ast0.Pcircles(dots) -> string_mcode dots
-      | Ast0.OptParam(param) -> parameterTypeDef param
-      | Ast0.UniqueParam(param) -> parameterTypeDef param in
-    paramfn all_functions k p
-
-  (* discard the result, because the statement is assumed to be already
-     represented elsewhere in the code *)
-  and process_bef_aft s =
-    match Ast0.get_dots_bef_aft s with
-      Ast0.NoDots -> ()
-    | Ast0.DroppingBetweenDots(stm) -> let _ = statement stm in ()
-    | Ast0.AddingBetweenDots(stm) -> let _ = statement stm in ()
-
-  and statement s =
-    process_bef_aft s;
-    let k s =
-      match Ast0.unwrap s with
-       Ast0.FunDecl(_,fi,name,lp,params,rp,lbrace,body,rbrace) ->
-         multibind
-           ((List.map fninfo fi) @
-            [ident name; string_mcode lp;
-              parameter_dots params; string_mcode rp; string_mcode lbrace;
-              statement_dots body; string_mcode rbrace])
-      | Ast0.Decl(_,decl) -> declaration decl
-      | Ast0.Seq(lbrace,body,rbrace) ->
-         multibind
-           [string_mcode lbrace; statement_dots body; string_mcode rbrace]
-      | Ast0.ExprStatement(exp,sem) ->
-         bind (expression exp) (string_mcode sem)
-      | Ast0.IfThen(iff,lp,exp,rp,branch1,_) ->
-         multibind
-           [string_mcode iff; string_mcode lp; expression exp;
-             string_mcode rp; statement branch1]
-      | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,_) ->
-         multibind
-           [string_mcode iff; string_mcode lp; expression exp;
-             string_mcode rp; statement branch1; string_mcode els;
-             statement branch2]
-      | Ast0.While(whl,lp,exp,rp,body,_) ->
-         multibind
-           [string_mcode whl; string_mcode lp; expression exp;
-             string_mcode rp; statement body]
-      | Ast0.Do(d,body,whl,lp,exp,rp,sem) ->
-         multibind
-           [string_mcode d; statement body; string_mcode whl;
-             string_mcode lp; expression exp; string_mcode rp;
-             string_mcode sem]
-      | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,_) ->
-         multibind
-           [string_mcode fr; string_mcode lp; get_option expression e1;
-             string_mcode sem1; get_option expression e2; string_mcode sem2;
-             get_option expression e3;
-             string_mcode rp; statement body]
-      | Ast0.Iterator(nm,lp,args,rp,body,_) ->
-         multibind
-           [ident nm; string_mcode lp; expression_dots args;
-             string_mcode rp; statement body]
-      |        Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-         multibind
-           [string_mcode switch; string_mcode lp; expression exp;
-             string_mcode rp; string_mcode lb; case_line_dots cases;
-             string_mcode rb]
-      | Ast0.Break(br,sem) -> bind (string_mcode br) (string_mcode sem)
-      | Ast0.Continue(cont,sem) -> bind (string_mcode cont) (string_mcode sem)
-      |        Ast0.Label(l,dd) -> bind (ident l) (string_mcode dd)
-      |        Ast0.Goto(goto,l,sem) ->
-         bind (string_mcode goto) (bind (ident l) (string_mcode sem))
-      | Ast0.Return(ret,sem) -> bind (string_mcode ret) (string_mcode sem)
-      | Ast0.ReturnExpr(ret,exp,sem) ->
-         multibind [string_mcode ret; expression exp; string_mcode sem]
-      | Ast0.MetaStmt(name,_) -> meta_mcode name
-      | Ast0.MetaStmtList(name,_) -> meta_mcode name
-      | Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-         (match statement_dots_list with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (statement_dots x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (statement_dots x))
-                           mids xs))
-                     (string_mcode ender))))
-      | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-         bind (string_mcode starter)
-           (bind (statement_dots stmt_dots)
-              (bind (string_mcode ender)
-                 (multibind
-                    (List.map (whencode statement_dots statement) whn))))
-      | Ast0.Exp(exp) -> expression exp
-      | Ast0.TopExp(exp) -> expression exp
-      | Ast0.Ty(ty) -> typeC ty
-      | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) ->
-         bind (string_mcode d)
-           (multibind (List.map (whencode statement_dots statement) whn))
-      | Ast0.Include(inc,name) -> bind (string_mcode inc) (inc_mcode name)
-      | Ast0.Define(def,id,params,body) ->
-         multibind [string_mcode def; ident id; define_parameters params;
-                     statement_dots body]
-      | Ast0.OptStm(re) -> statement re
-      | Ast0.UniqueStm(re) -> statement re in
-    stmtfn all_functions k s
-
-  (* not parameterizable for now... *)
-  and define_parameters p =
-    let k p =
-      match Ast0.unwrap p with
-       Ast0.NoParams -> option_default
-      | Ast0.DParams(lp,params,rp) ->
-         multibind
-           [string_mcode lp; define_param_dots params; string_mcode rp] in
-    k p
-
-  and define_param_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map define_param l) in
-    k d
-
-  and define_param p =
-    let k p =
-      match Ast0.unwrap p with
-       Ast0.DParam(id) -> ident id
-      | Ast0.DPComma(comma) -> string_mcode comma
-      | Ast0.DPdots(d) -> string_mcode d
-      | Ast0.DPcircles(c) -> string_mcode c
-      | Ast0.OptDParam(dp) -> define_param dp
-      | Ast0.UniqueDParam(dp) -> define_param dp in
-    k p 
-
-  and fninfo = function
-      Ast0.FStorage(stg) -> storage_mcode stg
-    | Ast0.FType(ty) -> typeC ty
-    | Ast0.FInline(inline) -> string_mcode inline
-    | Ast0.FAttr(init) -> string_mcode init
-
-  and whencode notfn alwaysfn = function
-      Ast0.WhenNot a -> notfn a
-    | Ast0.WhenAlways a -> alwaysfn a
-    | Ast0.WhenModifier(_) -> option_default
-
-  and case_line c =
-    let k c =
-      match Ast0.unwrap c with
-       Ast0.Default(def,colon,code) ->
-         multibind [string_mcode def;string_mcode colon;statement_dots code]
-      | Ast0.Case(case,exp,colon,code) ->
-         multibind [string_mcode case;expression exp;string_mcode colon;
-                     statement_dots code]
-      |        Ast0.OptCase(case) -> case_line case in
-    casefn all_functions k c
-
-  and anything a = (* for compile_iso, not parameterisable *)
-    let k = function
-       Ast0.DotsExprTag(exprs) -> expression_dots exprs
-      | Ast0.DotsInitTag(inits) -> initialiser_dots inits
-      | Ast0.DotsParamTag(params) -> parameter_dots params
-      | Ast0.DotsStmtTag(stmts) -> statement_dots stmts
-      | Ast0.DotsDeclTag(decls) -> declaration_dots decls
-      | Ast0.DotsCaseTag(cases) -> case_line_dots cases
-      | Ast0.IdentTag(id) -> ident id
-      | Ast0.ExprTag(exp) -> expression exp
-      | Ast0.ArgExprTag(exp) -> expression exp
-      | Ast0.TestExprTag(exp) -> expression exp
-      | Ast0.TypeCTag(ty) -> typeC ty
-      | Ast0.ParamTag(param) -> parameterTypeDef param
-      | Ast0.InitTag(init) -> initialiser init
-      | Ast0.DeclTag(decl) -> declaration decl
-      | Ast0.StmtTag(stmt) -> statement stmt
-      | Ast0.CaseLineTag(c) -> case_line c
-      | Ast0.TopTag(top) -> top_level top
-      | Ast0.IsoWhenTag(_) -> option_default
-      |        Ast0.MetaPosTag(var) -> failwith "not supported" in
-    k a
-
-  and top_level t =
-    let k t =
-      match Ast0.unwrap t with
-       Ast0.FILEINFO(old_file,new_file) ->
-         bind (string_mcode old_file) (string_mcode new_file)
-      | Ast0.DECL(stmt_dots) -> statement stmt_dots
-      | Ast0.CODE(stmt_dots) -> statement_dots stmt_dots
-      | Ast0.ERRORWORDS(exps) -> multibind (List.map expression exps)
-      | Ast0.OTHER(_) -> failwith "unexpected code" in
-    topfn all_functions k t
-  and all_functions =
-    {combiner_ident = ident;
-      combiner_expression = expression;
-      combiner_typeC = typeC;
-      combiner_declaration = declaration;
-      combiner_initialiser = initialiser;
-      combiner_initialiser_list = initialiser_dots;
-      combiner_parameter = parameterTypeDef;
-      combiner_parameter_list = parameter_dots;
-      combiner_statement = statement;
-      combiner_case_line = case_line;
-      combiner_top_level = top_level;
-      combiner_expression_dots = expression_dots;
-      combiner_statement_dots = statement_dots;
-      combiner_declaration_dots = declaration_dots;
-      combiner_case_line_dots = case_line_dots;
-      combiner_anything = anything} in
-  all_functions
-
-(* --------------------------------------------------------------------- *)
-(* Generic traversal: rebuilder *)
-
-type 'a inout = 'a -> 'a (* for specifying the type of rebuilder *)
-
-type rebuilder =
-    {rebuilder_ident : Ast0.ident inout;
-      rebuilder_expression : Ast0.expression inout;
-      rebuilder_typeC : Ast0.typeC inout;
-      rebuilder_declaration : Ast0.declaration inout;
-      rebuilder_initialiser : Ast0.initialiser inout;
-      rebuilder_initialiser_list : Ast0.initialiser_list inout;
-      rebuilder_parameter : Ast0.parameterTypeDef inout;
-      rebuilder_parameter_list : Ast0.parameter_list inout;
-      rebuilder_statement : Ast0.statement inout;
-      rebuilder_case_line : Ast0.case_line inout;
-      rebuilder_top_level : Ast0.top_level inout;
-      rebuilder_expression_dots :
-       Ast0.expression Ast0.dots ->
-         Ast0.expression Ast0.dots;
-         rebuilder_statement_dots :
-           Ast0.statement Ast0.dots ->
-             Ast0.statement Ast0.dots;
-         rebuilder_declaration_dots :
-           Ast0.declaration Ast0.dots ->
-             Ast0.declaration Ast0.dots;
-         rebuilder_case_line_dots :
-           Ast0.case_line Ast0.dots ->
-             Ast0.case_line Ast0.dots;
-         rebuilder_anything :
-           Ast0.anything -> Ast0.anything}
-
-type 'mc rmcode = 'mc Ast0.mcode inout
-type 'cd rcode = rebuilder -> ('cd inout) -> 'cd inout
-
-let rebuilder = fun
-    meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
-    inc_mcode
-    dotsexprfn dotsinitfn dotsparamfn dotsstmtfn dotsdeclfn dotscasefn
-    identfn exprfn tyfn initfn paramfn declfn stmtfn casefn topfn ->
-  let get_option f = function
-      Some x -> Some (f x)
-    | None -> None in
-  let rec expression_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map expression l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map expression l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map expression l)) in
-    dotsexprfn all_functions k d
-  and initialiser_list i =
-    let k i =
-      Ast0.rewrap i
-       (match Ast0.unwrap i with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map initialiser l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map initialiser l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map initialiser l)) in
-    dotsinitfn all_functions k i
-  and parameter_list d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map parameterTypeDef l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map parameterTypeDef l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map parameterTypeDef l)) in
-    dotsparamfn all_functions k d
-  and statement_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map statement l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map statement l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map statement l)) in
-    dotsstmtfn all_functions k d
-  and declaration_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map declaration l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map declaration l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map declaration l)) in
-    dotsdeclfn all_functions k d
-  and case_line_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map case_line l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map case_line l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map case_line l)) in
-    dotscasefn all_functions k d
-  and ident i =
-    let k i =
-      Ast0.rewrap i
-       (match Ast0.unwrap i with
-         Ast0.Id(name) -> Ast0.Id(string_mcode name)
-       | Ast0.MetaId(name,constraints,pure) ->
-           Ast0.MetaId(meta_mcode name,constraints,pure)
-       | Ast0.MetaFunc(name,constraints,pure) ->
-           Ast0.MetaFunc(meta_mcode name,constraints,pure)
-       | Ast0.MetaLocalFunc(name,constraints,pure) ->
-           Ast0.MetaLocalFunc(meta_mcode name,constraints,pure)
-       | Ast0.OptIdent(id) -> Ast0.OptIdent(ident id)
-       | Ast0.UniqueIdent(id) -> Ast0.UniqueIdent(ident id)) in
-    identfn all_functions k i
-  and expression e =
-    let k e =
-      Ast0.rewrap e
-       (match Ast0.unwrap e with
-         Ast0.Ident(id) -> Ast0.Ident(ident id)
-       | Ast0.Constant(const) -> Ast0.Constant(const_mcode const)
-       | Ast0.FunCall(fn,lp,args,rp) ->
-           Ast0.FunCall(expression fn,string_mcode lp,expression_dots args,
-                        string_mcode rp)
-       | Ast0.Assignment(left,op,right,simple) ->
-           Ast0.Assignment(expression left,assign_mcode op,expression right,
-                           simple)
-       | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-           Ast0.CondExpr(expression exp1, string_mcode why,
-                         get_option expression exp2, string_mcode colon,
-                         expression exp3)
-       | Ast0.Postfix(exp,op) -> Ast0.Postfix(expression exp, fix_mcode op)
-       | Ast0.Infix(exp,op) -> Ast0.Infix(expression exp, fix_mcode op)
-       | Ast0.Unary(exp,op) -> Ast0.Unary(expression exp, unary_mcode op)
-       | Ast0.Binary(left,op,right) ->
-           Ast0.Binary(expression left, binary_mcode op, expression right)
-       | Ast0.Nested(left,op,right) ->
-           Ast0.Nested(expression left, binary_mcode op, expression right)
-       | Ast0.Paren(lp,exp,rp) ->
-           Ast0.Paren(string_mcode lp, expression exp, string_mcode rp)
-       | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-           Ast0.ArrayAccess(expression exp1,string_mcode lb,expression exp2,
-                            string_mcode rb)
-       | Ast0.RecordAccess(exp,pt,field) ->
-           Ast0.RecordAccess(expression exp, string_mcode pt, ident field)
-       | Ast0.RecordPtAccess(exp,ar,field) ->
-           Ast0.RecordPtAccess(expression exp, string_mcode ar, ident field)
-       | Ast0.Cast(lp,ty,rp,exp) ->
-           Ast0.Cast(string_mcode lp, typeC ty, string_mcode rp,
-                     expression exp)
-       | Ast0.SizeOfExpr(szf,exp) ->
-           Ast0.SizeOfExpr(string_mcode szf, expression exp)
-       | Ast0.SizeOfType(szf,lp,ty,rp) ->
-           Ast0.SizeOfType(string_mcode szf,string_mcode lp, typeC ty, 
-                            string_mcode rp)
-       | Ast0.TypeExp(ty) -> Ast0.TypeExp(typeC ty)
-       | Ast0.MetaErr(name,constraints,pure) ->
-           Ast0.MetaErr(meta_mcode name,constraints,pure)
-       | Ast0.MetaExpr(name,constraints,ty,form,pure) ->
-           Ast0.MetaExpr(meta_mcode name,constraints,ty,form,pure)
-       | Ast0.MetaExprList(name,lenname,pure) ->
-           Ast0.MetaExprList(meta_mcode name,lenname,pure)
-       | Ast0.EComma(cm) -> Ast0.EComma(string_mcode cm)
-       | Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-           Ast0.DisjExpr(string_mcode starter,List.map expression expr_list,
-                         List.map string_mcode mids,string_mcode ender)
-       | Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-           Ast0.NestExpr(string_mcode starter,expression_dots expr_dots,
-                         string_mcode ender, get_option expression whencode,
-                         multi)
-       | Ast0.Edots(dots,whencode) ->
-           Ast0.Edots(string_mcode dots, get_option expression whencode)
-       | Ast0.Ecircles(dots,whencode) ->
-           Ast0.Ecircles(string_mcode dots, get_option expression whencode)
-       | Ast0.Estars(dots,whencode) ->
-           Ast0.Estars(string_mcode dots, get_option expression whencode)
-       | Ast0.OptExp(exp) -> Ast0.OptExp(expression exp)
-       | Ast0.UniqueExp(exp) -> Ast0.UniqueExp(expression exp)) in
-    exprfn all_functions k e
-  and typeC t =
-    let k t =
-      Ast0.rewrap t
-       (match Ast0.unwrap t with
-         Ast0.ConstVol(cv,ty) -> Ast0.ConstVol(cv_mcode cv,typeC ty)
-       | Ast0.BaseType(ty,sign) ->
-           Ast0.BaseType(base_mcode ty, get_option sign_mcode sign)
-       | Ast0.ImplicitInt(sign) -> Ast0.ImplicitInt(sign_mcode sign)
-       | Ast0.Pointer(ty,star) ->
-           Ast0.Pointer(typeC ty, string_mcode star)
-       | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-           Ast0.FunctionPointer(typeC ty,string_mcode lp1,string_mcode star,
-                                string_mcode rp1,string_mcode lp2,
-                                parameter_list params,
-                                string_mcode rp2)
-       | Ast0.FunctionType(ty,lp1,params,rp1) ->
-           Ast0.FunctionType(get_option typeC ty,
-                             string_mcode lp1,parameter_list params,
-                             string_mcode rp1)
-       | Ast0.Array(ty,lb,size,rb) ->
-           Ast0.Array(typeC ty, string_mcode lb,
-                      get_option expression size, string_mcode rb)
-       | Ast0.StructUnionName(kind,name) ->
-           Ast0.StructUnionName (struct_mcode kind, get_option ident name)
-       | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-           Ast0.StructUnionDef (typeC ty,
-                                string_mcode lb, declaration_dots decls,
-                                string_mcode rb)
-       | Ast0.TypeName(name) -> Ast0.TypeName(string_mcode name)
-       | Ast0.MetaType(name,pure) ->
-           Ast0.MetaType(meta_mcode name,pure)
-       | Ast0.DisjType(starter,types,mids,ender) ->
-           Ast0.DisjType(string_mcode starter,List.map typeC types,
-                         List.map string_mcode mids,string_mcode ender)
-       | Ast0.OptType(ty) -> Ast0.OptType(typeC ty)
-       | Ast0.UniqueType(ty) -> Ast0.UniqueType(typeC ty)) in
-    tyfn all_functions k t
-  and declaration d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.Init(stg,ty,id,eq,ini,sem) ->
-           Ast0.Init(get_option storage_mcode stg,
-                     typeC ty, ident id, string_mcode eq, initialiser ini,
-                     string_mcode sem)
-       | Ast0.UnInit(stg,ty,id,sem) ->
-           Ast0.UnInit(get_option storage_mcode stg,
-                       typeC ty, ident id, string_mcode sem)
-       | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-           Ast0.MacroDecl(ident name,string_mcode lp,
-                          expression_dots args,
-                          string_mcode rp,string_mcode sem)
-       | Ast0.TyDecl(ty,sem) -> Ast0.TyDecl(typeC ty, string_mcode sem)
-       | Ast0.Typedef(stg,ty,id,sem) ->
-           Ast0.Typedef(string_mcode stg, typeC ty, typeC id,
-                        string_mcode sem)
-       | Ast0.DisjDecl(starter,decls,mids,ender) ->
-           Ast0.DisjDecl(string_mcode starter,List.map declaration decls,
-                         List.map string_mcode mids,string_mcode ender)
-       | Ast0.Ddots(dots,whencode) ->
-           Ast0.Ddots(string_mcode dots, get_option declaration whencode)
-       | Ast0.OptDecl(decl) -> Ast0.OptDecl(declaration decl)
-       | Ast0.UniqueDecl(decl) -> Ast0.UniqueDecl(declaration decl)) in
-    declfn all_functions k d
-  and initialiser i =
-    let k i =
-      Ast0.rewrap i
-       (match Ast0.unwrap i with
-         Ast0.InitExpr(exp) -> Ast0.InitExpr(expression exp)
-       | Ast0.InitList(lb,initlist,rb) ->
-           Ast0.InitList(string_mcode lb, initialiser_list initlist,
-                         string_mcode rb)
-       | Ast0.InitGccDotName(dot,name,eq,ini) ->
-           Ast0.InitGccDotName
-             (string_mcode dot, ident name, string_mcode eq, initialiser ini)
-       | Ast0.InitGccName(name,eq,ini) ->
-           Ast0.InitGccName(ident name, string_mcode eq, initialiser ini)
-       | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-           Ast0.InitGccIndex
-             (string_mcode lb, expression exp, string_mcode rb,
-              string_mcode eq, initialiser ini)
-       | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-           Ast0.InitGccRange
-             (string_mcode lb, expression exp1, string_mcode dots,
-              expression exp2, string_mcode rb, string_mcode eq,
-              initialiser ini)
-       | Ast0.IComma(cm) -> Ast0.IComma(string_mcode cm)
-       | Ast0.Idots(d,whencode) ->
-           Ast0.Idots(string_mcode d, get_option initialiser whencode)
-       | Ast0.OptIni(i) -> Ast0.OptIni(initialiser i)
-       | Ast0.UniqueIni(i) -> Ast0.UniqueIni(initialiser i)) in
-    initfn all_functions k i
-  and parameterTypeDef p =
-    let k p =
-      Ast0.rewrap p
-       (match Ast0.unwrap p with
-         Ast0.VoidParam(ty) -> Ast0.VoidParam(typeC ty)
-       | Ast0.Param(ty,id) -> Ast0.Param(typeC ty, get_option ident id)
-       | Ast0.MetaParam(name,pure) ->
-           Ast0.MetaParam(meta_mcode name,pure)
-       | Ast0.MetaParamList(name,lenname,pure) ->
-           Ast0.MetaParamList(meta_mcode name,lenname,pure)
-       | Ast0.PComma(cm) -> Ast0.PComma(string_mcode cm)
-       | Ast0.Pdots(dots) -> Ast0.Pdots(string_mcode dots)
-       | Ast0.Pcircles(dots) -> Ast0.Pcircles(string_mcode dots)
-       | Ast0.OptParam(param) -> Ast0.OptParam(parameterTypeDef param)
-       | Ast0.UniqueParam(param) ->
-           Ast0.UniqueParam(parameterTypeDef param)) in
-    paramfn all_functions k p
-  (* not done for combiner, because the statement is assumed to be already
-     represented elsewhere in the code *)
-  and process_bef_aft s =
-    Ast0.set_dots_bef_aft s
-      (match Ast0.get_dots_bef_aft s with
-       Ast0.NoDots -> Ast0.NoDots
-      | Ast0.DroppingBetweenDots(stm) ->
-         Ast0.DroppingBetweenDots(statement stm)
-      | Ast0.AddingBetweenDots(stm) ->
-         Ast0.AddingBetweenDots(statement stm))
-
-  and statement s =
-    let k s =
-      Ast0.rewrap s
-       (match Ast0.unwrap s with
-         Ast0.FunDecl(bef,fi,name,lp,params,rp,lbrace,body,rbrace) ->
-           Ast0.FunDecl(bef,List.map fninfo fi, ident name,
-                        string_mcode lp, parameter_list params,
-                        string_mcode rp, string_mcode lbrace,
-                        statement_dots body, string_mcode rbrace)
-       | Ast0.Decl(bef,decl) -> Ast0.Decl(bef,declaration decl)
-       | Ast0.Seq(lbrace,body,rbrace) ->
-           Ast0.Seq(string_mcode lbrace, statement_dots body,
-                    string_mcode rbrace)
-       | Ast0.ExprStatement(exp,sem) ->
-           Ast0.ExprStatement(expression exp, string_mcode sem)
-       | Ast0.IfThen(iff,lp,exp,rp,branch1,aft) ->
-           Ast0.IfThen(string_mcode iff, string_mcode lp, expression exp,
-             string_mcode rp, statement branch1,aft)
-       | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,aft) ->
-           Ast0.IfThenElse(string_mcode iff,string_mcode lp,expression exp,
-             string_mcode rp, statement branch1, string_mcode els,
-             statement branch2,aft)
-       | Ast0.While(whl,lp,exp,rp,body,aft) ->
-           Ast0.While(string_mcode whl, string_mcode lp, expression exp,
-                      string_mcode rp, statement body, aft)
-       | Ast0.Do(d,body,whl,lp,exp,rp,sem) ->
-           Ast0.Do(string_mcode d, statement body, string_mcode whl,
-                   string_mcode lp, expression exp, string_mcode rp,
-                   string_mcode sem)
-       | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,aft) ->
-           Ast0.For(string_mcode fr, string_mcode lp,
-                    get_option expression e1, string_mcode sem1,
-                    get_option expression e2, string_mcode sem2,
-                    get_option expression e3,
-                    string_mcode rp, statement body, aft)
-       | Ast0.Iterator(nm,lp,args,rp,body,aft) ->
-           Ast0.Iterator(ident nm, string_mcode lp,
-                         expression_dots args,
-                         string_mcode rp, statement body, aft)
-       | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-           Ast0.Switch(string_mcode switch,string_mcode lp,expression exp,
-                       string_mcode rp,string_mcode lb,
-                       case_line_dots cases, string_mcode rb)
-       | Ast0.Break(br,sem) ->
-           Ast0.Break(string_mcode br,string_mcode sem)
-       | Ast0.Continue(cont,sem) ->
-           Ast0.Continue(string_mcode cont,string_mcode sem)
-       | Ast0.Label(l,dd) -> Ast0.Label(ident l,string_mcode dd)
-       | Ast0.Goto(goto,l,sem) ->
-           Ast0.Goto(string_mcode goto,ident l,string_mcode sem)
-       | Ast0.Return(ret,sem) ->
-           Ast0.Return(string_mcode ret,string_mcode sem)
-       | Ast0.ReturnExpr(ret,exp,sem) ->
-           Ast0.ReturnExpr(string_mcode ret,expression exp,string_mcode sem)
-       | Ast0.MetaStmt(name,pure) ->
-           Ast0.MetaStmt(meta_mcode name,pure)
-       | Ast0.MetaStmtList(name,pure) ->
-           Ast0.MetaStmtList(meta_mcode name,pure)
-       | Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-           Ast0.Disj(string_mcode starter,
-                     List.map statement_dots statement_dots_list,
-                     List.map string_mcode mids,
-                     string_mcode ender)
-       | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-           Ast0.Nest(string_mcode starter,statement_dots stmt_dots,
-                     string_mcode ender,
-                     List.map (whencode statement_dots statement) whn,
-                     multi)
-       | Ast0.Exp(exp) -> Ast0.Exp(expression exp)
-       | Ast0.TopExp(exp) -> Ast0.TopExp(expression exp)
-       | Ast0.Ty(ty) -> Ast0.Ty(typeC ty)
-       | Ast0.Dots(d,whn) ->
-           Ast0.Dots(string_mcode d,
-                     List.map (whencode statement_dots statement) whn)
-       | Ast0.Circles(d,whn) ->
-           Ast0.Circles(string_mcode d,
-                        List.map (whencode statement_dots statement) whn)
-       | Ast0.Stars(d,whn) ->
-           Ast0.Stars(string_mcode d,
-                      List.map (whencode statement_dots statement) whn)
-       | Ast0.Include(inc,name) ->
-           Ast0.Include(string_mcode inc,inc_mcode name)
-       | Ast0.Define(def,id,params,body) ->
-           Ast0.Define(string_mcode def,ident id,
-                       define_parameters params,
-                       statement_dots body)
-       | Ast0.OptStm(re) -> Ast0.OptStm(statement re)
-       | Ast0.UniqueStm(re) -> Ast0.UniqueStm(statement re)) in
-    let s = stmtfn all_functions k s in
-    process_bef_aft s
-
-  (* not parameterizable for now... *)
-  and define_parameters p =
-    let k p =
-      Ast0.rewrap p
-       (match Ast0.unwrap p with
-         Ast0.NoParams -> Ast0.NoParams
-       | Ast0.DParams(lp,params,rp) ->
-           Ast0.DParams(string_mcode lp,define_param_dots params,
-                        string_mcode rp))in
-    k p
-
-  and define_param_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map define_param l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map define_param l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map define_param l)) in
-    k d
-
-  and define_param p =
-    let k p =
-      Ast0.rewrap p
-       (match Ast0.unwrap p with
-         Ast0.DParam(id) -> Ast0.DParam(ident id)
-       | Ast0.DPComma(comma) -> Ast0.DPComma(string_mcode comma)
-       | Ast0.DPdots(d) -> Ast0.DPdots(string_mcode d)
-       | Ast0.DPcircles(c) -> Ast0.DPcircles(string_mcode c)
-       | Ast0.OptDParam(dp) -> Ast0.OptDParam(define_param dp)
-       | Ast0.UniqueDParam(dp) -> Ast0.UniqueDParam(define_param dp)) in
-    k p
-
-  and fninfo = function
-      Ast0.FStorage(stg) -> Ast0.FStorage(storage_mcode stg)
-    | Ast0.FType(ty) -> Ast0.FType(typeC ty)
-    | Ast0.FInline(inline) -> Ast0.FInline(string_mcode inline)
-    | Ast0.FAttr(init) -> Ast0.FAttr(string_mcode init)
-
-  and whencode notfn alwaysfn = function
-      Ast0.WhenNot a -> Ast0.WhenNot (notfn a)
-    | Ast0.WhenAlways a -> Ast0.WhenAlways (alwaysfn a)
-    | Ast0.WhenModifier(x)    -> Ast0.WhenModifier(x)
-
-  and case_line c =
-    let k c =
-      Ast0.rewrap c
-       (match Ast0.unwrap c with
-         Ast0.Default(def,colon,code) ->
-           Ast0.Default(string_mcode def,string_mcode colon,
-                        statement_dots code)
-       | Ast0.Case(case,exp,colon,code) ->
-           Ast0.Case(string_mcode case,expression exp,string_mcode colon,
-                     statement_dots code)
-       | Ast0.OptCase(case) -> Ast0.OptCase(case_line case)) in
-    casefn all_functions k c
-
-  and top_level t =
-    let k t =
-      Ast0.rewrap t
-       (match Ast0.unwrap t with
-         Ast0.FILEINFO(old_file,new_file) ->
-           Ast0.FILEINFO(string_mcode old_file, string_mcode new_file)
-       | Ast0.DECL(statement_dots) ->
-           Ast0.DECL(statement statement_dots)
-       | Ast0.CODE(stmt_dots) -> Ast0.CODE(statement_dots stmt_dots)
-       | Ast0.ERRORWORDS(exps) -> Ast0.ERRORWORDS(List.map expression exps)
-       | Ast0.OTHER(_) -> failwith "unexpected code") in
-    topfn all_functions k t
-
-  and anything a = (* for compile_iso, not parameterisable *)
-    let k = function
-       Ast0.DotsExprTag(exprs) -> Ast0.DotsExprTag(expression_dots exprs)
-      | Ast0.DotsInitTag(inits) -> Ast0.DotsInitTag(initialiser_list inits)
-      | Ast0.DotsParamTag(params) -> Ast0.DotsParamTag(parameter_list params)
-      | Ast0.DotsStmtTag(stmts) -> Ast0.DotsStmtTag(statement_dots stmts)
-      | Ast0.DotsDeclTag(decls) -> Ast0.DotsDeclTag(declaration_dots decls)
-      | Ast0.DotsCaseTag(cases) -> Ast0.DotsCaseTag(case_line_dots cases)
-      | Ast0.IdentTag(id) -> Ast0.IdentTag(ident id)
-      | Ast0.ExprTag(exp) -> Ast0.ExprTag(expression exp)
-      | Ast0.ArgExprTag(exp) -> Ast0.ArgExprTag(expression exp)
-      | Ast0.TestExprTag(exp) -> Ast0.TestExprTag(expression exp)
-      | Ast0.TypeCTag(ty) -> Ast0.TypeCTag(typeC ty)
-      | Ast0.ParamTag(param) -> Ast0.ParamTag(parameterTypeDef param)
-      | Ast0.InitTag(init) -> Ast0.InitTag(initialiser init)
-      | Ast0.DeclTag(decl) -> Ast0.DeclTag(declaration decl)
-      | Ast0.StmtTag(stmt) -> Ast0.StmtTag(statement stmt)
-      | Ast0.CaseLineTag(c) -> Ast0.CaseLineTag(case_line c)
-      | Ast0.TopTag(top) -> Ast0.TopTag(top_level top)
-      | Ast0.IsoWhenTag(x) -> Ast0.IsoWhenTag(x)
-      |        Ast0.MetaPosTag(var) -> failwith "not supported" in
-    k a
-
-  (* not done for combiner, because the statement is assumed to be already
-     represented elsewhere in the code *)
-
-  and all_functions =
-    {rebuilder_ident = ident;
-      rebuilder_expression = expression;
-      rebuilder_typeC = typeC;
-      rebuilder_declaration = declaration;
-      rebuilder_initialiser = initialiser;
-      rebuilder_initialiser_list = initialiser_list;
-      rebuilder_parameter = parameterTypeDef;
-      rebuilder_parameter_list = parameter_list;
-      rebuilder_statement = statement;
-      rebuilder_case_line = case_line;
-      rebuilder_top_level = top_level;
-      rebuilder_expression_dots = expression_dots;
-      rebuilder_statement_dots = statement_dots;
-      rebuilder_declaration_dots = declaration_dots;
-      rebuilder_case_line_dots = case_line_dots;
-      rebuilder_anything = anything} in
-  all_functions
diff --git a/parsing_cocci/.#visitor_ast0.ml.1.80 b/parsing_cocci/.#visitor_ast0.ml.1.80
deleted file mode 100644 (file)
index 36ab172..0000000
+++ /dev/null
@@ -1,1036 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-
-(* --------------------------------------------------------------------- *)
-(* Generic traversal: combiner *)
-(* parameters:
-   combining function
-   treatment of: mcode, identifiers, expressions, typeCs, types,
-   declarations, statements, toplevels
-   default value for options *)
-
-type 'a combiner =
-    {combiner_ident : Ast0.ident -> 'a;
-      combiner_expression : Ast0.expression -> 'a;
-      combiner_typeC : Ast0.typeC -> 'a;
-      combiner_declaration : Ast0.declaration -> 'a;
-      combiner_initialiser : Ast0.initialiser -> 'a;
-      combiner_initialiser_list : Ast0.initialiser_list -> 'a;
-      combiner_parameter : Ast0.parameterTypeDef -> 'a;
-      combiner_parameter_list : Ast0.parameter_list -> 'a;
-      combiner_statement : Ast0.statement -> 'a;
-      combiner_case_line : Ast0.case_line -> 'a;
-      combiner_top_level : Ast0.top_level -> 'a;
-      combiner_expression_dots :
-         Ast0.expression Ast0.dots -> 'a;
-      combiner_statement_dots :
-             Ast0.statement Ast0.dots -> 'a;
-      combiner_declaration_dots :
-                 Ast0.declaration Ast0.dots -> 'a;
-      combiner_case_line_dots :
-                 Ast0.case_line Ast0.dots -> 'a;
-      combiner_anything : Ast0.anything -> 'a}
-
-
-type ('mc,'a) cmcode = 'mc Ast0.mcode -> 'a
-type ('cd,'a) ccode = 'a combiner -> ('cd -> 'a) -> 'cd -> 'a
-
-let combiner bind option_default 
-    meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
-    inc_mcode
-    dotsexprfn dotsinitfn dotsparamfn dotsstmtfn dotsdeclfn dotscasefn
-    identfn exprfn
-    tyfn initfn paramfn declfn stmtfn casefn topfn =
-  let multibind l =
-    let rec loop = function
-       [] -> option_default
-      |        [x] -> x
-      |        x::xs -> bind x (loop xs) in
-    loop l in
-  let get_option f = function
-      Some x -> f x
-    | None -> option_default in
-  let rec expression_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map expression l) in
-    dotsexprfn all_functions k d
-  and initialiser_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map initialiser l) in
-    dotsinitfn all_functions k d
-  and parameter_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map parameterTypeDef l) in
-    dotsparamfn all_functions k d
-  and statement_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map statement l) in
-    dotsstmtfn all_functions k d
-  and declaration_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map declaration l) in
-    dotsdeclfn all_functions k d
-  and case_line_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map case_line l) in
-    dotscasefn all_functions k d
-  and ident i =
-    let k i =
-      match Ast0.unwrap i with
-       Ast0.Id(name) -> string_mcode name
-      | Ast0.MetaId(name,_,_) -> meta_mcode name
-      | Ast0.MetaFunc(name,_,_) -> meta_mcode name
-      | Ast0.MetaLocalFunc(name,_,_) -> meta_mcode name
-      | Ast0.OptIdent(id) -> ident id
-      | Ast0.UniqueIdent(id) -> ident id in
-  identfn all_functions k i
-  and expression e =
-    let k e =
-      match Ast0.unwrap e with
-       Ast0.Ident(id) -> ident id
-      | Ast0.Constant(const) -> const_mcode const
-      | Ast0.FunCall(fn,lp,args,rp) ->
-         multibind
-           [expression fn; string_mcode lp; expression_dots args;
-             string_mcode rp]
-      | Ast0.Assignment(left,op,right,_) ->
-         multibind [expression left; assign_mcode op; expression right]
-      | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-         multibind
-           [expression exp1; string_mcode why; get_option expression exp2;
-             string_mcode colon; expression exp3]
-      | Ast0.Postfix(exp,op) -> bind (expression exp) (fix_mcode op)
-      | Ast0.Infix(exp,op) -> bind (fix_mcode op) (expression exp)
-      | Ast0.Unary(exp,op) -> bind (unary_mcode op) (expression exp)
-      | Ast0.Binary(left,op,right) ->
-         multibind [expression left; binary_mcode op; expression right]
-      | Ast0.Nested(left,op,right) ->
-         multibind [expression left; binary_mcode op; expression right]
-      | Ast0.Paren(lp,exp,rp) ->
-         multibind [string_mcode lp; expression exp; string_mcode rp]
-      | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-         multibind
-           [expression exp1; string_mcode lb; expression exp2;
-             string_mcode rb]
-      | Ast0.RecordAccess(exp,pt,field) ->
-         multibind [expression exp; string_mcode pt; ident field]
-      | Ast0.RecordPtAccess(exp,ar,field) ->
-         multibind [expression exp; string_mcode ar; ident field]
-      | Ast0.Cast(lp,ty,rp,exp) ->
-         multibind
-           [string_mcode lp; typeC ty; string_mcode rp; expression exp]
-      | Ast0.SizeOfExpr(szf,exp) ->
-         multibind [string_mcode szf; expression exp]
-      | Ast0.SizeOfType(szf,lp,ty,rp) ->
-         multibind
-           [string_mcode szf; string_mcode lp; typeC ty; string_mcode rp]
-      | Ast0.TypeExp(ty) -> typeC ty
-      | Ast0.MetaErr(name,_,_)
-      | Ast0.MetaExpr(name,_,_,_,_)
-      | Ast0.MetaExprList(name,_,_) -> meta_mcode name
-      | Ast0.EComma(cm) -> string_mcode cm
-      | Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-         (match expr_list with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (expression x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (expression x))
-                           mids xs))
-                     (string_mcode ender))))
-      | Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-         bind (string_mcode starter)
-           (bind (expression_dots expr_dots)
-              (bind (string_mcode ender) (get_option expression whencode)))
-      | Ast0.Edots(dots,whencode) | Ast0.Ecircles(dots,whencode)
-      | Ast0.Estars(dots,whencode) ->
-         bind (string_mcode dots) (get_option expression whencode)
-      | Ast0.OptExp(exp) -> expression exp
-      | Ast0.UniqueExp(exp) -> expression exp in
-    exprfn all_functions k e
-  and function_pointer (ty,lp1,star,rp1,lp2,params,rp2) extra =
-    (* have to put the treatment of the identifier into the right position *)
-    multibind
-      ([typeC ty; string_mcode lp1; string_mcode star] @ extra @
-       [string_mcode rp1;
-        string_mcode lp2; parameter_dots params; string_mcode rp2])
-  and function_type (ty,lp1,params,rp1) extra =
-    (* have to put the treatment of the identifier into the right position *)
-    multibind ([get_option typeC ty] @ extra @
-              [string_mcode lp1; parameter_dots params; string_mcode rp1])
-  and array_type (ty,lb,size,rb) extra =
-    multibind
-      ([typeC ty] @ extra @
-       [string_mcode lb; get_option expression size; string_mcode rb])
-  and typeC t =
-    let k t =
-      match Ast0.unwrap t with
-       Ast0.ConstVol(cv,ty) -> bind (cv_mcode cv) (typeC ty)
-      |        Ast0.BaseType(ty,sign) ->
-         bind (get_option sign_mcode sign) (base_mcode ty)
-      |        Ast0.ImplicitInt(sign) -> (sign_mcode sign)
-      | Ast0.Pointer(ty,star) -> bind (typeC ty) (string_mcode star)
-      | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-         function_pointer (ty,lp1,star,rp1,lp2,params,rp2) []
-      | Ast0.FunctionType(ty,lp1,params,rp1) ->
-         function_type (ty,lp1,params,rp1) []
-      | Ast0.Array(ty,lb,size,rb) ->
-         array_type (ty,lb,size,rb) []
-      | Ast0.StructUnionName(kind,name) ->
-         bind (struct_mcode kind) (get_option ident name)
-      | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-         multibind
-           [typeC ty;string_mcode lb;declaration_dots decls;string_mcode rb]
-      | Ast0.TypeName(name) -> string_mcode name
-      | Ast0.MetaType(name,_) -> meta_mcode name
-      |        Ast0.DisjType(starter,types,mids,ender) ->
-         (match types with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (typeC x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (typeC x))
-                           mids xs))
-                     (string_mcode ender))))
-      | Ast0.OptType(ty) -> typeC ty
-      | Ast0.UniqueType(ty) -> typeC ty in
-    tyfn all_functions k t
-  and named_type ty id =
-    match Ast0.unwrap ty with
-      Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-       function_pointer (ty,lp1,star,rp1,lp2,params,rp2) [ident id]
-    | Ast0.FunctionType(ty,lp1,params,rp1) ->
-       function_type (ty,lp1,params,rp1) [ident id]
-    | Ast0.Array(ty,lb,size,rb) ->
-       array_type (ty,lb,size,rb) [ident id]
-    | _ -> bind (typeC ty) (ident id)
-  and declaration d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.Init(stg,ty,id,eq,ini,sem) ->
-         bind (get_option storage_mcode stg)
-           (bind (named_type ty id)
-              (multibind
-                 [string_mcode eq; initialiser ini; string_mcode sem]))
-      | Ast0.UnInit(stg,ty,id,sem) ->
-         bind (get_option storage_mcode stg)
-           (bind (named_type ty id) (string_mcode sem))
-      | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-         multibind
-           [ident name; string_mcode lp; expression_dots args;
-             string_mcode rp; string_mcode sem]
-      | Ast0.TyDecl(ty,sem) -> bind (typeC ty) (string_mcode sem)
-      | Ast0.Typedef(stg,ty,id,sem) ->
-         bind (string_mcode stg)
-           (bind (typeC ty) (bind (typeC id) (string_mcode sem)))
-      |        Ast0.DisjDecl(starter,decls,mids,ender) ->
-         (match decls with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (declaration x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (declaration x))
-                           mids xs))
-                     (string_mcode ender))))
-      |        Ast0.Ddots(dots,whencode) ->
-         bind (string_mcode dots) (get_option declaration whencode)
-      | Ast0.OptDecl(decl) -> declaration decl
-      | Ast0.UniqueDecl(decl) -> declaration decl in
-    declfn all_functions k d
-  and initialiser i =
-    let k i =
-      match Ast0.unwrap i with
-       Ast0.InitExpr(exp) -> expression exp
-      | Ast0.InitList(lb,initlist,rb) ->
-         multibind
-           [string_mcode lb; initialiser_dots initlist; string_mcode rb]
-      | Ast0.InitGccDotName(dot,name,eq,ini) ->
-         multibind
-           [string_mcode dot; ident name; string_mcode eq; initialiser ini]
-      | Ast0.InitGccName(name,eq,ini) ->
-         multibind [ident name; string_mcode eq; initialiser ini]
-      | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-         multibind
-           [string_mcode lb; expression exp; string_mcode rb;
-             string_mcode eq; initialiser ini]
-      | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-         multibind
-           [string_mcode lb; expression exp1; string_mcode dots;
-             expression exp2; string_mcode rb; string_mcode eq;
-             initialiser ini]
-      | Ast0.IComma(cm) -> string_mcode cm
-      | Ast0.Idots(dots,whencode) ->
-         bind (string_mcode dots) (get_option initialiser whencode)
-      | Ast0.OptIni(i) -> initialiser i
-      | Ast0.UniqueIni(i) -> initialiser i in
-    initfn all_functions k i
-  and parameterTypeDef p =
-    let k p =
-      match Ast0.unwrap p with
-       Ast0.VoidParam(ty) -> typeC ty
-      | Ast0.Param(ty,Some id) -> named_type ty id
-      | Ast0.Param(ty,None) -> typeC ty
-      | Ast0.MetaParam(name,_) -> meta_mcode name
-      | Ast0.MetaParamList(name,_,_) -> meta_mcode name
-      | Ast0.PComma(cm) -> string_mcode cm
-      | Ast0.Pdots(dots) -> string_mcode dots
-      | Ast0.Pcircles(dots) -> string_mcode dots
-      | Ast0.OptParam(param) -> parameterTypeDef param
-      | Ast0.UniqueParam(param) -> parameterTypeDef param in
-    paramfn all_functions k p
-
-  (* discard the result, because the statement is assumed to be already
-     represented elsewhere in the code *)
-  and process_bef_aft s =
-    match Ast0.get_dots_bef_aft s with
-      Ast0.NoDots -> ()
-    | Ast0.DroppingBetweenDots(stm) -> let _ = statement stm in ()
-    | Ast0.AddingBetweenDots(stm) -> let _ = statement stm in ()
-
-  and statement s =
-    process_bef_aft s;
-    let k s =
-      match Ast0.unwrap s with
-       Ast0.FunDecl(_,fi,name,lp,params,rp,lbrace,body,rbrace) ->
-         multibind
-           ((List.map fninfo fi) @
-            [ident name; string_mcode lp;
-              parameter_dots params; string_mcode rp; string_mcode lbrace;
-              statement_dots body; string_mcode rbrace])
-      | Ast0.Decl(_,decl) -> declaration decl
-      | Ast0.Seq(lbrace,body,rbrace) ->
-         multibind
-           [string_mcode lbrace; statement_dots body; string_mcode rbrace]
-      | Ast0.ExprStatement(exp,sem) ->
-         bind (expression exp) (string_mcode sem)
-      | Ast0.IfThen(iff,lp,exp,rp,branch1,_) ->
-         multibind
-           [string_mcode iff; string_mcode lp; expression exp;
-             string_mcode rp; statement branch1]
-      | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,_) ->
-         multibind
-           [string_mcode iff; string_mcode lp; expression exp;
-             string_mcode rp; statement branch1; string_mcode els;
-             statement branch2]
-      | Ast0.While(whl,lp,exp,rp,body,_) ->
-         multibind
-           [string_mcode whl; string_mcode lp; expression exp;
-             string_mcode rp; statement body]
-      | Ast0.Do(d,body,whl,lp,exp,rp,sem) ->
-         multibind
-           [string_mcode d; statement body; string_mcode whl;
-             string_mcode lp; expression exp; string_mcode rp;
-             string_mcode sem]
-      | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,_) ->
-         multibind
-           [string_mcode fr; string_mcode lp; get_option expression e1;
-             string_mcode sem1; get_option expression e2; string_mcode sem2;
-             get_option expression e3;
-             string_mcode rp; statement body]
-      | Ast0.Iterator(nm,lp,args,rp,body,_) ->
-         multibind
-           [ident nm; string_mcode lp; expression_dots args;
-             string_mcode rp; statement body]
-      |        Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-         multibind
-           [string_mcode switch; string_mcode lp; expression exp;
-             string_mcode rp; string_mcode lb; case_line_dots cases;
-             string_mcode rb]
-      | Ast0.Break(br,sem) -> bind (string_mcode br) (string_mcode sem)
-      | Ast0.Continue(cont,sem) -> bind (string_mcode cont) (string_mcode sem)
-      |        Ast0.Label(l,dd) -> bind (ident l) (string_mcode dd)
-      |        Ast0.Goto(goto,l,sem) ->
-         bind (string_mcode goto) (bind (ident l) (string_mcode sem))
-      | Ast0.Return(ret,sem) -> bind (string_mcode ret) (string_mcode sem)
-      | Ast0.ReturnExpr(ret,exp,sem) ->
-         multibind [string_mcode ret; expression exp; string_mcode sem]
-      | Ast0.MetaStmt(name,_) -> meta_mcode name
-      | Ast0.MetaStmtList(name,_) -> meta_mcode name
-      | Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-         (match statement_dots_list with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (statement_dots x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (statement_dots x))
-                           mids xs))
-                     (string_mcode ender))))
-      | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-         bind (string_mcode starter)
-           (bind (statement_dots stmt_dots)
-              (bind (string_mcode ender)
-                 (multibind
-                    (List.map (whencode statement_dots statement) whn))))
-      | Ast0.Exp(exp) -> expression exp
-      | Ast0.TopExp(exp) -> expression exp
-      | Ast0.Ty(ty) -> typeC ty
-      | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) ->
-         bind (string_mcode d)
-           (multibind (List.map (whencode statement_dots statement) whn))
-      | Ast0.Include(inc,name) -> bind (string_mcode inc) (inc_mcode name)
-      | Ast0.Define(def,id,params,body) ->
-         multibind [string_mcode def; ident id; define_parameters params;
-                     statement_dots body]
-      | Ast0.OptStm(re) -> statement re
-      | Ast0.UniqueStm(re) -> statement re in
-    stmtfn all_functions k s
-
-  (* not parameterizable for now... *)
-  and define_parameters p =
-    let k p =
-      match Ast0.unwrap p with
-       Ast0.NoParams -> option_default
-      | Ast0.DParams(lp,params,rp) ->
-         multibind
-           [string_mcode lp; define_param_dots params; string_mcode rp] in
-    k p
-
-  and define_param_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map define_param l) in
-    k d
-
-  and define_param p =
-    let k p =
-      match Ast0.unwrap p with
-       Ast0.DParam(id) -> ident id
-      | Ast0.DPComma(comma) -> string_mcode comma
-      | Ast0.DPdots(d) -> string_mcode d
-      | Ast0.DPcircles(c) -> string_mcode c
-      | Ast0.OptDParam(dp) -> define_param dp
-      | Ast0.UniqueDParam(dp) -> define_param dp in
-    k p 
-
-  and fninfo = function
-      Ast0.FStorage(stg) -> storage_mcode stg
-    | Ast0.FType(ty) -> typeC ty
-    | Ast0.FInline(inline) -> string_mcode inline
-    | Ast0.FAttr(init) -> string_mcode init
-
-  and whencode notfn alwaysfn = function
-      Ast0.WhenNot a -> notfn a
-    | Ast0.WhenAlways a -> alwaysfn a
-    | Ast0.WhenModifier(_) -> option_default
-    | Ast0.WhenNotTrue(e) -> expression e
-    | Ast0.WhenNotFalse(e) -> expression e
-
-  and case_line c =
-    let k c =
-      match Ast0.unwrap c with
-       Ast0.Default(def,colon,code) ->
-         multibind [string_mcode def;string_mcode colon;statement_dots code]
-      | Ast0.Case(case,exp,colon,code) ->
-         multibind [string_mcode case;expression exp;string_mcode colon;
-                     statement_dots code]
-      |        Ast0.OptCase(case) -> case_line case in
-    casefn all_functions k c
-
-  and anything a = (* for compile_iso, not parameterisable *)
-    let k = function
-       Ast0.DotsExprTag(exprs) -> expression_dots exprs
-      | Ast0.DotsInitTag(inits) -> initialiser_dots inits
-      | Ast0.DotsParamTag(params) -> parameter_dots params
-      | Ast0.DotsStmtTag(stmts) -> statement_dots stmts
-      | Ast0.DotsDeclTag(decls) -> declaration_dots decls
-      | Ast0.DotsCaseTag(cases) -> case_line_dots cases
-      | Ast0.IdentTag(id) -> ident id
-      | Ast0.ExprTag(exp) -> expression exp
-      | Ast0.ArgExprTag(exp) -> expression exp
-      | Ast0.TestExprTag(exp) -> expression exp
-      | Ast0.TypeCTag(ty) -> typeC ty
-      | Ast0.ParamTag(param) -> parameterTypeDef param
-      | Ast0.InitTag(init) -> initialiser init
-      | Ast0.DeclTag(decl) -> declaration decl
-      | Ast0.StmtTag(stmt) -> statement stmt
-      | Ast0.CaseLineTag(c) -> case_line c
-      | Ast0.TopTag(top) -> top_level top
-      | Ast0.IsoWhenTag(_) -> option_default
-      | Ast0.IsoWhenTTag(e) -> expression e
-      | Ast0.IsoWhenFTag(e) -> expression e
-      |        Ast0.MetaPosTag(var) -> failwith "not supported" in
-    k a
-
-  and top_level t =
-    let k t =
-      match Ast0.unwrap t with
-       Ast0.FILEINFO(old_file,new_file) ->
-         bind (string_mcode old_file) (string_mcode new_file)
-      | Ast0.DECL(stmt_dots) -> statement stmt_dots
-      | Ast0.CODE(stmt_dots) -> statement_dots stmt_dots
-      | Ast0.ERRORWORDS(exps) -> multibind (List.map expression exps)
-      | Ast0.OTHER(_) -> failwith "unexpected code" in
-    topfn all_functions k t
-  and all_functions =
-    {combiner_ident = ident;
-      combiner_expression = expression;
-      combiner_typeC = typeC;
-      combiner_declaration = declaration;
-      combiner_initialiser = initialiser;
-      combiner_initialiser_list = initialiser_dots;
-      combiner_parameter = parameterTypeDef;
-      combiner_parameter_list = parameter_dots;
-      combiner_statement = statement;
-      combiner_case_line = case_line;
-      combiner_top_level = top_level;
-      combiner_expression_dots = expression_dots;
-      combiner_statement_dots = statement_dots;
-      combiner_declaration_dots = declaration_dots;
-      combiner_case_line_dots = case_line_dots;
-      combiner_anything = anything} in
-  all_functions
-
-(* --------------------------------------------------------------------- *)
-(* Generic traversal: rebuilder *)
-
-type 'a inout = 'a -> 'a (* for specifying the type of rebuilder *)
-
-type rebuilder =
-    {rebuilder_ident : Ast0.ident inout;
-      rebuilder_expression : Ast0.expression inout;
-      rebuilder_typeC : Ast0.typeC inout;
-      rebuilder_declaration : Ast0.declaration inout;
-      rebuilder_initialiser : Ast0.initialiser inout;
-      rebuilder_initialiser_list : Ast0.initialiser_list inout;
-      rebuilder_parameter : Ast0.parameterTypeDef inout;
-      rebuilder_parameter_list : Ast0.parameter_list inout;
-      rebuilder_statement : Ast0.statement inout;
-      rebuilder_case_line : Ast0.case_line inout;
-      rebuilder_top_level : Ast0.top_level inout;
-      rebuilder_expression_dots :
-       Ast0.expression Ast0.dots ->
-         Ast0.expression Ast0.dots;
-         rebuilder_statement_dots :
-           Ast0.statement Ast0.dots ->
-             Ast0.statement Ast0.dots;
-         rebuilder_declaration_dots :
-           Ast0.declaration Ast0.dots ->
-             Ast0.declaration Ast0.dots;
-         rebuilder_case_line_dots :
-           Ast0.case_line Ast0.dots ->
-             Ast0.case_line Ast0.dots;
-         rebuilder_anything :
-           Ast0.anything -> Ast0.anything}
-
-type 'mc rmcode = 'mc Ast0.mcode inout
-type 'cd rcode = rebuilder -> ('cd inout) -> 'cd inout
-
-let rebuilder = fun
-    meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
-    inc_mcode
-    dotsexprfn dotsinitfn dotsparamfn dotsstmtfn dotsdeclfn dotscasefn
-    identfn exprfn tyfn initfn paramfn declfn stmtfn casefn topfn ->
-  let get_option f = function
-      Some x -> Some (f x)
-    | None -> None in
-  let rec expression_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map expression l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map expression l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map expression l)) in
-    dotsexprfn all_functions k d
-  and initialiser_list i =
-    let k i =
-      Ast0.rewrap i
-       (match Ast0.unwrap i with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map initialiser l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map initialiser l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map initialiser l)) in
-    dotsinitfn all_functions k i
-  and parameter_list d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map parameterTypeDef l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map parameterTypeDef l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map parameterTypeDef l)) in
-    dotsparamfn all_functions k d
-  and statement_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map statement l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map statement l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map statement l)) in
-    dotsstmtfn all_functions k d
-  and declaration_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map declaration l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map declaration l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map declaration l)) in
-    dotsdeclfn all_functions k d
-  and case_line_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map case_line l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map case_line l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map case_line l)) in
-    dotscasefn all_functions k d
-  and ident i =
-    let k i =
-      Ast0.rewrap i
-       (match Ast0.unwrap i with
-         Ast0.Id(name) -> Ast0.Id(string_mcode name)
-       | Ast0.MetaId(name,constraints,pure) ->
-           Ast0.MetaId(meta_mcode name,constraints,pure)
-       | Ast0.MetaFunc(name,constraints,pure) ->
-           Ast0.MetaFunc(meta_mcode name,constraints,pure)
-       | Ast0.MetaLocalFunc(name,constraints,pure) ->
-           Ast0.MetaLocalFunc(meta_mcode name,constraints,pure)
-       | Ast0.OptIdent(id) -> Ast0.OptIdent(ident id)
-       | Ast0.UniqueIdent(id) -> Ast0.UniqueIdent(ident id)) in
-    identfn all_functions k i
-  and expression e =
-    let k e =
-      Ast0.rewrap e
-       (match Ast0.unwrap e with
-         Ast0.Ident(id) -> Ast0.Ident(ident id)
-       | Ast0.Constant(const) -> Ast0.Constant(const_mcode const)
-       | Ast0.FunCall(fn,lp,args,rp) ->
-           Ast0.FunCall(expression fn,string_mcode lp,expression_dots args,
-                        string_mcode rp)
-       | Ast0.Assignment(left,op,right,simple) ->
-           Ast0.Assignment(expression left,assign_mcode op,expression right,
-                           simple)
-       | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-           Ast0.CondExpr(expression exp1, string_mcode why,
-                         get_option expression exp2, string_mcode colon,
-                         expression exp3)
-       | Ast0.Postfix(exp,op) -> Ast0.Postfix(expression exp, fix_mcode op)
-       | Ast0.Infix(exp,op) -> Ast0.Infix(expression exp, fix_mcode op)
-       | Ast0.Unary(exp,op) -> Ast0.Unary(expression exp, unary_mcode op)
-       | Ast0.Binary(left,op,right) ->
-           Ast0.Binary(expression left, binary_mcode op, expression right)
-       | Ast0.Nested(left,op,right) ->
-           Ast0.Nested(expression left, binary_mcode op, expression right)
-       | Ast0.Paren(lp,exp,rp) ->
-           Ast0.Paren(string_mcode lp, expression exp, string_mcode rp)
-       | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-           Ast0.ArrayAccess(expression exp1,string_mcode lb,expression exp2,
-                            string_mcode rb)
-       | Ast0.RecordAccess(exp,pt,field) ->
-           Ast0.RecordAccess(expression exp, string_mcode pt, ident field)
-       | Ast0.RecordPtAccess(exp,ar,field) ->
-           Ast0.RecordPtAccess(expression exp, string_mcode ar, ident field)
-       | Ast0.Cast(lp,ty,rp,exp) ->
-           Ast0.Cast(string_mcode lp, typeC ty, string_mcode rp,
-                     expression exp)
-       | Ast0.SizeOfExpr(szf,exp) ->
-           Ast0.SizeOfExpr(string_mcode szf, expression exp)
-       | Ast0.SizeOfType(szf,lp,ty,rp) ->
-           Ast0.SizeOfType(string_mcode szf,string_mcode lp, typeC ty, 
-                            string_mcode rp)
-       | Ast0.TypeExp(ty) -> Ast0.TypeExp(typeC ty)
-       | Ast0.MetaErr(name,constraints,pure) ->
-           Ast0.MetaErr(meta_mcode name,constraints,pure)
-       | Ast0.MetaExpr(name,constraints,ty,form,pure) ->
-           Ast0.MetaExpr(meta_mcode name,constraints,ty,form,pure)
-       | Ast0.MetaExprList(name,lenname,pure) ->
-           Ast0.MetaExprList(meta_mcode name,lenname,pure)
-       | Ast0.EComma(cm) -> Ast0.EComma(string_mcode cm)
-       | Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-           Ast0.DisjExpr(string_mcode starter,List.map expression expr_list,
-                         List.map string_mcode mids,string_mcode ender)
-       | Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-           Ast0.NestExpr(string_mcode starter,expression_dots expr_dots,
-                         string_mcode ender, get_option expression whencode,
-                         multi)
-       | Ast0.Edots(dots,whencode) ->
-           Ast0.Edots(string_mcode dots, get_option expression whencode)
-       | Ast0.Ecircles(dots,whencode) ->
-           Ast0.Ecircles(string_mcode dots, get_option expression whencode)
-       | Ast0.Estars(dots,whencode) ->
-           Ast0.Estars(string_mcode dots, get_option expression whencode)
-       | Ast0.OptExp(exp) -> Ast0.OptExp(expression exp)
-       | Ast0.UniqueExp(exp) -> Ast0.UniqueExp(expression exp)) in
-    exprfn all_functions k e
-  and typeC t =
-    let k t =
-      Ast0.rewrap t
-       (match Ast0.unwrap t with
-         Ast0.ConstVol(cv,ty) -> Ast0.ConstVol(cv_mcode cv,typeC ty)
-       | Ast0.BaseType(ty,sign) ->
-           Ast0.BaseType(base_mcode ty, get_option sign_mcode sign)
-       | Ast0.ImplicitInt(sign) -> Ast0.ImplicitInt(sign_mcode sign)
-       | Ast0.Pointer(ty,star) ->
-           Ast0.Pointer(typeC ty, string_mcode star)
-       | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-           Ast0.FunctionPointer(typeC ty,string_mcode lp1,string_mcode star,
-                                string_mcode rp1,string_mcode lp2,
-                                parameter_list params,
-                                string_mcode rp2)
-       | Ast0.FunctionType(ty,lp1,params,rp1) ->
-           Ast0.FunctionType(get_option typeC ty,
-                             string_mcode lp1,parameter_list params,
-                             string_mcode rp1)
-       | Ast0.Array(ty,lb,size,rb) ->
-           Ast0.Array(typeC ty, string_mcode lb,
-                      get_option expression size, string_mcode rb)
-       | Ast0.StructUnionName(kind,name) ->
-           Ast0.StructUnionName (struct_mcode kind, get_option ident name)
-       | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-           Ast0.StructUnionDef (typeC ty,
-                                string_mcode lb, declaration_dots decls,
-                                string_mcode rb)
-       | Ast0.TypeName(name) -> Ast0.TypeName(string_mcode name)
-       | Ast0.MetaType(name,pure) ->
-           Ast0.MetaType(meta_mcode name,pure)
-       | Ast0.DisjType(starter,types,mids,ender) ->
-           Ast0.DisjType(string_mcode starter,List.map typeC types,
-                         List.map string_mcode mids,string_mcode ender)
-       | Ast0.OptType(ty) -> Ast0.OptType(typeC ty)
-       | Ast0.UniqueType(ty) -> Ast0.UniqueType(typeC ty)) in
-    tyfn all_functions k t
-  and declaration d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.Init(stg,ty,id,eq,ini,sem) ->
-           Ast0.Init(get_option storage_mcode stg,
-                     typeC ty, ident id, string_mcode eq, initialiser ini,
-                     string_mcode sem)
-       | Ast0.UnInit(stg,ty,id,sem) ->
-           Ast0.UnInit(get_option storage_mcode stg,
-                       typeC ty, ident id, string_mcode sem)
-       | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-           Ast0.MacroDecl(ident name,string_mcode lp,
-                          expression_dots args,
-                          string_mcode rp,string_mcode sem)
-       | Ast0.TyDecl(ty,sem) -> Ast0.TyDecl(typeC ty, string_mcode sem)
-       | Ast0.Typedef(stg,ty,id,sem) ->
-           Ast0.Typedef(string_mcode stg, typeC ty, typeC id,
-                        string_mcode sem)
-       | Ast0.DisjDecl(starter,decls,mids,ender) ->
-           Ast0.DisjDecl(string_mcode starter,List.map declaration decls,
-                         List.map string_mcode mids,string_mcode ender)
-       | Ast0.Ddots(dots,whencode) ->
-           Ast0.Ddots(string_mcode dots, get_option declaration whencode)
-       | Ast0.OptDecl(decl) -> Ast0.OptDecl(declaration decl)
-       | Ast0.UniqueDecl(decl) -> Ast0.UniqueDecl(declaration decl)) in
-    declfn all_functions k d
-  and initialiser i =
-    let k i =
-      Ast0.rewrap i
-       (match Ast0.unwrap i with
-         Ast0.InitExpr(exp) -> Ast0.InitExpr(expression exp)
-       | Ast0.InitList(lb,initlist,rb) ->
-           Ast0.InitList(string_mcode lb, initialiser_list initlist,
-                         string_mcode rb)
-       | Ast0.InitGccDotName(dot,name,eq,ini) ->
-           Ast0.InitGccDotName
-             (string_mcode dot, ident name, string_mcode eq, initialiser ini)
-       | Ast0.InitGccName(name,eq,ini) ->
-           Ast0.InitGccName(ident name, string_mcode eq, initialiser ini)
-       | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-           Ast0.InitGccIndex
-             (string_mcode lb, expression exp, string_mcode rb,
-              string_mcode eq, initialiser ini)
-       | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-           Ast0.InitGccRange
-             (string_mcode lb, expression exp1, string_mcode dots,
-              expression exp2, string_mcode rb, string_mcode eq,
-              initialiser ini)
-       | Ast0.IComma(cm) -> Ast0.IComma(string_mcode cm)
-       | Ast0.Idots(d,whencode) ->
-           Ast0.Idots(string_mcode d, get_option initialiser whencode)
-       | Ast0.OptIni(i) -> Ast0.OptIni(initialiser i)
-       | Ast0.UniqueIni(i) -> Ast0.UniqueIni(initialiser i)) in
-    initfn all_functions k i
-  and parameterTypeDef p =
-    let k p =
-      Ast0.rewrap p
-       (match Ast0.unwrap p with
-         Ast0.VoidParam(ty) -> Ast0.VoidParam(typeC ty)
-       | Ast0.Param(ty,id) -> Ast0.Param(typeC ty, get_option ident id)
-       | Ast0.MetaParam(name,pure) ->
-           Ast0.MetaParam(meta_mcode name,pure)
-       | Ast0.MetaParamList(name,lenname,pure) ->
-           Ast0.MetaParamList(meta_mcode name,lenname,pure)
-       | Ast0.PComma(cm) -> Ast0.PComma(string_mcode cm)
-       | Ast0.Pdots(dots) -> Ast0.Pdots(string_mcode dots)
-       | Ast0.Pcircles(dots) -> Ast0.Pcircles(string_mcode dots)
-       | Ast0.OptParam(param) -> Ast0.OptParam(parameterTypeDef param)
-       | Ast0.UniqueParam(param) ->
-           Ast0.UniqueParam(parameterTypeDef param)) in
-    paramfn all_functions k p
-  (* not done for combiner, because the statement is assumed to be already
-     represented elsewhere in the code *)
-  and process_bef_aft s =
-    Ast0.set_dots_bef_aft s
-      (match Ast0.get_dots_bef_aft s with
-       Ast0.NoDots -> Ast0.NoDots
-      | Ast0.DroppingBetweenDots(stm) ->
-         Ast0.DroppingBetweenDots(statement stm)
-      | Ast0.AddingBetweenDots(stm) ->
-         Ast0.AddingBetweenDots(statement stm))
-
-  and statement s =
-    let k s =
-      Ast0.rewrap s
-       (match Ast0.unwrap s with
-         Ast0.FunDecl(bef,fi,name,lp,params,rp,lbrace,body,rbrace) ->
-           Ast0.FunDecl(bef,List.map fninfo fi, ident name,
-                        string_mcode lp, parameter_list params,
-                        string_mcode rp, string_mcode lbrace,
-                        statement_dots body, string_mcode rbrace)
-       | Ast0.Decl(bef,decl) -> Ast0.Decl(bef,declaration decl)
-       | Ast0.Seq(lbrace,body,rbrace) ->
-           Ast0.Seq(string_mcode lbrace, statement_dots body,
-                    string_mcode rbrace)
-       | Ast0.ExprStatement(exp,sem) ->
-           Ast0.ExprStatement(expression exp, string_mcode sem)
-       | Ast0.IfThen(iff,lp,exp,rp,branch1,aft) ->
-           Ast0.IfThen(string_mcode iff, string_mcode lp, expression exp,
-             string_mcode rp, statement branch1,aft)
-       | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,aft) ->
-           Ast0.IfThenElse(string_mcode iff,string_mcode lp,expression exp,
-             string_mcode rp, statement branch1, string_mcode els,
-             statement branch2,aft)
-       | Ast0.While(whl,lp,exp,rp,body,aft) ->
-           Ast0.While(string_mcode whl, string_mcode lp, expression exp,
-                      string_mcode rp, statement body, aft)
-       | Ast0.Do(d,body,whl,lp,exp,rp,sem) ->
-           Ast0.Do(string_mcode d, statement body, string_mcode whl,
-                   string_mcode lp, expression exp, string_mcode rp,
-                   string_mcode sem)
-       | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,aft) ->
-           Ast0.For(string_mcode fr, string_mcode lp,
-                    get_option expression e1, string_mcode sem1,
-                    get_option expression e2, string_mcode sem2,
-                    get_option expression e3,
-                    string_mcode rp, statement body, aft)
-       | Ast0.Iterator(nm,lp,args,rp,body,aft) ->
-           Ast0.Iterator(ident nm, string_mcode lp,
-                         expression_dots args,
-                         string_mcode rp, statement body, aft)
-       | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-           Ast0.Switch(string_mcode switch,string_mcode lp,expression exp,
-                       string_mcode rp,string_mcode lb,
-                       case_line_dots cases, string_mcode rb)
-       | Ast0.Break(br,sem) ->
-           Ast0.Break(string_mcode br,string_mcode sem)
-       | Ast0.Continue(cont,sem) ->
-           Ast0.Continue(string_mcode cont,string_mcode sem)
-       | Ast0.Label(l,dd) -> Ast0.Label(ident l,string_mcode dd)
-       | Ast0.Goto(goto,l,sem) ->
-           Ast0.Goto(string_mcode goto,ident l,string_mcode sem)
-       | Ast0.Return(ret,sem) ->
-           Ast0.Return(string_mcode ret,string_mcode sem)
-       | Ast0.ReturnExpr(ret,exp,sem) ->
-           Ast0.ReturnExpr(string_mcode ret,expression exp,string_mcode sem)
-       | Ast0.MetaStmt(name,pure) ->
-           Ast0.MetaStmt(meta_mcode name,pure)
-       | Ast0.MetaStmtList(name,pure) ->
-           Ast0.MetaStmtList(meta_mcode name,pure)
-       | Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-           Ast0.Disj(string_mcode starter,
-                     List.map statement_dots statement_dots_list,
-                     List.map string_mcode mids,
-                     string_mcode ender)
-       | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-           Ast0.Nest(string_mcode starter,statement_dots stmt_dots,
-                     string_mcode ender,
-                     List.map (whencode statement_dots statement) whn,
-                     multi)
-       | Ast0.Exp(exp) -> Ast0.Exp(expression exp)
-       | Ast0.TopExp(exp) -> Ast0.TopExp(expression exp)
-       | Ast0.Ty(ty) -> Ast0.Ty(typeC ty)
-       | Ast0.Dots(d,whn) ->
-           Ast0.Dots(string_mcode d,
-                     List.map (whencode statement_dots statement) whn)
-       | Ast0.Circles(d,whn) ->
-           Ast0.Circles(string_mcode d,
-                        List.map (whencode statement_dots statement) whn)
-       | Ast0.Stars(d,whn) ->
-           Ast0.Stars(string_mcode d,
-                      List.map (whencode statement_dots statement) whn)
-       | Ast0.Include(inc,name) ->
-           Ast0.Include(string_mcode inc,inc_mcode name)
-       | Ast0.Define(def,id,params,body) ->
-           Ast0.Define(string_mcode def,ident id,
-                       define_parameters params,
-                       statement_dots body)
-       | Ast0.OptStm(re) -> Ast0.OptStm(statement re)
-       | Ast0.UniqueStm(re) -> Ast0.UniqueStm(statement re)) in
-    let s = stmtfn all_functions k s in
-    process_bef_aft s
-
-  (* not parameterizable for now... *)
-  and define_parameters p =
-    let k p =
-      Ast0.rewrap p
-       (match Ast0.unwrap p with
-         Ast0.NoParams -> Ast0.NoParams
-       | Ast0.DParams(lp,params,rp) ->
-           Ast0.DParams(string_mcode lp,define_param_dots params,
-                        string_mcode rp))in
-    k p
-
-  and define_param_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map define_param l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map define_param l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map define_param l)) in
-    k d
-
-  and define_param p =
-    let k p =
-      Ast0.rewrap p
-       (match Ast0.unwrap p with
-         Ast0.DParam(id) -> Ast0.DParam(ident id)
-       | Ast0.DPComma(comma) -> Ast0.DPComma(string_mcode comma)
-       | Ast0.DPdots(d) -> Ast0.DPdots(string_mcode d)
-       | Ast0.DPcircles(c) -> Ast0.DPcircles(string_mcode c)
-       | Ast0.OptDParam(dp) -> Ast0.OptDParam(define_param dp)
-       | Ast0.UniqueDParam(dp) -> Ast0.UniqueDParam(define_param dp)) in
-    k p
-
-  and fninfo = function
-      Ast0.FStorage(stg) -> Ast0.FStorage(storage_mcode stg)
-    | Ast0.FType(ty) -> Ast0.FType(typeC ty)
-    | Ast0.FInline(inline) -> Ast0.FInline(string_mcode inline)
-    | Ast0.FAttr(init) -> Ast0.FAttr(string_mcode init)
-
-  and whencode notfn alwaysfn = function
-      Ast0.WhenNot a -> Ast0.WhenNot (notfn a)
-    | Ast0.WhenAlways a -> Ast0.WhenAlways (alwaysfn a)
-    | Ast0.WhenModifier(x) -> Ast0.WhenModifier(x)
-    | Ast0.WhenNotTrue(e) -> Ast0.WhenNotTrue(expression e)
-    | Ast0.WhenNotFalse(e) -> Ast0.WhenNotFalse(expression e)
-
-  and case_line c =
-    let k c =
-      Ast0.rewrap c
-       (match Ast0.unwrap c with
-         Ast0.Default(def,colon,code) ->
-           Ast0.Default(string_mcode def,string_mcode colon,
-                        statement_dots code)
-       | Ast0.Case(case,exp,colon,code) ->
-           Ast0.Case(string_mcode case,expression exp,string_mcode colon,
-                     statement_dots code)
-       | Ast0.OptCase(case) -> Ast0.OptCase(case_line case)) in
-    casefn all_functions k c
-
-  and top_level t =
-    let k t =
-      Ast0.rewrap t
-       (match Ast0.unwrap t with
-         Ast0.FILEINFO(old_file,new_file) ->
-           Ast0.FILEINFO(string_mcode old_file, string_mcode new_file)
-       | Ast0.DECL(statement_dots) ->
-           Ast0.DECL(statement statement_dots)
-       | Ast0.CODE(stmt_dots) -> Ast0.CODE(statement_dots stmt_dots)
-       | Ast0.ERRORWORDS(exps) -> Ast0.ERRORWORDS(List.map expression exps)
-       | Ast0.OTHER(_) -> failwith "unexpected code") in
-    topfn all_functions k t
-
-  and anything a = (* for compile_iso, not parameterisable *)
-    let k = function
-       Ast0.DotsExprTag(exprs) -> Ast0.DotsExprTag(expression_dots exprs)
-      | Ast0.DotsInitTag(inits) -> Ast0.DotsInitTag(initialiser_list inits)
-      | Ast0.DotsParamTag(params) -> Ast0.DotsParamTag(parameter_list params)
-      | Ast0.DotsStmtTag(stmts) -> Ast0.DotsStmtTag(statement_dots stmts)
-      | Ast0.DotsDeclTag(decls) -> Ast0.DotsDeclTag(declaration_dots decls)
-      | Ast0.DotsCaseTag(cases) -> Ast0.DotsCaseTag(case_line_dots cases)
-      | Ast0.IdentTag(id) -> Ast0.IdentTag(ident id)
-      | Ast0.ExprTag(exp) -> Ast0.ExprTag(expression exp)
-      | Ast0.ArgExprTag(exp) -> Ast0.ArgExprTag(expression exp)
-      | Ast0.TestExprTag(exp) -> Ast0.TestExprTag(expression exp)
-      | Ast0.TypeCTag(ty) -> Ast0.TypeCTag(typeC ty)
-      | Ast0.ParamTag(param) -> Ast0.ParamTag(parameterTypeDef param)
-      | Ast0.InitTag(init) -> Ast0.InitTag(initialiser init)
-      | Ast0.DeclTag(decl) -> Ast0.DeclTag(declaration decl)
-      | Ast0.StmtTag(stmt) -> Ast0.StmtTag(statement stmt)
-      | Ast0.CaseLineTag(c) -> Ast0.CaseLineTag(case_line c)
-      | Ast0.TopTag(top) -> Ast0.TopTag(top_level top)
-      | Ast0.IsoWhenTag(x) -> Ast0.IsoWhenTag(x)
-      | Ast0.IsoWhenTTag(e) -> Ast0.IsoWhenTTag(expression e)
-      | Ast0.IsoWhenFTag(e) -> Ast0.IsoWhenFTag(expression e)
-      |        Ast0.MetaPosTag(var) -> failwith "not supported" in
-    k a
-
-  (* not done for combiner, because the statement is assumed to be already
-     represented elsewhere in the code *)
-
-  and all_functions =
-    {rebuilder_ident = ident;
-      rebuilder_expression = expression;
-      rebuilder_typeC = typeC;
-      rebuilder_declaration = declaration;
-      rebuilder_initialiser = initialiser;
-      rebuilder_initialiser_list = initialiser_list;
-      rebuilder_parameter = parameterTypeDef;
-      rebuilder_parameter_list = parameter_list;
-      rebuilder_statement = statement;
-      rebuilder_case_line = case_line;
-      rebuilder_top_level = top_level;
-      rebuilder_expression_dots = expression_dots;
-      rebuilder_statement_dots = statement_dots;
-      rebuilder_declaration_dots = declaration_dots;
-      rebuilder_case_line_dots = case_line_dots;
-      rebuilder_anything = anything} in
-  all_functions
diff --git a/parsing_cocci/.#visitor_ast0.ml.1.81 b/parsing_cocci/.#visitor_ast0.ml.1.81
deleted file mode 100644 (file)
index 2e258a9..0000000
+++ /dev/null
@@ -1,1038 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-module Ast = Ast_cocci
-module Ast0 = Ast0_cocci
-
-(* --------------------------------------------------------------------- *)
-(* Generic traversal: combiner *)
-(* parameters:
-   combining function
-   treatment of: mcode, identifiers, expressions, typeCs, types,
-   declarations, statements, toplevels
-   default value for options *)
-
-type 'a combiner =
-    {combiner_ident : Ast0.ident -> 'a;
-      combiner_expression : Ast0.expression -> 'a;
-      combiner_typeC : Ast0.typeC -> 'a;
-      combiner_declaration : Ast0.declaration -> 'a;
-      combiner_initialiser : Ast0.initialiser -> 'a;
-      combiner_initialiser_list : Ast0.initialiser_list -> 'a;
-      combiner_parameter : Ast0.parameterTypeDef -> 'a;
-      combiner_parameter_list : Ast0.parameter_list -> 'a;
-      combiner_statement : Ast0.statement -> 'a;
-      combiner_case_line : Ast0.case_line -> 'a;
-      combiner_top_level : Ast0.top_level -> 'a;
-      combiner_expression_dots :
-         Ast0.expression Ast0.dots -> 'a;
-      combiner_statement_dots :
-             Ast0.statement Ast0.dots -> 'a;
-      combiner_declaration_dots :
-                 Ast0.declaration Ast0.dots -> 'a;
-      combiner_case_line_dots :
-                 Ast0.case_line Ast0.dots -> 'a;
-      combiner_anything : Ast0.anything -> 'a}
-
-
-type ('mc,'a) cmcode = 'mc Ast0.mcode -> 'a
-type ('cd,'a) ccode = 'a combiner -> ('cd -> 'a) -> 'cd -> 'a
-
-let combiner bind option_default 
-    meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
-    inc_mcode
-    dotsexprfn dotsinitfn dotsparamfn dotsstmtfn dotsdeclfn dotscasefn
-    identfn exprfn
-    tyfn initfn paramfn declfn stmtfn casefn topfn =
-  let multibind l =
-    let rec loop = function
-       [] -> option_default
-      |        [x] -> x
-      |        x::xs -> bind x (loop xs) in
-    loop l in
-  let get_option f = function
-      Some x -> f x
-    | None -> option_default in
-  let rec expression_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map expression l) in
-    dotsexprfn all_functions k d
-  and initialiser_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map initialiser l) in
-    dotsinitfn all_functions k d
-  and parameter_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map parameterTypeDef l) in
-    dotsparamfn all_functions k d
-  and statement_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map statement l) in
-    dotsstmtfn all_functions k d
-  and declaration_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map declaration l) in
-    dotsdeclfn all_functions k d
-  and case_line_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map case_line l) in
-    dotscasefn all_functions k d
-  and ident i =
-    let k i =
-      match Ast0.unwrap i with
-       Ast0.Id(name) -> string_mcode name
-      | Ast0.MetaId(name,_,_) -> meta_mcode name
-      | Ast0.MetaFunc(name,_,_) -> meta_mcode name
-      | Ast0.MetaLocalFunc(name,_,_) -> meta_mcode name
-      | Ast0.OptIdent(id) -> ident id
-      | Ast0.UniqueIdent(id) -> ident id in
-  identfn all_functions k i
-  and expression e =
-    let k e =
-      match Ast0.unwrap e with
-       Ast0.Ident(id) -> ident id
-      | Ast0.Constant(const) -> const_mcode const
-      | Ast0.FunCall(fn,lp,args,rp) ->
-         multibind
-           [expression fn; string_mcode lp; expression_dots args;
-             string_mcode rp]
-      | Ast0.Assignment(left,op,right,_) ->
-         multibind [expression left; assign_mcode op; expression right]
-      | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-         multibind
-           [expression exp1; string_mcode why; get_option expression exp2;
-             string_mcode colon; expression exp3]
-      | Ast0.Postfix(exp,op) -> bind (expression exp) (fix_mcode op)
-      | Ast0.Infix(exp,op) -> bind (fix_mcode op) (expression exp)
-      | Ast0.Unary(exp,op) -> bind (unary_mcode op) (expression exp)
-      | Ast0.Binary(left,op,right) ->
-         multibind [expression left; binary_mcode op; expression right]
-      | Ast0.Nested(left,op,right) ->
-         multibind [expression left; binary_mcode op; expression right]
-      | Ast0.Paren(lp,exp,rp) ->
-         multibind [string_mcode lp; expression exp; string_mcode rp]
-      | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-         multibind
-           [expression exp1; string_mcode lb; expression exp2;
-             string_mcode rb]
-      | Ast0.RecordAccess(exp,pt,field) ->
-         multibind [expression exp; string_mcode pt; ident field]
-      | Ast0.RecordPtAccess(exp,ar,field) ->
-         multibind [expression exp; string_mcode ar; ident field]
-      | Ast0.Cast(lp,ty,rp,exp) ->
-         multibind
-           [string_mcode lp; typeC ty; string_mcode rp; expression exp]
-      | Ast0.SizeOfExpr(szf,exp) ->
-         multibind [string_mcode szf; expression exp]
-      | Ast0.SizeOfType(szf,lp,ty,rp) ->
-         multibind
-           [string_mcode szf; string_mcode lp; typeC ty; string_mcode rp]
-      | Ast0.TypeExp(ty) -> typeC ty
-      | Ast0.MetaErr(name,_,_)
-      | Ast0.MetaExpr(name,_,_,_,_)
-      | Ast0.MetaExprList(name,_,_) -> meta_mcode name
-      | Ast0.EComma(cm) -> string_mcode cm
-      | Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-         (match expr_list with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (expression x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (expression x))
-                           mids xs))
-                     (string_mcode ender))))
-      | Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-         bind (string_mcode starter)
-           (bind (expression_dots expr_dots)
-              (bind (string_mcode ender) (get_option expression whencode)))
-      | Ast0.Edots(dots,whencode) | Ast0.Ecircles(dots,whencode)
-      | Ast0.Estars(dots,whencode) ->
-         bind (string_mcode dots) (get_option expression whencode)
-      | Ast0.OptExp(exp) -> expression exp
-      | Ast0.UniqueExp(exp) -> expression exp in
-    exprfn all_functions k e
-  and function_pointer (ty,lp1,star,rp1,lp2,params,rp2) extra =
-    (* have to put the treatment of the identifier into the right position *)
-    multibind
-      ([typeC ty; string_mcode lp1; string_mcode star] @ extra @
-       [string_mcode rp1;
-        string_mcode lp2; parameter_dots params; string_mcode rp2])
-  and function_type (ty,lp1,params,rp1) extra =
-    (* have to put the treatment of the identifier into the right position *)
-    multibind ([get_option typeC ty] @ extra @
-              [string_mcode lp1; parameter_dots params; string_mcode rp1])
-  and array_type (ty,lb,size,rb) extra =
-    multibind
-      ([typeC ty] @ extra @
-       [string_mcode lb; get_option expression size; string_mcode rb])
-  and typeC t =
-    let k t =
-      match Ast0.unwrap t with
-       Ast0.ConstVol(cv,ty) -> bind (cv_mcode cv) (typeC ty)
-      |        Ast0.BaseType(ty,sign) ->
-         bind (get_option sign_mcode sign) (base_mcode ty)
-      |        Ast0.ImplicitInt(sign) -> (sign_mcode sign)
-      | Ast0.Pointer(ty,star) -> bind (typeC ty) (string_mcode star)
-      | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-         function_pointer (ty,lp1,star,rp1,lp2,params,rp2) []
-      | Ast0.FunctionType(ty,lp1,params,rp1) ->
-         function_type (ty,lp1,params,rp1) []
-      | Ast0.Array(ty,lb,size,rb) ->
-         array_type (ty,lb,size,rb) []
-      | Ast0.StructUnionName(kind,name) ->
-         bind (struct_mcode kind) (get_option ident name)
-      | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-         multibind
-           [typeC ty;string_mcode lb;declaration_dots decls;string_mcode rb]
-      | Ast0.TypeName(name) -> string_mcode name
-      | Ast0.MetaType(name,_) -> meta_mcode name
-      |        Ast0.DisjType(starter,types,mids,ender) ->
-         (match types with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (typeC x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (typeC x))
-                           mids xs))
-                     (string_mcode ender))))
-      | Ast0.OptType(ty) -> typeC ty
-      | Ast0.UniqueType(ty) -> typeC ty in
-    tyfn all_functions k t
-  and named_type ty id =
-    match Ast0.unwrap ty with
-      Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-       function_pointer (ty,lp1,star,rp1,lp2,params,rp2) [ident id]
-    | Ast0.FunctionType(ty,lp1,params,rp1) ->
-       function_type (ty,lp1,params,rp1) [ident id]
-    | Ast0.Array(ty,lb,size,rb) ->
-       array_type (ty,lb,size,rb) [ident id]
-    | _ -> bind (typeC ty) (ident id)
-  and declaration d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.Init(stg,ty,id,eq,ini,sem) ->
-         bind (get_option storage_mcode stg)
-           (bind (named_type ty id)
-              (multibind
-                 [string_mcode eq; initialiser ini; string_mcode sem]))
-      | Ast0.UnInit(stg,ty,id,sem) ->
-         bind (get_option storage_mcode stg)
-           (bind (named_type ty id) (string_mcode sem))
-      | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-         multibind
-           [ident name; string_mcode lp; expression_dots args;
-             string_mcode rp; string_mcode sem]
-      | Ast0.TyDecl(ty,sem) -> bind (typeC ty) (string_mcode sem)
-      | Ast0.Typedef(stg,ty,id,sem) ->
-         bind (string_mcode stg)
-           (bind (typeC ty) (bind (typeC id) (string_mcode sem)))
-      |        Ast0.DisjDecl(starter,decls,mids,ender) ->
-         (match decls with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (declaration x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (declaration x))
-                           mids xs))
-                     (string_mcode ender))))
-      |        Ast0.Ddots(dots,whencode) ->
-         bind (string_mcode dots) (get_option declaration whencode)
-      | Ast0.OptDecl(decl) -> declaration decl
-      | Ast0.UniqueDecl(decl) -> declaration decl in
-    declfn all_functions k d
-  and initialiser i =
-    let k i =
-      match Ast0.unwrap i with
-       Ast0.InitExpr(exp) -> expression exp
-      | Ast0.InitList(lb,initlist,rb) ->
-         multibind
-           [string_mcode lb; initialiser_dots initlist; string_mcode rb]
-      | Ast0.InitGccDotName(dot,name,eq,ini) ->
-         multibind
-           [string_mcode dot; ident name; string_mcode eq; initialiser ini]
-      | Ast0.InitGccName(name,eq,ini) ->
-         multibind [ident name; string_mcode eq; initialiser ini]
-      | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-         multibind
-           [string_mcode lb; expression exp; string_mcode rb;
-             string_mcode eq; initialiser ini]
-      | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-         multibind
-           [string_mcode lb; expression exp1; string_mcode dots;
-             expression exp2; string_mcode rb; string_mcode eq;
-             initialiser ini]
-      | Ast0.IComma(cm) -> string_mcode cm
-      | Ast0.Idots(dots,whencode) ->
-         bind (string_mcode dots) (get_option initialiser whencode)
-      | Ast0.OptIni(i) -> initialiser i
-      | Ast0.UniqueIni(i) -> initialiser i in
-    initfn all_functions k i
-  and parameterTypeDef p =
-    let k p =
-      match Ast0.unwrap p with
-       Ast0.VoidParam(ty) -> typeC ty
-      | Ast0.Param(ty,Some id) -> named_type ty id
-      | Ast0.Param(ty,None) -> typeC ty
-      | Ast0.MetaParam(name,_) -> meta_mcode name
-      | Ast0.MetaParamList(name,_,_) -> meta_mcode name
-      | Ast0.PComma(cm) -> string_mcode cm
-      | Ast0.Pdots(dots) -> string_mcode dots
-      | Ast0.Pcircles(dots) -> string_mcode dots
-      | Ast0.OptParam(param) -> parameterTypeDef param
-      | Ast0.UniqueParam(param) -> parameterTypeDef param in
-    paramfn all_functions k p
-
-  (* discard the result, because the statement is assumed to be already
-     represented elsewhere in the code *)
-  and process_bef_aft s =
-    match Ast0.get_dots_bef_aft s with
-      Ast0.NoDots -> ()
-    | Ast0.DroppingBetweenDots(stm) -> let _ = statement stm in ()
-    | Ast0.AddingBetweenDots(stm) -> let _ = statement stm in ()
-
-  and statement s =
-    process_bef_aft s;
-    let k s =
-      match Ast0.unwrap s with
-       Ast0.FunDecl(_,fi,name,lp,params,rp,lbrace,body,rbrace) ->
-         multibind
-           ((List.map fninfo fi) @
-            [ident name; string_mcode lp;
-              parameter_dots params; string_mcode rp; string_mcode lbrace;
-              statement_dots body; string_mcode rbrace])
-      | Ast0.Decl(_,decl) -> declaration decl
-      | Ast0.Seq(lbrace,body,rbrace) ->
-         multibind
-           [string_mcode lbrace; statement_dots body; string_mcode rbrace]
-      | Ast0.ExprStatement(exp,sem) ->
-         bind (expression exp) (string_mcode sem)
-      | Ast0.IfThen(iff,lp,exp,rp,branch1,_) ->
-         multibind
-           [string_mcode iff; string_mcode lp; expression exp;
-             string_mcode rp; statement branch1]
-      | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,_) ->
-         multibind
-           [string_mcode iff; string_mcode lp; expression exp;
-             string_mcode rp; statement branch1; string_mcode els;
-             statement branch2]
-      | Ast0.While(whl,lp,exp,rp,body,_) ->
-         multibind
-           [string_mcode whl; string_mcode lp; expression exp;
-             string_mcode rp; statement body]
-      | Ast0.Do(d,body,whl,lp,exp,rp,sem) ->
-         multibind
-           [string_mcode d; statement body; string_mcode whl;
-             string_mcode lp; expression exp; string_mcode rp;
-             string_mcode sem]
-      | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,_) ->
-         multibind
-           [string_mcode fr; string_mcode lp; get_option expression e1;
-             string_mcode sem1; get_option expression e2; string_mcode sem2;
-             get_option expression e3;
-             string_mcode rp; statement body]
-      | Ast0.Iterator(nm,lp,args,rp,body,_) ->
-         multibind
-           [ident nm; string_mcode lp; expression_dots args;
-             string_mcode rp; statement body]
-      |        Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-         multibind
-           [string_mcode switch; string_mcode lp; expression exp;
-             string_mcode rp; string_mcode lb; case_line_dots cases;
-             string_mcode rb]
-      | Ast0.Break(br,sem) -> bind (string_mcode br) (string_mcode sem)
-      | Ast0.Continue(cont,sem) -> bind (string_mcode cont) (string_mcode sem)
-      |        Ast0.Label(l,dd) -> bind (ident l) (string_mcode dd)
-      |        Ast0.Goto(goto,l,sem) ->
-         bind (string_mcode goto) (bind (ident l) (string_mcode sem))
-      | Ast0.Return(ret,sem) -> bind (string_mcode ret) (string_mcode sem)
-      | Ast0.ReturnExpr(ret,exp,sem) ->
-         multibind [string_mcode ret; expression exp; string_mcode sem]
-      | Ast0.MetaStmt(name,_) -> meta_mcode name
-      | Ast0.MetaStmtList(name,_) -> meta_mcode name
-      | Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-         (match statement_dots_list with
-           [] -> failwith "bad disjunction"
-         | x::xs ->
-             bind (string_mcode starter)
-               (bind (statement_dots x)
-                  (bind
-                     (multibind
-                        (List.map2
-                           (function mid ->
-                             function x ->
-                               bind (string_mcode mid) (statement_dots x))
-                           mids xs))
-                     (string_mcode ender))))
-      | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-         bind (string_mcode starter)
-           (bind (statement_dots stmt_dots)
-              (bind (string_mcode ender)
-                 (multibind
-                    (List.map (whencode statement_dots statement) whn))))
-      | Ast0.Exp(exp) -> expression exp
-      | Ast0.TopExp(exp) -> expression exp
-      | Ast0.Ty(ty) -> typeC ty
-      | Ast0.TopInit(init) -> initialiser init
-      | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) ->
-         bind (string_mcode d)
-           (multibind (List.map (whencode statement_dots statement) whn))
-      | Ast0.Include(inc,name) -> bind (string_mcode inc) (inc_mcode name)
-      | Ast0.Define(def,id,params,body) ->
-         multibind [string_mcode def; ident id; define_parameters params;
-                     statement_dots body]
-      | Ast0.OptStm(re) -> statement re
-      | Ast0.UniqueStm(re) -> statement re in
-    stmtfn all_functions k s
-
-  (* not parameterizable for now... *)
-  and define_parameters p =
-    let k p =
-      match Ast0.unwrap p with
-       Ast0.NoParams -> option_default
-      | Ast0.DParams(lp,params,rp) ->
-         multibind
-           [string_mcode lp; define_param_dots params; string_mcode rp] in
-    k p
-
-  and define_param_dots d =
-    let k d =
-      match Ast0.unwrap d with
-       Ast0.DOTS(l) | Ast0.CIRCLES(l) | Ast0.STARS(l) ->
-         multibind (List.map define_param l) in
-    k d
-
-  and define_param p =
-    let k p =
-      match Ast0.unwrap p with
-       Ast0.DParam(id) -> ident id
-      | Ast0.DPComma(comma) -> string_mcode comma
-      | Ast0.DPdots(d) -> string_mcode d
-      | Ast0.DPcircles(c) -> string_mcode c
-      | Ast0.OptDParam(dp) -> define_param dp
-      | Ast0.UniqueDParam(dp) -> define_param dp in
-    k p 
-
-  and fninfo = function
-      Ast0.FStorage(stg) -> storage_mcode stg
-    | Ast0.FType(ty) -> typeC ty
-    | Ast0.FInline(inline) -> string_mcode inline
-    | Ast0.FAttr(init) -> string_mcode init
-
-  and whencode notfn alwaysfn = function
-      Ast0.WhenNot a -> notfn a
-    | Ast0.WhenAlways a -> alwaysfn a
-    | Ast0.WhenModifier(_) -> option_default
-    | Ast0.WhenNotTrue(e) -> expression e
-    | Ast0.WhenNotFalse(e) -> expression e
-
-  and case_line c =
-    let k c =
-      match Ast0.unwrap c with
-       Ast0.Default(def,colon,code) ->
-         multibind [string_mcode def;string_mcode colon;statement_dots code]
-      | Ast0.Case(case,exp,colon,code) ->
-         multibind [string_mcode case;expression exp;string_mcode colon;
-                     statement_dots code]
-      |        Ast0.OptCase(case) -> case_line case in
-    casefn all_functions k c
-
-  and anything a = (* for compile_iso, not parameterisable *)
-    let k = function
-       Ast0.DotsExprTag(exprs) -> expression_dots exprs
-      | Ast0.DotsInitTag(inits) -> initialiser_dots inits
-      | Ast0.DotsParamTag(params) -> parameter_dots params
-      | Ast0.DotsStmtTag(stmts) -> statement_dots stmts
-      | Ast0.DotsDeclTag(decls) -> declaration_dots decls
-      | Ast0.DotsCaseTag(cases) -> case_line_dots cases
-      | Ast0.IdentTag(id) -> ident id
-      | Ast0.ExprTag(exp) -> expression exp
-      | Ast0.ArgExprTag(exp) -> expression exp
-      | Ast0.TestExprTag(exp) -> expression exp
-      | Ast0.TypeCTag(ty) -> typeC ty
-      | Ast0.ParamTag(param) -> parameterTypeDef param
-      | Ast0.InitTag(init) -> initialiser init
-      | Ast0.DeclTag(decl) -> declaration decl
-      | Ast0.StmtTag(stmt) -> statement stmt
-      | Ast0.CaseLineTag(c) -> case_line c
-      | Ast0.TopTag(top) -> top_level top
-      | Ast0.IsoWhenTag(_) -> option_default
-      | Ast0.IsoWhenTTag(e) -> expression e
-      | Ast0.IsoWhenFTag(e) -> expression e
-      |        Ast0.MetaPosTag(var) -> failwith "not supported" in
-    k a
-
-  and top_level t =
-    let k t =
-      match Ast0.unwrap t with
-       Ast0.FILEINFO(old_file,new_file) ->
-         bind (string_mcode old_file) (string_mcode new_file)
-      | Ast0.DECL(stmt_dots) -> statement stmt_dots
-      | Ast0.CODE(stmt_dots) -> statement_dots stmt_dots
-      | Ast0.ERRORWORDS(exps) -> multibind (List.map expression exps)
-      | Ast0.OTHER(_) -> failwith "unexpected code" in
-    topfn all_functions k t
-  and all_functions =
-    {combiner_ident = ident;
-      combiner_expression = expression;
-      combiner_typeC = typeC;
-      combiner_declaration = declaration;
-      combiner_initialiser = initialiser;
-      combiner_initialiser_list = initialiser_dots;
-      combiner_parameter = parameterTypeDef;
-      combiner_parameter_list = parameter_dots;
-      combiner_statement = statement;
-      combiner_case_line = case_line;
-      combiner_top_level = top_level;
-      combiner_expression_dots = expression_dots;
-      combiner_statement_dots = statement_dots;
-      combiner_declaration_dots = declaration_dots;
-      combiner_case_line_dots = case_line_dots;
-      combiner_anything = anything} in
-  all_functions
-
-(* --------------------------------------------------------------------- *)
-(* Generic traversal: rebuilder *)
-
-type 'a inout = 'a -> 'a (* for specifying the type of rebuilder *)
-
-type rebuilder =
-    {rebuilder_ident : Ast0.ident inout;
-      rebuilder_expression : Ast0.expression inout;
-      rebuilder_typeC : Ast0.typeC inout;
-      rebuilder_declaration : Ast0.declaration inout;
-      rebuilder_initialiser : Ast0.initialiser inout;
-      rebuilder_initialiser_list : Ast0.initialiser_list inout;
-      rebuilder_parameter : Ast0.parameterTypeDef inout;
-      rebuilder_parameter_list : Ast0.parameter_list inout;
-      rebuilder_statement : Ast0.statement inout;
-      rebuilder_case_line : Ast0.case_line inout;
-      rebuilder_top_level : Ast0.top_level inout;
-      rebuilder_expression_dots :
-       Ast0.expression Ast0.dots ->
-         Ast0.expression Ast0.dots;
-         rebuilder_statement_dots :
-           Ast0.statement Ast0.dots ->
-             Ast0.statement Ast0.dots;
-         rebuilder_declaration_dots :
-           Ast0.declaration Ast0.dots ->
-             Ast0.declaration Ast0.dots;
-         rebuilder_case_line_dots :
-           Ast0.case_line Ast0.dots ->
-             Ast0.case_line Ast0.dots;
-         rebuilder_anything :
-           Ast0.anything -> Ast0.anything}
-
-type 'mc rmcode = 'mc Ast0.mcode inout
-type 'cd rcode = rebuilder -> ('cd inout) -> 'cd inout
-
-let rebuilder = fun
-    meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
-    inc_mcode
-    dotsexprfn dotsinitfn dotsparamfn dotsstmtfn dotsdeclfn dotscasefn
-    identfn exprfn tyfn initfn paramfn declfn stmtfn casefn topfn ->
-  let get_option f = function
-      Some x -> Some (f x)
-    | None -> None in
-  let rec expression_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map expression l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map expression l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map expression l)) in
-    dotsexprfn all_functions k d
-  and initialiser_list i =
-    let k i =
-      Ast0.rewrap i
-       (match Ast0.unwrap i with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map initialiser l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map initialiser l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map initialiser l)) in
-    dotsinitfn all_functions k i
-  and parameter_list d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map parameterTypeDef l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map parameterTypeDef l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map parameterTypeDef l)) in
-    dotsparamfn all_functions k d
-  and statement_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map statement l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map statement l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map statement l)) in
-    dotsstmtfn all_functions k d
-  and declaration_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map declaration l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map declaration l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map declaration l)) in
-    dotsdeclfn all_functions k d
-  and case_line_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map case_line l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map case_line l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map case_line l)) in
-    dotscasefn all_functions k d
-  and ident i =
-    let k i =
-      Ast0.rewrap i
-       (match Ast0.unwrap i with
-         Ast0.Id(name) -> Ast0.Id(string_mcode name)
-       | Ast0.MetaId(name,constraints,pure) ->
-           Ast0.MetaId(meta_mcode name,constraints,pure)
-       | Ast0.MetaFunc(name,constraints,pure) ->
-           Ast0.MetaFunc(meta_mcode name,constraints,pure)
-       | Ast0.MetaLocalFunc(name,constraints,pure) ->
-           Ast0.MetaLocalFunc(meta_mcode name,constraints,pure)
-       | Ast0.OptIdent(id) -> Ast0.OptIdent(ident id)
-       | Ast0.UniqueIdent(id) -> Ast0.UniqueIdent(ident id)) in
-    identfn all_functions k i
-  and expression e =
-    let k e =
-      Ast0.rewrap e
-       (match Ast0.unwrap e with
-         Ast0.Ident(id) -> Ast0.Ident(ident id)
-       | Ast0.Constant(const) -> Ast0.Constant(const_mcode const)
-       | Ast0.FunCall(fn,lp,args,rp) ->
-           Ast0.FunCall(expression fn,string_mcode lp,expression_dots args,
-                        string_mcode rp)
-       | Ast0.Assignment(left,op,right,simple) ->
-           Ast0.Assignment(expression left,assign_mcode op,expression right,
-                           simple)
-       | Ast0.CondExpr(exp1,why,exp2,colon,exp3) ->
-           Ast0.CondExpr(expression exp1, string_mcode why,
-                         get_option expression exp2, string_mcode colon,
-                         expression exp3)
-       | Ast0.Postfix(exp,op) -> Ast0.Postfix(expression exp, fix_mcode op)
-       | Ast0.Infix(exp,op) -> Ast0.Infix(expression exp, fix_mcode op)
-       | Ast0.Unary(exp,op) -> Ast0.Unary(expression exp, unary_mcode op)
-       | Ast0.Binary(left,op,right) ->
-           Ast0.Binary(expression left, binary_mcode op, expression right)
-       | Ast0.Nested(left,op,right) ->
-           Ast0.Nested(expression left, binary_mcode op, expression right)
-       | Ast0.Paren(lp,exp,rp) ->
-           Ast0.Paren(string_mcode lp, expression exp, string_mcode rp)
-       | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
-           Ast0.ArrayAccess(expression exp1,string_mcode lb,expression exp2,
-                            string_mcode rb)
-       | Ast0.RecordAccess(exp,pt,field) ->
-           Ast0.RecordAccess(expression exp, string_mcode pt, ident field)
-       | Ast0.RecordPtAccess(exp,ar,field) ->
-           Ast0.RecordPtAccess(expression exp, string_mcode ar, ident field)
-       | Ast0.Cast(lp,ty,rp,exp) ->
-           Ast0.Cast(string_mcode lp, typeC ty, string_mcode rp,
-                     expression exp)
-       | Ast0.SizeOfExpr(szf,exp) ->
-           Ast0.SizeOfExpr(string_mcode szf, expression exp)
-       | Ast0.SizeOfType(szf,lp,ty,rp) ->
-           Ast0.SizeOfType(string_mcode szf,string_mcode lp, typeC ty, 
-                            string_mcode rp)
-       | Ast0.TypeExp(ty) -> Ast0.TypeExp(typeC ty)
-       | Ast0.MetaErr(name,constraints,pure) ->
-           Ast0.MetaErr(meta_mcode name,constraints,pure)
-       | Ast0.MetaExpr(name,constraints,ty,form,pure) ->
-           Ast0.MetaExpr(meta_mcode name,constraints,ty,form,pure)
-       | Ast0.MetaExprList(name,lenname,pure) ->
-           Ast0.MetaExprList(meta_mcode name,lenname,pure)
-       | Ast0.EComma(cm) -> Ast0.EComma(string_mcode cm)
-       | Ast0.DisjExpr(starter,expr_list,mids,ender) ->
-           Ast0.DisjExpr(string_mcode starter,List.map expression expr_list,
-                         List.map string_mcode mids,string_mcode ender)
-       | Ast0.NestExpr(starter,expr_dots,ender,whencode,multi) ->
-           Ast0.NestExpr(string_mcode starter,expression_dots expr_dots,
-                         string_mcode ender, get_option expression whencode,
-                         multi)
-       | Ast0.Edots(dots,whencode) ->
-           Ast0.Edots(string_mcode dots, get_option expression whencode)
-       | Ast0.Ecircles(dots,whencode) ->
-           Ast0.Ecircles(string_mcode dots, get_option expression whencode)
-       | Ast0.Estars(dots,whencode) ->
-           Ast0.Estars(string_mcode dots, get_option expression whencode)
-       | Ast0.OptExp(exp) -> Ast0.OptExp(expression exp)
-       | Ast0.UniqueExp(exp) -> Ast0.UniqueExp(expression exp)) in
-    exprfn all_functions k e
-  and typeC t =
-    let k t =
-      Ast0.rewrap t
-       (match Ast0.unwrap t with
-         Ast0.ConstVol(cv,ty) -> Ast0.ConstVol(cv_mcode cv,typeC ty)
-       | Ast0.BaseType(ty,sign) ->
-           Ast0.BaseType(base_mcode ty, get_option sign_mcode sign)
-       | Ast0.ImplicitInt(sign) -> Ast0.ImplicitInt(sign_mcode sign)
-       | Ast0.Pointer(ty,star) ->
-           Ast0.Pointer(typeC ty, string_mcode star)
-       | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
-           Ast0.FunctionPointer(typeC ty,string_mcode lp1,string_mcode star,
-                                string_mcode rp1,string_mcode lp2,
-                                parameter_list params,
-                                string_mcode rp2)
-       | Ast0.FunctionType(ty,lp1,params,rp1) ->
-           Ast0.FunctionType(get_option typeC ty,
-                             string_mcode lp1,parameter_list params,
-                             string_mcode rp1)
-       | Ast0.Array(ty,lb,size,rb) ->
-           Ast0.Array(typeC ty, string_mcode lb,
-                      get_option expression size, string_mcode rb)
-       | Ast0.StructUnionName(kind,name) ->
-           Ast0.StructUnionName (struct_mcode kind, get_option ident name)
-       | Ast0.StructUnionDef(ty,lb,decls,rb) ->
-           Ast0.StructUnionDef (typeC ty,
-                                string_mcode lb, declaration_dots decls,
-                                string_mcode rb)
-       | Ast0.TypeName(name) -> Ast0.TypeName(string_mcode name)
-       | Ast0.MetaType(name,pure) ->
-           Ast0.MetaType(meta_mcode name,pure)
-       | Ast0.DisjType(starter,types,mids,ender) ->
-           Ast0.DisjType(string_mcode starter,List.map typeC types,
-                         List.map string_mcode mids,string_mcode ender)
-       | Ast0.OptType(ty) -> Ast0.OptType(typeC ty)
-       | Ast0.UniqueType(ty) -> Ast0.UniqueType(typeC ty)) in
-    tyfn all_functions k t
-  and declaration d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.Init(stg,ty,id,eq,ini,sem) ->
-           Ast0.Init(get_option storage_mcode stg,
-                     typeC ty, ident id, string_mcode eq, initialiser ini,
-                     string_mcode sem)
-       | Ast0.UnInit(stg,ty,id,sem) ->
-           Ast0.UnInit(get_option storage_mcode stg,
-                       typeC ty, ident id, string_mcode sem)
-       | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-           Ast0.MacroDecl(ident name,string_mcode lp,
-                          expression_dots args,
-                          string_mcode rp,string_mcode sem)
-       | Ast0.TyDecl(ty,sem) -> Ast0.TyDecl(typeC ty, string_mcode sem)
-       | Ast0.Typedef(stg,ty,id,sem) ->
-           Ast0.Typedef(string_mcode stg, typeC ty, typeC id,
-                        string_mcode sem)
-       | Ast0.DisjDecl(starter,decls,mids,ender) ->
-           Ast0.DisjDecl(string_mcode starter,List.map declaration decls,
-                         List.map string_mcode mids,string_mcode ender)
-       | Ast0.Ddots(dots,whencode) ->
-           Ast0.Ddots(string_mcode dots, get_option declaration whencode)
-       | Ast0.OptDecl(decl) -> Ast0.OptDecl(declaration decl)
-       | Ast0.UniqueDecl(decl) -> Ast0.UniqueDecl(declaration decl)) in
-    declfn all_functions k d
-  and initialiser i =
-    let k i =
-      Ast0.rewrap i
-       (match Ast0.unwrap i with
-         Ast0.InitExpr(exp) -> Ast0.InitExpr(expression exp)
-       | Ast0.InitList(lb,initlist,rb) ->
-           Ast0.InitList(string_mcode lb, initialiser_list initlist,
-                         string_mcode rb)
-       | Ast0.InitGccDotName(dot,name,eq,ini) ->
-           Ast0.InitGccDotName
-             (string_mcode dot, ident name, string_mcode eq, initialiser ini)
-       | Ast0.InitGccName(name,eq,ini) ->
-           Ast0.InitGccName(ident name, string_mcode eq, initialiser ini)
-       | Ast0.InitGccIndex(lb,exp,rb,eq,ini) ->
-           Ast0.InitGccIndex
-             (string_mcode lb, expression exp, string_mcode rb,
-              string_mcode eq, initialiser ini)
-       | Ast0.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini) ->
-           Ast0.InitGccRange
-             (string_mcode lb, expression exp1, string_mcode dots,
-              expression exp2, string_mcode rb, string_mcode eq,
-              initialiser ini)
-       | Ast0.IComma(cm) -> Ast0.IComma(string_mcode cm)
-       | Ast0.Idots(d,whencode) ->
-           Ast0.Idots(string_mcode d, get_option initialiser whencode)
-       | Ast0.OptIni(i) -> Ast0.OptIni(initialiser i)
-       | Ast0.UniqueIni(i) -> Ast0.UniqueIni(initialiser i)) in
-    initfn all_functions k i
-  and parameterTypeDef p =
-    let k p =
-      Ast0.rewrap p
-       (match Ast0.unwrap p with
-         Ast0.VoidParam(ty) -> Ast0.VoidParam(typeC ty)
-       | Ast0.Param(ty,id) -> Ast0.Param(typeC ty, get_option ident id)
-       | Ast0.MetaParam(name,pure) ->
-           Ast0.MetaParam(meta_mcode name,pure)
-       | Ast0.MetaParamList(name,lenname,pure) ->
-           Ast0.MetaParamList(meta_mcode name,lenname,pure)
-       | Ast0.PComma(cm) -> Ast0.PComma(string_mcode cm)
-       | Ast0.Pdots(dots) -> Ast0.Pdots(string_mcode dots)
-       | Ast0.Pcircles(dots) -> Ast0.Pcircles(string_mcode dots)
-       | Ast0.OptParam(param) -> Ast0.OptParam(parameterTypeDef param)
-       | Ast0.UniqueParam(param) ->
-           Ast0.UniqueParam(parameterTypeDef param)) in
-    paramfn all_functions k p
-  (* not done for combiner, because the statement is assumed to be already
-     represented elsewhere in the code *)
-  and process_bef_aft s =
-    Ast0.set_dots_bef_aft s
-      (match Ast0.get_dots_bef_aft s with
-       Ast0.NoDots -> Ast0.NoDots
-      | Ast0.DroppingBetweenDots(stm) ->
-         Ast0.DroppingBetweenDots(statement stm)
-      | Ast0.AddingBetweenDots(stm) ->
-         Ast0.AddingBetweenDots(statement stm))
-
-  and statement s =
-    let k s =
-      Ast0.rewrap s
-       (match Ast0.unwrap s with
-         Ast0.FunDecl(bef,fi,name,lp,params,rp,lbrace,body,rbrace) ->
-           Ast0.FunDecl(bef,List.map fninfo fi, ident name,
-                        string_mcode lp, parameter_list params,
-                        string_mcode rp, string_mcode lbrace,
-                        statement_dots body, string_mcode rbrace)
-       | Ast0.Decl(bef,decl) -> Ast0.Decl(bef,declaration decl)
-       | Ast0.Seq(lbrace,body,rbrace) ->
-           Ast0.Seq(string_mcode lbrace, statement_dots body,
-                    string_mcode rbrace)
-       | Ast0.ExprStatement(exp,sem) ->
-           Ast0.ExprStatement(expression exp, string_mcode sem)
-       | Ast0.IfThen(iff,lp,exp,rp,branch1,aft) ->
-           Ast0.IfThen(string_mcode iff, string_mcode lp, expression exp,
-             string_mcode rp, statement branch1,aft)
-       | Ast0.IfThenElse(iff,lp,exp,rp,branch1,els,branch2,aft) ->
-           Ast0.IfThenElse(string_mcode iff,string_mcode lp,expression exp,
-             string_mcode rp, statement branch1, string_mcode els,
-             statement branch2,aft)
-       | Ast0.While(whl,lp,exp,rp,body,aft) ->
-           Ast0.While(string_mcode whl, string_mcode lp, expression exp,
-                      string_mcode rp, statement body, aft)
-       | Ast0.Do(d,body,whl,lp,exp,rp,sem) ->
-           Ast0.Do(string_mcode d, statement body, string_mcode whl,
-                   string_mcode lp, expression exp, string_mcode rp,
-                   string_mcode sem)
-       | Ast0.For(fr,lp,e1,sem1,e2,sem2,e3,rp,body,aft) ->
-           Ast0.For(string_mcode fr, string_mcode lp,
-                    get_option expression e1, string_mcode sem1,
-                    get_option expression e2, string_mcode sem2,
-                    get_option expression e3,
-                    string_mcode rp, statement body, aft)
-       | Ast0.Iterator(nm,lp,args,rp,body,aft) ->
-           Ast0.Iterator(ident nm, string_mcode lp,
-                         expression_dots args,
-                         string_mcode rp, statement body, aft)
-       | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
-           Ast0.Switch(string_mcode switch,string_mcode lp,expression exp,
-                       string_mcode rp,string_mcode lb,
-                       case_line_dots cases, string_mcode rb)
-       | Ast0.Break(br,sem) ->
-           Ast0.Break(string_mcode br,string_mcode sem)
-       | Ast0.Continue(cont,sem) ->
-           Ast0.Continue(string_mcode cont,string_mcode sem)
-       | Ast0.Label(l,dd) -> Ast0.Label(ident l,string_mcode dd)
-       | Ast0.Goto(goto,l,sem) ->
-           Ast0.Goto(string_mcode goto,ident l,string_mcode sem)
-       | Ast0.Return(ret,sem) ->
-           Ast0.Return(string_mcode ret,string_mcode sem)
-       | Ast0.ReturnExpr(ret,exp,sem) ->
-           Ast0.ReturnExpr(string_mcode ret,expression exp,string_mcode sem)
-       | Ast0.MetaStmt(name,pure) ->
-           Ast0.MetaStmt(meta_mcode name,pure)
-       | Ast0.MetaStmtList(name,pure) ->
-           Ast0.MetaStmtList(meta_mcode name,pure)
-       | Ast0.Disj(starter,statement_dots_list,mids,ender) ->
-           Ast0.Disj(string_mcode starter,
-                     List.map statement_dots statement_dots_list,
-                     List.map string_mcode mids,
-                     string_mcode ender)
-       | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
-           Ast0.Nest(string_mcode starter,statement_dots stmt_dots,
-                     string_mcode ender,
-                     List.map (whencode statement_dots statement) whn,
-                     multi)
-       | Ast0.Exp(exp) -> Ast0.Exp(expression exp)
-       | Ast0.TopExp(exp) -> Ast0.TopExp(expression exp)
-       | Ast0.Ty(ty) -> Ast0.Ty(typeC ty)
-       | Ast0.TopInit(init) -> Ast0.TopInit(initialiser init)
-       | Ast0.Dots(d,whn) ->
-           Ast0.Dots(string_mcode d,
-                     List.map (whencode statement_dots statement) whn)
-       | Ast0.Circles(d,whn) ->
-           Ast0.Circles(string_mcode d,
-                        List.map (whencode statement_dots statement) whn)
-       | Ast0.Stars(d,whn) ->
-           Ast0.Stars(string_mcode d,
-                      List.map (whencode statement_dots statement) whn)
-       | Ast0.Include(inc,name) ->
-           Ast0.Include(string_mcode inc,inc_mcode name)
-       | Ast0.Define(def,id,params,body) ->
-           Ast0.Define(string_mcode def,ident id,
-                       define_parameters params,
-                       statement_dots body)
-       | Ast0.OptStm(re) -> Ast0.OptStm(statement re)
-       | Ast0.UniqueStm(re) -> Ast0.UniqueStm(statement re)) in
-    let s = stmtfn all_functions k s in
-    process_bef_aft s
-
-  (* not parameterizable for now... *)
-  and define_parameters p =
-    let k p =
-      Ast0.rewrap p
-       (match Ast0.unwrap p with
-         Ast0.NoParams -> Ast0.NoParams
-       | Ast0.DParams(lp,params,rp) ->
-           Ast0.DParams(string_mcode lp,define_param_dots params,
-                        string_mcode rp))in
-    k p
-
-  and define_param_dots d =
-    let k d =
-      Ast0.rewrap d
-       (match Ast0.unwrap d with
-         Ast0.DOTS(l) -> Ast0.DOTS(List.map define_param l)
-       | Ast0.CIRCLES(l) -> Ast0.CIRCLES(List.map define_param l)
-       | Ast0.STARS(l) -> Ast0.STARS(List.map define_param l)) in
-    k d
-
-  and define_param p =
-    let k p =
-      Ast0.rewrap p
-       (match Ast0.unwrap p with
-         Ast0.DParam(id) -> Ast0.DParam(ident id)
-       | Ast0.DPComma(comma) -> Ast0.DPComma(string_mcode comma)
-       | Ast0.DPdots(d) -> Ast0.DPdots(string_mcode d)
-       | Ast0.DPcircles(c) -> Ast0.DPcircles(string_mcode c)
-       | Ast0.OptDParam(dp) -> Ast0.OptDParam(define_param dp)
-       | Ast0.UniqueDParam(dp) -> Ast0.UniqueDParam(define_param dp)) in
-    k p
-
-  and fninfo = function
-      Ast0.FStorage(stg) -> Ast0.FStorage(storage_mcode stg)
-    | Ast0.FType(ty) -> Ast0.FType(typeC ty)
-    | Ast0.FInline(inline) -> Ast0.FInline(string_mcode inline)
-    | Ast0.FAttr(init) -> Ast0.FAttr(string_mcode init)
-
-  and whencode notfn alwaysfn = function
-      Ast0.WhenNot a -> Ast0.WhenNot (notfn a)
-    | Ast0.WhenAlways a -> Ast0.WhenAlways (alwaysfn a)
-    | Ast0.WhenModifier(x) -> Ast0.WhenModifier(x)
-    | Ast0.WhenNotTrue(e) -> Ast0.WhenNotTrue(expression e)
-    | Ast0.WhenNotFalse(e) -> Ast0.WhenNotFalse(expression e)
-
-  and case_line c =
-    let k c =
-      Ast0.rewrap c
-       (match Ast0.unwrap c with
-         Ast0.Default(def,colon,code) ->
-           Ast0.Default(string_mcode def,string_mcode colon,
-                        statement_dots code)
-       | Ast0.Case(case,exp,colon,code) ->
-           Ast0.Case(string_mcode case,expression exp,string_mcode colon,
-                     statement_dots code)
-       | Ast0.OptCase(case) -> Ast0.OptCase(case_line case)) in
-    casefn all_functions k c
-
-  and top_level t =
-    let k t =
-      Ast0.rewrap t
-       (match Ast0.unwrap t with
-         Ast0.FILEINFO(old_file,new_file) ->
-           Ast0.FILEINFO(string_mcode old_file, string_mcode new_file)
-       | Ast0.DECL(statement_dots) ->
-           Ast0.DECL(statement statement_dots)
-       | Ast0.CODE(stmt_dots) -> Ast0.CODE(statement_dots stmt_dots)
-       | Ast0.ERRORWORDS(exps) -> Ast0.ERRORWORDS(List.map expression exps)
-       | Ast0.OTHER(_) -> failwith "unexpected code") in
-    topfn all_functions k t
-
-  and anything a = (* for compile_iso, not parameterisable *)
-    let k = function
-       Ast0.DotsExprTag(exprs) -> Ast0.DotsExprTag(expression_dots exprs)
-      | Ast0.DotsInitTag(inits) -> Ast0.DotsInitTag(initialiser_list inits)
-      | Ast0.DotsParamTag(params) -> Ast0.DotsParamTag(parameter_list params)
-      | Ast0.DotsStmtTag(stmts) -> Ast0.DotsStmtTag(statement_dots stmts)
-      | Ast0.DotsDeclTag(decls) -> Ast0.DotsDeclTag(declaration_dots decls)
-      | Ast0.DotsCaseTag(cases) -> Ast0.DotsCaseTag(case_line_dots cases)
-      | Ast0.IdentTag(id) -> Ast0.IdentTag(ident id)
-      | Ast0.ExprTag(exp) -> Ast0.ExprTag(expression exp)
-      | Ast0.ArgExprTag(exp) -> Ast0.ArgExprTag(expression exp)
-      | Ast0.TestExprTag(exp) -> Ast0.TestExprTag(expression exp)
-      | Ast0.TypeCTag(ty) -> Ast0.TypeCTag(typeC ty)
-      | Ast0.ParamTag(param) -> Ast0.ParamTag(parameterTypeDef param)
-      | Ast0.InitTag(init) -> Ast0.InitTag(initialiser init)
-      | Ast0.DeclTag(decl) -> Ast0.DeclTag(declaration decl)
-      | Ast0.StmtTag(stmt) -> Ast0.StmtTag(statement stmt)
-      | Ast0.CaseLineTag(c) -> Ast0.CaseLineTag(case_line c)
-      | Ast0.TopTag(top) -> Ast0.TopTag(top_level top)
-      | Ast0.IsoWhenTag(x) -> Ast0.IsoWhenTag(x)
-      | Ast0.IsoWhenTTag(e) -> Ast0.IsoWhenTTag(expression e)
-      | Ast0.IsoWhenFTag(e) -> Ast0.IsoWhenFTag(expression e)
-      |        Ast0.MetaPosTag(var) -> failwith "not supported" in
-    k a
-
-  (* not done for combiner, because the statement is assumed to be already
-     represented elsewhere in the code *)
-
-  and all_functions =
-    {rebuilder_ident = ident;
-      rebuilder_expression = expression;
-      rebuilder_typeC = typeC;
-      rebuilder_declaration = declaration;
-      rebuilder_initialiser = initialiser;
-      rebuilder_initialiser_list = initialiser_list;
-      rebuilder_parameter = parameterTypeDef;
-      rebuilder_parameter_list = parameter_list;
-      rebuilder_statement = statement;
-      rebuilder_case_line = case_line;
-      rebuilder_top_level = top_level;
-      rebuilder_expression_dots = expression_dots;
-      rebuilder_statement_dots = statement_dots;
-      rebuilder_declaration_dots = declaration_dots;
-      rebuilder_case_line_dots = case_line_dots;
-      rebuilder_anything = anything} in
-  all_functions
diff --git a/parsing_cocci/.cvsignore b/parsing_cocci/.cvsignore
deleted file mode 100644 (file)
index ec28187..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.depend
-*.cma
-lexer_cocci.ml
-lexer_script.ml
-parser_cocci_menhir.ml
-parser_cocci_menhir.mli
index d02e5f9..f39c46e 100644 (file)
@@ -5,7 +5,7 @@ ast_cocci.cmi: type_cocci.cmi
 check_meta.cmi: ast_cocci.cmi ast0_cocci.cmi 
 comm_assoc.cmi: ast0_cocci.cmi 
 compute_lines.cmi: ast0_cocci.cmi 
-context_neg.cmi: ../commons/common.cmi ast0_cocci.cmi 
+context_neg.cmi: ast0_cocci.cmi 
 data.cmi: type_cocci.cmi ast_cocci.cmi ast0_cocci.cmi 
 disjdistr.cmi: ast_cocci.cmi 
 free_vars.cmi: ast_cocci.cmi 
@@ -18,8 +18,7 @@ iso_compile.cmi: iso_pattern.cmi
 iso_pattern.cmi: visitor_ast0.cmi ast_cocci.cmi ast0_cocci.cmi 
 merge.cmi: ast_cocci.cmi ast0_cocci.cmi 
 parse_cocci.cmi: ast_cocci.cmi 
-parser_cocci_menhir.cmi: parse_aux.cmo data.cmi ../commons/common.cmi \
-    ast_cocci.cmi ast0_cocci.cmi 
+parser_cocci_menhir.cmi: parse_aux.cmo data.cmi ast_cocci.cmi ast0_cocci.cmi 
 plus.cmi: ast_cocci.cmi 
 pretty_print_cocci.cmi: ast_cocci.cmi 
 simple_assignments.cmi: ast0_cocci.cmi 
@@ -34,124 +33,110 @@ visitor_ast.cmi: ast_cocci.cmi
 visitor_ast0.cmi: ast_cocci.cmi ast0_cocci.cmi 
 arity.cmo: ast_cocci.cmi ast0_cocci.cmi arity.cmi 
 arity.cmx: ast_cocci.cmx ast0_cocci.cmx arity.cmi 
-ast0_cocci.cmo: type_cocci.cmi ../globals/flag.cmo ast_cocci.cmi \
-    ast0_cocci.cmi 
-ast0_cocci.cmx: type_cocci.cmx ../globals/flag.cmx ast_cocci.cmx \
-    ast0_cocci.cmi 
-ast0toast.cmo: visitor_ast0.cmi visitor_ast.cmi type_cocci.cmi \
-    ../globals/flag.cmo ast_cocci.cmi ast0_cocci.cmi ast0toast.cmi 
-ast0toast.cmx: visitor_ast0.cmx visitor_ast.cmx type_cocci.cmx \
-    ../globals/flag.cmx ast_cocci.cmx ast0_cocci.cmx ast0toast.cmi 
-ast_cocci.cmo: type_cocci.cmi ../commons/common.cmi ast_cocci.cmi 
-ast_cocci.cmx: type_cocci.cmx ../commons/common.cmx ast_cocci.cmi 
-check_meta.cmo: visitor_ast0.cmi type_cocci.cmi ../commons/common.cmi \
-    ast_cocci.cmi ast0_cocci.cmi check_meta.cmi 
-check_meta.cmx: visitor_ast0.cmx type_cocci.cmx ../commons/common.cmx \
-    ast_cocci.cmx ast0_cocci.cmx check_meta.cmi 
-comm_assoc.cmo: visitor_ast0.cmi unparse_ast0.cmi ../globals/flag.cmo \
-    ast_cocci.cmi ast0_cocci.cmi comm_assoc.cmi 
-comm_assoc.cmx: visitor_ast0.cmx unparse_ast0.cmx ../globals/flag.cmx \
-    ast_cocci.cmx ast0_cocci.cmx comm_assoc.cmi 
+ast0_cocci.cmo: type_cocci.cmi ast_cocci.cmi ast0_cocci.cmi 
+ast0_cocci.cmx: type_cocci.cmx ast_cocci.cmx ast0_cocci.cmi 
+ast0toast.cmo: visitor_ast0.cmi visitor_ast.cmi type_cocci.cmi ast_cocci.cmi \
+    ast0_cocci.cmi ast0toast.cmi 
+ast0toast.cmx: visitor_ast0.cmx visitor_ast.cmx type_cocci.cmx ast_cocci.cmx \
+    ast0_cocci.cmx ast0toast.cmi 
+ast_cocci.cmo: type_cocci.cmi ast_cocci.cmi 
+ast_cocci.cmx: type_cocci.cmx ast_cocci.cmi 
+check_meta.cmo: visitor_ast0.cmi type_cocci.cmi ast_cocci.cmi ast0_cocci.cmi \
+    check_meta.cmi 
+check_meta.cmx: visitor_ast0.cmx type_cocci.cmx ast_cocci.cmx ast0_cocci.cmx \
+    check_meta.cmi 
+comm_assoc.cmo: visitor_ast0.cmi unparse_ast0.cmi ast_cocci.cmi \
+    ast0_cocci.cmi comm_assoc.cmi 
+comm_assoc.cmx: visitor_ast0.cmx unparse_ast0.cmx ast_cocci.cmx \
+    ast0_cocci.cmx comm_assoc.cmi 
 compute_lines.cmo: ast_cocci.cmi ast0_cocci.cmi compute_lines.cmi 
 compute_lines.cmx: ast_cocci.cmx ast0_cocci.cmx compute_lines.cmi 
 context_neg.cmo: visitor_ast0.cmi unparse_ast0.cmi index.cmi \
-    ../globals/flag.cmo compute_lines.cmi ../commons/common.cmi ast_cocci.cmi \
-    ast0_cocci.cmi context_neg.cmi 
+    compute_lines.cmi ast_cocci.cmi ast0_cocci.cmi context_neg.cmi 
 context_neg.cmx: visitor_ast0.cmx unparse_ast0.cmx index.cmx \
-    ../globals/flag.cmx compute_lines.cmx ../commons/common.cmx ast_cocci.cmx \
-    ast0_cocci.cmx context_neg.cmi 
+    compute_lines.cmx ast_cocci.cmx ast0_cocci.cmx context_neg.cmi 
 data.cmo: type_cocci.cmi ast_cocci.cmi ast0_cocci.cmi data.cmi 
 data.cmx: type_cocci.cmx ast_cocci.cmx ast0_cocci.cmx data.cmi 
-disjdistr.cmo: visitor_ast.cmi ../globals/flag.cmo ../commons/common.cmi \
-    ast_cocci.cmi disjdistr.cmi 
-disjdistr.cmx: visitor_ast.cmx ../globals/flag.cmx ../commons/common.cmx \
-    ast_cocci.cmx disjdistr.cmi 
-free_vars.cmo: visitor_ast.cmi type_cocci.cmi ../commons/common.cmi \
-    ast_cocci.cmi free_vars.cmi 
-free_vars.cmx: visitor_ast.cmx type_cocci.cmx ../commons/common.cmx \
-    ast_cocci.cmx free_vars.cmi 
+disjdistr.cmo: visitor_ast.cmi ast_cocci.cmi disjdistr.cmi 
+disjdistr.cmx: visitor_ast.cmx ast_cocci.cmx disjdistr.cmi 
+free_vars.cmo: visitor_ast.cmi type_cocci.cmi ast_cocci.cmi free_vars.cmi 
+free_vars.cmx: visitor_ast.cmx type_cocci.cmx ast_cocci.cmx free_vars.cmi 
 function_prototypes.cmo: visitor_ast0.cmi iso_pattern.cmi insert_plus.cmi \
     context_neg.cmi compute_lines.cmi ast_cocci.cmi ast0toast.cmi \
     ast0_cocci.cmi function_prototypes.cmi 
 function_prototypes.cmx: visitor_ast0.cmx iso_pattern.cmx insert_plus.cmx \
     context_neg.cmx compute_lines.cmx ast_cocci.cmx ast0toast.cmx \
     ast0_cocci.cmx function_prototypes.cmi 
-get_constants.cmo: visitor_ast.cmi type_cocci.cmi ../globals/flag.cmo \
-    ../commons/common.cmi ast_cocci.cmi get_constants.cmi 
-get_constants.cmx: visitor_ast.cmx type_cocci.cmx ../globals/flag.cmx \
-    ../commons/common.cmx ast_cocci.cmx get_constants.cmi 
-get_constants2.cmo: visitor_ast.cmi type_cocci.cmi ../globals/flag.cmo \
-    ../commons/common.cmi ast_cocci.cmi get_constants2.cmi 
-get_constants2.cmx: visitor_ast.cmx type_cocci.cmx ../globals/flag.cmx \
-    ../commons/common.cmx ast_cocci.cmx get_constants2.cmi 
+get_constants.cmo: visitor_ast.cmi type_cocci.cmi ast_cocci.cmi \
+    get_constants.cmi 
+get_constants.cmx: visitor_ast.cmx type_cocci.cmx ast_cocci.cmx \
+    get_constants.cmi 
+get_constants2.cmo: visitor_ast.cmi type_cocci.cmi ast_cocci.cmi \
+    get_constants2.cmi 
+get_constants2.cmx: visitor_ast.cmx type_cocci.cmx ast_cocci.cmx \
+    get_constants2.cmi 
 index.cmo: ast_cocci.cmi ast0_cocci.cmi index.cmi 
 index.cmx: ast_cocci.cmx ast0_cocci.cmx index.cmi 
 insert_plus.cmo: visitor_ast0.cmi pretty_print_cocci.cmi context_neg.cmi \
     ast_cocci.cmi ast0toast.cmi ast0_cocci.cmi insert_plus.cmi 
 insert_plus.cmx: visitor_ast0.cmx pretty_print_cocci.cmx context_neg.cmx \
     ast_cocci.cmx ast0toast.cmx ast0_cocci.cmx insert_plus.cmi 
-iso_compile.cmo: visitor_ast0.cmi ../commons/common.cmi ast_cocci.cmi \
-    ast0_cocci.cmi iso_compile.cmi 
-iso_compile.cmx: visitor_ast0.cmx ../commons/common.cmx ast_cocci.cmx \
-    ast0_cocci.cmx iso_compile.cmi 
+iso_compile.cmo: visitor_ast0.cmi ast_cocci.cmi ast0_cocci.cmi \
+    iso_compile.cmi 
+iso_compile.cmx: visitor_ast0.cmx ast_cocci.cmx ast0_cocci.cmx \
+    iso_compile.cmi 
 iso_pattern.cmo: visitor_ast0.cmi unparse_ast0.cmi type_cocci.cmi \
-    flag_parsing_cocci.cmo ../globals/flag.cmo \
-    ../commons/ocamlextra/dumper.cmi compute_lines.cmi ../commons/common.cmi \
-    ast_cocci.cmi ast0_cocci.cmi iso_pattern.cmi 
+    flag_parsing_cocci.cmo compute_lines.cmi ast_cocci.cmi ast0_cocci.cmi \
+    iso_pattern.cmi 
 iso_pattern.cmx: visitor_ast0.cmx unparse_ast0.cmx type_cocci.cmx \
-    flag_parsing_cocci.cmx ../globals/flag.cmx \
-    ../commons/ocamlextra/dumper.cmx compute_lines.cmx ../commons/common.cmx \
-    ast_cocci.cmx ast0_cocci.cmx iso_pattern.cmi 
-lexer_cocci.cmo: parser_cocci_menhir.cmi parse_aux.cmo ../globals/flag.cmo \
-    data.cmi ../commons/common.cmi ast_cocci.cmi ast0_cocci.cmi 
-lexer_cocci.cmx: parser_cocci_menhir.cmx parse_aux.cmx ../globals/flag.cmx \
-    data.cmx ../commons/common.cmx ast_cocci.cmx ast0_cocci.cmx 
+    flag_parsing_cocci.cmx compute_lines.cmx ast_cocci.cmx ast0_cocci.cmx \
+    iso_pattern.cmi 
+lexer_cocci.cmo: parser_cocci_menhir.cmi parse_aux.cmo data.cmi ast_cocci.cmi \
+    ast0_cocci.cmi 
+lexer_cocci.cmx: parser_cocci_menhir.cmx parse_aux.cmx data.cmx ast_cocci.cmx \
+    ast0_cocci.cmx 
 lexer_script.cmo: parser_cocci_menhir.cmi data.cmi ast_cocci.cmi 
 lexer_script.cmx: parser_cocci_menhir.cmx data.cmx ast_cocci.cmx 
 main.cmo: parse_cocci.cmi 
 main.cmx: parse_cocci.cmx 
 merge.cmo: visitor_ast0.cmi ast_cocci.cmi ast0_cocci.cmi merge.cmi 
 merge.cmx: visitor_ast0.cmx ast_cocci.cmx ast0_cocci.cmx merge.cmi 
-parse_aux.cmo: type_cocci.cmi semantic_cocci.cmo data.cmi \
-    ../commons/common.cmi ast_cocci.cmi ast0_cocci.cmi 
-parse_aux.cmx: type_cocci.cmx semantic_cocci.cmx data.cmx \
-    ../commons/common.cmx ast_cocci.cmx ast0_cocci.cmx 
+parse_aux.cmo: type_cocci.cmi semantic_cocci.cmo data.cmi ast_cocci.cmi \
+    ast0_cocci.cmi 
+parse_aux.cmx: type_cocci.cmx semantic_cocci.cmx data.cmx ast_cocci.cmx \
+    ast0_cocci.cmx 
 parse_cocci.cmo: visitor_ast0.cmi unitary_ast0.cmi type_infer.cmi \
     test_exps.cmi single_statement.cmi simple_assignments.cmi \
     semantic_cocci.cmo pretty_print_cocci.cmi parser_cocci_menhir.cmi \
     parse_aux.cmo lexer_script.cmo lexer_cocci.cmo iso_pattern.cmi \
     iso_compile.cmi insert_plus.cmi get_constants2.cmi get_constants.cmi \
     function_prototypes.cmi free_vars.cmi flag_parsing_cocci.cmo \
-    ../globals/flag.cmo disjdistr.cmi data.cmi context_neg.cmi \
-    ../globals/config.cmo compute_lines.cmi ../commons/common.cmi \
-    comm_assoc.cmi check_meta.cmi ast_cocci.cmi ast0toast.cmi ast0_cocci.cmi \
-    arity.cmi parse_cocci.cmi 
+    disjdistr.cmi data.cmi context_neg.cmi compute_lines.cmi comm_assoc.cmi \
+    check_meta.cmi ast_cocci.cmi ast0toast.cmi ast0_cocci.cmi arity.cmi \
+    parse_cocci.cmi 
 parse_cocci.cmx: visitor_ast0.cmx unitary_ast0.cmx type_infer.cmx \
     test_exps.cmx single_statement.cmx simple_assignments.cmx \
     semantic_cocci.cmx pretty_print_cocci.cmx parser_cocci_menhir.cmx \
     parse_aux.cmx lexer_script.cmx lexer_cocci.cmx iso_pattern.cmx \
     iso_compile.cmx insert_plus.cmx get_constants2.cmx get_constants.cmx \
     function_prototypes.cmx free_vars.cmx flag_parsing_cocci.cmx \
-    ../globals/flag.cmx disjdistr.cmx data.cmx context_neg.cmx \
-    ../globals/config.cmx compute_lines.cmx ../commons/common.cmx \
-    comm_assoc.cmx check_meta.cmx ast_cocci.cmx ast0toast.cmx ast0_cocci.cmx \
-    arity.cmx parse_cocci.cmi 
+    disjdistr.cmx data.cmx context_neg.cmx compute_lines.cmx comm_assoc.cmx \
+    check_meta.cmx ast_cocci.cmx ast0toast.cmx ast0_cocci.cmx arity.cmx \
+    parse_cocci.cmi 
 parser_cocci_menhir.cmo: type_cocci.cmi top_level.cmi semantic_cocci.cmo \
-    parse_aux.cmo data.cmi ../commons/common.cmi ast_cocci.cmi ast0_cocci.cmi \
+    parse_aux.cmo data.cmi ast_cocci.cmi ast0_cocci.cmi \
     parser_cocci_menhir.cmi 
 parser_cocci_menhir.cmx: type_cocci.cmx top_level.cmx semantic_cocci.cmx \
-    parse_aux.cmx data.cmx ../commons/common.cmx ast_cocci.cmx ast0_cocci.cmx \
+    parse_aux.cmx data.cmx ast_cocci.cmx ast0_cocci.cmx \
     parser_cocci_menhir.cmi 
 plus.cmo: visitor_ast.cmi ast_cocci.cmi plus.cmi 
 plus.cmx: visitor_ast.cmx ast_cocci.cmx plus.cmi 
-pretty_print_cocci.cmo: type_cocci.cmi ../globals/flag.cmo \
-    ../commons/common.cmi ast_cocci.cmi pretty_print_cocci.cmi 
-pretty_print_cocci.cmx: type_cocci.cmx ../globals/flag.cmx \
-    ../commons/common.cmx ast_cocci.cmx pretty_print_cocci.cmi 
-simple_assignments.cmo: visitor_ast0.cmi ../globals/flag.cmo \
-    ../commons/common.cmi ast_cocci.cmi ast0_cocci.cmi simple_assignments.cmi 
-simple_assignments.cmx: visitor_ast0.cmx ../globals/flag.cmx \
-    ../commons/common.cmx ast_cocci.cmx ast0_cocci.cmx simple_assignments.cmi 
+pretty_print_cocci.cmo: type_cocci.cmi ast_cocci.cmi pretty_print_cocci.cmi 
+pretty_print_cocci.cmx: type_cocci.cmx ast_cocci.cmx pretty_print_cocci.cmi 
+simple_assignments.cmo: visitor_ast0.cmi ast_cocci.cmi ast0_cocci.cmi \
+    simple_assignments.cmi 
+simple_assignments.cmx: visitor_ast0.cmx ast_cocci.cmx ast0_cocci.cmx \
+    simple_assignments.cmi 
 single_statement.cmo: visitor_ast0.cmi iso_pattern.cmi flag_parsing_cocci.cmo \
     compute_lines.cmi ast_cocci.cmi ast0_cocci.cmi single_statement.cmi 
 single_statement.cmx: visitor_ast0.cmx iso_pattern.cmx flag_parsing_cocci.cmx \
@@ -168,14 +153,14 @@ type_infer.cmx: visitor_ast0.cmx type_cocci.cmx ast_cocci.cmx ast0_cocci.cmx \
     type_infer.cmi 
 unify_ast.cmo: visitor_ast.cmi ast_cocci.cmi unify_ast.cmi 
 unify_ast.cmx: visitor_ast.cmx ast_cocci.cmx unify_ast.cmi 
-unitary_ast0.cmo: visitor_ast0.cmi ../globals/flag.cmo ast_cocci.cmi \
-    ast0_cocci.cmi unitary_ast0.cmi 
-unitary_ast0.cmx: visitor_ast0.cmx ../globals/flag.cmx ast_cocci.cmx \
-    ast0_cocci.cmx unitary_ast0.cmi 
-unparse_ast0.cmo: type_cocci.cmi pretty_print_cocci.cmi ../commons/common.cmi \
-    ast0_cocci.cmi unparse_ast0.cmi 
-unparse_ast0.cmx: type_cocci.cmx pretty_print_cocci.cmx ../commons/common.cmx \
-    ast0_cocci.cmx unparse_ast0.cmi 
+unitary_ast0.cmo: visitor_ast0.cmi ast_cocci.cmi ast0_cocci.cmi \
+    unitary_ast0.cmi 
+unitary_ast0.cmx: visitor_ast0.cmx ast_cocci.cmx ast0_cocci.cmx \
+    unitary_ast0.cmi 
+unparse_ast0.cmo: type_cocci.cmi pretty_print_cocci.cmi ast0_cocci.cmi \
+    unparse_ast0.cmi 
+unparse_ast0.cmx: type_cocci.cmx pretty_print_cocci.cmx ast0_cocci.cmx \
+    unparse_ast0.cmi 
 visitor_ast.cmo: ast_cocci.cmi visitor_ast.cmi 
 visitor_ast.cmx: ast_cocci.cmx visitor_ast.cmi 
 visitor_ast0.cmo: ast_cocci.cmi ast0_cocci.cmi visitor_ast0.cmi 
index 027e433..f710d1e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+# Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 # This file is part of Coccinelle.
 # 
@@ -54,7 +54,7 @@ OCAMLC =ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
 OCAMLOPT = ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
 OCAMLLEX = ocamllex$(OPTBIN)
 OCAMLYACC= menhir --table
-OCAMLDEP = ocamldep$(OPTBIN) $(INCLUDES)
+OCAMLDEP = ocamldep$(OPTBIN) #$(INCLUDES)
 EXEC=$(TARGET).byte
 EXEC=$(TARGET)
 LIB=$(TARGET).cma
@@ -71,7 +71,6 @@ local: $(EXEC)
 
 all.opt: $(OPTLIB)
 
-
 $(LIB): $(GENERATED) $(OBJS)
        $(OCAMLC) -I $(MENHIR_PATH) -a -o $(LIB) $(MENHIR) $(OBJS)
 
index 75b83b6..3fb1665 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -361,23 +361,18 @@ and top_typeC tgt opt_allowed typ =
       let cv = mcode cv in
       let ty = typeC arity ty in
       make_typeC typ tgt arity (Ast0.ConstVol(cv,ty))
-  | Ast0.BaseType(ty,Some sign) ->
+  | Ast0.BaseType(ty,strings) ->
       let arity =
-       all_same opt_allowed tgt (mcode2line ty)
-         [mcode2arity ty; mcode2arity sign] in
-      let ty = mcode ty in
-      let sign = mcode sign in
-      make_typeC typ tgt arity (Ast0.BaseType(ty,Some sign))
-  | Ast0.BaseType(ty,None) ->
-      let arity =
-       all_same opt_allowed tgt (mcode2line ty) [mcode2arity ty] in
-      let ty = mcode ty in
-      make_typeC typ tgt arity (Ast0.BaseType(ty,None))
-  | Ast0.ImplicitInt(sign) ->
+       all_same opt_allowed tgt (mcode2line (List.hd strings))
+         (List.map mcode2arity strings) in
+      let strings = List.map mcode strings in
+      make_typeC typ tgt arity (Ast0.BaseType(ty,strings))
+  | Ast0.Signed(sign,ty) ->
       let arity =
        all_same opt_allowed tgt (mcode2line sign) [mcode2arity sign] in
       let sign = mcode sign in
-      make_typeC typ tgt arity (Ast0.ImplicitInt(sign))
+      let ty = get_option (typeC arity) ty in
+      make_typeC typ tgt arity (Ast0.Signed(sign,ty))
   | Ast0.Pointer(ty,star) ->
       let arity =
        all_same opt_allowed tgt (mcode2line star) [mcode2arity star] in
@@ -408,6 +403,12 @@ and top_typeC tgt opt_allowed typ =
       let size = get_option (expression arity) size in
       let rb = mcode rb in
       make_typeC typ tgt arity (Ast0.Array(ty,lb,size,rb))
+  | Ast0.EnumName(kind,name) ->
+      let arity =
+       all_same opt_allowed tgt (mcode2line kind) [mcode2arity kind] in
+      let kind = mcode kind in
+      let name = ident false arity name in
+      make_typeC typ tgt arity (Ast0.EnumName(kind,name))
   | Ast0.StructUnionName(kind,name) ->
       let arity =
        all_same opt_allowed tgt (mcode2line kind)
@@ -606,7 +607,7 @@ and parameterTypeDef tgt param =
   | Ast0.Param(ty,Some id) ->
       let ty = top_typeC tgt true ty in
       let id = ident true tgt id in
-      Ast0.rewrap param 
+      Ast0.rewrap param
        (match (Ast0.unwrap ty,Ast0.unwrap id) with
          (Ast0.OptType(ty),Ast0.OptIdent(id)) ->
            Ast0.OptParam(Ast0.rewrap param (Ast0.Param(ty,Some id)))
@@ -619,7 +620,7 @@ and parameterTypeDef tgt param =
        | _ -> Ast0.Param(ty,Some id))
   | Ast0.Param(ty,None) ->
       let ty = top_typeC tgt true ty in
-      Ast0.rewrap param 
+      Ast0.rewrap param
        (match Ast0.unwrap ty with
          Ast0.OptType(ty) ->
            Ast0.OptParam(Ast0.rewrap param (Ast0.Param(ty,None)))
@@ -665,14 +666,14 @@ and statement tgt stm =
   match Ast0.unwrap stm with
     Ast0.Decl(bef,decl) ->
       let new_decl = declaration tgt decl in
-      Ast0.rewrap stm 
+      Ast0.rewrap stm
        (match Ast0.unwrap new_decl with
          Ast0.OptDecl(decl) ->
            Ast0.OptStm(Ast0.rewrap stm (Ast0.Decl(bef,decl)))
        | Ast0.UniqueDecl(decl) ->
            Ast0.UniqueStm(Ast0.rewrap stm (Ast0.Decl(bef,decl)))
        | _ -> Ast0.Decl(bef,new_decl))
-  | Ast0.Seq(lbrace,body,rbrace) -> 
+  | Ast0.Seq(lbrace,body,rbrace) ->
       let arity =
        stm_same (mcode2line lbrace)
          [mcode2arity lbrace; mcode2arity rbrace] in
@@ -806,7 +807,7 @@ and statement tgt stm =
       make_rule_elem stm tgt arity (Ast0.MetaStmtList(name,pure))
   | Ast0.Exp(exp) ->
       let new_exp = top_expression true tgt exp in
-      Ast0.rewrap stm 
+      Ast0.rewrap stm
        (match Ast0.unwrap new_exp with
          Ast0.OptExp(exp) ->
            Ast0.OptStm(Ast0.rewrap stm (Ast0.Exp(exp)))
@@ -815,7 +816,7 @@ and statement tgt stm =
        | _ -> Ast0.Exp(new_exp))
   | Ast0.TopExp(exp) ->
       let new_exp = top_expression true tgt exp in
-      Ast0.rewrap stm 
+      Ast0.rewrap stm
        (match Ast0.unwrap new_exp with
          Ast0.OptExp(exp) ->
            Ast0.OptStm(Ast0.rewrap stm (Ast0.TopExp(exp)))
@@ -824,7 +825,7 @@ and statement tgt stm =
        | _ -> Ast0.TopExp(new_exp))
   | Ast0.Ty(ty) ->
       let new_ty = typeC tgt ty in (* opt makes no sense alone at top level *)
-      Ast0.rewrap stm 
+      Ast0.rewrap stm
        (match Ast0.unwrap new_ty with
          Ast0.OptType(ty) ->
            Ast0.OptStm(Ast0.rewrap stm (Ast0.Ty(ty)))
@@ -930,7 +931,7 @@ and statement tgt stm =
       let rbrace = mcode rbrace in
       make_rule_elem stm tgt arity
        (Ast0.FunDecl(bef,fi,name,lp,params,rp,lbrace,body,rbrace))
-  | Ast0.Include(inc,s) -> 
+  | Ast0.Include(inc,s) ->
       let arity =
        all_same true tgt (mcode2line inc) [mcode2arity inc; mcode2arity s] in
       let inc = mcode inc in
@@ -1048,7 +1049,7 @@ and case_line tgt c =
 let top_level tgt t =
   Ast0.rewrap t
     (match Ast0.unwrap t with
-      Ast0.FILEINFO(old_file,new_file) -> 
+      Ast0.FILEINFO(old_file,new_file) ->
        if mcode2arity old_file = Ast0.NONE && mcode2arity new_file = Ast0.NONE
        then Ast0.FILEINFO(mcode old_file,mcode new_file)
        else fail t "unexpected arity for file info"
index 02cb0f9..b40bb6e 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -102,7 +102,7 @@ and ident = base_ident wrap
 (* --------------------------------------------------------------------- *)
 (* Expression *)
 
-and base_expression = 
+and base_expression =
     Ident          of ident
   | Constant       of Ast.constant mcode
   | FunCall        of expression * string mcode (* ( *) *
@@ -151,10 +151,10 @@ and listlen = Ast.meta_name mcode option
 (* --------------------------------------------------------------------- *)
 (* Types *)
 
-and base_typeC = 
+and base_typeC =
     ConstVol        of Ast.const_vol mcode * typeC
-  | BaseType        of Ast.baseType mcode * Ast.sign mcode option
-  | ImplicitInt     of Ast.sign mcode
+  | BaseType        of Ast.baseType * string mcode list
+  | Signed          of Ast.sign mcode * typeC option
   | Pointer         of typeC * string mcode (* * *)
   | FunctionPointer of typeC *
                  string mcode(* ( *)*string mcode(* * *)*string mcode(* ) *)*
@@ -164,6 +164,7 @@ and base_typeC =
                        string mcode (* ) *)
   | Array           of typeC * string mcode (* [ *) *
                       expression option * string mcode (* ] *)
+  | EnumName        of string mcode (*enum*) * ident (* name *)
   | StructUnionName of Ast.structUnion mcode * ident option (* name *)
   | StructUnionDef  of typeC (* either StructUnionName or metavar *) *
        string mcode (* { *) * declaration dots * string mcode (* } *)
@@ -202,7 +203,7 @@ and declaration = base_declaration wrap
 (* Initializers *)
 
 and base_initialiser =
-    InitExpr of expression 
+    InitExpr of expression
   | InitList of string mcode (*{*) * initialiser_list * string mcode (*}*)
   | InitGccDotName of
       string mcode (*.*) * ident (* name *) * string mcode (*=*) *
@@ -375,7 +376,7 @@ and parsed_rule =
     CocciRule of
       (rule * Ast.metavar list *
         (string list * string list * Ast.dependency * string * Ast.exists)) *
-       (rule * Ast.metavar list)
+       (rule * Ast.metavar list) * Ast.ruletype
   | ScriptRule of
       string * Ast.dependency * (string * Ast.meta_name) list * string
 
@@ -510,18 +511,30 @@ let undots d =
 let rec ast0_type_to_type ty =
   match unwrap ty with
     ConstVol(cv,ty) -> Type_cocci.ConstVol(const_vol cv,ast0_type_to_type ty)
-  | BaseType(bty,None) ->
-      Type_cocci.BaseType(baseType bty,None)
-  | BaseType(bty,Some sgn) ->
-      Type_cocci.BaseType(baseType bty,Some (sign sgn))
-  | ImplicitInt(sgn) ->
-      let bty = Type_cocci.IntType in
-      Type_cocci.BaseType(bty,Some (sign sgn))
+  | BaseType(bty,strings) ->
+      Type_cocci.BaseType(baseType bty)
+  | Signed(sgn,None) ->
+      Type_cocci.SignedT(sign sgn,None)
+  | Signed(sgn,Some ty) ->
+      let bty = ast0_type_to_type ty in
+      Type_cocci.SignedT(sign sgn,Some bty)
   | Pointer(ty,_) -> Type_cocci.Pointer(ast0_type_to_type ty)
   | FunctionPointer(ty,_,_,_,_,params,_) ->
       Type_cocci.FunctionPointer(ast0_type_to_type ty)
   | FunctionType _ -> failwith "not supported"
   | Array(ety,_,_,_) -> Type_cocci.Array(ast0_type_to_type ety)
+  | EnumName(su,tag) ->
+      (match unwrap tag with
+       Id(tag) ->
+         Type_cocci.EnumName(false,unwrap_mcode tag)
+      | MetaId(tag,_,_) ->
+         (Printf.printf
+            "warning: enum with a metavariable name detected.\n";
+          Printf.printf
+            "For type checking assuming the name of the metavariable is the name of the type\n";
+          let (rule,tag) = unwrap_mcode tag in
+          Type_cocci.EnumName(true,rule^tag))
+      | _ -> failwith "unexpected enum type name")
   | StructUnionName(su,Some tag) ->
       (match unwrap tag with
        Id(tag) ->
@@ -543,8 +556,7 @@ let rec ast0_type_to_type ty =
   | OptType(ty) | UniqueType(ty) ->
       ast0_type_to_type ty
 
-and baseType t =
-  match unwrap_mcode t with
+and baseType = function
     Ast.VoidType -> Type_cocci.VoidType
   | Ast.CharType -> Type_cocci.CharType
   | Ast.ShortType -> Type_cocci.ShortType
@@ -552,6 +564,7 @@ and baseType t =
   | Ast.DoubleType -> Type_cocci.DoubleType
   | Ast.FloatType -> Type_cocci.FloatType
   | Ast.LongType -> Type_cocci.LongType
+  | Ast.LongLongType -> Type_cocci.LongLongType
 
 and structUnion t =
   match unwrap_mcode t with
@@ -572,7 +585,7 @@ and const_vol t =
 (* this function is a rather minimal attempt.  the problem is that information
 has been lost.  but since it is only used for metavariable types in the isos,
 perhaps it doesn't matter *)
-let make_mcode x = (x,NONE,default_info(),context_befaft(),ref NoMetaPos)
+and make_mcode x = (x,NONE,default_info(),context_befaft(),ref NoMetaPos)
 let make_mcode_info x info = (x,NONE,info,context_befaft(),ref NoMetaPos)
 
 exception TyConv
@@ -581,12 +594,22 @@ let rec reverse_type ty =
   match ty with
     Type_cocci.ConstVol(cv,ty) ->
       ConstVol(reverse_const_vol cv,context_wrap(reverse_type ty))
-  | Type_cocci.BaseType(bty,None) ->
-      BaseType(reverse_baseType bty,None)
-  | Type_cocci.BaseType(bty,Some sgn) ->
-      BaseType(reverse_baseType bty,Some (reverse_sign sgn))
+  | Type_cocci.BaseType(bty) ->
+      BaseType(reverse_baseType bty,[(* not used *)])
+  | Type_cocci.SignedT(sgn,None) -> Signed(reverse_sign sgn,None)
+  | Type_cocci.SignedT(sgn,Some bty) ->
+      Signed(reverse_sign sgn,Some (context_wrap(reverse_type ty)))
   | Type_cocci.Pointer(ty) ->
       Pointer(context_wrap(reverse_type ty),make_mcode "*")
+  | Type_cocci.EnumName(mv,tag) ->
+      if mv
+      then
+       (* not right... *)
+       EnumName
+         (make_mcode "enum",
+          context_wrap(MetaId(make_mcode ("",tag),[],Impure)))
+      else
+       EnumName(make_mcode "enum",context_wrap(Id(make_mcode tag)))
   | Type_cocci.StructUnionName(su,mv,tag) ->
       if mv
       then
@@ -603,17 +626,16 @@ let rec reverse_type ty =
       MetaType(make_mcode name,Impure(*not really right*))
   | _ -> raise TyConv
 
-and reverse_baseType t =
-  make_mcode
-    (match t with
-      Type_cocci.VoidType -> Ast.VoidType
-    | Type_cocci.CharType -> Ast.CharType
-    | Type_cocci.BoolType -> Ast.IntType
-    | Type_cocci.ShortType -> Ast.ShortType
-    | Type_cocci.IntType -> Ast.IntType
-    | Type_cocci.DoubleType -> Ast.DoubleType
-    | Type_cocci.FloatType -> Ast.FloatType
-    | Type_cocci.LongType -> Ast.LongType)
+and reverse_baseType = function
+    Type_cocci.VoidType -> Ast.VoidType
+  | Type_cocci.CharType -> Ast.CharType
+  | Type_cocci.BoolType -> Ast.IntType
+  | Type_cocci.ShortType -> Ast.ShortType
+  | Type_cocci.IntType -> Ast.IntType
+  | Type_cocci.DoubleType -> Ast.DoubleType
+  | Type_cocci.FloatType -> Ast.FloatType
+  | Type_cocci.LongType -> Ast.LongType
+  | Type_cocci.LongLongType -> Ast.LongLongType
 
 and reverse_structUnion t =
   make_mcode
index b77ca37..ae6ea09 100644 (file)
@@ -74,7 +74,7 @@ and ident = base_ident wrap
 (* --------------------------------------------------------------------- *)
 (* Expression *)
 
-and base_expression = 
+and base_expression =
     Ident          of ident
   | Constant       of Ast_cocci.constant mcode
   | FunCall        of expression * string mcode (* ( *) *
@@ -123,10 +123,10 @@ and listlen = Ast_cocci.meta_name mcode option
 (* --------------------------------------------------------------------- *)
 (* Types *)
 
-and base_typeC = 
+and base_typeC =
     ConstVol        of Ast_cocci.const_vol mcode * typeC
-  | BaseType        of Ast_cocci.baseType mcode * Ast_cocci.sign mcode option
-  | ImplicitInt     of Ast_cocci.sign mcode
+  | BaseType        of Ast_cocci.baseType * string mcode list
+  | Signed          of Ast_cocci.sign mcode * typeC option
   | Pointer         of typeC * string mcode (* * *)
   | FunctionPointer of typeC *
                  string mcode(* ( *)*string mcode(* * *)*string mcode(* ) *)*
@@ -136,6 +136,7 @@ and base_typeC =
                        string mcode (* ) *)
   | Array           of typeC * string mcode (* [ *) *
                       expression option * string mcode (* ] *)
+  | EnumName        of string mcode (*enum*) * ident (* name *)
   | StructUnionName of Ast_cocci.structUnion mcode * ident option (* name *)
   | StructUnionDef  of typeC (* either StructUnionName or metavar *) *
        string mcode (* { *) * declaration dots * string mcode (* } *)
@@ -174,7 +175,7 @@ and declaration = base_declaration wrap
 (* Initializers *)
 
 and base_initialiser =
-    InitExpr of expression 
+    InitExpr of expression
   | InitList of string mcode (*{*) * initialiser_list * string mcode (*}*)
   | InitGccDotName of
       string mcode (*.*) * ident (* name *) * string mcode (*=*) *
@@ -350,7 +351,7 @@ and parsed_rule =
       (rule * Ast_cocci.metavar list *
         (string list * string list * Ast_cocci.dependency * string *
            Ast_cocci.exists)) *
-       (rule * Ast_cocci.metavar list)
+       (rule * Ast_cocci.metavar list) * Ast_cocci.ruletype
   | ScriptRule of
       string * Ast_cocci.dependency * (string * Ast_cocci.meta_name) list *
        string
index b04f31d..91da782 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -165,7 +165,7 @@ let inline_mcodes =
     | Ast0.PLUS -> () in
   V0.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode mcode mcode
+    mcode mcode
     do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
     do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
     do_nothing do_nothing do_nothing
@@ -211,14 +211,14 @@ let check_allminus =
 
   V0.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode mcode mcode
+    mcode mcode
     donothing donothing donothing donothing donothing donothing
     donothing expression typeC donothing donothing declaration
     statement donothing donothing
-    
+
 (* --------------------------------------------------------------------- *)
 (* --------------------------------------------------------------------- *)
-    
+
 let get_option fn = function
     None -> None
   | Some x -> Some (fn x)
@@ -226,7 +226,7 @@ let get_option fn = function
 (* --------------------------------------------------------------------- *)
 (* --------------------------------------------------------------------- *)
 (* Mcode *)
-       
+
 let convert_info info =
   { Ast.line = info.Ast0.line_start; Ast.column = info.Ast0.column;
     Ast.strbef = info.Ast0.strings_before;
@@ -234,7 +234,7 @@ let convert_info info =
 
 let convert_mcodekind = function
     Ast0.MINUS(replacements) ->
-      let (replacements,_) = !replacements in 
+      let (replacements,_) = !replacements in
       Ast.MINUS(Ast.NoPos,replacements)
   | Ast0.PLUS -> Ast.PLUS
   | Ast0.CONTEXT(befaft) ->
@@ -379,10 +379,12 @@ and expression e =
   if Ast0.get_test_exp e then Ast.set_test_exp e1 else e1
 
 and expression_dots ed = dots expression ed
-  
+
 (* --------------------------------------------------------------------- *)
 (* Types *)
 
+and rewrap_iso t t1 = rewrap t (do_isos (Ast0.get_iso t)) t1
+
 and typeC t =
   rewrap t (do_isos (Ast0.get_iso t))
     (match Ast0.unwrap t with
@@ -398,8 +400,7 @@ and typeC t =
          List.map
            (function ty ->
              Ast.Type
-               (Some (mcode cv),
-                rewrap ty (do_isos (Ast0.get_iso ty)) (base_typeC ty)))
+               (Some (mcode cv),rewrap_iso ty (base_typeC ty)))
            (collect_disjs ty) in
        (* one could worry that isos are lost because we flatten the
           disjunctions.  but there should not be isos on the disjunctions
@@ -407,20 +408,21 @@ and typeC t =
        (match res with
          [ty] -> ty
        | types -> Ast.DisjType(List.map (rewrap t no_isos) types))
-    | Ast0.BaseType(_,_) | Ast0.ImplicitInt(_) | Ast0.Pointer(_,_)
+    | Ast0.BaseType(_) | Ast0.Signed(_,_) | Ast0.Pointer(_,_)
     | Ast0.FunctionPointer(_,_,_,_,_,_,_) | Ast0.FunctionType(_,_,_,_)
-    | Ast0.Array(_,_,_,_) | Ast0.StructUnionName(_,_)
+    | Ast0.Array(_,_,_,_) | Ast0.EnumName(_,_) | Ast0.StructUnionName(_,_)
     | Ast0.StructUnionDef(_,_,_,_) | Ast0.TypeName(_) | Ast0.MetaType(_,_) ->
        Ast.Type(None,rewrap t no_isos (base_typeC t))
     | Ast0.DisjType(_,types,_,_) -> Ast.DisjType(List.map typeC types)
     | Ast0.OptType(ty) -> Ast.OptType(typeC ty)
     | Ast0.UniqueType(ty) -> Ast.UniqueType(typeC ty))
-    
+
 and base_typeC t =
   match Ast0.unwrap t with
-    Ast0.BaseType(ty,sign) ->
-      Ast.BaseType(mcode ty,get_option mcode sign)
-  | Ast0.ImplicitInt(sgn) -> Ast.ImplicitInt(mcode sgn)
+    Ast0.BaseType(ty,strings) -> Ast.BaseType(ty,List.map mcode strings)
+  | Ast0.Signed(sgn,ty) ->
+      Ast.SignedT(mcode sgn,
+                 get_option (function x -> rewrap_iso x (base_typeC x)) ty)
   | Ast0.Pointer(ty,star) -> Ast.Pointer(typeC ty,mcode star)
   | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
       Ast.FunctionPointer
@@ -433,6 +435,8 @@ and base_typeC t =
         parameter_list params,mcode rp)
   | Ast0.Array(ty,lb,size,rb) ->
       Ast.Array(typeC ty,mcode lb,get_option expression size,mcode rb)
+  | Ast0.EnumName(kind,name) ->
+      Ast.EnumName(mcode kind,ident name)
   | Ast0.StructUnionName(kind,name) ->
       Ast.StructUnionName(mcode kind,get_option ident name)
   | Ast0.StructUnionDef(ty,lb,decls,rb) ->
@@ -443,12 +447,12 @@ and base_typeC t =
   | Ast0.MetaType(name,_) ->
       Ast.MetaType(mcode name,unitary,false)
   | _ -> failwith "ast0toast: unexpected type"
-       
+
 (* --------------------------------------------------------------------- *)
 (* Variable declaration *)
 (* Even if the Cocci program specifies a list of declarations, they are
    split out into multiple declarations of a single variable each. *)
-    
+
 and declaration d =
   rewrap d (do_isos (Ast0.get_iso d))
     (match Ast0.unwrap d with
@@ -504,7 +508,7 @@ and declaration_dots l = dots declaration l
 and strip_idots initlist =
   match Ast0.unwrap initlist with
     Ast0.DOTS(x) ->
-      let (whencode,init) = 
+      let (whencode,init) =
        List.fold_left
          (function (prevwhen,previnit) ->
            function cur ->
@@ -542,7 +546,7 @@ and initialiser i =
 
 (* --------------------------------------------------------------------- *)
 (* Parameter *)
-    
+
 and parameterTypeDef p =
   rewrap p no_isos
     (match Ast0.unwrap p with
@@ -586,7 +590,7 @@ and statement s =
                       (Ast.Decl(convert_mcodekind bef,
                                 check_allminus.V0.combiner_statement s,
                                 declaration decl)))
-      | Ast0.Seq(lbrace,body,rbrace) -> 
+      | Ast0.Seq(lbrace,body,rbrace) ->
          let lbrace = mcode lbrace in
          let (decls,body) = separate_decls seqible body in
          let rbrace = mcode rbrace in
@@ -872,7 +876,7 @@ and case_line c =
     | Ast0.OptCase(case) -> Ast.OptCase(case_line case))
 
 and statement_dots l = dots statement l
-    
+
 (* --------------------------------------------------------------------- *)
 
 (* what is possible is only what is at the top level in an iso *)
@@ -902,7 +906,7 @@ and anything = function
 (* --------------------------------------------------------------------- *)
 (* Function declaration *)
 (* top level isos are probably lost to tracking *)
-    
+
 and top_level t =
   rewrap t no_isos
     (match Ast0.unwrap t with
@@ -924,6 +928,7 @@ let ast0toast_toplevel x =
   inline_mcodes.V0.combiner_top_level x;
   top_level x
 
-let ast0toast name deps dropped exists x is_exp =
+let ast0toast name deps dropped exists x is_exp ruletype =
   List.iter inline_mcodes.V0.combiner_top_level x;
-  Ast.CocciRule (name,(deps,dropped,exists),List.map top_level x,is_exp)
+  Ast.CocciRule
+    (name,(deps,dropped,exists),List.map top_level x,is_exp,ruletype)
index a2dc7c3..e46dec0 100644 (file)
@@ -1,6 +1,7 @@
 val ast0toast :
     string -> Ast_cocci.dependency -> string list (* dropped isos *) ->
-      Ast_cocci.exists -> Ast0_cocci.rule -> bool list -> Ast_cocci.rule
+      Ast_cocci.exists -> Ast0_cocci.rule -> bool list -> Ast_cocci.ruletype ->
+       Ast_cocci.rule
 val ast0toast_toplevel : Ast0_cocci.top_level -> Ast_cocci.top_level
 
 val ident : Ast0_cocci.ident -> Ast_cocci.ident
index ef3d17f..4521d24 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -133,7 +133,7 @@ and ident = base_ident wrap
 (* --------------------------------------------------------------------- *)
 (* Expression *)
 
-and base_expression = 
+and base_expression =
     Ident          of ident
   | Constant       of constant mcode
   | FunCall        of expression * string mcode (* ( *) *
@@ -215,9 +215,9 @@ and base_fullType =
   | OptType         of fullType
   | UniqueType      of fullType
 
-and base_typeC = 
-    BaseType        of baseType mcode * sign mcode option
-  | ImplicitInt     of sign mcode
+and base_typeC =
+    BaseType        of baseType * string mcode list (* Yoann style *)
+  | SignedT         of sign mcode * typeC option
   | Pointer         of fullType * string mcode (* * *)
   | FunctionPointer of fullType *
                  string mcode(* ( *)*string mcode(* * *)*string mcode(* ) *)*
@@ -231,6 +231,7 @@ and base_typeC =
 
   | Array           of fullType * string mcode (* [ *) *
                       expression option * string mcode (* ] *)
+  | EnumName        of string mcode (*enum*) * ident (* name *)
   | StructUnionName of structUnion mcode * ident option (* name *)
   | StructUnionDef  of fullType (* either StructUnionName or metavar *) *
        string mcode (* { *) * declaration dots * string mcode (* } *)
@@ -240,9 +241,9 @@ and base_typeC =
 
 and fullType = base_fullType wrap
 and typeC = base_typeC wrap
-     
+
 and baseType = VoidType | CharType | ShortType | IntType | DoubleType
-| FloatType | LongType
+  | FloatType | LongType | LongLongType
 
 and structUnion = Struct | Union
 
@@ -262,7 +263,7 @@ and base_declaration =
   | TyDecl of fullType * string mcode (* ; *)
   | MacroDecl of ident (* name *) * string mcode (* ( *) *
         expression dots * string mcode (* ) *) * string mcode (* ; *)
-  | Typedef of string mcode (*typedef*) * fullType * 
+  | Typedef of string mcode (*typedef*) * fullType *
                typeC (* either TypeName or metavar *) * string mcode (*;*)
   | DisjDecl of declaration list
   (* Ddots is for a structure declaration *)
@@ -279,7 +280,7 @@ and declaration = base_declaration wrap
 (* Initializers *)
 
 and base_initialiser =
-    InitExpr of expression 
+    InitExpr of expression
   | InitList of string mcode (*{*) * initialiser list * string mcode (*}*) *
        initialiser list (* whencode: elements that shouldn't appear in init *)
   | InitGccDotName of
@@ -509,12 +510,16 @@ and top_level = base_top_level wrap
 and rulename =
     CocciRulename of string option * dependency *
        string list * string list * exists * bool
+  | GeneratedRulename of string option * dependency *
+       string list * string list * exists * bool
   | ScriptRulename of string * dependency
 
+and ruletype = Normal | Generated
+
 and rule =
-    CocciRule of string (* name *) * 
+    CocciRule of string (* name *) *
        (dependency * string list (* dropped isos *) * exists) * top_level list
-       * bool list
+       * bool list * ruletype
   | ScriptRule of string * dependency * (string * meta_name) list * string
 
 and dependency =
index 32fc4ca..cb24dcf 100644 (file)
@@ -108,7 +108,7 @@ and ident = base_ident wrap
 (* --------------------------------------------------------------------- *)
 (* Expression *)
 
-and base_expression = 
+and base_expression =
     Ident          of ident
   | Constant       of constant mcode
   | FunCall        of expression * string mcode (* ( *) *
@@ -188,9 +188,9 @@ and base_fullType =
   | OptType         of fullType
   | UniqueType      of fullType
 
-and base_typeC = 
-    BaseType        of baseType mcode * sign mcode option
-  | ImplicitInt     of sign mcode
+and base_typeC =
+    BaseType        of baseType * string mcode list (* Yoann style *)
+  | SignedT         of sign mcode * typeC option
   | Pointer         of fullType * string mcode (* * *)
   | FunctionPointer of fullType *
                  string mcode(* ( *)*string mcode(* * *)*string mcode(* ) *)*
@@ -201,6 +201,7 @@ and base_typeC =
                    string mcode (* ) *)
   | Array           of fullType * string mcode (* [ *) *
                       expression option * string mcode (* ] *)
+  | EnumName        of string mcode (*enum*) * ident (* name *)
   | StructUnionName of structUnion mcode * ident option (* name *)
   | StructUnionDef  of fullType (* either StructUnionName or metavar *) *
        string mcode (* { *) * declaration dots * string mcode (* } *)
@@ -210,9 +211,9 @@ and base_typeC =
 
 and fullType = base_fullType wrap
 and typeC = base_typeC wrap
-     
+
 and baseType = VoidType | CharType | ShortType | IntType | DoubleType
-| FloatType | LongType
+  | FloatType | LongType | LongLongType
 
 and structUnion = Struct | Union
 
@@ -247,7 +248,7 @@ and declaration = base_declaration wrap
 (* Initializers *)
 
 and base_initialiser =
-    InitExpr of expression 
+    InitExpr of expression
   | InitList of string mcode (*{*) * initialiser list * string mcode (*}*) *
        initialiser list (* whencode: elements that shouldn't appear in init *)
   | InitGccDotName of
@@ -334,7 +335,7 @@ and base_rule_elem =
                     fninfo list * ident (* name *) *
                     string mcode (* ( *) * parameter_list *
                      string mcode (* ) *)
-  | Decl          of mcodekind (* before the decl *) * 
+  | Decl          of mcodekind (* before the decl *) *
                      bool (* true if all minus *) * declaration
 
   | SeqStart      of string mcode (* { *)
@@ -471,12 +472,17 @@ and rulename =
     CocciRulename of string option * dependency * string list * string list *
        exists * bool
       (* true if the whole thing is an expression *)
+  | GeneratedRulename of string option * dependency *
+       string list * string list * exists * bool
+      (* true if the whole thing is an expression *)
   | ScriptRulename of string * dependency
 
+and ruletype = Normal | Generated
+
 and rule =
     CocciRule of string (* name *) *
        (dependency * string list (* dropped isos *) * exists) *
-       top_level list * bool list (* true if generates an exp *)
+       top_level list * bool list (* true if generates an exp *) * ruletype
   | ScriptRule of string * dependency * (string * meta_name) list * string
 
 and dependency =
index e555f85..9c8fcd2 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -175,7 +175,8 @@ let rec expression context old_metas table minus e =
   | _ -> () (* no metavariable subterms *)
 
 and get_type_name = function
-    Type_cocci.ConstVol(_,ty) | Type_cocci.Pointer(ty)
+    Type_cocci.ConstVol(_,ty) | Type_cocci.SignedT(_,Some ty)
+  | Type_cocci.Pointer(ty)
   | Type_cocci.FunctionPointer(ty) | Type_cocci.Array(ty) -> get_type_name ty
   | Type_cocci.MetaType(nm,_,_) -> Some nm
   | _ -> None
@@ -186,6 +187,8 @@ and get_type_name = function
 and typeC old_metas table minus t =
   match Ast0.unwrap t with
     Ast0.ConstVol(cv,ty) -> typeC old_metas table minus ty
+  | Ast0.Signed(sgn,ty) ->
+      get_opt (typeC old_metas table minus) ty
   | Ast0.Pointer(ty,star) -> typeC old_metas table minus ty
   | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
       typeC old_metas table minus ty;
@@ -200,6 +203,7 @@ and typeC old_metas table minus t =
       check_table table minus name
   | Ast0.DisjType(_,types,_,_) ->
       List.iter (typeC old_metas table minus) types
+  | Ast0.EnumName(en,id) -> ident GLOBAL old_metas table minus id
   | Ast0.StructUnionName(su,Some id) -> ident GLOBAL old_metas table minus id
   | Ast0.StructUnionDef(ty,lb,decls,rb) ->
       typeC old_metas table minus ty;
@@ -233,7 +237,7 @@ and declaration context old_metas table minus d =
   | Ast0.UnInit(stg,ty,id,sem) ->
       typeC old_metas table minus ty; ident context old_metas table minus id
   | Ast0.MacroDecl(name,lp,args,rp,sem) ->
-      ident ID old_metas table minus name;
+      ident GLOBAL old_metas table minus name;
       dots (expression ID old_metas table minus) args
   | Ast0.TyDecl(ty,sem) -> typeC old_metas table minus ty
   | Ast0.Typedef(stg,ty,id,sem) ->
@@ -322,7 +326,7 @@ and statement old_metas table minus s =
       get_opt (expression ID old_metas table minus) exp3;
       statement old_metas table minus body
   | Ast0.Iterator(nm,lp,args,rp,body,_) ->
-      ident ID old_metas table minus nm;
+      ident GLOBAL old_metas table minus nm;
       dots (expression ID old_metas table minus) args;
       statement old_metas table minus body
   | Ast0.Switch(switch,lp,exp,rp,lb,cases,rb) ->
@@ -410,7 +414,6 @@ let positions table rules =
   let fn =
     V0.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing
       donothing donothing donothing donothing donothing donothing donothing
       donothing donothing in
@@ -462,7 +465,6 @@ let dup_positions rules =
   let fn =
     V0.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing
       donothing expression typeC donothing donothing declaration statement
       donothing donothing in
@@ -527,7 +529,7 @@ let check_meta rname old_metas inherited_metavars metavars minus plus =
   dup_positions minus;
   check_all_marked rname "metavariable" other_table "in the - or context code";
   rule old_metas [iother_table;fresh_table;err_table] false plus;
-  check_all_marked rname "fresh identifier metavariable" iother_table
+  check_all_marked rname "inherited metavariable" iother_table
     "in the -, +, or context code";
   check_all_marked rname "metavariable" fresh_table "in the + code";
   check_all_marked rname "error metavariable" err_table ""
index 9266cd7..124b8d8 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -65,7 +65,7 @@ let process_binops rule_name =
               Unparse_ast0.expression e1;
               Format.print_newline();
               e)
-       | Ast0.Edots(d,_) -> 
+       | Ast0.Edots(d,_) ->
            (Printf.printf
               "%s: whencode interferes with comm_assoc iso" rule_name;
             Unparse_ast0.expression e1;
@@ -75,7 +75,6 @@ let process_binops rule_name =
     | _ -> e in
   V0.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing
     donothing expr donothing donothing donothing donothing donothing
     donothing donothing
index 526d75e..67ec35d 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -25,7 +25,7 @@ expressions.  every node gets an index as well. *)
 
 module Ast0 = Ast0_cocci
 module Ast = Ast_cocci
-    
+
 (* --------------------------------------------------------------------- *)
 (* Result *)
 
@@ -66,11 +66,11 @@ let mkmultires x e left right (astart,start_mcodes) (aend,end_mcodes) =
   {x with Ast0.node = e; Ast0.info = info}
 
 (* --------------------------------------------------------------------- *)
-    
+
 let get_option fn = function
     None -> None
   | Some x -> Some (fn x)
-       
+
 (* --------------------------------------------------------------------- *)
 (* --------------------------------------------------------------------- *)
 (* Mcode *)
@@ -160,7 +160,7 @@ let dot_list is_dots fn = function
       let first = Ast0.set_info first first_info in
       let last = Ast0.set_info last last_info in
       (forward,first,last)
-      
+
 let dots is_dots prev fn d =
   match (prev,Ast0.unwrap d) with
     (Some prev,Ast0.DOTS([])) ->
@@ -181,7 +181,7 @@ let dots is_dots prev fn d =
 
 (* --------------------------------------------------------------------- *)
 (* Identifier *)
-       
+
 let rec ident i =
   match Ast0.unwrap i with
     Ast0.Id(name) as ui ->
@@ -193,7 +193,7 @@ let rec ident i =
       let id = ident id in mkres i (Ast0.OptIdent(id)) id id
   | Ast0.UniqueIdent(id) ->
       let id = ident id in mkres i (Ast0.UniqueIdent(id)) id id
-       
+
 (* --------------------------------------------------------------------- *)
 (* Expression *)
 
@@ -262,7 +262,7 @@ let rec expression e =
       let exp = expression exp in
       mkres e (Ast0.SizeOfExpr(szf,exp)) (promote_mcode szf) exp
   | Ast0.SizeOfType(szf,lp,ty,rp) ->
-      mkres e (Ast0.SizeOfType(szf,lp,typeC ty,rp)) 
+      mkres e (Ast0.SizeOfType(szf,lp,typeC ty,rp))
         (promote_mcode szf)  (promote_mcode rp)
   | Ast0.TypeExp(ty) ->
       let ty = typeC ty in mkres e (Ast0.TypeExp(ty)) ty ty
@@ -307,21 +307,24 @@ let rec expression e =
       mkres e (Ast0.UniqueExp(exp)) exp exp
 
 and expression_dots x = dots is_exp_dots None expression x
-       
+
 (* --------------------------------------------------------------------- *)
 (* Types *)
-       
+
 and typeC t =
   match Ast0.unwrap t with
     Ast0.ConstVol(cv,ty) ->
       let ty = typeC ty in
       mkres t (Ast0.ConstVol(cv,ty)) (promote_mcode cv) ty
-  | Ast0.BaseType(ty,None) as ut ->
-      mkres t ut (promote_mcode ty) (promote_mcode ty)
-  | Ast0.BaseType(ty,Some sgn) as ut ->
-      mkres t ut (promote_mcode sgn) (promote_mcode ty)
-  | Ast0.ImplicitInt(sgn) as ut ->
+  | Ast0.BaseType(ty,strings) as ut ->
+      let first = List.hd strings in
+      let last = List.hd (List.rev strings) in
+      mkres t ut (promote_mcode first) (promote_mcode last)
+  | Ast0.Signed(sgn,None) as ut ->
       mkres t ut (promote_mcode sgn) (promote_mcode sgn)
+  | Ast0.Signed(sgn,Some ty) ->
+      let ty = typeC ty in
+      mkres t (Ast0.Signed(sgn,Some ty)) (promote_mcode sgn) ty
   | Ast0.Pointer(ty,star) ->
       let ty = typeC ty in
       mkres t (Ast0.Pointer(ty,star)) ty (promote_mcode star)
@@ -343,6 +346,9 @@ and typeC t =
       let ty = typeC ty in
       mkres t (Ast0.Array(ty,lb,get_option expression size,rb))
        ty (promote_mcode rb)
+  | Ast0.EnumName(kind,name) ->
+      let name = ident name in
+      mkres t (Ast0.EnumName(kind,name)) (promote_mcode kind) name
   | Ast0.StructUnionName(kind,Some name) ->
       let name = ident name in
       mkres t (Ast0.StructUnionName(kind,Some name)) (promote_mcode kind) name
@@ -370,7 +376,7 @@ and typeC t =
       let ty = typeC ty in mkres t (Ast0.OptType(ty)) ty ty
   | Ast0.UniqueType(ty) ->
       let ty = typeC ty in mkres t (Ast0.UniqueType(ty)) ty ty
-       
+
 (* --------------------------------------------------------------------- *)
 (* Variable declaration *)
 (* Even if the Cocci program specifies a list of declarations, they are
@@ -380,7 +386,7 @@ and is_decl_dots s =
   match Ast0.unwrap s with
     Ast0.Ddots(_,_) -> true
   | _ -> false
-       
+
 and declaration d =
   match Ast0.unwrap d with
     Ast0.Init(stg,ty,id,eq,exp,sem) ->
@@ -390,7 +396,7 @@ and declaration d =
       (match stg with
        None ->
          mkres d (Ast0.Init(stg,ty,id,eq,exp,sem)) ty (promote_mcode sem)
-      | Some x -> 
+      | Some x ->
          mkres d (Ast0.Init(stg,ty,id,eq,exp,sem))
            (promote_mcode x) (promote_mcode sem))
   | Ast0.UnInit(stg,ty,id,sem) ->
@@ -440,7 +446,7 @@ and is_init_dots i =
   match Ast0.unwrap i with
     Ast0.Idots(_,_) -> true
   | _ -> false
-       
+
 and initialiser i =
   match Ast0.unwrap i with
     Ast0.InitExpr(exp) ->
@@ -494,7 +500,7 @@ and is_param_dots p =
   match Ast0.unwrap p with
     Ast0.Pdots(_) | Ast0.Pcircles(_) -> true
   | _ -> false
-       
+
 and parameterTypeDef p =
   match Ast0.unwrap p with
     Ast0.VoidParam(ty) ->
@@ -539,7 +545,7 @@ let is_stm_dots s =
   match Ast0.unwrap s with
     Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) -> true
   | _ -> false
-    
+
 let rec statement s =
   let res =
     match Ast0.unwrap s with
@@ -547,7 +553,7 @@ let rec statement s =
        let decl = declaration decl in
        let left = promote_to_statement_start decl bef in
        mkres s (Ast0.Decl((Ast0.get_info left,bef),decl)) decl decl
-    | Ast0.Seq(lbrace,body,rbrace) -> 
+    | Ast0.Seq(lbrace,body,rbrace) ->
        let body =
          dots is_stm_dots (Some(promote_mcode lbrace)) statement body in
        mkres s (Ast0.Seq(lbrace,body,rbrace))
@@ -613,13 +619,13 @@ let rec statement s =
        mkres s (Ast0.Label(l,dd)) l (promote_mcode dd)
     | Ast0.Goto(goto,id,sem) ->
        let id = ident id in
-       mkres s (Ast0.Goto(goto,id,sem)) 
+       mkres s (Ast0.Goto(goto,id,sem))
          (promote_mcode goto) (promote_mcode sem)
     | Ast0.Return(ret,sem) as us ->
        mkres s us (promote_mcode ret) (promote_mcode sem)
     | Ast0.ReturnExpr(ret,exp,sem) ->
        let exp = expression exp in
-       mkres s (Ast0.ReturnExpr(ret,exp,sem)) 
+       mkres s (Ast0.ReturnExpr(ret,exp,sem))
          (promote_mcode ret) (promote_mcode sem)
     | Ast0.MetaStmt(name,_)
     | Ast0.MetaStmtList(name,_) as us ->
@@ -709,7 +715,7 @@ let rec statement s =
            mkres s res (promote_mcode inline) (promote_mcode rbrace)
        | Ast0.FAttr(attr)::_ ->
            mkres s res (promote_mcode attr) (promote_mcode rbrace))
-         
+
     | Ast0.Include(inc,stm) ->
        mkres s (Ast0.Include(inc,stm)) (promote_mcode inc) (promote_mcode stm)
     | Ast0.Define(def,id,params,body) ->
@@ -741,10 +747,10 @@ and case_line c =
       let case = case_line case in mkres c (Ast0.OptCase(case)) case case
 
 and statement_dots x = dots is_stm_dots None statement x
-       
+
 (* --------------------------------------------------------------------- *)
 (* Function declaration *)
-       
+
 let top_level t =
   match Ast0.unwrap t with
     Ast0.FILEINFO(old_file,new_file) -> t
@@ -755,9 +761,9 @@ let top_level t =
       mkres t (Ast0.CODE(rule_elem_dots)) rule_elem_dots rule_elem_dots
   | Ast0.ERRORWORDS(exps) -> t
   | Ast0.OTHER(_) -> failwith "eliminated by top_level"
-       
+
 (* --------------------------------------------------------------------- *)
 (* Entry points *)
-       
+
 let compute_lines = List.map top_level
-    
+
index 86d6a8f..84eaabe 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -145,7 +145,6 @@ let collect_plus_lines top =
   let fn =
     V0.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing
       donothing donothing donothing donothing donothing donothing donothing
       donothing donothing in
@@ -263,7 +262,7 @@ let classify is_minus all_marked table code =
          try
            let _ = Hashtbl.find table index in
            failwith
-             (Printf.sprintf "%d: index %s already used\n"
+             (Printf.sprintf "line %d: index %s already used\n"
                 (Ast0.get_info e).Ast0.line_start
                 (String.concat " " (List.map string_of_int index)))
          with Not_found -> Hashtbl.add table index (e1,l)) in
@@ -320,7 +319,7 @@ let classify is_minus all_marked table code =
          k (Ast0.rewrap e (Ast0.Ecircles(dots,None)))
       | Ast0.Estars(dots,whencode) ->
          k (Ast0.rewrap e (Ast0.Estars(dots,None)))
-      | Ast0.DisjExpr(starter,expr_list,_,ender) -> 
+      | Ast0.DisjExpr(starter,expr_list,_,ender) ->
          disj_cases e starter expr_list r.V0.combiner_expression ender
       |        _ -> k e) in
 
@@ -408,10 +407,9 @@ let classify is_minus all_marked table code =
 
   let do_top builder r k e = compute_result builder e (k e) in
 
-  let combiner = 
+  let combiner =
     V0.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       (do_nothing Ast0.dotsExpr) (do_nothing Ast0.dotsInit)
       (do_nothing Ast0.dotsParam) (do_nothing Ast0.dotsStmt)
       (do_nothing Ast0.dotsDecl) (do_nothing Ast0.dotsCase)
@@ -490,7 +488,7 @@ let rec equal_expression e1 e2 =
   | (Ast0.EComma(cm1),Ast0.EComma(cm2)) -> equal_mcode cm1 cm2
   | (Ast0.DisjExpr(starter1,_,mids1,ender1),
      Ast0.DisjExpr(starter2,_,mids2,ender2)) ->
-       equal_mcode starter1 starter2 && 
+       equal_mcode starter1 starter2 &&
        List.for_all2 equal_mcode mids1 mids2 &&
        equal_mcode ender1 ender2
   | (Ast0.NestExpr(starter1,_,ender1,_,m1),
@@ -506,14 +504,16 @@ let rec equal_expression e1 e2 =
 let rec equal_typeC t1 t2 =
   match (Ast0.unwrap t1,Ast0.unwrap t2) with
     (Ast0.ConstVol(cv1,_),Ast0.ConstVol(cv2,_)) -> equal_mcode cv1 cv2
-  | (Ast0.BaseType(ty1,sign1),Ast0.BaseType(ty2,sign2)) ->
-      equal_mcode ty1 ty2 && equal_option sign1 sign2
-  | (Ast0.ImplicitInt(sign1),Ast0.ImplicitInt(sign2)) ->
+  | (Ast0.BaseType(ty1,stringsa),Ast0.BaseType(ty2,stringsb)) ->
+      List.for_all2 equal_mcode stringsa stringsb
+  | (Ast0.Signed(sign1,_),Ast0.Signed(sign2,_)) ->
       equal_mcode sign1 sign2
   | (Ast0.Pointer(_,star1),Ast0.Pointer(_,star2)) ->
       equal_mcode star1 star2
   | (Ast0.Array(_,lb1,_,rb1),Ast0.Array(_,lb2,_,rb2)) ->
       equal_mcode lb1 lb2 && equal_mcode rb1 rb2
+  | (Ast0.EnumName(kind1,_),Ast0.EnumName(kind2,_)) ->
+      equal_mcode kind1 kind2
   | (Ast0.StructUnionName(kind1,_),Ast0.StructUnionName(kind2,_)) ->
       equal_mcode kind1 kind2
   | (Ast0.FunctionType(ty1,lp1,p1,rp1),Ast0.FunctionType(ty2,lp2,p2,rp2)) ->
@@ -526,7 +526,7 @@ let rec equal_typeC t1 t2 =
       equal_mcode name1 name2
   | (Ast0.DisjType(starter1,_,mids1,ender1),
      Ast0.DisjType(starter2,_,mids2,ender2)) ->
-       equal_mcode starter1 starter2 && 
+       equal_mcode starter1 starter2 &&
        List.for_all2 equal_mcode mids1 mids2 &&
        equal_mcode ender1 ender2
   | (Ast0.OptType(_),Ast0.OptType(_)) -> true
@@ -569,7 +569,7 @@ let equal_initialiser i1 i2 =
   | (Ast0.OptIni(_),Ast0.OptIni(_)) -> true
   | (Ast0.UniqueIni(_),Ast0.UniqueIni(_)) -> true
   | _ -> false
-       
+
 let equal_parameterTypeDef p1 p2 =
   match (Ast0.unwrap p1,Ast0.unwrap p2) with
     (Ast0.VoidParam(_),Ast0.VoidParam(_)) -> true
@@ -636,7 +636,7 @@ let rec equal_statement s1 s2 =
   | (Ast0.MetaStmtList(name1,_),Ast0.MetaStmtList(name2,_)) ->
       equal_mcode name1 name2
   | (Ast0.Disj(starter1,_,mids1,ender1),Ast0.Disj(starter2,_,mids2,ender2)) ->
-      equal_mcode starter1 starter2 && 
+      equal_mcode starter1 starter2 &&
       List.for_all2 equal_mcode mids1 mids2 &&
       equal_mcode ender1 ender2
   | (Ast0.Nest(starter1,_,ender1,_,m1),Ast0.Nest(starter2,_,ender2,_,m2)) ->
@@ -737,7 +737,6 @@ let contextify_all =
 
   V0.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
     do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
     do_nothing do_nothing do_nothing
@@ -779,10 +778,9 @@ let contextify_whencode =
        List.iter whencode whn
     | _ -> () in
 
-  let combiner = 
+  let combiner =
     V0.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
       do_nothing
       expression
@@ -835,7 +833,7 @@ let collect_up_to m plus =
   let mend = minfo.Ast0.logical_end in
   let rec loop = function
       [] -> ([],[])
-    | p::plus -> 
+    | p::plus ->
        let pinfo = Ast0.get_info p in
        let pstart = pinfo.Ast0.logical_start in
        if pstart > mend
index 5805dea..fe7c28d 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -49,6 +49,7 @@ type pconstraints = Ast.meta_name list
 let in_rule_name = ref false
 let in_meta = ref false
 let in_iso = ref false
+let in_generating = ref false
 let in_prolog = ref false
 let inheritable_positions =
   ref ([] : string list) (* rules from which posns can be inherited *)
@@ -56,92 +57,92 @@ let inheritable_positions =
 let all_metadecls =
   (Hashtbl.create(100) : (string, Ast.metavar list) Hashtbl.t)
 
-let clear_meta: (unit -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+let clear_meta: (unit -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_id_meta:
-    (Ast.meta_name -> iconstraints -> Ast0.pure -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+    (Ast.meta_name -> iconstraints -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
-let add_type_meta: (Ast.meta_name -> Ast0.pure -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+let add_type_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
-let add_param_meta: (Ast.meta_name -> Ast0.pure -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+let add_param_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_paramlist_meta:
-    (Ast.meta_name -> Ast.meta_name option -> Ast0.pure -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+    (Ast.meta_name -> Ast.meta_name option -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_const_meta:
     (Type_cocci.typeC list option -> Ast.meta_name -> econstraints ->
       Ast0.pure -> unit)
     ref =
-  ref (fun _ -> failwith "uninitialized add_meta") 
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_err_meta:
     (Ast.meta_name -> econstraints -> Ast0.pure -> unit) ref =
-  ref (fun _ -> failwith "uninitialized add_meta") 
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_exp_meta:
     (Type_cocci.typeC list option -> Ast.meta_name -> econstraints ->
       Ast0.pure -> unit)
     ref =
-  ref (fun _ -> failwith "uninitialized add_meta") 
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_idexp_meta:
     (Type_cocci.typeC list option -> Ast.meta_name -> econstraints ->
       Ast0.pure -> unit)
     ref =
-  ref (fun _ -> failwith "uninitialized add_meta") 
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_local_idexp_meta:
     (Type_cocci.typeC list option -> Ast.meta_name -> econstraints ->
       Ast0.pure -> unit)
     ref =
-  ref (fun _ -> failwith "uninitialized add_meta") 
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_explist_meta:
-    (Ast.meta_name -> Ast.meta_name option -> Ast0.pure -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+    (Ast.meta_name -> Ast.meta_name option -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
-let add_stm_meta: (Ast.meta_name -> Ast0.pure -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+let add_stm_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
-let add_stmlist_meta: (Ast.meta_name -> Ast0.pure -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+let add_stmlist_meta: (Ast.meta_name -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_func_meta:
-    (Ast.meta_name -> iconstraints -> Ast0.pure -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+    (Ast.meta_name -> iconstraints -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_local_func_meta:
-    (Ast.meta_name -> iconstraints -> Ast0.pure -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+    (Ast.meta_name -> iconstraints -> Ast0.pure -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
 let add_declarer_meta:
     (Ast.meta_name -> iconstraints -> Ast0.pure -> unit) ref =
-  ref (fun _ -> failwith "uninitialized add_decl") 
+  ref (fun _ -> failwith "uninitialized add_decl")
 
 let add_iterator_meta:
     (Ast.meta_name -> iconstraints -> Ast0.pure -> unit) ref =
-  ref (fun _ -> failwith "uninitialized add_iter") 
+  ref (fun _ -> failwith "uninitialized add_iter")
 
 let add_pos_meta:
-    (Ast.meta_name -> pconstraints -> Ast.meta_collect -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_meta") 
+    (Ast.meta_name -> pconstraints -> Ast.meta_collect -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_meta")
 
-let add_type_name: (string -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_type") 
+let add_type_name: (string -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_type")
 
-let add_declarer_name: (string -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_decl") 
+let add_declarer_name: (string -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_decl")
 
-let add_iterator_name: (string -> unit) ref = 
-  ref (fun _ -> failwith "uninitialized add_iter") 
+let add_iterator_name: (string -> unit) ref =
+  ref (fun _ -> failwith "uninitialized add_iter")
 
 let init_rule: (unit -> unit) ref =
-  ref (fun _ -> failwith "uninitialized install_bindings") 
+  ref (fun _ -> failwith "uninitialized install_bindings")
 
 let install_bindings: (string -> unit) ref =
-  ref (fun _ -> failwith "uninitialized install_bindings") 
+  ref (fun _ -> failwith "uninitialized install_bindings")
index 3f725b8..3bd3998 100644 (file)
@@ -22,6 +22,7 @@ type pconstraints = Ast_cocci.meta_name list
 val in_rule_name : bool ref (* true if parsing the rule name *)
 val in_meta : bool ref      (* true if parsing the metavariable decls *)
 val in_iso : bool ref       (* true if parsing the isomorphisms *)
+val in_generating : bool ref(* true if generating a rule *)
 val in_prolog : bool ref    (* true if parsing the beginning of an SP *)
 val inheritable_positions : string list ref
 
index bf5448a..ae7679f 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -72,7 +72,7 @@ let rec disjty ft =
 
 and disjtypeC bty =
   match Ast.unwrap bty with
-    Ast.BaseType(_,_) | Ast.ImplicitInt(_) -> [bty]
+    Ast.BaseType(_) | Ast.SignedT(_,_) -> [bty]
   | Ast.Pointer(ty,star) ->
       let ty = disjty ty in
       List.map (function ty -> Ast.rewrap bty (Ast.Pointer(ty,star))) ty
@@ -92,7 +92,7 @@ and disjtypeC bty =
       disjmult2 (disjty ty) (disjoption disjexp size)
        (function ty -> function size ->
          Ast.rewrap bty (Ast.Array(ty,lb,size,rb)))
-  | Ast.StructUnionName(kind,name) -> [bty]
+  | Ast.EnumName(_,_) | Ast.StructUnionName(_,_) -> [bty]
   | Ast.StructUnionDef(ty,lb,decls,rb) ->
       disjmult2 (disjty ty) (disjdots disjdecl decls)
        (function ty -> function decls ->
@@ -169,7 +169,8 @@ and disjexp e =
       List.map (function ty -> Ast.rewrap e (Ast.TypeExp(ty))) ty
   | Ast.MetaErr(_,_,_,_) | Ast.MetaExpr(_,_,_,_,_,_)
   | Ast.MetaExprList(_,_,_,_) | Ast.EComma(_) -> [e]
-  | Ast.DisjExpr(exp_list) -> List.concat (List.map disjexp exp_list)
+  | Ast.DisjExpr(exp_list) ->
+      List.concat (List.map disjexp exp_list)
   | Ast.NestExpr(expr_dots,whencode,multi) ->
       (* not sure what to do here, so ambiguities still possible *)
       [e]
@@ -225,10 +226,10 @@ and disjini i =
        (function exp1 -> function exp2 -> function ini ->
          Ast.rewrap i (Ast.InitGccRange(lb,exp1,dots,exp2,rb,eq,ini)))
   | Ast.IComma(comma) -> [i]
-  | Ast.OptIni(ini) -> 
+  | Ast.OptIni(ini) ->
       let ini = disjini ini in
       List.map (function ini -> Ast.rewrap i (Ast.OptIni(ini))) ini
-  | Ast.UniqueIni(ini) -> 
+  | Ast.UniqueIni(ini) ->
       let ini = disjini ini in
       List.map (function ini -> Ast.rewrap i (Ast.UniqueIni(ini))) ini
 
@@ -274,7 +275,7 @@ let orify_rule_elem_decl = generic_orify_rule_elem disjdecl
 let orify_rule_elem_ini = generic_orify_rule_elem disjini
 
 let disj_rule_elem r k re =
-  match Ast.unwrap re with      
+  match Ast.unwrap re with
     Ast.FunHeader(bef,allminus,fninfo,name,lp,params,rp) ->
       generic_orify_rule_elem (disjdots disjparam) re params
        (function params ->
@@ -340,7 +341,6 @@ let disj_all =
   let donothing r k e = k e in
   V.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing donothing
     disj_rule_elem donothing donothing donothing donothing
@@ -356,7 +356,6 @@ let collect_all_isos =
   let doanything r k e = k e in
   V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing donothing
     donothing doanything
@@ -372,7 +371,6 @@ let collect_iso_info =
        Ast.set_isos e isos in
   V.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing rule_elem donothing donothing
     donothing donothing
@@ -384,14 +382,14 @@ let disj rules =
     (function (mv,r) ->
       match r with
         Ast.ScriptRule _ -> (mv, r)
-      | Ast.CocciRule (nm, rule_info, r, isexp) ->
-      let res =
-       List.map
-         (function x ->
-           let res = disj_all.V.rebuilder_top_level x in
-           if !Flag.track_iso_usage
-           then collect_iso_info.V.rebuilder_top_level res
-           else res)
-         r in
-      (mv, Ast.CocciRule (nm,rule_info,res,isexp)))
+      | Ast.CocciRule (nm, rule_info, r, isexp, ruletype) ->
+         let res =
+           List.map
+             (function x ->
+               let res = disj_all.V.rebuilder_top_level x in
+               if !Flag.track_iso_usage
+               then collect_iso_info.V.rebuilder_top_level res
+               else res)
+             r in
+         (mv, Ast.CocciRule (nm,rule_info,res,isexp,ruletype)))
     rules
index baecee0..371a7f8 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 2ff5545..dabf51c 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -91,6 +91,7 @@ let collect_refs include_constraints =
       TC.ConstVol(_,ty) | TC.Pointer(ty) | TC.FunctionPointer(ty)
     | TC.Array(ty) -> type_collect res ty
     | TC.MetaType(tyname,_,_) -> bind [tyname] res
+    | TC.SignedT(_,Some ty) -> type_collect res ty
     | ty -> res in
 
   let astfvexpr recursor k e =
@@ -159,7 +160,6 @@ let collect_refs include_constraints =
 
   V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     astfvident astfvexpr astfvfullType astfvtypeC donothing astfvparam
     astfvdecls astfvrule_elem astfvstatement donothing donothing donothing_a
@@ -195,6 +195,7 @@ let collect_saved =
       TC.ConstVol(_,ty) | TC.Pointer(ty) | TC.FunctionPointer(ty)
     | TC.Array(ty) -> type_collect res ty
     | TC.MetaType(tyname,TC.Saved,_) -> bind [tyname] res
+    | TC.SignedT(_,Some ty) -> type_collect res ty
     | ty -> res in
 
   let astfvexpr recursor k e =
@@ -252,7 +253,6 @@ let collect_saved =
 
   V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     astfvident astfvexpr donothing astfvtypeC donothing astfvparam
     donothing astfvrule_elem donothing donothing donothing donothing
@@ -331,7 +331,6 @@ let collect_in_plus_term =
 
   V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing
     donothing astfvrule_elem astfvstatement donothing donothing donothing
@@ -359,7 +358,7 @@ let classify_variables metavars minirules used_after =
   let metavars = List.map Ast.get_meta_name metavars in
   let (unitary,nonunitary) = collect_all_multirefs minirules in
   let inplus = collect_in_plus minirules in
-  
+
   let donothing r k e = k e in
   let check_unitary name inherited =
     if List.mem name inplus or List.mem name used_after
@@ -404,6 +403,7 @@ let classify_variables metavars minirules used_after =
     | TC.MetaType(name,_,_) ->
        let (unitary,inherited) = classify (name,(),(),Ast.NoMetaPos) in
        Type_cocci.MetaType(name,unitary,inherited)
+    | TC.SignedT(sgn,Some ty) -> TC.SignedT(sgn,Some (type_infos ty))
     | ty -> ty in
 
   let expression r k e =
@@ -469,7 +469,6 @@ let classify_variables metavars minirules used_after =
 
   let fn = V.rebuilder
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing
       ident expression donothing typeC donothing param donothing rule_elem
       donothing donothing donothing donothing in
@@ -560,7 +559,7 @@ let astfvs metavars bound =
            classify (cip_mcodekind collect_in_plus_term aft) [] in
          Ast.Iterator(header,body,(unbound,fresh,inherited,aft))
       |        s -> s in
-    
+
     let (unbound,munbound,fresh,_) = classify free minus_free in
     let inherited =
       List.filter (function x -> List.mem x bound) nc_free in
@@ -601,7 +600,6 @@ let astfvs metavars bound =
 
   V.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing astfvstatement_dots donothing
     donothing donothing donothing donothing donothing donothing donothing
     astfvrule_elem astfvstatement donothing astfvtoplevel donothing
@@ -628,14 +626,14 @@ let collect_astfvs rules =
            (* bound stays as is because script rules have no names, so no
               inheritance is possible *)
            rule::(loop bound rules)
-        | Ast.CocciRule (nm, rule_info, minirules, isexp) ->
+        | Ast.CocciRule (nm, rule_info, minirules, isexp, ruletype) ->
           let bound =
             Common.minus_set bound (List.map Ast.get_meta_name metavars) in
           (Ast.CocciRule
             (nm, rule_info,
              (List.map (astfvs metavars bound).V.rebuilder_top_level
                 minirules),
-             isexp))::
+             isexp, ruletype))::
             (loop ((List.map Ast.get_meta_name metavars)@bound) rules) in
   loop [] rules
 
@@ -660,12 +658,11 @@ let get_neg_pos_list (_,rule) used_after_list =
   let v =
     V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing in
   match rule with
-    Ast.CocciRule(_,_,minirules,_) ->
+    Ast.CocciRule(_,_,minirules,_,_) ->
       List.map
        (function toplevel ->
          let (positions,neg_positions) = v.V.combiner_top_level toplevel in
@@ -702,7 +699,7 @@ let collect_top_level_used_after metavar_rule_list =
             match r with
               Ast.ScriptRule (_,_,mv,_) ->
                 List.map (function (_,(r,v)) -> (r,v)) mv
-            | Ast.CocciRule (_,_,rule,_) ->
+            | Ast.CocciRule (_,_,rule,_,_) ->
                Common.union_set (nub (collect_all_rule_refs rule))
                  (collect_in_plus rule) in
          let inherited =
@@ -717,7 +714,7 @@ let collect_top_level_used_after metavar_rule_list =
       failwith
        (Printf.sprintf "collect_top_level_used_after: unbound variables %s"
           (String.concat " " (List.map (function (_,x) -> x) used_after)))
-       
+
 let collect_local_used_after metavars minirules used_after =
   let locally_defined = List.map Ast.get_meta_name metavars in
   let rec loop defined = function
@@ -749,7 +746,7 @@ let collect_used_after metavar_rule_list =
       function used_after ->
         match r with
           Ast.ScriptRule (_,_,mv,_) -> ([], [used_after])
-        | Ast.CocciRule (name, rule_info, minirules, _) ->
+        | Ast.CocciRule (name, rule_info, minirules, _,_) ->
           collect_local_used_after metavars minirules used_after
     )
     metavar_rule_list used_after_lists
@@ -766,7 +763,7 @@ let free_vars rules =
       (function (mv, r) ->
          match r with
            Ast.ScriptRule _ -> []
-         | Ast.CocciRule (_,_,rule,_) ->
+         | Ast.CocciRule (_,_,rule,_,_) ->
            let positions =
              List.fold_left
                (function prev ->
@@ -780,10 +777,11 @@ let free_vars rules =
        function ua ->
           match r with
             Ast.ScriptRule _ -> r
-          | Ast.CocciRule (nm, rule_info, r, is_exp) ->
+          | Ast.CocciRule (nm, rule_info, r, is_exp,ruletype) ->
              Ast.CocciRule
                (nm, rule_info, classify_variables mv r (List.concat ua),
-                is_exp))
+                is_exp,ruletype))
       rules used_after_lists in
   let new_rules = collect_astfvs (List.combine metavars new_rules) in
-  (new_rules,fvs_lists,neg_pos_lists,used_after_lists,positions_list)
+  (metavars,new_rules,
+   fvs_lists,neg_pos_lists,used_after_lists,positions_list)
index 65918d6..fac1f11 100644 (file)
@@ -3,7 +3,7 @@ bindings.  These are combined in ctlcocciintegration, ie after the CTL
 generation. *)
 
 val free_vars : Ast_cocci.rule_with_metavars list ->
-  (Ast_cocci.rule list) *
+  (Ast_cocci.metavar list list) * (Ast_cocci.rule list) *
     (((Ast_cocci.meta_name list) list) list) (*fvs of the rule*) *
     (((Ast_cocci.meta_name list) list) list) (*negated position vars*) *
     (((Ast_cocci.meta_name list) list) list) (*used after list*) *
index dcc255e..788c685 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -158,7 +158,6 @@ and strip =
 
   V0.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing
     ident donothing typeC donothing param donothing donothing
     donothing donothing
@@ -211,7 +210,7 @@ let drop_names dec =
 
 let ct = ref 0
 
-let new_name name = 
+let new_name name =
   let n = !ct in
   ct := !ct + 1;
   name^"__"^(string_of_int n)
@@ -333,7 +332,7 @@ let merge mproto pproto =
   let pproto =
     Compute_lines.compute_lines [Ast0.copywrap pproto (Ast0.DECL pproto)] in
   let (m,p) = List.split(Context_neg.context_neg mproto pproto) in
-  Insert_plus.insert_plus m p;
+  Insert_plus.insert_plus m p true (* no isos for protos *);
   (* convert to ast so that the + code will fall down to the tokens
      and off the artificially added Ast0.DECL *)
   let mproto = Ast0toast.ast0toast_toplevel (List.hd mproto) in
@@ -387,7 +386,7 @@ let rec split4 = function
   | (a,b,c,d)::rest ->
       let (ax,bx,cx,dx) = split4 rest in (a::ax,b::bx,c::cx,d::dx)
 
-let process rule_name rule_metavars dropped_isos minus plus =
+let process rule_name rule_metavars dropped_isos minus plus ruletype =
   let minus_functions = List.concat (List.map get_all_functions minus) in
   match minus_functions with
     [] -> ((rule_metavars,minus),None)
@@ -407,13 +406,13 @@ let process rule_name rule_metavars dropped_isos minus plus =
          (* probably not possible, since there is always the version with
             variables and the version without *)
          ((mdef_metavars,minus),
-          Some 
+          Some
             (metavars,
              Ast.CocciRule
                ("proto for "^rule_name,
                 (Ast.Dep rule_name,dropped_isos,Ast.Forall),
                 [Ast.rewrap x (Ast.DECL x)],
-                [false])))
+                [false],ruletype)))
       |        x::_ ->
          let drules =
            List.map (function x -> Ast.rewrap x (Ast.DOTS [x])) rules in
@@ -422,5 +421,5 @@ let process rule_name rule_metavars dropped_isos minus plus =
            ("proto for "^rule_name,
             (Ast.Dep rule_name,dropped_isos,Ast.Forall),
             [Ast.rewrap x (Ast.DECL (Ast.rewrap x (Ast.Disj drules)))],
-            [false]) in
+            [false],ruletype) in
          ((mdef_metavars,minus),Some(metavars,res))
index 4bcd346..85b056c 100644 (file)
@@ -1,5 +1,5 @@
 val process : string (* name *) -> Ast_cocci.metavar list ->
   string list (* dropped isos *) ->
-    Ast0_cocci.rule -> Ast0_cocci.rule ->
+    Ast0_cocci.rule -> Ast0_cocci.rule -> Ast_cocci.ruletype ->
       ((Ast_cocci.metavar list * Ast0_cocci.rule) *
         Ast_cocci.rule_with_metavars option)
index 3cd8f90..e191e32 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -118,7 +118,6 @@ let get_minus_constants bind orbind =
 
   V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     ident expression fullType typeC donothing donothing declaration
     rule_elem statement donothing donothing donothing
@@ -137,7 +136,6 @@ let get_all_minus_constants =
 
   V.combiner bind option_default
     other mcode other other other other other other other other other other
-    other
 
     donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing donothing
@@ -167,7 +165,6 @@ let get_plus_constants =
 
   V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing donothing
@@ -255,7 +252,6 @@ let check_inherited nm =
 
   V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     strictident strictexpr strictfullType stricttypeC donothing strictparam
     strictdecls strictrule_elem strictstatement donothing donothing donothing
@@ -306,7 +302,7 @@ let get_constants rules =
           function r ->
             match r with
               Ast.ScriptRule (_,mv,deps,_) -> (rest_info, in_plus)
-            | Ast.CocciRule (nm, (dep,_,_), cur, _) ->
+            | Ast.CocciRule (nm, (dep,_,_), cur, _, _) ->
                 let (cur_info,cur_plus) = rule_fn cur in_plus in
                let cur_info =
                  (* no dependencies if dependent on another rule; then we
index 6d66cf6..8ca4e52 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -186,6 +186,7 @@ let do_get_constants constants keywords env neg_pos =
     | TC.Array(ty) -> type_collect res ty
     | TC.MetaType(tyname,_,_) -> inherited tyname
     | TC.TypeName(s) -> constants s
+    | TC.EnumName(false,s) -> constants s
     | TC.StructUnionName(_,false,s) -> constants s
     | ty -> res in
 
@@ -222,14 +223,14 @@ let do_get_constants constants keywords env neg_pos =
     | Ast.OptExp(exp) -> option_default
     | Ast.Edots(_,_) | Ast.Ecircles(_,_) | Ast.Estars(_,_) -> option_default
     | _ -> k e in
-  
+
   let fullType r k ft =
     match Ast.unwrap ft with
       Ast.DisjType(decls) ->
        disj_union_all (List.map r.V.combiner_fullType decls)
     | Ast.OptType(ty) -> option_default
     | _ -> k ft in
-  
+
   let baseType = function
       Ast.VoidType -> keywords "void "
     | Ast.CharType -> keywords "char "
@@ -237,11 +238,11 @@ let do_get_constants constants keywords env neg_pos =
     | Ast.IntType -> keywords "int "
     | Ast.DoubleType -> keywords "double "
     | Ast.FloatType -> keywords "float "
-    | Ast.LongType -> keywords "long " in
+    | Ast.LongType | Ast.LongLongType -> keywords "long " in
 
   let typeC r k ty =
     match Ast.unwrap ty with
-      Ast.BaseType(ty1,sgn) -> bind (k ty) (baseType (Ast.unwrap_mcode ty1))
+      Ast.BaseType(ty1,strings) -> bind (k ty) (baseType ty1)
     | Ast.TypeName(name) -> bind (k ty) (constants (Ast.unwrap_mcode name))
     | Ast.MetaType(name,_,_) -> bind (minherited name) (k ty)
     | _ -> k ty in
@@ -267,7 +268,7 @@ let do_get_constants constants keywords env neg_pos =
     | Ast.MetaParamList(name,Some(lenname,_,_),_,_) ->
        bind (minherited name) (bind (minherited lenname) (k p))
     | _ -> k p in
-  
+
   let rule_elem r k re =
     match Ast.unwrap re with
       Ast.MetaRuleElem(name,_,_) | Ast.MetaStmt(name,_,_,_)
@@ -307,7 +308,7 @@ let do_get_constants constants keywords env neg_pos =
     | Ast.DisjRuleElem(res) ->
        disj_union_all (List.map r.V.combiner_rule_elem res)
     | _ -> k re in
-  
+
   let statement r k s =
     match Ast.unwrap s with
       Ast.Disj(stmt_dots) ->
@@ -322,7 +323,6 @@ let do_get_constants constants keywords env neg_pos =
 
   V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     ident expression fullType typeC initialiser parameter declaration
     rule_elem statement donothing donothing donothing
@@ -355,7 +355,6 @@ let get_all_constants minus_only =
 
   V.combiner bind option_default
     other mcode other other other other other other other other other other
-    other
 
     donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing donothing
@@ -386,7 +385,6 @@ let get_plus_constants =
 
   V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing donothing
@@ -418,7 +416,6 @@ let all_context =
 
   V.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing
@@ -477,7 +474,7 @@ let get_constants rules neg_pos_vars =
                  False -> (rest_info, in_plus, env, locals)
                | dependencies ->
                    (build_or dependencies rest_info, in_plus, env, locals))
-            | (Ast.CocciRule (nm,(dep,_,_),cur,_),neg_pos_vars) ->
+            | (Ast.CocciRule (nm,(dep,_,_),cur,_,_),neg_pos_vars) ->
                let (cur_info,cur_plus) =
                  rule_fn cur in_plus ((nm,True)::env) neg_pos_vars in
                if List.for_all all_context.V.combiner_top_level cur
index 3396bd9..2f3752c 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -21,7 +21,7 @@
 
 
 (* create an index for each constructor *)
-(* current max is 146 *)
+(* current max is 147 *)
 
 (* doesn't really work - requires that identical terms with no token
 subterms (eg dots) not appear on the same line *)
@@ -38,42 +38,42 @@ let expression_dots d =
     Ast0.DOTS(l) -> 1::(if l = [] then [ln] else [0])
   | Ast0.CIRCLES(l) -> 2::(if l = [] then [ln] else [0])
   | Ast0.STARS(l) -> 3::(if l = [] then [ln] else [0])
-       
+
 let initialiser_dots d =
   let ln = (Ast0.get_info d).Ast0.line_start in
   match Ast0.unwrap d with
     Ast0.DOTS(l) -> 113::(if l = [] then [ln] else [0])
   | Ast0.CIRCLES(l) -> 114::(if l = [] then [ln] else [0])
   | Ast0.STARS(l) -> 115::(if l = [] then [ln] else [0])
-       
+
 let parameter_dots d =
   let ln = (Ast0.get_info d).Ast0.line_start in
   match Ast0.unwrap d with
     Ast0.DOTS(l) -> 4::(if l = [] then [ln] else [0])
   | Ast0.CIRCLES(l) -> 5::(if l = [] then [ln] else [0])
   | Ast0.STARS(l) -> 6::(if l = [] then [ln] else [0])
-       
+
 let statement_dots d =
   let ln = (Ast0.get_info d).Ast0.line_start in
   match Ast0.unwrap d with
     Ast0.DOTS(l) -> 7::(if l = [] then [ln] else [0])
   | Ast0.CIRCLES(l) -> 8::(if l = [] then [ln] else [0])
   | Ast0.STARS(l) -> 9::(if l = [] then [ln] else [0])
-       
+
 let declaration_dots d =
   let ln = (Ast0.get_info d).Ast0.line_start in
   match Ast0.unwrap d with
     Ast0.DOTS(l) -> 134::(if l = [] then [ln] else [0])
   | Ast0.CIRCLES(l) -> 135::(if l = [] then [ln] else [0])
   | Ast0.STARS(l) -> 136::(if l = [] then [ln] else [0])
-       
+
 let case_line_dots d =
   let ln = (Ast0.get_info d).Ast0.line_start in
   match Ast0.unwrap d with
     Ast0.DOTS(l) -> 138::(if l = [] then [ln] else [0])
   | Ast0.CIRCLES(l) -> 139::(if l = [] then [ln] else [0])
   | Ast0.STARS(l) -> 140::(if l = [] then [ln] else [0])
-       
+
 let ident i =
   match Ast0.unwrap i with
     Ast0.Id(name) -> [10]
@@ -82,7 +82,7 @@ let ident i =
   | Ast0.MetaLocalFunc(name,_,_) -> [13]
   | Ast0.OptIdent(id) -> [14]
   | Ast0.UniqueIdent(id) -> [15]
-       
+
 let expression e =
   match Ast0.unwrap e with
     Ast0.Ident(id) -> [17]
@@ -118,12 +118,13 @@ let expression e =
 let typeC t =
   match Ast0.unwrap t with
     Ast0.ConstVol(cv,ty) -> [44]
-  | Ast0.BaseType(ty,sign) -> [48]
-  | Ast0.ImplicitInt(sign) -> [129]
+  | Ast0.BaseType(ty,strings) -> [48]
+  | Ast0.Signed(sign,ty) -> [129]
   | Ast0.Pointer(ty,star) -> [49]
   | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) -> [131]
   | Ast0.FunctionType(ty,lp1,params,rp1) -> [132]
   | Ast0.Array(ty,lb,size,rb) -> [50]
+  | Ast0.EnumName(kind,name) -> [146]
   | Ast0.StructUnionName(kind,name) -> [51]
   | Ast0.StructUnionDef(ty,lb,decls,rb) -> [117]
   | Ast0.TypeName(name) -> [52]
@@ -131,7 +132,7 @@ let typeC t =
   | Ast0.DisjType(_,type_list,_,_) -> [130]
   | Ast0.OptType(ty) -> [45]
   | Ast0.UniqueType(ty) -> [46]
-       
+
 let declaration d =
   match Ast0.unwrap d with
     Ast0.Init(stg,ty,id,eq,exp,sem) -> [54]
@@ -168,7 +169,7 @@ let parameterTypeDef p =
   | Ast0.Pcircles(dots) -> [65]
   | Ast0.OptParam(param) -> [66]
   | Ast0.UniqueParam(param) -> [67]
-       
+
 let statement s =
   match Ast0.unwrap s with
     Ast0.FunDecl(bef,fninfo,name,lp,params,rp,lbrace,body,rbrace) -> [68]
index 795d46c..706f922 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -34,6 +34,8 @@ module Ast0 = Ast0_cocci
 module V0 = Visitor_ast0
 module CN = Context_neg
 
+let empty_isos = ref false
+
 let get_option f = function
     None -> []
   | Some x -> f x
@@ -88,7 +90,6 @@ it *)
   let res =
     V0.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       (donothing Ast0.dotsExpr) (donothing Ast0.dotsInit)
       (donothing Ast0.dotsParam) (donothing Ast0.dotsStmt)
       (donothing Ast0.dotsDecl) (donothing Ast0.dotsCase)
@@ -303,7 +304,6 @@ bind to that; not good for isomorphisms *)
 
   V0.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     edots idots pdots sdots ddots cdots
     ident expression typeC initialiser param decl statement case_line do_top
 
@@ -411,7 +411,6 @@ let process_minus minus =
 (* --------------------------------------------------------------------- *)
 (* collect the plus tokens *)
 
-let mk_baseType x         = Ast.BaseTypeTag x
 let mk_structUnion x      = Ast.StructUnionTag x
 let mk_sign x             = Ast.SignTag x
 let mk_ident x            = Ast.IdentTag (Ast0toast.ident x)
@@ -493,7 +492,7 @@ let collect_plus_nodes root =
     (imcode mk_meta) (imcode mk_token) (mcode mk_constant) (mcode mk_assignOp)
     (mcode mk_fixOp)
     (mcode mk_unaryOp) (mcode mk_binaryOp) (mcode mk_const_vol)
-    (mcode mk_baseType) (mcode mk_sign) (mcode mk_structUnion)
+    (mcode mk_sign) (mcode mk_structUnion)
     (mcode mk_storage) (mcode mk_inc_file)
     (do_nothing mk_exprdots) initdots
     (do_nothing mk_paramdots) stmt_dots (do_nothing mk_decldots)
@@ -732,7 +731,7 @@ let attachbefore (infop,p) = function
        Ast.BEFORE(bef) ->
          let (bef,ti1) = insert p infop bef ti1 in
          neighbors := (Ast.BEFORE(bef),ti1,ti2)
-      |        Ast.AFTER(aft) -> 
+      |        Ast.AFTER(aft) ->
          let (bef,ti1) = init p infop in
          neighbors := (Ast.BEFOREAFTER(bef,aft),ti1,ti2)
       |        Ast.BEFOREAFTER(bef,aft) ->
@@ -754,7 +753,7 @@ let attachafter (infop,p) = function
        Ast.BEFORE(bef) ->
          let (aft,ti2) = init p infop in
          neighbors := (Ast.BEFOREAFTER(bef,aft),ti1,ti2)
-      |        Ast.AFTER(aft) -> 
+      |        Ast.AFTER(aft) ->
          let (aft,ti2) = insert p infop aft ti2 in
          neighbors := (Ast.AFTER(aft),ti1,ti2)
       |        Ast.BEFOREAFTER(bef,aft) ->
@@ -805,7 +804,7 @@ and after_m1 ((f1,infom1,m1) as x1) ((f2,infom2,m2) as x2) rest = function
         what it can infer from something being CONTEXT with no top-level
         modifications.  for the moment, we thus give an error, asking the
         user to rewrite the semantic patch. *)
-      if greater_than_end infop infom1
+      if greater_than_end infop infom1 or is_minus m1 or !empty_isos
       then
        if less_than_start infop infom2
        then
@@ -840,6 +839,12 @@ and after_m1 ((f1,infom1,m1) as x1) ((f2,infom2,m2) as x2) rest = function
            "The semantic patch is structured in a way that may give bad results with isomorphisms.  Please try to rewrite it by moving + code out from -/context terms."
        end
 
+(* not sure this is safe.  if have iso problems, consider changing this
+to always return false *)
+and is_minus = function
+    Ast0.MINUS _ -> true
+  | _ -> false
+
 and before_m2 ((f2,infom2,m2) as x2) rest
     (p : (Ast0.info * Ast.anything list list) list) =
   match (rest,p) with
@@ -931,7 +936,6 @@ let reevaluate_contextness =
   let res =
     V0.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing donothing
       donothing
       donothing donothing donothing donothing donothing donothing donothing in
@@ -940,7 +944,8 @@ let reevaluate_contextness =
 (* --------------------------------------------------------------------- *)
 (* --------------------------------------------------------------------- *)
 
-let insert_plus minus plus =
+let insert_plus minus plus ei =
+  empty_isos := ei;
   let minus_stream = process_minus minus in
   let plus_stream = process_plus plus in
   merge minus_stream plus_stream;
index 16899dc..788df0b 100644 (file)
@@ -1 +1,2 @@
-val insert_plus : Ast0_cocci.rule -> Ast0_cocci.rule -> unit
+val insert_plus : Ast0_cocci.rule -> Ast0_cocci.rule -> bool -> unit
+(* bool is true if no isos *)
index ba8497c..f9835c6 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -38,9 +38,8 @@ let sequence_tokens =
   let donothing r k e = k e in
   let bind x y = x @ y in
   let option_default = [] in
-  V0.combiner bind option_default 
+  V0.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing
     donothing donothing
     donothing donothing donothing donothing donothing donothing donothing
index bf7bab0..0afc05b 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -51,7 +51,6 @@ let strip_info =
       Ast0.true_if_test = x.Ast0.true_if_test} in
   V0.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing donothing
     donothing donothing
@@ -399,9 +398,8 @@ let match_maker checks_needed context_required whencode_allowed =
          Ast0.MetaStmt(name,pure) | Ast0.MetaStmtList(name,pure) -> pure
        | _ -> Ast0.Impure) in
 
-    V0.combiner bind option_default 
+    V0.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing
       ident expression typeC donothing param donothing stmt donothing
       donothing in
@@ -700,7 +698,7 @@ let match_maker checks_needed context_required whencode_allowed =
          | (_,Ast0.UniqueExp(expb)) -> match_expr pattern expb
          | _ -> return false
        else return_false (ContextRequired (Ast0.ExprTag expr))
-           
+
 (* the special case for function types prevents the eg T X; -> T X = E; iso
    from applying, which doesn't seem very relevant, but it also avoids a
    mysterious bug that is obtained with eg int attach(...); *)
@@ -722,16 +720,18 @@ let match_maker checks_needed context_required whencode_allowed =
              then
                conjunct_bindings (check_mcode cva cvb) (match_typeC tya tyb)
              else return false
-         | (Ast0.BaseType(tya,signa),Ast0.BaseType(tyb,signb)) ->
-             if (mcode_equal tya tyb &&
-                 bool_match_option mcode_equal signa signb)
+         | (Ast0.BaseType(tya,stringsa),Ast0.BaseType(tyb,stringsb)) ->
+             if tya = tyb
              then
-               conjunct_bindings (check_mcode tya tyb)
-                 (match_option check_mcode signa signb)
+               match_list check_mcode
+                 (function _ -> false) (function _ -> failwith "")
+                 stringsa stringsb
              else return false
-         | (Ast0.ImplicitInt(signa),Ast0.ImplicitInt(signb)) ->
+         | (Ast0.Signed(signa,tya),Ast0.Signed(signb,tyb)) ->
              if mcode_equal signa signb
-             then check_mcode signa signb
+             then
+               conjunct_bindings (check_mcode signa signb)
+                 (match_option match_typeC tya tyb)
              else return false
          | (Ast0.Pointer(tya,star1),Ast0.Pointer(tyb,star)) ->
              conjunct_bindings (check_mcode star1 star) (match_typeC tya tyb)
@@ -754,6 +754,9 @@ let match_maker checks_needed context_required whencode_allowed =
              conjunct_many_bindings
                [check_mcode lb1 lb; check_mcode rb1 rb;
                  match_typeC tya tyb; match_option match_expr sizea sizeb]
+         | (Ast0.EnumName(kinda,namea),Ast0.EnumName(kindb,nameb)) ->
+             conjunct_bindings (check_mcode kinda kindb)
+               (match_ident namea nameb)
          | (Ast0.StructUnionName(kinda,Some namea),
             Ast0.StructUnionName(kindb,Some nameb)) ->
               if mcode_equal kinda kindb
@@ -779,7 +782,7 @@ let match_maker checks_needed context_required whencode_allowed =
          | (_,Ast0.UniqueType(tyb)) -> match_typeC pattern tyb
          | _ -> return false
        else return_false (ContextRequired (Ast0.TypeCTag t))
-           
+
   and match_decl pattern d =
     if not(checks_needed) or not(context_required) or is_context d
     then
@@ -828,7 +831,7 @@ let match_maker checks_needed context_required whencode_allowed =
               return false))
       | (Ast0.Ddots(_,Some _),_) ->
          failwith "whencode not allowed in a pattern1"
-           
+
       | (Ast0.OptDecl(decla),Ast0.OptDecl(declb))
       | (Ast0.UniqueDecl(decla),Ast0.UniqueDecl(declb)) ->
          match_decl decla declb
@@ -837,7 +840,7 @@ let match_maker checks_needed context_required whencode_allowed =
          match_decl pattern declb
       | _ -> return false
     else return_false (ContextRequired (Ast0.DeclTag d))
-       
+
   and match_init pattern i =
     if not(checks_needed) or not(context_required) or is_context i
     then
@@ -889,7 +892,7 @@ let match_maker checks_needed context_required whencode_allowed =
       | (_,Ast0.UniqueIni(ib)) -> match_init pattern ib
       | _ -> return false
     else return_false (ContextRequired (Ast0.InitTag i))
-       
+
   and match_param pattern p =
     match Ast0.unwrap pattern with
       Ast0.MetaParam(name,pure) ->
@@ -915,7 +918,7 @@ let match_maker checks_needed context_required whencode_allowed =
          | (_,Ast0.UniqueParam(paramb)) -> match_param pattern paramb
          | _ -> return false
        else return_false (ContextRequired (Ast0.ParamTag p))
-           
+
   and match_statement pattern s =
     match Ast0.unwrap pattern with
       Ast0.MetaStmt(name,pure) ->
@@ -1093,7 +1096,7 @@ let match_maker checks_needed context_required whencode_allowed =
          | (_,Ast0.UniqueStm(reb)) -> match_statement pattern reb
          |     _ -> return false
        else return_false (ContextRequired (Ast0.StmtTag s))
-           
+
   (* first should provide a subset of the information in the second *)
   and match_fninfo patterninfo cinfo =
     let patterninfo = List.sort compare patterninfo in
@@ -1120,7 +1123,7 @@ let match_maker checks_needed context_required whencode_allowed =
          | _ -> failwith "not possible")
       |        _ -> return false in
     loop (patterninfo,cinfo)
-      
+
   and match_case_line pattern c =
     if not(checks_needed) or not(context_required) or is_context c
     then
@@ -1139,36 +1142,36 @@ let match_maker checks_needed context_required whencode_allowed =
       |        (_,Ast0.OptCase(cb)) -> match_case_line pattern cb
       |        _ -> return false
     else return_false (ContextRequired (Ast0.CaseLineTag c)) in
-  
+
   let match_statement_dots x y =
     match_dots match_statement is_slist_matcher do_slist_match x y in
-  
+
   (match_expr, match_decl, match_statement, match_typeC,
    match_statement_dots)
-    
+
 let match_expr dochecks context_required whencode_allowed =
   let (fn,_,_,_,_) = match_maker dochecks context_required whencode_allowed in
   fn
-    
+
 let match_decl dochecks context_required whencode_allowed =
   let (_,fn,_,_,_) = match_maker dochecks context_required whencode_allowed in
   fn
-    
+
 let match_statement dochecks context_required whencode_allowed =
   let (_,_,fn,_,_) = match_maker dochecks context_required whencode_allowed in
   fn
-    
+
 let match_typeC dochecks context_required whencode_allowed =
   let (_,_,_,fn,_) = match_maker dochecks context_required whencode_allowed in
   fn
-    
+
 let match_statement_dots dochecks context_required whencode_allowed =
   let (_,_,_,_,fn) = match_maker dochecks context_required whencode_allowed in
   fn
-    
+
 (* --------------------------------------------------------------------- *)
 (* make an entire tree MINUS *)
-    
+
 let make_minus =
   let mcode (term,arity,info,mcodekind,pos) =
     let new_mcodekind =
@@ -1180,7 +1183,7 @@ let make_minus =
      | Ast0.MINUS(mc) -> mcodekind (* in the part copied from the src term *)
      | _ -> failwith "make_minus mcode: unexpected mcodekind" in
     (term,arity,info,new_mcodekind,pos) in
-  
+
   let update_mc mcodekind e =
     match !mcodekind with
       Ast0.CONTEXT(mc) ->
@@ -1191,11 +1194,11 @@ let make_minus =
     | Ast0.MINUS(_mc) -> () (* in the part copied from the src term *)
     | Ast0.PLUS -> failwith "make_minus donothing: unexpected plus mcodekind"
     | _ -> failwith "make_minus donothing: unexpected mcodekind" in
-  
+
   let donothing r k e =
     let mcodekind = Ast0.get_mcodekind_ref e in
     let e = k e in update_mc mcodekind e; e in
-  
+
   (* special case for whencode, because it isn't processed by contextneg,
      since it doesn't appear in the + code *)
   (* cases for dots and nests *)
@@ -1218,7 +1221,7 @@ let make_minus =
                         r.V0.rebuilder_expression_dots expr_dots,
                         mcode ender,whencode,multi))
     | _ -> donothing r k e in
-  
+
   let declaration r k e =
     let mcodekind = Ast0.get_mcodekind_ref e in
     match Ast0.unwrap e with
@@ -1226,7 +1229,7 @@ let make_minus =
        (*don't recurse because whencode hasn't been processed by context_neg*)
        update_mc mcodekind e; Ast0.rewrap e (Ast0.Ddots(mcode d,whencode))
     | _ -> donothing r k e in
-  
+
   let statement r k e =
     let mcodekind = Ast0.get_mcodekind_ref e in
     match Ast0.unwrap e with
@@ -1243,7 +1246,7 @@ let make_minus =
          (Ast0.Nest(mcode starter,r.V0.rebuilder_statement_dots stmt_dots,
                     mcode ender,whencode,multi))
     | _ -> donothing r k e in
-  
+
   let initialiser r k e =
     let mcodekind = Ast0.get_mcodekind_ref e in
     match Ast0.unwrap e with
@@ -1251,7 +1254,7 @@ let make_minus =
        (*don't recurse because whencode hasn't been processed by context_neg*)
        update_mc mcodekind e; Ast0.rewrap e (Ast0.Idots(mcode d,whencode))
     | _ -> donothing r k e in
-  
+
   let dots r k e =
     let info = Ast0.get_info e in
     let mcodekind = Ast0.get_mcodekind_ref e in
@@ -1277,17 +1280,16 @@ let make_minus =
                 "%d: make_minus donothingxxx: unexpected mcodekind: %s"
                 info.Ast0.line_start (Dumper.dump e)))
     | _ -> donothing r k e in
-  
+
   V0.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     dots dots dots dots dots dots
     donothing expression donothing initialiser donothing declaration
     statement donothing donothing
-    
+
 (* --------------------------------------------------------------------- *)
 (* rebuild mcode cells in an instantiated alt *)
-    
+
 (* mcodes will be side effected later with plus code, so we have to copy
    them on instantiating an isomorphism.  One could wonder whether it would
    be better not to use side-effects, but they are convenient for insert_plus
@@ -1303,14 +1305,14 @@ let rebuild_mcode start_line =
        (* this function is used elsewhere where we need to rebuild the
           indices, and so we allow PLUS code as well *)
         Ast0.PLUS in
-  
+
   let mcode (term,arity,info,mcodekind,pos) =
     let info =
       match start_line with
        Some x -> {info with Ast0.line_start = x; Ast0.line_end = x}
       |        None -> info in
     (term,arity,info,copy_mcodekind mcodekind,pos) in
-  
+
   let copy_one x =
     let old_info = Ast0.get_info x in
     let info =
@@ -1319,9 +1321,9 @@ let rebuild_mcode start_line =
       |        None -> old_info in
     {x with Ast0.info = info; Ast0.index = ref(Ast0.get_index x);
       Ast0.mcodekind = ref (copy_mcodekind (Ast0.get_mcodekind x))} in
-  
+
   let donothing r k e = copy_one (k e) in
-  
+
   (* case for control operators (if, etc) *)
   let statement r k e =
     let s = k e in
@@ -1356,20 +1358,19 @@ let rebuild_mcode start_line =
          Ast0.AddingBetweenDots(r.V0.rebuilder_statement s)
       | Ast0.DroppingBetweenDots s ->
          Ast0.DroppingBetweenDots(r.V0.rebuilder_statement s)) in
-  
+
   V0.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing donothing
     donothing statement donothing donothing
-    
+
 (* --------------------------------------------------------------------- *)
 (* The problem of whencode.  If an isomorphism contains dots in multiple
    rules, then the code that is matched cannot contain whencode, because we
    won't know which dots it goes with. Should worry about nests, but they
    aren't allowed in isomorphisms for the moment. *)
-    
+
 let count_edots =
   let mcode x = 0 in
   let option_default = 0 in
@@ -1379,14 +1380,13 @@ let count_edots =
     match Ast0.unwrap e with
       Ast0.Edots(_,_) | Ast0.Ecircles(_,_) | Ast0.Estars(_,_) -> 1
     | _ -> 0 in
-  
+
   V0.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing
     donothing exprfn donothing donothing donothing donothing donothing
     donothing donothing
-    
+
 let count_idots =
   let mcode x = 0 in
   let option_default = 0 in
@@ -1394,14 +1394,13 @@ let count_idots =
   let donothing r k e = k e in
   let initfn r k e =
     match Ast0.unwrap e with Ast0.Idots(_,_) -> 1 | _ -> 0 in
-  
+
   V0.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing
     donothing donothing donothing initfn donothing donothing donothing
     donothing donothing
-    
+
 let count_dots =
   let mcode x = 0 in
   let option_default = 0 in
@@ -1411,16 +1410,15 @@ let count_dots =
     match Ast0.unwrap e with
       Ast0.Dots(_,_) | Ast0.Circles(_,_) | Ast0.Stars(_,_) -> 1
     | _ -> 0 in
-  
+
   V0.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing stmtfn
     donothing donothing
-    
+
 (* --------------------------------------------------------------------- *)
-    
+
 let lookup name bindings mv_bindings =
   try Common.Left (List.assoc (term name) bindings)
   with
@@ -1746,7 +1744,6 @@ let instantiate bindings mv_bindings =
 
   V0.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     (dots elist) donothing (dots plist) (dots slist) donothing donothing
     identfn exprfn tyfn donothing paramfn declfn stmtfn donothing donothing
 
@@ -2251,21 +2248,27 @@ let transform (alts : isomorphism) t =
     let (extra_meta,stm) = transform_stmt alts (k e) in
     extra_meta_decls := extra_meta @ !extra_meta_decls;
     stm in
-  
+
   let typefn r k e =
-    let (extra_meta,ty) = transform_type alts (k e) in
-    extra_meta_decls := extra_meta @ !extra_meta_decls;
-    ty in
-  
+   let continue =
+     match Ast0.unwrap e with
+       Ast0.Signed(signb,tyb) ->
+       (* Hack!  How else to prevent iso from applying under an
+         unsigned??? *)
+        e
+     | _ -> k e in
+   let (extra_meta,ty) = transform_type alts continue in
+   extra_meta_decls := extra_meta @ !extra_meta_decls;
+   ty in
+
   let topfn r k e =
     let (extra_meta,ty) = transform_top alts (k e) in
     extra_meta_decls := extra_meta @ !extra_meta_decls;
     ty in
-  
+
   let res =
     V0.rebuilder
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing
       donothing exprfn typefn donothing donothing declfn stmtfn
       donothing topfn in
@@ -2280,7 +2283,6 @@ let rewrap =
   let donothing r k e = Ast0.context_wrap(Ast0.unwrap(k e)) in
   V0.rebuilder
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing donothing donothing donothing
     donothing donothing donothing donothing donothing donothing donothing
     donothing donothing
index 46d2768..28e7093 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -168,7 +168,7 @@ let check_var s linetype =
        (try (Hashtbl.find type_names s) linetype
        with Not_found ->
          (try (Hashtbl.find declarer_names s) linetype
-         with Not_found -> 
+         with Not_found ->
            (try (Hashtbl.find iterator_names s) linetype
            with Not_found -> TIdent (s,linetype)))) in
   if !Data.in_meta or !Data.in_rule_name
@@ -187,6 +187,8 @@ let id_tokens lexbuf =
   | "type" when in_meta ->       check_arity_context_linetype s; TType
   | "parameter" when in_meta ->  check_arity_context_linetype s; TParameter
   | "constant"  when in_meta ->  check_arity_context_linetype s; TConstant
+  | "generated" when in_rule_name && not (!Flag.make_hrule = None) ->
+      check_arity_context_linetype s; TGenerated
   | "expression" when in_meta || in_rule_name ->
       check_arity_context_linetype s; TExpression
   | "idexpression" when in_meta ->
@@ -230,9 +232,10 @@ let id_tokens lexbuf =
   | "void" ->       Tvoid     linetype
   | "struct" ->     Tstruct   linetype
   | "union" ->      Tunion    linetype
+  | "enum" ->       Tenum     linetype
   | "unsigned" ->   Tunsigned linetype
   | "signed" ->     Tsigned   linetype
-       
+
   | "auto"  ->      Tauto     linetype
   | "register" ->   Tregister linetype
   | "extern" ->     Textern   linetype
@@ -405,7 +408,7 @@ let hex = ['0'-'9' 'a'-'f' 'A'-'F']
 
 let decimal = ('0' | (['1'-'9'] dec*))
 let octal   = ['0']        oct+
-let hexa    = ("0x" |"0X") hex+ 
+let hexa    = ("0x" |"0X") hex+
 
 let pent   = dec+
 let pfract = dec+
@@ -517,7 +520,7 @@ rule token = parse
                     then TMPtVirg (* works better with tokens_all *)
                     else TPtVirg (get_current_line_type lexbuf) }
 
-  
+
   | '*'            { pass_zero();
                     if !current_line_started
                     then
@@ -526,56 +529,56 @@ rule token = parse
                       (patch_or_match MATCH;
                        add_current_line_type D.MINUS; token lexbuf) }
   | '/'            { start_line true;
-                    TDmOp (Ast.Div,get_current_line_type lexbuf) } 
+                    TDmOp (Ast.Div,get_current_line_type lexbuf) }
   | '%'            { start_line true;
-                    TDmOp (Ast.Mod,get_current_line_type lexbuf) } 
-  | '~'            { start_line true;  TTilde (get_current_line_type lexbuf) } 
-  
+                    TDmOp (Ast.Mod,get_current_line_type lexbuf) }
+  | '~'            { start_line true;  TTilde (get_current_line_type lexbuf) }
+
   | "++"           { start_line true;  TInc (get_current_line_type lexbuf) }
   | "--"           { start_line true;  TDec (get_current_line_type lexbuf) }
-  
-  | "="            { start_line true; TEq (get_current_line_type lexbuf) } 
-  
+
+  | "="            { start_line true; TEq (get_current_line_type lexbuf) }
+
   | "-="           { start_line true; mkassign Ast.Minus lexbuf }
   | "+="           { start_line true; mkassign Ast.Plus lexbuf }
-  
+
   | "*="           { start_line true; mkassign Ast.Mul lexbuf }
   | "/="           { start_line true; mkassign Ast.Div lexbuf }
   | "%="           { start_line true; mkassign Ast.Mod lexbuf }
-  
+
   | "&="           { start_line true; mkassign Ast.And lexbuf }
   | "|="           { start_line true; mkassign Ast.Or lexbuf }
   | "^="           { start_line true; mkassign Ast.Xor lexbuf }
-  
+
   | "<<="          { start_line true; mkassign Ast.DecLeft lexbuf }
   | ">>="          { start_line true; mkassign Ast.DecRight lexbuf }
 
   | ":"            { start_line true; TDotDot (get_current_line_type lexbuf) }
-  
+
   | "=="           { start_line true; TEqEq   (get_current_line_type lexbuf) }
-  | "!="           { start_line true; TNotEq  (get_current_line_type lexbuf) } 
+  | "!="           { start_line true; TNotEq  (get_current_line_type lexbuf) }
   | ">="           { start_line true;
                     TLogOp(Ast.SupEq,get_current_line_type lexbuf) }
   | "<="           { start_line true;
                     TLogOp(Ast.InfEq,get_current_line_type lexbuf) }
   | "<"            { start_line true;
-                    TLogOp(Ast.Inf,get_current_line_type lexbuf) } 
+                    TLogOp(Ast.Inf,get_current_line_type lexbuf) }
   | ">"            { start_line true;
                     TLogOp(Ast.Sup,get_current_line_type lexbuf) }
-  
-  | "&&"           { start_line true; TAndLog (get_current_line_type lexbuf) } 
+
+  | "&&"           { start_line true; TAndLog (get_current_line_type lexbuf) }
   | "||"           { start_line true; TOrLog  (get_current_line_type lexbuf) }
-  
+
   | ">>"           { start_line true;
                     TShOp(Ast.DecRight,get_current_line_type lexbuf) }
   | "<<"           { start_line true;
                     TShOp(Ast.DecLeft,get_current_line_type lexbuf) }
-  
+
   | "&"            { start_line true; TAnd    (get_current_line_type lexbuf) }
   | "^"            { start_line true; TXor(get_current_line_type lexbuf) }
 
   | ( ("#" [' ' '\t']*  "define" [' ' '\t']+))
-    ( (letter (letter |digit)*) as ident) 
+    ( (letter (letter |digit)*) as ident)
       { start_line true;
        let (arity,line,lline,offset,col,strbef,straft,pos) as lt =
          get_current_line_type lexbuf in
@@ -586,7 +589,7 @@ rule token = parse
           check_var ident
             (arity,line,lline,offset+off,(-1),[],[],Ast0.NoMetaPos)) }
   | ( ("#" [' ' '\t']*  "define" [' ' '\t']+))
-    ( (letter (letter | digit)*) as ident) 
+    ( (letter (letter | digit)*) as ident)
     '('
       { start_line true;
        let (arity,line,lline,offset,col,strbef,straft,pos) as lt =
@@ -639,7 +642,7 @@ rule token = parse
           (get_current_line_type lexbuf))) }
 
   | letter (letter | digit)*
-      { start_line true; id_tokens lexbuf } 
+      { start_line true; id_tokens lexbuf }
 
   | "'" { start_line true;
          TChar(char lexbuf,get_current_line_type lexbuf) }
@@ -647,9 +650,9 @@ rule token = parse
          TString(string lexbuf,(get_current_line_type lexbuf)) }
   | (real as x)    { start_line true;
                     TFloat(x,(get_current_line_type lexbuf)) }
-  | ((( decimal | hexa | octal) 
-      ( ['u' 'U'] 
-      | ['l' 'L']  
+  | ((( decimal | hexa | octal)
+      ( ['u' 'U']
+      | ['l' 'L']
       | (['l' 'L'] ['u' 'U'])
       | (['u' 'U'] ['l' 'L'])
       | (['u' 'U'] ['l' 'L'] ['l' 'L'])
@@ -678,7 +681,7 @@ and char = parse
            | _ -> lexerr "unrecognised symbol: " (tok lexbuf)
            );
           x
-       } 
+       }
   | _ { lexerr "unrecognised symbol: " (tok lexbuf) }
 
 and string  = parse
@@ -686,14 +689,14 @@ and string  = parse
   | (_ as x)                   { Common.string_of_char x ^ string lexbuf }
   | ("\\" (oct | oct oct | oct oct oct)) as x { x ^ string lexbuf }
   | ("\\x" (hex | hex hex)) as x              { x ^ string lexbuf }
-  | ("\\" (_ as v)) as x  
-       { 
+  | ("\\" (_ as v)) as x
+       {
          (match v with
-         | 'n' -> ()  | 't' -> ()   | 'v' -> ()  | 'b' -> () | 'r' -> () 
+         | 'n' -> ()  | 't' -> ()   | 'v' -> ()  | 'b' -> () | 'r' -> ()
         | 'f' -> () | 'a' -> ()
         | '\\' -> () | '?'  -> () | '\'' -> ()  | '"' -> ()
          | 'e' -> ()
-         | '\n' -> () 
+         | '\n' -> ()
          | _ -> lexerr "unrecognised symbol:" (tok lexbuf)
         );
           x ^ string lexbuf
index 7e051db..2210b4e 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 58a59b5..a7f31c6 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 58a081d..04e0f39 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 274b37f..1190521 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -262,6 +262,7 @@ let check_meta tok =
   | Ast.MetaExpListDecl(Ast.NONE,(rule,name),len_name) ->
       (match lookup rule name with
        Ast.MetaExpListDecl(_,_,_) -> ()
+      | Ast.MetaParamListDecl(_,_,_) when not (!Flag.make_hrule = None) -> ()
       | _ ->
          raise
            (Semantic_cocci.Semantic
@@ -459,6 +460,16 @@ let make_cocci_rule_name_result nm d i a e ee =
       Ast.CocciRulename (Some n,d,i,a,e,ee)
   | None -> Ast.CocciRulename (None,d,i,a,e,ee)
 
+let make_generated_rule_name_result nm d i a e ee =
+  match nm with
+    Some nm ->
+      let n = id2name nm in
+      (try let _ =  Hashtbl.find Data.all_metadecls n in
+      raise (Semantic_cocci.Semantic ("repeated rule name"))
+      with Not_found -> ());
+      Ast.GeneratedRulename (Some n,d,i,a,e,ee)
+  | None -> Ast.GeneratedRulename (None,d,i,a,e,ee)
+
 let make_script_rule_name_result lang deps =
   let l = id2name lang in
        Ast.ScriptRulename (l,deps)
index 212dcda..bd217cc 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -33,7 +33,7 @@ let pr = Printf.sprintf
 let pr2 s = Printf.printf "%s\n" s
 
 (* for isomorphisms.  all should be at the front!!! *)
-let reserved_names = 
+let reserved_names =
   ["all";"optional_storage";"optional_qualifier";"value_format";"comm_assoc"]
 
 (* ----------------------------------------------------------------------- *)
@@ -82,6 +82,7 @@ let token2c (tok,_) =
   | PC.TReverse -> "reverse"
   | PC.TError -> "error"
   | PC.TWords -> "words"
+  | PC.TGenerated -> "generated"
 
   | PC.TNothing -> "nothing"
 
@@ -94,6 +95,7 @@ let token2c (tok,_) =
   | PC.Tvoid(clt) -> "void"^(line_type2c clt)
   | PC.Tstruct(clt) -> "struct"^(line_type2c clt)
   | PC.Tunion(clt) -> "union"^(line_type2c clt)
+  | PC.Tenum(clt) -> "enum"^(line_type2c clt)
   | PC.Tunsigned(clt) -> "unsigned"^(line_type2c clt)
   | PC.Tsigned(clt) -> "signed"^(line_type2c clt)
   | PC.Tstatic(clt) -> "static"^(line_type2c clt)
@@ -116,7 +118,7 @@ let token2c (tok,_) =
 
   | PC.TInc(clt) -> "++"^(line_type2c clt)
   | PC.TDec(clt) -> "--"^(line_type2c clt)
-       
+
   | PC.TIf(clt) -> "if"^(line_type2c clt)
   | PC.TElse(clt) -> "else"^(line_type2c clt)
   | PC.TWhile(clt) -> "while"^(line_type2c clt)
@@ -272,7 +274,8 @@ let plus_attachable (tok,_) =
   match tok with
     PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
   | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt) | PC.Tstatic(clt)
+  | PC.Tunion(clt) | PC.Tenum(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
+  | PC.Tstatic(clt)
   | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt)
   | PC.Tauto(clt) | PC.Tregister(clt)
   | PC.Textern(clt) | PC.Tconst(clt) | PC.Tvolatile(clt)
@@ -281,7 +284,7 @@ let plus_attachable (tok,_) =
   | PC.TDefineParam(clt,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
 
   | PC.TInc(clt) | PC.TDec(clt)
-       
+
   | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
   | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt) | PC.TReturn(clt)
   | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt) | PC.TIdent(_,clt)
@@ -302,19 +305,19 @@ let plus_attachable (tok,_) =
   | PC.TMetaLocalIdExp(_,_,_,_,clt)
   | PC.TMetaExpList(_,_,_,clt)
   | PC.TMetaId(_,_,_,clt)
-  | PC.TMetaType(_,_,clt) | PC.TMetaStm(_,_,clt)  
-  | PC.TMetaStmList(_,_,clt)  | PC.TMetaFunc(_,_,_,clt) 
+  | PC.TMetaType(_,_,clt) | PC.TMetaStm(_,_,clt)
+  | PC.TMetaStmList(_,_,clt)  | PC.TMetaFunc(_,_,_,clt)
   | PC.TMetaLocalFunc(_,_,_,clt)
 
   | PC.TWhen(clt) |  PC.TWhenTrue(clt) |  PC.TWhenFalse(clt)
   | PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
   (* | PC.TCircles(clt) | PC.TStars(clt) *)
 
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt) 
+  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt)
   | PC.TCPar(clt)
 
   | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt)
-  | PC.TOInit(clt) 
+  | PC.TOInit(clt)
 
   | PC.TPtrOp(clt)
 
@@ -323,7 +326,7 @@ let plus_attachable (tok,_) =
       if line_type clt = D.PLUS then PLUS else NOTPLUS
 
   | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar0(clt)
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt) 
+  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt)
   | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (* | PC.TOCircles(clt)
   | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *) -> NOTPLUS
   | PC.TMetaPos(nm,_,_,_) -> NOTPLUS
@@ -334,7 +337,8 @@ let get_clt (tok,_) =
   match tok with
     PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
   | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt) | PC.Tstatic(clt)
+  | PC.Tunion(clt) | PC.Tenum(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
+  | PC.Tstatic(clt)
   | PC.Tinline(clt) | PC.Tattr(_,clt) | PC.Tauto(clt) | PC.Tregister(clt)
   | PC.Textern(clt) | PC.Tconst(clt) | PC.Tvolatile(clt)
 
@@ -342,7 +346,7 @@ let get_clt (tok,_) =
   | PC.TDefineParam(clt,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
 
   | PC.TInc(clt) | PC.TDec(clt)
-       
+
   | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
   | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt) | PC.TReturn(clt)
   | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt) | PC.TIdent(_,clt)
@@ -363,15 +367,15 @@ let get_clt (tok,_) =
   | PC.TMetaLocalIdExp(_,_,_,_,clt)
   | PC.TMetaExpList(_,_,_,clt)
   | PC.TMetaId(_,_,_,clt)
-  | PC.TMetaType(_,_,clt) | PC.TMetaStm(_,_,clt)  
-  | PC.TMetaStmList(_,_,clt)  | PC.TMetaFunc(_,_,_,clt) 
+  | PC.TMetaType(_,_,clt) | PC.TMetaStm(_,_,clt)
+  | PC.TMetaStmList(_,_,clt)  | PC.TMetaFunc(_,_,_,clt)
   | PC.TMetaLocalFunc(_,_,_,clt) | PC.TMetaPos(_,_,_,clt)
 
   | PC.TWhen(clt) | PC.TWhenTrue(clt) | PC.TWhenFalse(clt) |
     PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
   (* | PC.TCircles(clt) | PC.TStars(clt) *)
 
-  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt) 
+  | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt)
   | PC.TCPar(clt)
 
   | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt)
@@ -400,6 +404,7 @@ let update_clt (tok,x) clt =
   | PC.Tvoid(_) -> (PC.Tvoid(clt),x)
   | PC.Tstruct(_) -> (PC.Tstruct(clt),x)
   | PC.Tunion(_) -> (PC.Tunion(clt),x)
+  | PC.Tenum(_) -> (PC.Tenum(clt),x)
   | PC.Tunsigned(_) -> (PC.Tunsigned(clt),x)
   | PC.Tsigned(_) -> (PC.Tsigned(clt),x)
   | PC.Tstatic(_) -> (PC.Tstatic(clt),x)
@@ -421,7 +426,7 @@ let update_clt (tok,x) clt =
 
   | PC.TInc(_) -> (PC.TInc(clt),x)
   | PC.TDec(_) -> (PC.TDec(clt),x)
-       
+
   | PC.TIf(_) -> (PC.TIf(clt),x)
   | PC.TElse(_) -> (PC.TElse(clt),x)
   | PC.TWhile(_) -> (PC.TWhile(clt),x)
@@ -535,17 +540,17 @@ let make_name prefix ln = Printf.sprintf "%s starting on line %d" prefix ln
 (* Read tokens *)
 
 let wrap_lexbuf_info lexbuf =
-  (Lexing.lexeme lexbuf, Lexing.lexeme_start lexbuf)    
+  (Lexing.lexeme lexbuf, Lexing.lexeme_start lexbuf)
 
 let tokens_all_full token table file get_ats lexbuf end_markers :
     (bool * ((PC.token * (string * (int * int) * (int * int))) list)) =
-  try 
-    let rec aux () = 
+  try
+    let rec aux () =
       let result = token lexbuf in
-      let info = (Lexing.lexeme lexbuf, 
+      let info = (Lexing.lexeme lexbuf,
                   (table.(Lexing.lexeme_start lexbuf)),
                   (Lexing.lexeme_start lexbuf, Lexing.lexeme_end lexbuf)) in
-      if result = PC.EOF 
+      if result = PC.EOF
       then
        if get_ats
        then failwith "unexpected end of file in a metavariable declaration"
@@ -555,7 +560,7 @@ let tokens_all_full token table file get_ats lexbuf end_markers :
       else
        let (more,rest) = aux() in
        (more,(result, info)::rest)
-    in aux () 
+    in aux ()
   with
     e -> pr2 (Common.error_message file (wrap_lexbuf_info lexbuf) ); raise e
 
@@ -587,11 +592,11 @@ let split_token ((tok,_) as t) =
   | PC.TPathIsoFile(_)
   | PC.TDepends | PC.TOn | PC.TEver | PC.TNever | PC.TExists | PC.TForall
   | PC.TReverse
-  | PC.TError | PC.TWords | PC.TNothing -> ([t],[t])
+  | PC.TError | PC.TWords | PC.TGenerated | PC.TNothing -> ([t],[t])
 
   | PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
   | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
+  | PC.Tunion(clt) | PC.Tenum(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
   | PC.Tstatic(clt) | PC.Tauto(clt) | PC.Tregister(clt) | PC.Textern(clt)
   | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt)
   | PC.Tconst(clt) | PC.Tvolatile(clt) -> split t clt
@@ -717,7 +722,7 @@ let rec detect_attr l =
   let is_id = function
       (PC.TIdent(_,_),_) | (PC.TMetaId(_,_,_,_),_) | (PC.TMetaFunc(_,_,_,_),_)
     | (PC.TMetaLocalFunc(_,_,_,_),_) -> true
-    | _ -> false in    
+    | _ -> false in
   let rec loop = function
       [] -> []
     | [x] -> [x]
@@ -764,7 +769,7 @@ let detect_types in_meta_decls l =
     | (PC.TMetaType(_,_,_),_)
     | (PC.TMetaStm(_,_,_),_)
     | (PC.TMetaStmList(_,_,_),_)
-    | (PC.TMetaPos(_,_,_,_),_) -> in_meta_decls 
+    | (PC.TMetaPos(_,_,_,_),_) -> in_meta_decls
     | _ -> false in
   let redo_id ident clt v =
     !Data.add_type_name ident;
@@ -822,33 +827,33 @@ let detect_types in_meta_decls l =
 
 let token2line (tok,_) =
   match tok with
-    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt) 
-  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt) 
-  | PC.Tunion(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
-  | PC.Tstatic(clt) | PC.Tauto(clt) | PC.Tregister(clt) | PC.Textern(clt) 
+    PC.Tchar(clt) | PC.Tshort(clt) | PC.Tint(clt) | PC.Tdouble(clt)
+  | PC.Tfloat(clt) | PC.Tlong(clt) | PC.Tvoid(clt) | PC.Tstruct(clt)
+  | PC.Tunion(clt) | PC.Tenum(clt) | PC.Tunsigned(clt) | PC.Tsigned(clt)
+  | PC.Tstatic(clt) | PC.Tauto(clt) | PC.Tregister(clt) | PC.Textern(clt)
   | PC.Tinline(clt) | PC.Ttypedef(clt) | PC.Tattr(_,clt) | PC.Tconst(clt)
-  | PC.Tvolatile(clt) 
+  | PC.Tvolatile(clt)
 
-  | PC.TInc(clt) | PC.TDec(clt) 
-       
-  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt) 
+  | PC.TInc(clt) | PC.TDec(clt)
+
+  | PC.TIf(clt) | PC.TElse(clt) | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
   | PC.TSwitch (clt) | PC.TCase (clt) | PC.TDefault (clt) | PC.TSizeof (clt)
   | PC.TReturn(clt) | PC.TBreak(clt) | PC.TContinue(clt) | PC.TGoto(clt)
   | PC.TIdent(_,clt)
   | PC.TTypeId(_,clt) | PC.TDeclarerId(_,clt) | PC.TIteratorId(_,clt)
   | PC.TMetaDeclarer(_,_,_,clt) | PC.TMetaIterator(_,_,_,clt)
 
-  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt) 
+  | PC.TString(_,clt) | PC.TChar(_,clt) | PC.TFloat(_,clt) | PC.TInt(_,clt)
 
   | PC.TOrLog(clt) | PC.TAndLog(clt) | PC.TOr(clt) | PC.TXor(clt)
-  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt) 
-  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt) 
-  | PC.TDmOp(_,clt) | PC.TTilde (clt) 
+  | PC.TAnd (clt) | PC.TEqEq(clt) | PC.TNotEq(clt) | PC.TLogOp(_,clt)
+  | PC.TShOp(_,clt) | PC.TPlus(clt) | PC.TMinus(clt) | PC.TMul(clt)
+  | PC.TDmOp(_,clt) | PC.TTilde (clt)
 
-  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt) 
+  | PC.TMetaParam(_,_,clt) | PC.TMetaParamList(_,_,_,clt)
   | PC.TMetaConst(_,_,_,_,clt) | PC.TMetaExp(_,_,_,_,clt)
   | PC.TMetaIdExp(_,_,_,_,clt) | PC.TMetaLocalIdExp(_,_,_,_,clt)
-  | PC.TMetaExpList(_,_,_,clt) 
+  | PC.TMetaExpList(_,_,_,clt)
   | PC.TMetaId(_,_,_,clt) | PC.TMetaType(_,_,clt)
   | PC.TMetaStm(_,_,clt) | PC.TMetaStmList(_,_,clt) | PC.TMetaFunc(_,_,_,clt)
   | PC.TMetaLocalFunc(_,_,_,clt) | PC.TMetaPos(_,_,_,clt)
@@ -858,23 +863,23 @@ let token2line (tok,_) =
   | PC.TAny(clt) | PC.TStrict(clt) | PC.TEllipsis(clt)
   (* | PC.TCircles(clt) | PC.TStars(clt) *)
 
-  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt) 
+  | PC.TOEllipsis(clt) | PC.TCEllipsis(clt)
   | PC.TPOEllipsis(clt) | PC.TPCEllipsis(clt) (*| PC.TOCircles(clt)
   | PC.TCCircles(clt) | PC.TOStars(clt) | PC.TCStars(clt) *)
 
   | PC.TWhy(clt) | PC.TDotDot(clt) | PC.TBang(clt) | PC.TOPar(clt)
-  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar(clt)  
-  | PC.TCPar0(clt) 
+  | PC.TOPar0(clt) | PC.TMid0(clt) | PC.TCPar(clt)
+  | PC.TCPar0(clt)
 
-  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt) 
+  | PC.TOBrace(clt) | PC.TCBrace(clt) | PC.TOCro(clt) | PC.TCCro(clt)
   | PC.TOInit(clt)
 
-  | PC.TPtrOp(clt) 
+  | PC.TPtrOp(clt)
 
   | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_)
   | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt)
 
-  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt) 
+  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
   | PC.TPtVirg(clt) ->
       let (_,line,_,_,_,_,_,_) = clt in Some line
 
@@ -942,11 +947,15 @@ let find_top_init tokens =
        Some x -> x
       |        None ->
          (match List.rev rest with
-           ((PC.EOF,_) as x)::rest ->
+           (* not super sure what this does, but EOF, @, and @@ should be
+              the same, markind the end of a rule *)
+           ((PC.EOF,_) as x)::rest | ((PC.TArob,_) as x)::rest
+         | ((PC.TArobArob,_) as x)::rest ->
              (match comma_end [x] rest with
                Some x -> x
              | None -> tokens)
-         | _ -> failwith "unexpected empty token list"))
+         | _ ->
+             failwith "unexpected empty token list"))
   | _ -> tokens
 
 (* ----------------------------------------------------------------------- *)
@@ -970,7 +979,7 @@ let rec collect_up_to_pragmas skipped = function
       |        SKIP -> collect_up_to_pragmas (x::skipped) xs
 
 let rec collect_up_to_plus skipped = function
-    [] -> failwith "nothing to attach a pragma to"
+    [] -> failwith "nothing to attach a pragma to (empty)"
   | x::xs ->
       match plus_attachable x with
        PLUS -> (List.rev skipped,x,xs)
@@ -1026,17 +1035,21 @@ let rec drop_double_dots l =
   let middle = function
       (PC.TEllipsis(_),_) (* | (PC.TCircles(_),_) | (PC.TStars(_),_) *) -> true
     | _ -> false in
+  let whenline = function
+      (PC.TLineEnd(_),_) -> true
+    | (PC.TMid0(_),_) -> true
+    | _ -> false in
   let final = function
       (PC.TCEllipsis(_),_) | (PC.TPCEllipsis(_),_)
  (* | (PC.TCCircles(_),_) | (PC.TCStars(_),_) *) ->
        true
     | _ -> false in
+  let any_before x = start x or middle x or final x or whenline x in
+  let any_after x = start x or middle x or final x in
   let rec loop ((_,i) as prev) = function
       [] -> []
-    | x::rest when middle prev && middle x -> (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when start prev && middle x ->  (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when start prev && final x ->   (PC.TNothing,i)::x::(loop x rest)
-    | x::rest when middle prev && final x ->  (PC.TNothing,i)::x::(loop x rest)
+    | x::rest when any_before prev && any_after x ->
+       (PC.TNothing,i)::x::(loop x rest)
     | x::rest -> x :: (loop x rest) in
   match l with
     [] -> []
@@ -1076,7 +1089,7 @@ let drop_empty_nest = drop_empty_thing
 let get_s_starts (_, (s,_,(starts, ends))) =
   Printf.printf "%d %d\n" starts ends; (s, starts)
 
-let pop2 l = 
+let pop2 l =
   let v = List.hd !l in
   l := List.tl !l;
   v
@@ -1102,8 +1115,8 @@ let parse_one str parsefn file toks =
 
   reinit();
 
-  try parsefn lexer_function lexbuf_fake 
-  with 
+  try parsefn lexer_function lexbuf_fake
+  with
     Lexer_cocci.Lexical s ->
       failwith
        (Printf.sprintf "%s: lexical error: %s\n =%s\n" str s
@@ -1125,6 +1138,9 @@ let prepare_tokens tokens =
        (insert_line_end
          (detect_types false (find_function_names (detect_attr tokens)))))
 
+let prepare_mv_tokens tokens =
+  detect_types false (detect_attr tokens)
+
 let rec consume_minus_positions = function
     [] -> []
   | ((PC.TOPar0(_),_) as x)::xs | ((PC.TCPar0(_),_) as x)::xs
@@ -1150,7 +1166,6 @@ let any_modif rule =
   let fn =
     V0.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing
       donothing donothing donothing donothing donothing donothing donothing
       donothing donothing in
@@ -1161,7 +1176,7 @@ let drop_last extra l = List.rev(extra@(List.tl(List.rev l)))
 let partition_either l =
   let rec part_either left right = function
   | [] -> (List.rev left, List.rev right)
-  | x :: l -> 
+  | x :: l ->
       (match x with
       | Common.Left  e -> part_either (e :: left) right l
       | Common.Right e -> part_either left (e :: right) l) in
@@ -1171,7 +1186,7 @@ let get_metavars parse_fn table file lexbuf =
   let rec meta_loop acc (* read one decl at a time *) =
     let (_,tokens) =
       tokens_all table file true lexbuf [PC.TArobArob;PC.TMPtVirg] in
-    let tokens = prepare_tokens tokens in
+    let tokens = prepare_mv_tokens tokens in
     match tokens with
       [(PC.TArobArob,_)] -> List.rev acc
     | _ ->
@@ -1186,7 +1201,7 @@ let get_script_metavars parse_fn table file lexbuf =
     let tokens = prepare_tokens tokens in
     match tokens with
       [(PC.TArobArob, _)] -> List.rev acc
-    | _ -> 
+    | _ ->
       let metavar = parse_one "scriptmeta" parse_fn file tokens in
       meta_loop (metavar :: acc)
   in
@@ -1199,13 +1214,17 @@ let get_rule_name parse_fn starts_with_name get_tokens file prefix =
     if starts_with_name
     then
       let (_,tokens) = get_tokens [PC.TArob] in
+      let check_name = function
+         None -> Some (mknm())
+       | Some nm ->
+           (if List.mem nm reserved_names
+           then failwith (Printf.sprintf "invalid name %s\n" nm));
+           Some nm in
       match parse_one "rule name" parse_fn file tokens with
-       Ast.CocciRulename (None,a,b,c,d,e) -> 
-          Ast.CocciRulename (Some (mknm()),a,b,c,d,e)
-      |        Ast.CocciRulename (Some nm,a,b,c,d,e) ->
-         (if List.mem nm reserved_names
-         then failwith (Printf.sprintf "invalid name %s\n" nm));
-         Ast.CocciRulename (Some nm,a,b,c,d,e)
+       Ast.CocciRulename (nm,a,b,c,d,e) ->
+          Ast.CocciRulename (check_name nm,a,b,c,d,e)
+      | Ast.GeneratedRulename (nm,a,b,c,d,e) ->
+          Ast.GeneratedRulename (check_name nm,a,b,c,d,e)
       | Ast.ScriptRulename(s,deps) -> Ast.ScriptRulename(s,deps)
     else
       Ast.CocciRulename(Some(mknm()),Ast.NoDep,[],[],Ast.Undetermined,false) in
@@ -1310,7 +1329,7 @@ let parse file =
          let iso_files =
            parse_one "iso file names" PC.include_main file data in
 
-          let parse_cocci_rule old_metas
+          let parse_cocci_rule ruletype old_metas
              (rule_name, dependencies, iso, dropiso, exists, is_expression) =
             Ast0.rule_name := rule_name;
             Data.inheritable_positions :=
@@ -1380,7 +1399,7 @@ let parse file =
 
             (more, Ast0.CocciRule ((minus_res, metavars,
               (iso, dropiso, dependencies, rule_name, exists)),
-              (plus_res, metavars)), metavars, tokens) in
+              (plus_res, metavars), ruletype), metavars, tokens) in
 
           let parse_script_rule language old_metas deps =
             let get_tokens = tokens_script_all table file false lexbuf in
@@ -1421,8 +1440,14 @@ let parse file =
              get_rule_name PC.rule_name starts_with_name get_tokens file
                "rule" in
             match rulename with
-              Ast.CocciRulename (Some s, a, b, c, d, e) -> 
-                parse_cocci_rule old_metas (s, a, b, c, d, e)
+              Ast.CocciRulename (Some s, a, b, c, d, e) ->
+                parse_cocci_rule Ast.Normal old_metas (s, a, b, c, d, e)
+            | Ast.GeneratedRulename (Some s, a, b, c, d, e) ->
+               Data.in_generating := true;
+                let res =
+                 parse_cocci_rule Ast.Generated old_metas (s,a,b,c,d,e) in
+               Data.in_generating := false;
+               res
             | Ast.ScriptRulename (l,deps) -> parse_script_rule l old_metas deps
             | _ -> failwith "Malformed rule name"
             in
@@ -1435,7 +1460,7 @@ let parse file =
               (match List.hd (List.rev tokens) with
                     (PC.TArobArob,_) -> false
                   | (PC.TArob,_) -> true
-                  | _ -> failwith "unexpected token") 
+                  | _ -> failwith "unexpected token")
             in
 
             let (more, rule, metavars, tokens) =
@@ -1472,7 +1497,7 @@ let process file isofile verbose =
        | Ast0.CocciRule
            ((minus, metavarsm,
              (iso, dropiso, dependencies, rule_name, exists)),
-            (plus, metavars)) ->
+            (plus, metavars),ruletype) ->
               let chosen_isos =
                 parse_iso_files global_isos
                   (List.map (function x -> Common.Left x) iso)
@@ -1491,8 +1516,8 @@ let process file isofile verbose =
                   failwith
                     ("invalid iso name " ^ bad_dropped ^ " in " ^ rule_name)
                 with Not_found -> ());
-                if List.mem "all" dropiso 
-                then 
+                if List.mem "all" dropiso
+                then
                   if List.length dropiso = 1
                   then []
                   else failwith "disable all should only be by itself"
@@ -1530,14 +1555,19 @@ let process file isofile verbose =
               let minus = Arity.minus_arity minus in
               let ((metavars,minus),function_prototypes) =
                 Function_prototypes.process
-                  rule_name metavars dropped_isos minus plus in
+                  rule_name metavars dropped_isos minus plus ruletype in
           (* warning! context_neg side-effects its arguments *)
-              let (m,p) = List.split (Context_neg.context_neg minus plus) in 
+              let (m,p) = List.split (Context_neg.context_neg minus plus) in
               Type_infer.type_infer p;
-              (if not !Flag.sgrep_mode2 then Insert_plus.insert_plus m p);
+              (if not !Flag.sgrep_mode2
+              then Insert_plus.insert_plus m p (chosen_isos = []));
               Type_infer.type_infer minus;
               let (extra_meta, minus) =
-                Iso_pattern.apply_isos chosen_isos minus rule_name in
+                match (chosen_isos,ruletype) with
+                  (* separate case for [] because applying isos puts
+                     some restrictions on the -+ code *)
+                  ([],_) | (_,Ast.Generated) -> ([],minus)
+                | _ -> Iso_pattern.apply_isos chosen_isos minus rule_name in
               let minus = Comm_assoc.comm_assoc minus rule_name dropiso in
               let minus =
                 if !Flag.sgrep_mode2 then minus
@@ -1545,7 +1575,7 @@ let process file isofile verbose =
               let minus = Simple_assignments.simple_assignments minus in
               let minus_ast =
                 Ast0toast.ast0toast rule_name dependencies dropped_isos
-                  exists minus is_exp in
+                  exists minus is_exp ruletype in
               match function_prototypes with
                 None -> [(extra_meta @ metavars, minus_ast)]
               | Some mv_fp ->
@@ -1554,15 +1584,15 @@ let process file isofile verbose =
       rules in
   let parsed = List.concat parsed in
   let disjd = Disjdistr.disj parsed in
-  
-  let (code,fvs,neg_pos,ua,pos) = Free_vars.free_vars disjd in
+
+  let (metavars,code,fvs,neg_pos,ua,pos) = Free_vars.free_vars disjd in
   if !Flag_parsing_cocci.show_SP
   then List.iter Pretty_print_cocci.unparse code;
-  
+
   let grep_tokens =
     Common.profile_code "get_constants"
       (fun () -> Get_constants.get_constants code) in (* for grep *)
   let glimpse_tokens2 =
     Common.profile_code "get_glimpse_constants"
       (fun () -> Get_constants2.get_constants code neg_pos) in(* for glimpse *)
-  (code,fvs,neg_pos,ua,pos,grep_tokens,glimpse_tokens2)
+  (metavars,code,fvs,neg_pos,ua,pos,grep_tokens,glimpse_tokens2)
index 9ef89f6..c7e2164 100644 (file)
@@ -1,7 +1,7 @@
 val process :
     string (* filename *) -> string option (* iso filename *) ->
       bool (* verbose? *) ->
-       (Ast_cocci.rule list) *
+       (Ast_cocci.metavar list list) * (Ast_cocci.rule list) *
          (((Ast_cocci.meta_name list) list) list) (*fvs of the rule*) *
          (((Ast_cocci.meta_name list) list) list) (*negated pos vars*) *
          (((Ast_cocci.meta_name list) list) list) (*used after list*) *
index b34a116..b907736 100644 (file)
@@ -1,5 +1,5 @@
 /*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -34,8 +34,8 @@ parameter needs both a type and an identifier *)
 module Ast0 = Ast0_cocci
 module Ast = Ast_cocci
 
-(*let warning s v = 
-  if !Flag.verbose_parsing 
+(*let warning s v =
+  if !Flag.verbose_parsing
   then Common.warning s v
   else v*)
 
@@ -133,12 +133,12 @@ TMetaExp TMetaConst
 %token <Data.line_type * int * int> TAndLog
 %token <Data.line_type * int * int> TOr
 %token <Data.line_type * int * int> TXor
-%token <Data.line_type * int * int> TAnd 
+%token <Data.line_type * int * int> TAnd
 %token <Data.line_type * int * int> TEqEq TNotEq
-%token <Data.line_type * int * int> TInf TSup TInfEq TSupEq 
+%token <Data.line_type * int * int> TInf TSup TInfEq TSupEq
 %token <Data.line_type * int * int> TShl TShr
 %token <Data.line_type * int * int> TPlus TMinus
-%token <Data.line_type * int * int> TMul TDiv TMod 
+%token <Data.line_type * int * int> TMul TDiv TMod
 
 %token <Data.line_type * int * int> TOBrace TCBrace
 %token <Data.line_type * int * int> TOCro TCCro
@@ -156,14 +156,14 @@ TMetaExp TMetaConst
 %left TAndLog
 %left TOr
 %left TXor
-%left TAnd 
+%left TAnd
 %left TEqEq TNotEq
-%left TInf TSup TInfEq TSupEq 
+%left TInf TSup TInfEq TSupEq
 %left TShl TShr
 %left TPlus TMinus
-%left TMul TDiv TMod 
+%left TMul TDiv TMod
 
-%start main 
+%start main
 %type <Ast0_cocci.rule> main
 
 %start meta_main
@@ -199,19 +199,19 @@ meta_var:
        (function name ->
          !Data.add_type_meta name;
          Ast.MetaTypeDecl($1,name))
-       $3 } 
+       $3 }
 | arity TParameter pure_ident_or_meta_ident_list TPtVirg
     { List.map
        (function name ->
          !Data.add_param_meta name;
          Ast.MetaParamDecl($1,name))
-       $3 } 
+       $3 }
 | arity TParameter Tlist pure_ident_or_meta_ident_list TPtVirg
     { List.map
        (function name ->
          !Data.add_paramlist_meta name;
          Ast.MetaParamListDecl($1,name))
-       $4 } 
+       $4 }
 | arity TError pure_ident_or_meta_ident_list TPtVirg
     { List.map
        (function name ->
@@ -558,7 +558,7 @@ eassign_expr: econd_expr                         { $1 }
            | eunary_expr TEq eassign_expr
                { Ast0.Assignment($1,clt2mcode Ast.SimpleAssign $2,$3)  }
 
-econd_expr: earith_expr                          { $1 } 
+econd_expr: earith_expr                          { $1 }
          | earith_expr TWhy eexpr_opt TDotDot econd_expr
             { Ast0.CondExpr ($1, clt2mcode "?" $2, $3, clt2mcode "?" $4, $5) }
 
@@ -650,7 +650,7 @@ dassign_expr: dcond_expr                         { $1 }
            | dunary_expr TEq dassign_expr
                { Ast0.Assignment($1,clt2mcode Ast.SimpleAssign $2,$3)  }
 
-dcond_expr: darith_expr                          { $1 } 
+dcond_expr: darith_expr                          { $1 }
          | darith_expr TWhy eexpr_opt TDotDot dcond_expr
             { Ast0.CondExpr ($1, clt2mcode "?" $2, $3, clt2mcode "?" $4, $5) }
 
index 2abc53a..17852c9 100644 (file)
@@ -93,337 +93,342 @@ type token =
 # 53 "parser_cocci_menhir.mly"
       (Data.clt)
 # 96 "parser_cocci_menhir.ml"
+)
+  | Tenum of (
+# 50 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 101 "parser_cocci_menhir.ml"
 )
   | Tdouble of (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 101 "parser_cocci_menhir.ml"
+# 106 "parser_cocci_menhir.ml"
 )
   | Tconst of (
 # 54 "parser_cocci_menhir.mly"
       (Data.clt)
-# 106 "parser_cocci_menhir.ml"
+# 111 "parser_cocci_menhir.ml"
 )
   | Tchar of (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 111 "parser_cocci_menhir.ml"
+# 116 "parser_cocci_menhir.ml"
 )
   | Tauto of (
 # 53 "parser_cocci_menhir.mly"
       (Data.clt)
-# 116 "parser_cocci_menhir.ml"
+# 121 "parser_cocci_menhir.ml"
 )
   | Tattr of (
 # 55 "parser_cocci_menhir.mly"
       (string * Data.clt)
-# 121 "parser_cocci_menhir.ml"
+# 126 "parser_cocci_menhir.ml"
 )
   | TXor of (
 # 91 "parser_cocci_menhir.mly"
        (Data.clt)
-# 126 "parser_cocci_menhir.ml"
+# 131 "parser_cocci_menhir.ml"
 )
   | TWords
   | TWhy0
   | TWhy of (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 133 "parser_cocci_menhir.ml"
+# 138 "parser_cocci_menhir.ml"
 )
   | TWhile of (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 138 "parser_cocci_menhir.ml"
+# 143 "parser_cocci_menhir.ml"
 )
   | TWhenTrue of (
 # 73 "parser_cocci_menhir.mly"
        (Data.clt)
-# 143 "parser_cocci_menhir.ml"
+# 148 "parser_cocci_menhir.ml"
 )
   | TWhenFalse of (
 # 73 "parser_cocci_menhir.mly"
        (Data.clt)
-# 148 "parser_cocci_menhir.ml"
+# 153 "parser_cocci_menhir.ml"
 )
   | TWhen of (
 # 73 "parser_cocci_menhir.mly"
        (Data.clt)
-# 153 "parser_cocci_menhir.ml"
+# 158 "parser_cocci_menhir.ml"
 )
   | TUsing
   | TTypedef
   | TTypeId of (
 # 59 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 160 "parser_cocci_menhir.ml"
+# 165 "parser_cocci_menhir.ml"
 )
   | TType
   | TTilde of (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 166 "parser_cocci_menhir.ml"
+# 171 "parser_cocci_menhir.ml"
 )
   | TSwitch of (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 171 "parser_cocci_menhir.ml"
+# 176 "parser_cocci_menhir.ml"
 )
   | TString of (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 176 "parser_cocci_menhir.ml"
+# 181 "parser_cocci_menhir.ml"
 )
   | TStrict of (
 # 73 "parser_cocci_menhir.mly"
        (Data.clt)
-# 181 "parser_cocci_menhir.ml"
+# 186 "parser_cocci_menhir.ml"
 )
   | TStatement
   | TSizeof of (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 187 "parser_cocci_menhir.ml"
+# 192 "parser_cocci_menhir.ml"
 )
   | TShOp of (
 # 95 "parser_cocci_menhir.mly"
        (Ast_cocci.arithOp * Data.clt)
-# 192 "parser_cocci_menhir.ml"
+# 197 "parser_cocci_menhir.ml"
 )
   | TScriptData of (
 # 70 "parser_cocci_menhir.mly"
        (string)
-# 197 "parser_cocci_menhir.ml"
+# 202 "parser_cocci_menhir.ml"
 )
   | TScript
   | TRuleName of (
 # 47 "parser_cocci_menhir.mly"
       (string)
-# 203 "parser_cocci_menhir.ml"
+# 208 "parser_cocci_menhir.ml"
 )
   | TRightIso
   | TReverse
   | TReturn of (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 210 "parser_cocci_menhir.ml"
+# 215 "parser_cocci_menhir.ml"
 )
   | TPure
   | TPtrOp of (
 # 103 "parser_cocci_menhir.mly"
        (Data.clt)
-# 216 "parser_cocci_menhir.ml"
+# 221 "parser_cocci_menhir.ml"
 )
   | TPtVirg of (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 221 "parser_cocci_menhir.ml"
+# 226 "parser_cocci_menhir.ml"
 )
   | TPragma of (
 # 78 "parser_cocci_menhir.mly"
        (string)
-# 226 "parser_cocci_menhir.ml"
+# 231 "parser_cocci_menhir.ml"
 )
   | TPosition
   | TPosAny
   | TPlusFile of (
 # 82 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 233 "parser_cocci_menhir.ml"
+# 238 "parser_cocci_menhir.ml"
 )
   | TPlus0
   | TPlus of (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 239 "parser_cocci_menhir.ml"
+# 244 "parser_cocci_menhir.ml"
 )
   | TPathIsoFile of (
 # 78 "parser_cocci_menhir.mly"
        (string)
-# 244 "parser_cocci_menhir.ml"
+# 249 "parser_cocci_menhir.ml"
 )
   | TParameter
   | TPOEllipsis of (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 250 "parser_cocci_menhir.ml"
+# 255 "parser_cocci_menhir.ml"
 )
   | TPCEllipsis of (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 255 "parser_cocci_menhir.ml"
+# 260 "parser_cocci_menhir.ml"
 )
   | TPArob
   | TOrLog of (
 # 88 "parser_cocci_menhir.mly"
        (Data.clt)
-# 261 "parser_cocci_menhir.ml"
+# 266 "parser_cocci_menhir.ml"
 )
   | TOr of (
 # 90 "parser_cocci_menhir.mly"
        (Data.clt)
-# 266 "parser_cocci_menhir.ml"
+# 271 "parser_cocci_menhir.ml"
 )
   | TOn
   | TOPar0 of (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 272 "parser_cocci_menhir.ml"
+# 277 "parser_cocci_menhir.ml"
 )
   | TOPar of (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 277 "parser_cocci_menhir.ml"
+# 282 "parser_cocci_menhir.ml"
 )
   | TOInit of (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 282 "parser_cocci_menhir.ml"
+# 287 "parser_cocci_menhir.ml"
 )
   | TOEllipsis of (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 287 "parser_cocci_menhir.ml"
+# 292 "parser_cocci_menhir.ml"
 )
   | TOCro of (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 292 "parser_cocci_menhir.ml"
+# 297 "parser_cocci_menhir.ml"
 )
   | TOBrace of (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 297 "parser_cocci_menhir.ml"
+# 302 "parser_cocci_menhir.ml"
 )
   | TNothing
   | TNotEq of (
 # 93 "parser_cocci_menhir.mly"
        (Data.clt)
-# 303 "parser_cocci_menhir.ml"
+# 308 "parser_cocci_menhir.ml"
 )
   | TNever
   | TName
   | TMul of (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 310 "parser_cocci_menhir.ml"
+# 315 "parser_cocci_menhir.ml"
 )
   | TMinusFile of (
 # 82 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 315 "parser_cocci_menhir.ml"
+# 320 "parser_cocci_menhir.ml"
 )
   | TMinus of (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 320 "parser_cocci_menhir.ml"
+# 325 "parser_cocci_menhir.ml"
 )
   | TMid0 of (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 325 "parser_cocci_menhir.ml"
+# 330 "parser_cocci_menhir.ml"
 )
   | TMetaType of (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 330 "parser_cocci_menhir.ml"
+# 335 "parser_cocci_menhir.ml"
 )
   | TMetaStmList of (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 335 "parser_cocci_menhir.ml"
+# 340 "parser_cocci_menhir.ml"
 )
   | TMetaStm of (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 340 "parser_cocci_menhir.ml"
+# 345 "parser_cocci_menhir.ml"
 )
   | TMetaPos of (
 # 67 "parser_cocci_menhir.mly"
        (Parse_aux.pos_info)
-# 345 "parser_cocci_menhir.ml"
+# 350 "parser_cocci_menhir.ml"
 )
   | TMetaParamList of (
 # 65 "parser_cocci_menhir.mly"
        (Parse_aux.list_info)
-# 350 "parser_cocci_menhir.ml"
+# 355 "parser_cocci_menhir.ml"
 )
   | TMetaParam of (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 355 "parser_cocci_menhir.ml"
+# 360 "parser_cocci_menhir.ml"
 )
   | TMetaLocalIdExp of (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 360 "parser_cocci_menhir.ml"
+# 365 "parser_cocci_menhir.ml"
 )
   | TMetaLocalFunc of (
 # 61 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 365 "parser_cocci_menhir.ml"
+# 370 "parser_cocci_menhir.ml"
 )
   | TMetaIterator of (
 # 62 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 370 "parser_cocci_menhir.ml"
+# 375 "parser_cocci_menhir.ml"
 )
   | TMetaIdExp of (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 375 "parser_cocci_menhir.ml"
+# 380 "parser_cocci_menhir.ml"
 )
   | TMetaId of (
 # 61 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 380 "parser_cocci_menhir.ml"
+# 385 "parser_cocci_menhir.ml"
 )
   | TMetaFunc of (
 # 61 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 385 "parser_cocci_menhir.ml"
+# 390 "parser_cocci_menhir.ml"
 )
   | TMetaExpList of (
 # 65 "parser_cocci_menhir.mly"
        (Parse_aux.list_info)
-# 390 "parser_cocci_menhir.ml"
+# 395 "parser_cocci_menhir.ml"
 )
   | TMetaExp of (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 395 "parser_cocci_menhir.ml"
+# 400 "parser_cocci_menhir.ml"
 )
   | TMetaErr of (
 # 63 "parser_cocci_menhir.mly"
        (Parse_aux.expinfo)
-# 400 "parser_cocci_menhir.ml"
+# 405 "parser_cocci_menhir.ml"
 )
   | TMetaDeclarer of (
 # 62 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 405 "parser_cocci_menhir.ml"
+# 410 "parser_cocci_menhir.ml"
 )
   | TMetaConst of (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 410 "parser_cocci_menhir.ml"
+# 415 "parser_cocci_menhir.ml"
 )
   | TMPtVirg
   | TLogOp of (
 # 94 "parser_cocci_menhir.mly"
        (Ast_cocci.logicalOp * Data.clt)
-# 416 "parser_cocci_menhir.ml"
+# 421 "parser_cocci_menhir.ml"
 )
   | TLocal
   | TLineEnd of (
 # 73 "parser_cocci_menhir.mly"
        (Data.clt)
-# 422 "parser_cocci_menhir.ml"
+# 427 "parser_cocci_menhir.ml"
 )
   | TIteratorId of (
 # 59 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 427 "parser_cocci_menhir.ml"
+# 432 "parser_cocci_menhir.ml"
 )
   | TIterator
   | TIsoType
@@ -438,57 +443,58 @@ type token =
   | TInt of (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 442 "parser_cocci_menhir.ml"
+# 447 "parser_cocci_menhir.ml"
 )
   | TIncludeNL of (
 # 79 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 447 "parser_cocci_menhir.ml"
+# 452 "parser_cocci_menhir.ml"
 )
   | TIncludeL of (
 # 79 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 452 "parser_cocci_menhir.ml"
+# 457 "parser_cocci_menhir.ml"
 )
   | TInc of (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 457 "parser_cocci_menhir.ml"
+# 462 "parser_cocci_menhir.ml"
 )
   | TIf of (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 462 "parser_cocci_menhir.ml"
+# 467 "parser_cocci_menhir.ml"
 )
   | TIdentifier
   | TIdent of (
 # 59 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 468 "parser_cocci_menhir.ml"
+# 473 "parser_cocci_menhir.ml"
 )
   | TIdExpression
   | TGoto of (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 474 "parser_cocci_menhir.ml"
+# 479 "parser_cocci_menhir.ml"
 )
+  | TGenerated
   | TFunction
   | TFunDecl of (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 480 "parser_cocci_menhir.ml"
+# 486 "parser_cocci_menhir.ml"
 )
   | TFresh
   | TForall
   | TFor of (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 487 "parser_cocci_menhir.ml"
+# 493 "parser_cocci_menhir.ml"
 )
   | TFloat of (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 492 "parser_cocci_menhir.ml"
+# 498 "parser_cocci_menhir.ml"
 )
   | TExtends
   | TExpression
@@ -498,150 +504,150 @@ type token =
   | TEqEq of (
 # 93 "parser_cocci_menhir.mly"
        (Data.clt)
-# 502 "parser_cocci_menhir.ml"
+# 508 "parser_cocci_menhir.ml"
 )
   | TEq of (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 507 "parser_cocci_menhir.ml"
+# 513 "parser_cocci_menhir.ml"
 )
   | TElse of (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 512 "parser_cocci_menhir.ml"
+# 518 "parser_cocci_menhir.ml"
 )
   | TEllipsis of (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 517 "parser_cocci_menhir.ml"
+# 523 "parser_cocci_menhir.ml"
 )
   | TDotDot of (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 522 "parser_cocci_menhir.ml"
+# 528 "parser_cocci_menhir.ml"
 )
   | TDot of (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 527 "parser_cocci_menhir.ml"
+# 533 "parser_cocci_menhir.ml"
 )
   | TDo of (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 532 "parser_cocci_menhir.ml"
+# 538 "parser_cocci_menhir.ml"
 )
   | TDmOp of (
 # 96 "parser_cocci_menhir.mly"
        (Ast_cocci.arithOp * Data.clt)
-# 537 "parser_cocci_menhir.ml"
+# 543 "parser_cocci_menhir.ml"
 )
   | TDisable
   | TDepends
   | TDefineParam of (
 # 81 "parser_cocci_menhir.mly"
        (Data.clt * token * int)
-# 544 "parser_cocci_menhir.ml"
+# 550 "parser_cocci_menhir.ml"
 )
   | TDefine of (
 # 80 "parser_cocci_menhir.mly"
        (Data.clt * token)
-# 549 "parser_cocci_menhir.ml"
+# 555 "parser_cocci_menhir.ml"
 )
   | TDefault of (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 554 "parser_cocci_menhir.ml"
+# 560 "parser_cocci_menhir.ml"
 )
   | TDeclarerId of (
 # 59 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 559 "parser_cocci_menhir.ml"
+# 565 "parser_cocci_menhir.ml"
 )
   | TDeclarer
   | TDec of (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 565 "parser_cocci_menhir.ml"
+# 571 "parser_cocci_menhir.ml"
 )
   | TContinue of (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 570 "parser_cocci_menhir.ml"
+# 576 "parser_cocci_menhir.ml"
 )
   | TContext
   | TConstant
   | TComma of (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 577 "parser_cocci_menhir.ml"
+# 583 "parser_cocci_menhir.ml"
 )
   | TChar of (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 582 "parser_cocci_menhir.ml"
+# 588 "parser_cocci_menhir.ml"
 )
   | TCase of (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 587 "parser_cocci_menhir.ml"
+# 593 "parser_cocci_menhir.ml"
 )
   | TCPar0 of (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 592 "parser_cocci_menhir.ml"
+# 598 "parser_cocci_menhir.ml"
 )
   | TCPar of (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 597 "parser_cocci_menhir.ml"
+# 603 "parser_cocci_menhir.ml"
 )
   | TCEllipsis of (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 602 "parser_cocci_menhir.ml"
+# 608 "parser_cocci_menhir.ml"
 )
   | TCCro of (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 607 "parser_cocci_menhir.ml"
+# 613 "parser_cocci_menhir.ml"
 )
   | TCBrace of (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 612 "parser_cocci_menhir.ml"
+# 618 "parser_cocci_menhir.ml"
 )
   | TBreak of (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 617 "parser_cocci_menhir.ml"
+# 623 "parser_cocci_menhir.ml"
 )
   | TBang0
   | TBang of (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 623 "parser_cocci_menhir.ml"
+# 629 "parser_cocci_menhir.ml"
 )
   | TAssign of (
 # 107 "parser_cocci_menhir.mly"
        (Ast_cocci.assignOp * Data.clt)
-# 628 "parser_cocci_menhir.ml"
+# 634 "parser_cocci_menhir.ml"
 )
   | TArobArob
   | TArob
   | TAny of (
 # 73 "parser_cocci_menhir.mly"
        (Data.clt)
-# 635 "parser_cocci_menhir.ml"
+# 641 "parser_cocci_menhir.ml"
 )
   | TAndLog of (
 # 89 "parser_cocci_menhir.mly"
        (Data.clt)
-# 640 "parser_cocci_menhir.ml"
+# 646 "parser_cocci_menhir.ml"
 )
   | TAnd of (
 # 92 "parser_cocci_menhir.mly"
        (Data.clt)
-# 645 "parser_cocci_menhir.ml"
+# 651 "parser_cocci_menhir.ml"
 )
   | EOF
 
@@ -660,304 +666,308 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
     fun _tok ->
       match _tok with
       | EOF ->
-          166
+          168
       | TAnd _ ->
-          165
+          167
       | TAndLog _ ->
-          164
+          166
       | TAny _ ->
-          163
+          165
       | TArob ->
-          162
+          164
       | TArobArob ->
-          161
+          163
       | TAssign _ ->
-          160
+          162
       | TBang _ ->
-          159
+          161
       | TBang0 ->
-          158
+          160
       | TBreak _ ->
-          157
+          159
       | TCBrace _ ->
-          156
+          158
       | TCCro _ ->
-          155
+          157
       | TCEllipsis _ ->
-          154
+          156
       | TCPar _ ->
-          153
+          155
       | TCPar0 _ ->
-          152
+          154
       | TCase _ ->
-          151
+          153
       | TChar _ ->
-          150
+          152
       | TComma _ ->
-          149
+          151
       | TConstant ->
-          148
+          150
       | TContext ->
-          147
+          149
       | TContinue _ ->
-          146
+          148
       | TDec _ ->
-          145
+          147
       | TDeclarer ->
-          144
+          146
       | TDeclarerId _ ->
-          143
+          145
       | TDefault _ ->
-          142
+          144
       | TDefine _ ->
-          141
+          143
       | TDefineParam _ ->
-          140
+          142
       | TDepends ->
-          139
+          141
       | TDisable ->
-          138
+          140
       | TDmOp _ ->
-          137
+          139
       | TDo _ ->
-          136
+          138
       | TDot _ ->
-          135
+          137
       | TDotDot _ ->
-          134
+          136
       | TEllipsis _ ->
-          133
+          135
       | TElse _ ->
-          132
+          134
       | TEq _ ->
-          131
+          133
       | TEqEq _ ->
-          130
+          132
       | TError ->
-          129
+          131
       | TEver ->
-          128
+          130
       | TExists ->
-          127
+          129
       | TExpression ->
-          126
+          128
       | TExtends ->
-          125
+          127
       | TFloat _ ->
-          124
+          126
       | TFor _ ->
-          123
+          125
       | TForall ->
-          122
+          124
       | TFresh ->
-          121
+          123
       | TFunDecl _ ->
-          120
+          122
       | TFunction ->
-          119
+          121
+      | TGenerated ->
+          120
       | TGoto _ ->
-          118
+          119
       | TIdExpression ->
-          117
+          118
       | TIdent _ ->
-          116
+          117
       | TIdentifier ->
-          115
+          116
       | TIf _ ->
-          114
+          115
       | TInc _ ->
-          113
+          114
       | TIncludeL _ ->
-          112
+          113
       | TIncludeNL _ ->
-          111
+          112
       | TInt _ ->
-          110
+          111
       | TInvalid ->
-          109
+          110
       | TIso ->
-          108
+          109
       | TIsoArgExpression ->
-          107
+          108
       | TIsoDeclaration ->
-          106
+          107
       | TIsoExpression ->
-          105
+          106
       | TIsoStatement ->
-          104
+          105
       | TIsoTestExpression ->
-          103
+          104
       | TIsoTopLevel ->
-          102
+          103
       | TIsoType ->
-          101
+          102
       | TIterator ->
-          100
+          101
       | TIteratorId _ ->
-          99
+          100
       | TLineEnd _ ->
-          98
+          99
       | TLocal ->
-          97
+          98
       | TLogOp _ ->
-          96
+          97
       | TMPtVirg ->
-          95
+          96
       | TMetaConst _ ->
-          94
+          95
       | TMetaDeclarer _ ->
-          93
+          94
       | TMetaErr _ ->
-          92
+          93
       | TMetaExp _ ->
-          91
+          92
       | TMetaExpList _ ->
-          90
+          91
       | TMetaFunc _ ->
-          89
+          90
       | TMetaId _ ->
-          88
+          89
       | TMetaIdExp _ ->
-          87
+          88
       | TMetaIterator _ ->
-          86
+          87
       | TMetaLocalFunc _ ->
-          85
+          86
       | TMetaLocalIdExp _ ->
-          84
+          85
       | TMetaParam _ ->
-          83
+          84
       | TMetaParamList _ ->
-          82
+          83
       | TMetaPos _ ->
-          81
+          82
       | TMetaStm _ ->
-          80
+          81
       | TMetaStmList _ ->
-          79
+          80
       | TMetaType _ ->
-          78
+          79
       | TMid0 _ ->
-          77
+          78
       | TMinus _ ->
-          76
+          77
       | TMinusFile _ ->
-          75
+          76
       | TMul _ ->
-          74
+          75
       | TName ->
-          73
+          74
       | TNever ->
-          72
+          73
       | TNotEq _ ->
-          71
+          72
       | TNothing ->
-          70
+          71
       | TOBrace _ ->
-          69
+          70
       | TOCro _ ->
-          68
+          69
       | TOEllipsis _ ->
-          67
+          68
       | TOInit _ ->
-          66
+          67
       | TOPar _ ->
-          65
+          66
       | TOPar0 _ ->
-          64
+          65
       | TOn ->
-          63
+          64
       | TOr _ ->
-          62
+          63
       | TOrLog _ ->
-          61
+          62
       | TPArob ->
-          60
+          61
       | TPCEllipsis _ ->
-          59
+          60
       | TPOEllipsis _ ->
-          58
+          59
       | TParameter ->
-          57
+          58
       | TPathIsoFile _ ->
-          56
+          57
       | TPlus _ ->
-          55
+          56
       | TPlus0 ->
-          54
+          55
       | TPlusFile _ ->
-          53
+          54
       | TPosAny ->
-          52
+          53
       | TPosition ->
-          51
+          52
       | TPragma _ ->
-          50
+          51
       | TPtVirg _ ->
-          49
+          50
       | TPtrOp _ ->
-          48
+          49
       | TPure ->
-          47
+          48
       | TReturn _ ->
-          46
+          47
       | TReverse ->
-          45
+          46
       | TRightIso ->
-          44
+          45
       | TRuleName _ ->
-          43
+          44
       | TScript ->
-          42
+          43
       | TScriptData _ ->
-          41
+          42
       | TShOp _ ->
-          40
+          41
       | TSizeof _ ->
-          39
+          40
       | TStatement ->
-          38
+          39
       | TStrict _ ->
-          37
+          38
       | TString _ ->
-          36
+          37
       | TSwitch _ ->
-          35
+          36
       | TTilde _ ->
-          34
+          35
       | TType ->
-          33
+          34
       | TTypeId _ ->
-          32
+          33
       | TTypedef ->
-          31
+          32
       | TUsing ->
-          30
+          31
       | TWhen _ ->
-          29
+          30
       | TWhenFalse _ ->
-          28
+          29
       | TWhenTrue _ ->
-          27
+          28
       | TWhile _ ->
-          26
+          27
       | TWhy _ ->
-          25
+          26
       | TWhy0 ->
-          24
+          25
       | TWords ->
-          23
+          24
       | TXor _ ->
-          22
+          23
       | Tattr _ ->
-          21
+          22
       | Tauto _ ->
-          20
+          21
       | Tchar _ ->
-          19
+          20
       | Tconst _ ->
-          18
+          19
       | Tdouble _ ->
+          18
+      | Tenum _ ->
           17
       | Textern _ ->
           16
@@ -1094,6 +1104,8 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           Obj.repr _v
       | TFunction ->
           Obj.repr ()
+      | TGenerated ->
+          Obj.repr ()
       | TGoto _v ->
           Obj.repr _v
       | TIdExpression ->
@@ -1298,6 +1310,8 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           Obj.repr _v
       | Tdouble _v ->
           Obj.repr _v
+      | Tenum _v ->
+          Obj.repr _v
       | Textern _v ->
           Obj.repr _v
       | Tfloat _v ->
@@ -1332,19 +1346,19 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           Obj.repr _v
   
   let default_reduction =
-    (16, "\000\000\000\000\001 \001!\000\000\001#\001\"\000\001\000\000\001[\000\000\000\000\000\136\000\000\000\000\001\214\000\142\000\145\002\195\002\194\000\146\001\013\001\019\001\015\001\018\001\017\000\135\001\011\001\026\000\000\000\000\001\025\000\000\000\000\000\000\000\000\000\000\001O\000\232\002\185\002o\000\000\000\000\000\000\000\000\000\000\002\190\000\000\001\022\000\000\002\192\000\000\001\029\001\028\000\000\000\000\002\250\0029\000\000\002\248\000\000\002S\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\247\002\249\002?\001\004\002>\001\002\001\003\002=\002<\002;\0027\000\000\000\000\0028\000\205\000\000\002:\000\000\002\246\000\000\002\221\001\001\002\026\000\000\000\000\002\029\000\000\000\015\000\000\000\000\000\000\000\000\000\206\0026\002B\000[\000\021\000]\000\000\000\000\000c\000\000\000\000\000\000\000\000\000\000\000\000\000\022\000\000\000\023\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\130\001\251\000R\000\215\000^\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\\\000T\000\000\000S\000\000\000\000\000\140\000\216\000\000\002 \000\217\000\014\000\000\001\014\001\020\001\016\001\012\000\016\000\000\000\000\000\143\000\000\000\141\000\000\000\000\000\220\000\000\000\000\002\027\002\030\000\000\002\028\002\031\002\222\002\220\000\000\002@\002\219\000\000\002Z\000\000\000\000\002Y\002X\002W\002V\002U\002Q\000\000\000\000\002R\000\000\002T\000\000\000\000\002\235\002(\000\000\000\000\002+\000\000\000\000\002.\000\000\000\000\002)\002,\000\000\002*\002-\002\\\002P\002\236\002\234\002\233\000g\000h\000\000\000\000\000W\000\000\000V\000\227\000\000\001\206\000\000\000\000\000\000\000\000\000\000\000\210\001\212\000\000\000\000\001s\000U\0001\000\203\000_\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0002\000\000\0003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\132\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002A\000\000\000\144\000\000\000\000\001\190\000\000\001i\001\171\000\000\000\000\001\189\000\000\001g\001\170\000\000\000\000\000d\000\000\002[\000\000\000\000\002\238\002\237\000\000\001\207\000\000\000\000\002\224\002\223\000\000\000Q\000\147\000\000\001Q\000\000\002\188\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\226\000\151\000\000\000\000\000n\000o\001\225\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\160\001\195\000\000\000\148\000\155\000\000\001\197\000\000\000\000\000\000\000\000\000\149\000\161\000\000\001W\000\000\000\000\002\187\000\000\000\000\000\138\000\000\000\000\002\186\000\000\000\000\000\000\002\189\002\193\000\000\000\000\000\000\001\023\000\000\000\214\000\000\001\024\000\000\000\000\001:\000\000\0019\000\000\001G\000\000\001]\000\000\000\000\000\000\000\000\000\000\000\000\001\008\000\000\000\000\002\217\000\000\000\189\002\216\002\181\002\183\002\184\002\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002`\000\000\000\000\000\000\000\000\002g\000\000\000\000\002f\002e\002d\002c\002b\0016\002^\000\000\000\000\002_\000\000\002a\000\000\000\000\002\242\002/\000\000\000\000\0022\000\000\000\000\0025\000\000\000\000\0020\0023\000\000\0021\0024\002i\002]\002\243\002\241\002\240\000i\000j\000\000\000\000\000Z\000\000\000Y\000\000\002h\000\000\001\172\000X\000?\000\226\000`\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\134\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\245\002\244\000\000\002\172\000\000\002\171\000\000\000\000\000\000\000\000\003\001\000\000\000\000\000\000\003\002\000\000\000\018\000\000\000\000\000\000\002\253\000\000\001u\000\000\000\000\000\000\000\162\002\162\001M\000\000\000\153\001L\001%\001$\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\176\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\207\000\208\000\195\000\000\001Y\000\000\000\000\000\194\000\190\000\000\000\197\000\191\000\196\000\000\002\174\000\000\002\173\002\159\000\000\000\000\000\000\000\000\000\000\002\168\000\000\000\000\000\000\000\000\000\000\002\169\002\161\000\000\002\175\000\000\002\163\000\000\000\166\000\000\002\178\000\152\000\000\001'\000\000\000\000\000\000\000\000\000\000\000\000\001\t\000\000\000w\000\000\000\000\000\000\002F\000\000\000\000\000\000\002N\000\000\000\000\002M\000\000\002\231\002L\002K\002J\002I\002H\002D\000\000\000\000\002E\000\000\002G\000\000\000\000\002\228\002!\000\000\000\000\002$\000\000\000\000\002'\000\000\000\000\002\"\002%\000\000\002#\002&\002O\002C\002\229\002\227\002\226\002\230\000\000\000\000\000\000\000e\000f\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\212\001(\000\000\000\000\000\000\001.\000\000\000\000\001/\000#\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000$\000\000\000%\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001-\0012\000\000\001,\000\000\000\000\0014\000\000\000\000\000\000\000\000\000\000\000\000\000t\000q\000r\0015\0011\000\000\000\000\0010\001*\000\000\001)\000\000\000\182\000\000\002\140\000\000\000\000\000\178\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\185\000\000\000\000\000\188\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\007\000\000\000\000\000\000\000\175\000\000\000\172\000\000\000\000\000\000\000\000\000\000\000\183\000\000\000\179\000\000\000\000\002\199\000\000\002\206\000\168\000\000\000\000\000\000\000\000\000\180\000\000\000\176\000\173\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\184\000\000\000\000\000\187\000\000\002\200\000\167\000\000\002\201\000\000\002\208\000\000\000\000\000\000\000\000\000\186\000\000\000\170\000\000\000\000\000\000\000\000\001\006\000\000\000\000\000\000\000\174\000\000\000\171\000\000\000\000\000\000\000\000\000\000\000\181\000\000\000\177\000\164\000\163\000\000\002\209\002\210\000\000\002\211\000\000\002\212\000\000\001&\002\166\000\000\000\000\001\194\000\000\001q\001\176\000\000\002\160\000\000\000\000\000\000\002\165\000\000\000\000\000\000\000\250\000\000\000\244\000\000\000\245\000\000\000\255\000\243\000\254\000\000\002\177\001\000\000\000\000\169\000\000\000\000\000\000\000\000\000\252\000\247\001\191\000\000\000\248\000\000\000\249\000\000\001k\001\173\000\000\000\000\000\000\001\202\000\000\001\200\000\000\000\000\001\204\001\198\000\000\001\205\001\199\000\000\002\179\001\208\000\000\000\165\000\000\000\000\001\192\000\000\001m\001\174\000\000\002\254\000\000\002\251\000\000\002\252\000\019\000\020\000\000\000\000\002}\000\000\002|\000\000\000\000\002\127\000\000\002~\000\000\000\000\000\000\001\235\000\000\000\000\001\239\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\242\000\000\000\000\001\245\000\000\000\000\001\229\000\000\000\000\001\232\000\000\000\000\000\000\001\236\000\000\000\000\001\240\000\000\000\000\001\193\000\000\000\000\001\233\000\000\000\000\001\237\002z\001\230\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\241\000\000\000\000\001\244\000\000\002{\000\000\000\000\000\000\000\000\001\243\000\000\001\227\000\000\001\228\000\000\000\000\001\231\000\000\000\000\000\000\001\234\000\000\000\000\001\238\000\000\001o\001\175\000\000\002\128\000\000\000\000\000\000\002\255\000\017\000u\000\000\003\000\000\000\000\000\002\136\000\000\000\000\002\180\000a\000\000\000\000\000\000\000b\000\000\002\170\000\000\001S\002\167\000\000\000\000\001@\000\000\001?\000\000\001H\000\000\001c\000\000\000\000\000\000\001>\000\000\001=\000\000\001E\000\000\001a\000\000\000\000\000\000\001B\000\000\001A\000\000\001F\000\000\001e\000\000\000\000\000\000\001C\000\000\000\000\000\000\000\000\001<\000\000\001;\000\000\001I\000\000\001_\000\000\000\000\000\000\001D\000\002\000\000\000N\000O\000M\001J\000\003\000\000\000\000\002l\000\000\001\249\000\000\002r\002t\000\000\000\000\001\140\002s\000\128\000\000\000\000\002\158\000\000\000\000\000\000\000z\000\000\000\000\002\146\000\000\001\222\001\221\001\135\002x\002p\002q\000\000\001\167\000\000\002m\000\000\000\000\000|\000\000\000\000\002\150\000\000\001\149\000\000\000\000\001\146\000\000\000\000\000\000\001\148\000\000\001\147\000\000\000\000\000\000\000\000\000\000\000\000\001\168\000\000\001\144\000\000\001\143\000\000\000v\000\000\000\000\002\138\000\000\000\000\001\139\000\000\000\000\000~\000\000\000\000\002\154\000\000\000\000\000\000\000{\000\000\000\000\002\148\000\000\001\218\001\217\001\131\002v\000\000\001\154\000\000\000\000\000\000\001\151\000\000\001\156\000\000\000\000\001\152\000\000\000\000\001\153\000\000\000\000\000\000\001\142\000\000\000\000\000\000\000\000\000\000\000\000\001\169\000\000\001\145\000}\000\000\000\000\002\152\000\000\000\000\000\000\001\031\000y\001\030\000\000\000\000\002\144\000\000\001\216\001\215\001\129\002u\000\000\000\127\000\000\000\000\002\156\000\000\000\000\000\000\000\000\001\220\001\219\001\133\002w\000\000\001\161\000\000\001\165\000\000\000\000\001\157\000\000\000\000\000\000\001\150\000\000\001\155\000\000\000\000\000\000\000\000\000\000\000\000\001\164\001\138\000\000\001\163\000\000\000\000\000\000\000\000\001\160\000\000\000\000\001\159\000\000\001\158\000\000\000\000\000\000\000\000\001\162\000\000\001\166\000\000\000\000\001K\000\004\000\000\001\141\000\005\000\000\000\000\000\230\000\006\000\000\001\180\001\181\001\179\000\000\000\000\000\000\000\000\000\000\000\000\000x\000\000\000\000\002\142\000\000\000\221\001\178\001{\002\196\001}\000\000\000\007\000\000\001\183\001\184\001\182\000\000\000\000\000\000\000\000\000\000\000\000\000\231\000\234\000\000\000\000\000\000\000\000\000\239\000\241\000\240\000\235\000\237\000\236\000\000\000\000\002\197\001\188\001\187\000\000\000\000\000\000\000\000\002\202\002\213\000\000\002\203\000\000\002\204\001\127\000\000\001\177\001\185\000\000\000\000\000\000\000\000\001\224\000\000\000\000\000l\000m\000\000\000\000\000\000\001\223\000\000\000\158\000\000\001U\000\000\000\000\000\157\000\154\000\000\000\000\000\000\000\000\001\005\000\000\000\000\002\214\000\000\002\215\000\000\000\000\001\211\001\209\000\000\001\210\000\008\000\000\000\t\000\000\002\n\002\011\002\t\000\000\000\000\002\008\000\000\000\n\000\000\002\013\002\014\002\012\000\000\002\016\000\000\000\000\000\000\002\002\000\000\000\000\002\004\000\000\001\254\000\000\002\000\000\000\002\005\000\000\002\006\001\255\001\253\002\017\001\137\000\000\002\007\000\000\002\019\000\000\002\018\000\000\002\020\000\000\002y\000\011\000\000\000\000\000\000\000\000\000\000\000\000\002\021\000\000\000\000\002\024\000\000\002\023\000\000\002\022\000\198\000\000\000\000\000\000\000\000\000\199\002\025\000\000\000\000\002\131\000\000\000\229\000\012\000\000\000\000\000\000\000\000\000\000\000\000\002\134\000k\000\000\000\000\000\204\000\000\000\000\000\224\000\223\000\222\000\000\0018\000\000\002\130\001y\001w\000\000\000\000\000\000\000\000\000\000\000\000\002\129\000\000\000\013\000\000\000\000\000\000\000\000\000\000\002\132")
+    (16, "\000\000\000\000\001/\0010\000\000\0012\0011\000\001\000\000\001j\000\000\000\000\000\136\000\000\000\000\001\229\000\142\000\000\001\019\000\000\001\030\001\022\001\016\001(\002\212\002\211\000\000\001\020\000\000\001\031\001\023\001\017\001)\001\021\000\000\001 \001\024\001\026\000\000\001,\002~\001+\001!\001\025\000\135\001\018\001'\000\000\000\000\001&\000\000\000\000\000\000\000\000\000\000\001^\000\235\002\202\000\000\000\000\000\000\000\000\000\000\002\207\000\000\001#\000\000\002\209\000\000\000\000\000\000\003\015\002H\000\000\003\013\000\000\002b\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\012\003\014\002N\001\007\002M\001\005\001\006\002L\002K\002J\002F\000\000\000\000\002G\000\208\000\000\002I\000\000\003\011\000\000\002\242\001\004\002)\000\000\000\000\002,\000\000\000\015\000\000\000\000\000\000\000\000\000\209\002E\002Q\000[\000\021\000]\000\000\000\000\000c\000\000\000\000\000\000\000\000\000\000\000\000\000\022\000\000\000\023\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\130\002\n\000R\000\218\000^\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\\\000T\000\000\000S\001\015\000\000\000\000\000\140\000\219\000\000\002/\000\220\000\014\000\016\000\000\000\000\000\143\000\000\000\141\000\000\000\000\000\223\000\000\000\000\002*\002-\000\000\002+\002.\002\243\002\241\000\000\002O\002\240\000\000\002i\000\000\000\000\002h\002g\002f\002e\002d\002`\000\000\000\000\002a\000\000\002c\000\000\000\000\003\000\0027\000\000\000\000\002:\000\000\000\000\002=\000\000\000\000\0028\002;\000\000\0029\002<\002k\002_\003\001\002\255\002\254\000g\000h\000\000\000\000\000W\000\000\000V\000\230\000\000\001\221\000\000\000\000\000\000\000\000\000\000\000\213\001\227\000\000\000\000\001\130\000U\0001\000\206\000_\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0002\000\000\0003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\132\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002P\000\000\000\144\000\000\000\000\001\205\000\000\001x\001\186\000\000\000\000\001\204\000\000\001v\001\185\000\000\000\000\000d\000\000\002j\000\000\000\000\003\003\003\002\000\000\001\222\000\000\000\000\002\245\002\244\000\000\000Q\000\150\000\000\001`\000\000\002\205\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\241\000\154\000\000\000\000\000n\000o\001\240\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\163\001\210\000\000\000\151\000\158\000\000\001\212\000\000\000\000\000\000\000\000\000\152\000\164\000\000\001f\000\000\000\000\002\204\000\000\000\000\000\138\000\000\000\000\002\203\000\000\000\000\000\000\002\206\002\210\000\000\000\000\000\000\001$\000\000\000\217\000\000\001%\000\000\000\000\001I\000\000\001H\000\000\001V\000\000\001l\000\000\000\000\000\000\000\000\000\000\000\000\001\011\000\000\000\000\000\147\000\000\000\000\000\000\000\000\000\149\000\000\000\145\000\000\002\238\000\000\000\192\002\237\000\000\000\000\000\148\000\000\000\146\002\198\002\200\002\201\002\199\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002o\000\000\000\000\000\000\000\000\002v\000\000\000\000\002u\002t\002s\002r\002q\001E\002m\000\000\000\000\002n\000\000\002p\000\000\000\000\003\007\002>\000\000\000\000\002A\000\000\000\000\002D\000\000\000\000\002?\002B\000\000\002@\002C\002x\002l\003\008\003\006\003\005\000i\000j\000\000\000\000\000Z\000\000\000Y\000\000\002w\000\000\001\187\000X\000?\000\229\000`\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\134\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\n\003\t\000\000\002\189\000\000\002\188\000\000\000\000\000\000\000\000\003\022\000\000\000\000\000\000\003\023\000\000\000\018\000\000\000\000\000\000\003\018\000\000\001\132\000\000\000\000\000\000\000\165\002\179\001\\\000\000\000\156\001[\0014\0013\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\193\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\210\000\211\000\198\000\000\001h\000\000\000\000\000\197\000\193\000\000\000\200\000\194\000\199\000\000\002\191\000\000\002\190\002\176\000\000\000\000\000\000\000\000\000\000\002\185\000\000\000\000\000\000\000\000\000\000\002\186\002\178\000\000\002\192\000\000\002\180\000\000\000\169\000\000\002\195\000\155\000\000\0016\000\000\000\000\000\000\000\000\000\000\000\000\001\012\000\000\000w\000\000\000\000\000\000\002U\000\000\000\000\000\000\002]\000\000\000\000\002\\\000\000\002\252\002[\002Z\002Y\002X\002W\002S\000\000\000\000\002T\000\000\002V\000\000\000\000\002\249\0020\000\000\000\000\0023\000\000\000\000\0026\000\000\000\000\0021\0024\000\000\0022\0025\002^\002R\002\250\002\248\002\247\002\251\000\000\000\000\000\000\000e\000f\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\215\0017\000\000\000\000\000\000\001=\000\000\000\000\001>\000#\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000$\000\000\000%\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001<\001A\000\000\001;\000\000\000\000\001C\000\000\000\000\000\000\000\000\000\000\000\000\000t\000q\000r\001D\001@\000\000\000\000\001?\0019\000\000\0018\000\000\000\185\000\000\002\157\000\000\000\000\000\181\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\188\000\000\000\000\000\191\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\n\000\000\000\000\000\000\000\178\000\000\000\175\000\000\000\000\000\000\000\000\000\000\000\186\000\000\000\182\000\000\000\000\002\216\000\000\002\223\000\171\000\000\000\000\000\000\000\000\000\183\000\000\000\179\000\176\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\187\000\000\000\000\000\190\000\000\002\217\000\170\000\000\002\218\000\000\002\225\000\000\000\000\000\000\000\000\000\189\000\000\000\173\000\000\000\000\000\000\000\000\001\t\000\000\000\000\000\000\000\177\000\000\000\174\000\000\000\000\000\000\000\000\000\000\000\184\000\000\000\180\000\167\000\166\000\000\002\226\002\227\000\000\002\228\000\000\002\229\000\000\0015\002\183\000\000\000\000\001\209\000\000\001\128\001\191\000\000\002\177\000\000\000\000\000\000\002\182\000\000\000\000\000\000\000\253\000\000\000\247\000\000\000\248\000\000\001\002\000\246\001\001\000\000\002\194\001\003\000\000\000\172\000\000\000\000\000\000\000\000\000\255\000\250\001\206\000\000\000\251\000\000\000\252\000\000\001z\001\188\000\000\000\000\000\000\001\217\000\000\001\215\000\000\000\000\001\219\001\213\000\000\001\220\001\214\000\000\002\196\001\223\000\000\000\168\000\000\000\000\001\207\000\000\001|\001\189\000\000\003\019\000\000\003\016\000\000\003\017\000\019\000\020\000\000\000\000\002\141\000\000\002\140\000\000\000\000\002\143\000\000\002\142\000\000\000\000\000\000\001\250\000\000\000\000\001\254\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\001\000\000\000\000\002\004\000\000\000\000\001\244\000\000\000\000\001\247\000\000\000\000\000\000\001\251\000\000\000\000\001\255\000\000\000\000\001\208\000\000\000\000\001\248\000\000\000\000\001\252\002\138\001\245\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\002\003\000\000\002\139\000\000\000\000\000\000\000\000\002\002\000\000\001\242\000\000\001\243\000\000\000\000\001\246\000\000\000\000\000\000\001\249\000\000\000\000\001\253\000\000\001~\001\190\000\000\002\144\000\000\000\000\000\000\003\020\000\017\000u\000\000\003\021\000\000\000\000\002\153\000\000\000\000\002\197\000a\000\000\000\000\000\000\000b\000\000\002\187\000\000\001b\002\184\000\000\000\000\001O\000\000\001N\000\000\001W\000\000\001r\000\000\000\000\000\000\001M\000\000\001L\000\000\001T\000\000\001p\000\000\000\000\000\000\001Q\000\000\001P\000\000\001U\000\000\001t\000\000\000\000\000\000\001R\000\000\000\000\000\000\000\000\001K\000\000\001J\000\000\001X\000\000\001n\000\000\000\000\000\000\001S\000\002\000\000\000N\000O\000M\001Y\000\003\000\000\000\000\002{\000\000\002\008\000\000\002\129\002\131\000\000\000\000\001\155\002\132\002\130\000\128\000\000\000\000\002\175\000\000\000\000\000\000\000z\000\000\000\000\002\163\000\000\001\237\001\236\001\150\002\136\002\127\002\128\000\000\001\182\000\000\002|\000\000\000\000\000|\000\000\000\000\002\167\000\000\001\164\000\000\000\000\001\161\000\000\000\000\000\000\001\163\000\000\001\162\000\000\000\000\000\000\000\000\000\000\000\000\001\183\000\000\001\159\000\000\001\158\000\000\000v\000\000\000\000\002\155\000\000\000\000\001\154\000\000\000\000\000~\000\000\000\000\002\171\000\000\000\000\000\000\000{\000\000\000\000\002\165\000\000\001\233\001\232\001\146\002\134\000\000\001\169\000\000\000\000\000\000\001\166\000\000\001\171\000\000\000\000\001\167\000\000\000\000\001\168\000\000\000\000\000\000\001\157\000\000\000\000\000\000\000\000\000\000\000\000\001\184\000\000\001\160\000}\000\000\000\000\002\169\000\000\000\000\000\000\001.\000y\001-\000\000\000\000\002\161\000\000\001\231\001\230\001\144\002\133\000\000\000\127\000\000\000\000\002\173\000\000\000\000\000\000\000\000\001\235\001\234\001\148\002\135\000\000\001\176\000\000\001\180\000\000\000\000\001\172\000\000\000\000\000\000\001\165\000\000\001\170\000\000\000\000\000\000\000\000\000\000\000\000\001\179\001\153\000\000\001\178\000\000\000\000\000\000\000\000\001\175\000\000\000\000\001\174\000\000\001\173\000\000\000\000\000\000\000\000\001\177\000\000\001\181\000\000\000\000\001Z\000\004\000\000\001\156\000\005\000\000\000\000\000\233\000\006\000\000\001\195\001\196\001\194\000\000\000\000\000\000\000\000\000\000\000\000\000x\000\000\000\000\002\159\000\000\000\224\001\193\001\138\002\213\001\140\000\000\000\007\000\000\001\198\001\199\001\197\000\000\000\000\000\000\000\000\000\000\000\000\000\234\000\237\000\000\000\000\000\000\000\000\000\242\000\244\000\243\000\238\000\240\000\239\000\000\000\000\000\000\000\000\000\000\002\219\002\232\000\000\002\220\000\000\002\221\000\000\000\000\002\214\000\000\000\000\000\000\000\000\002\231\000\000\000\000\002\230\001\203\001\202\000\000\000\000\001\142\000\000\001\192\001\200\000\000\000\000\000\000\000\000\001\239\000\000\000\000\000l\000m\000\000\000\000\000\000\001\238\000\000\000\161\000\000\001d\000\000\000\000\000\160\000\157\000\000\000\000\000\000\000\000\001\008\000\000\000\000\002\235\000\000\002\236\000\000\000\000\001\226\001\224\000\000\001\225\000\008\000\000\000\t\000\000\002\025\002\026\002\024\000\000\000\000\002\023\000\000\000\n\000\000\002\028\002\029\002\027\000\000\002\031\000\000\000\000\000\000\002\017\000\000\000\000\002\019\000\000\002\013\000\000\002\015\000\000\002\020\000\000\002\021\002\014\002\012\002 \001\152\000\000\002\022\000\000\002\"\000\000\002!\000\000\002#\000\000\002\137\000\011\000\000\000\000\000\000\000\000\000\000\000\000\002$\000\000\000\000\002'\000\000\002&\000\000\002%\000\201\000\000\000\000\000\000\000\000\000\202\002(\000\000\000\000\002\148\000\000\000\000\000\232\000\000\000\000\000\000\000\000\000\000\002\151\000k\000\000\000\000\000\207\000\000\000\000\000\227\000\226\000\225\000\000\001G\000\000\002\147\001\136\001\134\000\012\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\146\000\000\000\000\000\000\000\000\000\000\000\000\002\145\000\000\000\013\000\000\000\000\000\000\000\000\000\000\002\149")
   
   let error =
-    (167, "\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000`\000\000\000\000\016\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000`\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\192\000\000\000\000\000\000\003\214\171\128\004\000\128\000\004\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\016\006\016\000\002\t\1290\008\002\002\000\016\000\0012\024\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000z\213p\000\128\016\000\000\128\002\000\000\000\000\000\000\000\000\000\000\000\002U\024\000\1280\128\000\152L\t\128@\016\017\000\128\000\t\144\197\235U\192\002\000@\000\002\008\008\000\000\000\000 \000\016\000\000\000\000\000\000\000\000\000\000\000\002\001\000\000\000\000\000\000\000\000\000\000\000\000\018(\192\000\000\004\000\004\002@L\002\000\000\136\004\000\000L\006 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\245\170\224\t\000 \000\001\004\004\000\000\000\000\016\000\000\000\000\016\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\003\214\171\128\004\000\128\000\004\016\016\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\008\000\000\000\128\000\000\000\000\000\015Z\174\000\016\002\000\000\016@@\000\000\000\001\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\245\170\224\001\000 \000\001\004\004\000\000\000\000\016\000\008\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\002\000\000\000\000\000\000\000\004\000\001\016\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\008\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t  \016\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128\128\000\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\002\000\000\016\128A\000\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\000\130\000\000\000\000)\000\001 \208(\013\218\000\002H\008\004\000B\001\004\245\170\224\001R \002A\160T\027\180\000\004\144\016\008\000\132\002\t\235U\192\002\164@\004\131@\1687h\000\t  \016\001\008\004\016\000\000\000\001H\000\t\006\129@n\208\000\018@@\000\002\016\008'\173W\000\n\145\000\018\013\002\160\221\160\000$\128\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\008\004\000B\001\004\000\000\000\000R\000\002A\160P\027\180\000\004\144\016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000$\000\008\140\019e\146\192\000\n\000\132\000\007t\004O\014\224\000\000\000\000\000\000\000\000\000\000\016\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000=j\184\000T\136\000\144h\021\006\253\000\001$\004\002\000! \130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\128\001\000\130\012\002X\000\001@\000\000\000\236\128\t\161\220\000\000\000\000\164\000\004\131@\1607h\000\t  \016\001\008\004\016\000\000\018\000\004B\t\176\137`\000\005\000@\000\003\178\000'\135p\000\000\000\002\144\000\018\013\002\128\221\160\000$\128\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\018\000\004B\t\176\137`\000\005\000@\000\0032\000'\131p\000\000\000\002\144\000\018\013\002\128\221\160\000$\128\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\144\000\"\016M\132K\000\000(\002\000\000\025\144\001<\027\128\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\000\130\000\000\002@\000\136A6\017,\000\000\160\008\000\000f@\004\240n\000\000\000\000R\000\002A\160P\027\180\000\004\144\016\008\000\132\002\008\000\000\t\000\002!\004\216D\176\000\002\128 \000\001\153\000\019\193\184\000\000\000\001H\000\t\006\129@n\208\000\018@@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\005\001\187@\000I\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\000\130\000\000\002@\000\136A6\017,\000\000\160\008\000\000f@\004\240n\000\000\000\000R\000\002A\160P\027\180\000\004\144\016\008\000\132\002\008\000\000\t\000\002!\004\216D\176\000\002\128 \000\001\153\000\019\193\184\000\000\000\001H\000\t\006\129@n\208\000\018@@ \002\016\008 \000\000$\000\008\132\019a\018\192\000\n\000\128\000\006d\000O\006\224\000\000\000\005 \000$\026\005\001\187@\000I\001\000\128\008@ \128\000\000\144\000\"\016M\132K\000\000(\002\000\000\025\144\001<\027\128\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\000\130\000\000\002@\000\136A6\017,\000\000\160\008\000\000f@\004\240n\000\000\000\000R\000\002A\160P\027\180\000\004\144\016\012\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002A\160P\027\180\000\004\144\016\008\000\132\002\008\000\000\t\000\002!\004\216D\176\000\002\128 \000\001\153\000\019\193\184\000\000\000\001H\000\t\006\129@n\208\000\018@@ \002\016\008 \000\000$\000\008\132\019a\018\192\000\n\000\128\000\006d\000O\006\224\000\000\000\005 \000$\026\005\001\187@\000I\001\000\128\008@ \128\000\000\144\000\"\016M\132K\000\000(\002\000\000\025\144\001<\027\128\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t  \016\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\004\001\128\000\000\130`\000\000\000\128\128\004\000\000L\128 %Q\128\008\003\008\000\t\004\192\152\004\001\001\016\008\000\000\153\012@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\023\233\192\004\001\132\000\004\130`L\002\000\128\136\004\000\000L\134 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\235U@\002\000@\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\008\003\008\000\001\004\192\152\004\001\001\000\008\000\000\153\012@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002 \000z\213p\000\169\016\001 \208*\013\250\000\002H\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t  \016\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000R\000\002A\160P\027\180\000\004\144\016\000\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\008\000\000B\001\004\000\000\000\000R\000\002A\160P\027\180\000\004\144\016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@@\000\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\005\001\187@\000I\001\000\000\008@ \128\000\000\000\n@\000H4\n\003v\128\000\146\002\000\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\128\001\017\002,\146P\000\001\000\016\128\000j\128\136a\028\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\000\n\145\000\018\013\002\160\223\160\000$\128\128@\004$\016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000H\000\017\000\"\192%\000\000\016\001\000\000\006\136\000\134\017\192\000\000\000\n@\000H4\n\003v\128\000\146\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\128\000\004\000\000\000\000\001\n@\000H4\n\003v\128\000\146\002\000\000\016\128A\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128\128\000\004 \016@\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\128\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\018\000\004@\008\176\t@\000\004\000@\000\001\"\000!\128p\000\000\000\002\144\000\018\013\002\128\221\160\000$\128\128\000\004 \016@\000\000H\000\017\000\"\192%\000\000\016\001\000\000\004\136\000\134\001\192\000\000\000\n@\000H4\n\003v\128\000\146\002\000\000\016\128A\000\000\001 \000D\000\139\000\148\000\000@\004\000\000\018 \002\024\007\000\000\000\000)\000\001 \208(\013\218\000\002H\008\000\000B\001\004\000\000\004\128\001\016\002,\002P\000\001\000\016\000\000H\128\008`\028\000\000\000\000\164\000\004\131@\1607h\000\t  \000\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128\128\000\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\002\000\000\016\128A\000\000\001 \000D\000\139\000\148\000\000@\004\000\000\018 \002\024\007\000\000\000\000)\000\001 \208(\013\218\000\002H\008\000\000B\001\004\000\000\004\128\001\016\002,\002P\000\001\000\016\000\000H\128\008`\028\000\000\000\000\164\000\004\131@\1607h\000\t  \000\001\008\004\016\000\000\018\000\004@\008\176\t@\000\004\000@\000\001\"\000!\128p\000\000\000\002\144\000\018\013\002\128\221\160\000$\128\128\000\004 \016@\000\000H\000\017\000\"\192%\000\000\016\001\000\000\004\136\000\134\001\192\000\000\000\n@\000H4\n\003v\128\000\146\002\000\000\016\128A\000\000\001 \000D\000\139\000\148\000\000@\004\000\000\018 \002\024\007\000\000\000\000)\000\001 \208(\013\218\000\002H\008\006\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t  \000\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128\128\000\004 \016@\000\000H\000\017\000\"\192%\000\000\016\001\000\000\004\136\000\134\001\192\000\000\000\n@\000H4\n\003v\128\000\146\002\000\000\016\128A\000\000\001 \000D\000\139\000\148\000\000@\004\000\000\018 \002\024\007\000\000\000\000)\000\001 \208(\013\218\000\002H\008\000\000B\001\004\000\000\004\128\001\016\002,\002P\000\001\000\016\000\000H\128\008`\028\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\008\000\015Z\174\000\016\002\000\000\016\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000=j\184\000T\136\000\144h\021\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015Z\174\000\021\"\000$\026\005A\187@\000I\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\128\000\000\000\000\000\000\001\000\000D\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\"\140\000\000\000@\000@$\004\192 \000\008\128@\000\004\192b\002E\024\000\000\000\128\000\128\008\t\128@\000\017\000\128\000\t\128\196\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000=j\184\000@\008\000\000@\001\024\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000@ \000\000\000\000\000\000\000\000\004@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\"\000\007\173W\000\008\001\000\000\008\000#\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\001\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\000\008\001\000\000\008\000#\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\136\000\030\181\\\000 \004\000\000 \000\140\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\016\000\000\000\008\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000z\213p\000\128\016\000\000\128\0020\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000D\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\245\170\224\001\000 \000\001\004\004\000\000\000\000\016\000\000\000\000\016\001\235U\192\002\000@\000\002\008\008\000\000\000\000 \000\016\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\029j\168\000@\008\000\000\000\001\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\018\168\192\004\001\132\000\004\194`L\002\000\128\136\004\000\000L\134/Z\174\000\016\002\000\000\016@@\000\000\000\001\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\128\000\000\000\000\000\000/Z\174\000\016\002\000\000\016\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000=j\184\000@\008\000\000@\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000@\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015\254\191\004\023\"@ \024\197q\251\194\000\253C\000\017\172@\160\128H\163\000\000\000\000\000\016\008\0010\000\000\002 \000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000z\213p\000\128\016\000\000\128\0020\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\000\008\001\000\000\008\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000@r\004\002\001\136Q\031\180 \015\2120\001\024\196\n\008\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128B\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\127\245\248 \185\018\001 \212+\143\222\016\007\234\024\004\143c\013\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\003\000\1607h\000\025  \000\001\008\004\016\000\000\000\001H\000\008\006\001@n\208\0002@@\000\002\016\008'\173W\000\n\145\000\018\013\002\160\221\160\000$\128\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000)\000\001\000\192(\013\218\000\006H\008\000\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001\000\192(\013\218\000\006H\008\000\000B\001\004\000\000\000\000R\000\002A\160P\027\180\000\004\144\016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\008\006\001@n\208\0002@@\000\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000 \024\005\001\187@\000\201\001\000\000\008@ \128\000\000\000\n@\000@0\n\003v\128\001\146\002\000\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\128\001\017\130l\178X\000\001@\016\128\000\234\128\129A\220\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\000\n\145\000\018\013\002\160\223\160\000$\128\128@\004$\016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000H\000\017\008&\194%\128\000\020\001\000\000\014\136\000\020\029\192\000\000\000\n@\000H4\n\003v\128\000\146\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\000\002!\004\216D\176\000\002\128 \000\001\145\000\002\129\184\000\000\000\001H\000\008\006\001@n\208\0002@@\000\002\016\008 \000\000$\000\008\132\019a\018\192\000\n\000\128\000\006D\000\n\006\224\000\000\000\005 \000 \024\005\001\187@\000\201\001\000\000\008@ \128\000\000\144\000\"\016M\132K\000\000(\002\000\000\025\016\000(\027\128\000\000\000\020\128\000\128`\020\006\237\000\003$\004\000\000!\000\130\000\000\002@\000\136A6\017,\000\000\160\008\000\000d@\000\160n\000\000\000\000R\000\002\001\128P\027\180\000\012\144\016\000\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\008\006\001@n\208\0002@@\000\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000 \024\005\001\187@\000\201\001\000\000\008@ \128\000\000\144\000\"\016M\132K\000\000(\002\000\000\025\016\000(\027\128\000\000\000\020\128\000\128`\020\006\237\000\003$\004\000\000!\000\130\000\000\002@\000\136A6\017,\000\000\160\008\000\000d@\000\160n\000\000\000\000R\000\002\001\128P\027\180\000\012\144\016\000\000\132\002\008\000\000\t\000\002!\004\216D\176\000\002\128 \000\001\145\000\002\129\184\000\000\000\001H\000\008\006\001@n\208\0002@@\000\002\016\008 \000\000$\000\008\132\019a\018\192\000\n\000\128\000\006D\000\n\006\224\000\000\000\005 \000 \024\005\001\187@\000\201\001\000\000\008@ \128\000\000\144\000\"\016M\132K\000\000(\002\000\000\025\016\000(\027\128\000\000\000\020\128\000\144h\020\006\237\000\001$\004\003\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000R\000\002\001\128P\027\180\000\012\144\016\000\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\008\006\001@n\208\0002@@\000\002\016\008 \000\000$\000\008\132\019a\018\192\000\n\000\128\000\006D\000\n\006\224\000\000\000\005 \000 \024\005\001\187@\000\201\001\000\000\008@ \128\000\000\144\000\"\016M\132K\000\000(\002\000\000\025\016\000(\027\128\000\000\000\020\128\000\128`\020\006\237\000\003$\004\000\000!\000\130\000\000\002@\000\136A6\017,\000\000\160\008\000\000d@\000\160n\245\170\224\001R \002A\160T\027\180\000\004\144\016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \008$\026\005\001\187@\000I\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\235\240yr$\002\001\140W\031\188 \015\2120\001\026\196\n\008\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\004\000\000\000\000\000\000\132@\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\255_\130\011\145 \016\012B\184\253\225\000~\161\128\008\214 PO\254\191\004\023\"@$\026\133\241\251\194\000\253C\000\145\172P\160\159\253~\015.D\128@1\138\227\247\132\001\250\134\000#X\129A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\247\252<\185\018\001\000\198/\143\2220\007\234\152@\143c\141f\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\255\215\224\130\228H\004\003\024\174?x@\031\168`\0025\136\020\019\255\175\193\005\200\144\t\006\161|~\240\128?P\192$k\020('\255_\130\011\145 \018\013B\184\253\225\000~\161\128H\214 \208@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002@\000\136\1936Y,\000\000\160\008@\000w@D\160\238\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000 9\002\001\000\196(\143\218\016\007\234\024\000\140b\005\004\000\000\000@r\004\002\001\136Q\031\180 \015\2120\001\024\196\n\008\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\016H4\n\003v\128\000\146\002\001\000\016\128A\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000A \208(\013\218\000\002H\008\004\000B\001\004\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t  \016\001\t\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\002\003\144 \016\012B\136\253\161\000~\161\128\008\198 P@\000\000\004\007 @ \024\133\017\251B\000\253C\000\017\140@\160\128\000\000\000\000\000\000\000\000\000\000 \000\000\002\000\001\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002 \000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\008\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000D\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\016\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\004\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\005\001\187@\000I\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\128\001\001\130\012\146X\000\001\000\000\128\000f\128\137\001\024\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\128\005H\128\t\006\129Po\208\000\018@@ \002\018\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\004\007 @ \024\133\017\251B\000\253C\000\017\140@\160\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\255_\130\011\145 \018\013B\184\253\225\000~\161\128H\214 P@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253\255\015.D\128@1\139\227\247\140\001\250\166\016#\216\227Y\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\128\004\000\128\000\004\000\016\000\000\000\000@\000\000\000\000\000\000\018(\192\000\000\000\000\004\002\000L\000\000\000\136\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\030\181\\\000 \004\000\000 \000\140\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\001\000\000@\000\000\000\000\000\005 \000$\026\133\001\187@\000I\001\000\128\008@ \128\000\000\000\n@\000@3\n\003v\128\001\146\002\001@\016\130A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001\000\192(\013\218\000\006H\008\000\000B\001\004\000\000\000\000R\000\002A\160P\027\180\000\004\144\016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\000\n\145\000\018\013\002\160\221\160\000$\128\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\128`\020\006\237\000\003$\004\000\000!\000\130\000\000\000\000)\000\001 \208(\013\218\000\002H\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\003\000\1607h\000\025  \000\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\016\012\002\128\221\160\000d\128\128\000\004 \016@\000\000\000\005 \000 \024\005\001\187@\000\201\001\000\000\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\128\129\006I(\000\000\128\000@\000!@D\000\012\000\000\000\000\000\000\000\000\000\000\001\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\128\005H\128\t\006\129Po\208\000\018@@ \002\018\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\128\005H\128\t\006\129Pn\208\000\018@@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\005 \000 \024\005\001\187@\000\201\001\000\000\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000 \000\000\000\000\000\164\000\004\131@\1607h\000\t  \016\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\005 \000 \025\133\001\187@\000\201\001\000 \008@ \128\000\000\000\n@\000@3\n\003v\128\001\146\002\001@\016\130A\000\000\000\002\020\128\000\128f\020\006\237\000\003$\004\002\128!\004\130\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002A\168P\027\180\000\004\144\016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\020\128\000\128f\020\006\237\000\003$\004\000\128!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\164\000\004\0030\1607h\000\025  \004\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\016\000 \192%\000\000\016\000\000\000\004\008\000\128\001\128\000\000\000\n@\000@0\n\003v\128\001\146\002\000\000\016\128A\000\000\001\000\000@\000\131\000\148\000\000@\000\000\000\016 \002\000\006\000\000\000\000)\000\001\000\192(\013\218\000\006H\008\000\000B\001\004\000\000\004\000\001\000\002\012\002P\000\001\000\000\000\000@\128\008\000\024\000\000\000\000\164\000\004\003\000\1607h\000\025  \000\001\008\004\016\000\000\016\000\004\000\0080\t@\000\004\000\000\000\001\002\000 \000`\000\000\000\002\144\000\016\012\002\128\221\160\000d\128\128\000\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000@0\n\003v\128\001\146\002\000\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001\000\192(\013\218\000\006H\008\000\000B\001\004\000\000\004\000\001\000\002\012\002P\000\001\000\000\000\000@\128\008\000\024\000\000\000\000\164\000\004\003\000\1607h\000\025  \000\001\008\004\016\000\000\016\000\004\000\0080\t@\000\004\000\000\000\001\002\000 \000`\000\000\000\002\144\000\016\012\002\128\221\160\000d\128\128\000\004 \016@\000\000@\000\016\000 \192%\000\000\016\000\000\000\004\008\000\128\001\128\000\000\000\n@\000@0\n\003v\128\001\146\002\000\000\016\128A\000\000\001\000\000@\000\131\000\148\000\000@\000\000\000\016 \002\000\006\000\000\000\000)\000\001\000\192(\013\218\000\006H\008\000\000B\001\004\000\000\004\000\001\000\002\012\002P\000\001\000\000\000\000@\128\008\000\024\000\000\000\000\164\000\004\003\000\1607h\000\025  \000\001\008\004\016\000\000\016\000\004\000\0080\t@\000\004\000\000\000\001\002\000 \000`\000\000\000\002\144\000\016\012\002\128\221\160\000d\128\128\000\004 \016@\000\000@\000\016\000 \192%\000\000\016\000\000\000\004\008\000\128\001\128\000\000\000\n@\000@0\n\003v\128\001\146\002\000\000\016\128A\000\000\001\000\000@\000\131\000\148\000\000@\000\000\000\016 \002\000\006\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\005 \000 \025\133\001\187@\000\201\001\000\160\008A \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\128f\020\006\237\000\003$\004\002\128!\004\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000R\000\002\001\152P\027\180\000\012\144\016\n\000\132\018\008\000\000\000\000\164\000\004\0030\1607h\000\025  \004\001\008$\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\002\144\000\016\012\194\128\221\160\000d\128\128P\004 \144@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\001H\000\008\006a@n\208\0002@@\008\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\000\008\001\000\000\008\000#\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \212(\013\218\000\002H\008\004\000B\001\004\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000&\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\004\000\004\128\000\000\000\000\000\000\001\000\000@\000\000\000\000\000\000\000\008\000\t\000\000\000\000\000\000\000\002\000\000\128\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000=j\184\000@\008\000\000@\001\024\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\128\000 \000\000\000\000\000\002\144\000\018\013B\128\221\160\000$\128\128@\004 \016@\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000u\170\160\001\000 \000\000\000\004\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\128\000 \000\000\000\000\000\002\144\000\018\013B\128\221\160\000$\128\128@\004 \016@\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\235\240Ar$\002\001\140W\031\188`\015\2120\001\026\196\n\008\000\000\000\000\000\000\000\128@\000\000\000\128\000\000\001\016\000\000\001\136\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\255_\130\011\145 \016\012b\184\253\227\000~\161\132\008\214 V`\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001 \000D`\155,\150\000@P\004$\000;\160 Pw\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\016\000\004\000\000\000\000\000\000R\000\002A\168P\027\180\000\004\144\016\008\000\132\002\008\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\000\008\001\000\000\008\000#\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \212(\013\218\000\002H\008\004\000B\001\004\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\001\000\128\000\000\001\000\000\000\002 \000\000\003\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253~\008.D\128H5\n\227\247\140\001\250\134\017#X\129Y\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\245\248 \185\018\001\000\198+\143\2220\007\234\024@\141b\005f\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\128\005H\128\t\006\129Po\208\000\018@@ \002\018\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\002`\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\001\235U\192\002\000@\000\002\000\008\192\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\004\000\001\000\000\000\000\000\000\020\128\000\144j\020\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\173U\000\008\001\000\000\000\000 \000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\004\000\001\000\000\000\000\000\000\020\128\000\144j\020\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253~\008.D\128H5\n\227\247\140\001\250\134\017#X\129Y\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128@ \000\000\000@\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\175\193\005\200\144\t\006\161\\~\241\128?P\192$k\016( \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\152\004\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\128\000\000\000\000@r\004\002\001\136Q\031\180 \015\2120\001\024\196\n\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\004\000\000\000\000\000\000\000\000\000\128\000\255\239\248Ar4\002a\168_\031\188`\031\2130\153\030\199Z\204\000\000\000\128\228\008\004\003\016\162?h@\031\168`\0021\136\020\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\255_\130\011\145 \016\012b\248\253\225\000~\161\128\008\2468\208@\000\000\000\000\000\000\004\002\000\000\000\000\000\000\000\000\128\000\000\000\031\253~\008.D\128@1\139\227\247\132\001\250\134\000#\216\227A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@ \016\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\255\215\224\130\228H\004\131P\190?x@\031\168`\018=\1424\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\255_\130\011\145 \018\013B\248\253\225\000~\161\128H\2468\208@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\016\000\031\253~\008.D\128@1\139\227\247\132\001\250\134\000#X\161A\000\000\000\000\000\000\000\016\008\002\000\000\000\000\000\000\002\000\000@\000\127\245\248 \185\018\001\000\198/\143\222\016\007\234\024\000\141b\133\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\002\001\000@\000\000\000\000\000\000@\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253~\008.D\128H5\011\227\247\132\001\250\134\001#X\161A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000 &\000\000\000@\000\000\000\004\000\000\000\000\000\000\000\128\003\001\000\000\000\000\000\128\000\000@\000\002\000/\254\191\004\023\"@ \024\197q\251\194\000\253C\000\017\172@\160\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004 \024\008\000\000\000\000\004\000\000\002\000\000\016\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\235\240Ar4\002a\168W\031\188 \031\2120\t\026\196J\013\255\215\224\130\228H\004\003\024\174?x@\031\168`\0025\136\020\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015\254\191\004\023#@&\026\133q\251\194\001\253C\000\145\172D\160\192\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\016\000\031\253~\008.D\128H5\011\227\247\132\001\250\134\001#X\161A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\004\002\000\000\000\004\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000?\250\252\016\\\137\000\144j\021\199\239\024\003\245\012\002F\177\002\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\223\175\192\005H\144\008\006\001Pn\240\0002@@\000\011\016( \000\000\000\002\144\004\018\013\002\128\221\160\000$\128\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000{\245\248\000\169\018\001\000\192*\013\222\000\006H\008\000\001b\005\004\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015Z\174\000\016\002\000\000\016\000@\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\002\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002A\168P\027\180\000\004\144\016\008\000\132\002\008\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\245\170\224\001\000 \000\001\000\004`\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\133\001\187@\000I\001\000\128\008@ \128\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\192\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\161@n\208\000\018@@ \002\016\008 \000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\014\181T\000 \004\000\000\000\000\128\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\131P\1607h\000\t  \016\001\008\004\016\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\016\000\030\253~\000*D\128@0\n\131w\128\001\146\002\000\000X\129A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002@\000\128\193\006I,\000\128\128\000H\0001@@\128\140\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\161@n\208\000\018@@ \002\016\008 \000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\015Z\174\000\016\002\000\000\016\000F\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002A\168P\027\180\000\004\144\016\008\000\132\002\008\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000=j\184\000T\136\000\144h\021\006\253\000\001$\004\002\000! \130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000&\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144j\020\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\235U@\002\000@\000\000\000\008\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H5\n\003v\128\000\146\002\001\000\016\128A\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\001\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000 \000\000\002\002`\000\000\004\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\001\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\016\128\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\235\240Ar$\002\001\140W\031\188 \015\2120\001\026\196\n\008\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\005\001\187@\000I\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000?\250\252\016\\\137\000\144j\021\199\239\008\003\245\012\002G\177\134\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\008@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\191\250\252\016\\\137\000\128c\021\199\239\008\003\245\012\000F\177\002\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\235\240Ar$\002\001\140W\031\188 \015\2120\001\026\196\n\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\004\000\000!\000\130\000\000\000\000\000\008\000\000\000\000\000\000\000\008\000\000\000\000\000\000\002\000\000\000\000R\000\002A\160P\027\180\000\004\144\016\000\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@@\000\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\004\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@r\004\002\001\136Q\031\180 \015\2120\001\024\196\n\008\000\000\000\000\000 \000\000\000\000\000\000\000 \000\000\000\000\000\000\008\000\000\001\001\200\016\008\006!D~\208\128?P\192\004c\016( \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\007 @ \024\133\017\251B\000\253C\000\017\140@\160\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\016\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@@\000\002\016\008 \000\000\000\000\000\128\000\000\000\000\000\000\000\128\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000?\250\252\000@\008\000\000@\001\000\002\000\000\004\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\008\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\016\000\000\000\000\000\000\005\255\215\224\002\000@\000\002\000\008\000\016\000\000 \000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\255_\128\008\001\000\000\008\000 \000@\000\000\128\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\008\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t  \000\001\008\004\016\000\000\000\000\000@\000\000\000\000\000\000\000@\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000=j\184@\225\008\137 B\001\000\000$\000\n\161 \000L\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015Z\174\0008B\"\008\016\128@\000\t\000\002\168H\000\019\000\000\030\181\\\000p\132\000\016!\000\128\000\018\000\005P\144\000&\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000@\016\008\000\000\000\000\000\000\000\008\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\001\000@\000\000\000\000\000\000\000\000 \001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\016\000\000\000@\000\002\000\128\000\000\000\000\000\000\000\000@\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000 \000\000\000\000\000\000\128\000\000\000\000\000\000\004\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\016\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015Z\174\0008B \008\016\128@\000\t\000\002\168H\000\017\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000=j\184\000\225\008\000 B\001\000\000$\000\n\161 \000D\000\000\000\008\000\000@\016\000\000\000\000\000\000\000\000\008\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\016\000\000\000@\000\002\000\128\000\000\000\000\000\000\000\000@\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000 \008\000\000\000\000\000\000\000\000\004\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\001\000@\000\000\000\000\000\000\000\000 \001\000\000\000\000\000\000@\000\002\000\128\000\000\000\000\000\008\000\000@\002\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000@\016\000\000\000\000\000\000\000\000\008\000@\000\000\000\000\000\016\000\000\128 \000\000\016\000\000\002\000\000\016\000\128\000\008\000\000\000 \000\001\000@\000\000\000\000\000\000\000\000 \001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\128\000\004\001\000\000\000\000\000\000\000\000\000\128\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\128\004\000\128\000\004\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\129\000\030\181\\\000 \004\000\000 \000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\016\000\000\128 \000\000\016@\000\000\000\000\016\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000(\000\000\000\000\000\000\000\128\000\004\001\000\000\000\000\000\000\000\000\000\128\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\001\000\000\000\004\000\000 \008\000\000\000\000\000\000\000\000\004\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\002\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\004`\000\000\129\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000 \008\000\000\000 \000\000\000\000\004\000 \000\000\000\000\000\008\000\000@\016\000\000\000\000\000\000\000\000\008\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\008\002\000\000\000\000\000\000\000\000\001\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000@\016\000\000\000\000\000\000\000\000\008\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\128\000\004\001\000\000\000\000\000\000\000\000\000\128\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000 \008\000\000\000\016\000\000\000\000\004\000 \000\000\000\000\000\008\000\000@\016\000\000\t\000\000\001\000\000\008\000@\000\004\000\000\000\016\000\000\128 \000\000\000\000\000\000\000\000\016\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000@\000\002\000\128\000\000\000\000\000\000\000\000@\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\008\000\000\000 \000\001\000@\000\000\000\000\000\000\000\000 \001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\016\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\001\000@\000\000\000\000\000\000\000\000 \001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000@\000\000\001\000\000\008\002\000\000\000\000\000\000\000\000\001\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\128\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\002\000\128\000\000\000\000\000\000\000\000@\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\016\004\000\000\000\016\000\000\000\000\002\000\016\000\000\000\000\000\004\000\000 \008\000\000\000\000\000\000\000\000\004\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\173\215\000\012\001\000\000\008@ \000\000\000\000\128\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\004\000\000 \008\000\000\000\144\000\000\128\000\004\000 \000\002\000\000\000\008\000\000@\016\000\000\000\000\000\000\000\000\008\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000=n\184\000`\008\000\000B\017\000\000\000\000\004\000 \000\000\000\000\000\008\000\000@\016\000\000\000\000\000\000\000\000\008\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\002\000\128\000\000\000\000\000\000\000\000@\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000@\016\000\000\008\000\000\000\000\000\008\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000 \000\001\000@\000\000\000\000\000\000\000\000 \001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\132\014\016\136\146\004 \016\000\002@\000\170\018\000\004\192\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\014\003v\128\000\146\002\001\000\016\128A\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\136\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\0001\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@@\000\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\130\000\000\000\000\000\n@\000H4\n\003v\128\000\146\002\000\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253\255\008.D\128H=\014\227\247\132\001\250\166\017#X\129Y\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000b\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\255\127\194\011\145 \018\015B\184\253\225\000~\169\132H\214 Vg~\251\128\016\002\000\000\000\000@\000\000\000\000\016\000\000\000\000\000\000H\163\000\000\000\000\000\000\008\000\000\000\000\000 \000\000\000\000\000\029\251\238\000@\008\000\000\000\001\000\000\000\000\000@\000\000\000\000\000;\247\220\000\128\016\000\000\000\002\000\000\000\000\000\128\000\000\000\000\000\002E\024\000\000\000\000\000\000@\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\018(\192\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000$Q\128\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000H\163\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\145F\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000@3\n\003v\128\001\146\002\001@\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\223\191\224\004\000\128\000\004\000\016\000\000\000\000D\000\000\000\000\000\000\018(\192\000\000\000\000\004\000\000\000\000\000\000\008\000\000\000\000\000\015\254\191\004\023\"@ \024\197q\251\194\000\253C\000\017\172@\160\128\000\000\000\000\000\000\008\004\000\000\000\000\000\000\000\017\000\000\000\024\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128@ \000\000\000\000\000\000\000\136\000\000\000\196\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\175\193\005\200\144\t\006\161\\~\240\128?P\194$k\016+0\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\024\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\019\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\000\008\001\000\000\008\000#\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\016\000=j\184\000@\008\000\000@\001\024\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\017\000\003\214\171\128\004\000\128\000\004\000\017\128\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\127\245\248 \185\018\001 \212+\143\222\016\007\234\024\004\141b\013\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\020`\000\000\000\000\002\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\004\002\001\000\000\000\000\000\000\000\004@\000\000\006 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253~\008.D\128H5\n\227\247\132\001\250\134\017#X\129Y\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\004\192\000\000\008\000@\000\000\000b\000\000\000\000\000\128@\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\028\006\237\000\001$\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\196\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\005\001\187@\000I\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\024\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\247\252 \185\018\001 \244;\143\222\016\007\234\152D\141b\005f\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\136\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253\255\008.D\128H=\n\227\247\132\001\250\166\017#X\129Y\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\247\252 \185\018\001\000\198+\143\222\016\007\234\152@\141b\005f\000\000\000\000\000\000\000@ \000\000\000\000\000\000\000\136\000\000\000\197\255\223\240\130\228H\004\003\024\174?x@\031\170a\0025\136\021\152\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\255\127\194\011\145 \018\013B\184\253\225\000~\169\132H\214 Vo\254\255\132\023\"@ \024\197q\251\194\000\253S\008\017\172@\172\192\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \016\008\000\000\000\000\000\000\000\"\000\000\0001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\239\248Ar$\002A\168W\031\188 \015\2130\137\026\196\n\204\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\191\225\005\200\144\t\006\161\\~\240\128?T\194$k\016+0\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015\254\255\132\023\"@$\026\133q\251\194\000\253S\008\145\172@\172\192\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\003\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015\254\255\132\023\"@$\026\133q\251\194\000\253S\008\145\172@\172\192\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \016\008\000\000\000\000\000\000\000\"\000\000\0001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\239\248Ar$\002A\168W\031\188 \015\2130\137\026\196\n\204\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000&\000\000\000@\002\000\000\000\003\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\t\000\000\000\000\000\000\000\000\002\t\192\012\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000@\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\002\004\000\000\000\000\000\000\004\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\008\016\000\000\000\000\000\000\016\000\000\000 \000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\008\001\000\000\000\000\000\004\000\000\016 \000\000\000\000\000\000 \000\000\000@\000\000\000\001\000\002\000\002\000\000\000\000\000\000\000\017\128\016\000 \020\000\000\000\000\000\016\000\000@\128\000\000\000\000\000\000\128\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000 \000 \000\000\000\000\000\000\001\024\001\000\000\001@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\008\000\000\000\000\000\000\000\000\000N\000`\000\000@\000\000\000\008\000\016\000\000\000\000\000\000\000\000\000\140\000\192\000\000\128\000\000\000\016\000 \000\000\000\000\000\000\000\000\001\024\001\000\000\001\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\004`\004\000\128\004\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000F\000@\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\0020\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\002\000\000\000\000\000\000\000\000\000\017\128\024\000\000\016\000\000\000\002\000\004\000\000\000\000\000\000\000\000\000#\000 \000\000 \000\000\000\000\000\008\000\000\000\000\000\000\000\000\000F\000@\000\000@\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\140\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")
+    (169, "\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\024\000\000\000\000\002\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\024\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\254\000\000\000\000\000\000\000\015Z\175\000\008\001\000\000\008\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\1280\128\000\016\204\t\128@\016\016\000@\000\004\200b\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\191G\000\016\006\016\000\018\025\1290\008\002\002\016\008\000\000\153\012@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000'P\192\004\001\132\000\004\134`L\002\000\128\132\002\000\000&C\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000_\163\128\008\003\008\000\t\012\192\152\004\001\001\008\004\000\000L\134 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\019\168`\002\000\194\000\002C0&\001\000@B\001\000\000\019!\136\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000N\161\128\008\003\008\000\t\012\192\152\004\001\001\008\004\000\000L\134 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\030\181^\000\016\002\000\000\016\000@\000\000\000\000\000\000\000\000\000\000\000%P\192\004\001\132\000\004\198`L\002\000\128\132\002\000\000&C\023\173W\128\004\000\128\000\004\016\016\000\000\000\000@\000\016\000\000\000\000\000\000\000\000\000\000\000\001\000\128\000\000\000\000\000\000\000\000\000\000\000\004\138\024\000\000\000\128\000\128H\t\128@\000\016\128@\000\004\192b\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\030\181^\000\144\002\000\000\016@@\000\000\000\001\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\007\173W\128\004\000\128\000\004\016\016\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\002\000\000\000 \000\000\000\000\000\001\235U\224\001\000 \000\001\004\004\000\000\000\000\016\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\030\181^\000\016\002\000\000\016@@\000\000\000\001\000\000@\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\001\000\000 \000\000\000\000\000\000\000 \000\008\128\000\000\000\000\000R\000\002A\160P\027\180\000\004\144\008\004\000B\017\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@\000\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t \016\000\000\132\002\008\000\000\000\000R\000\002A\160P\027\180\000\004\144\008\004\000B\001\004\000\000\000\000)\000\001 \208(\013\218\000\002H\004\002\000!\000\130z\213x\000T\136\000\144h\021\006\237\000\001$\002\001\000\016\128A=j\188\000*D\000H4\n\131v\128\000\146\001\000\128\008@ \128\000\000\000\005 \000$\026\005\001\187@\000I\000\128\000\004 \016OZ\175\000\n\145\000\018\013\002\160\221\160\000$\128@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\004\002\000!\000\130\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t \016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000$\000\008\140\019e\146\192\000\n\000\132\000\003\186\002'\135p\000\000\000\000\000\000\000\000\000\000\004\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\235U\224\001R \002A\160T\027\244\000\004\144\008\004\000BA\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001 \000@ \131\000\150\000\000P\000\000\000\029\144\0014;\128\000\000\000\n@\000H4\n\003v\128\000\146\001\000\128\008@ \128\000\000H\000\017\008&\194%\128\000\020\001\000\000\007d\000O\014\224\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000H\000\017\008&\194%\128\000\020\001\000\000\006d\000O\006\224\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\000\002!\004\216D\176\000\002\128 \000\000\204\128\t\224\220\000\000\000\000R\000\002A\160P\027\180\000\004\144\008\004\000B\001\004\000\000\002@\000\136A6\017,\000\000\160\008\000\0003 \002x7\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\001\000\016\128A\000\000\000\144\000\"\016M\132K\000\000(\002\000\000\012\200\000\158\013\192\000\000\000\005 \000$\026\005\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@ \016\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002A\160P\027\180\000\004\144\008\004\000B\001\004\000\000\002@\000\136A6\017,\000\000\160\008\000\0003 \002x7\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\001\000\016\128A\000\000\000\144\000\"\016M\132K\000\000(\002\000\000\012\200\000\158\013\192\000\000\000\005 \000$\026\005\001\187@\000I\000\128@\004 \016@\000\000$\000\008\132\019a\018\192\000\n\000\128\000\0032\000'\131p\000\000\000\001H\000\t\006\129@n\208\000\018@ \016\001\008\004\016\000\000\t\000\002!\004\216D\176\000\002\128 \000\000\204\128\t\224\220\000\000\000\000R\000\002A\160P\027\180\000\004\144\008\004\000B\001\004\000\000\002@\000\136A6\017,\000\000\160\008\000\0003 \002x7\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\001\128\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\005 \000$\026\005\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\001\000\016\128A\000\000\000\144\000\"\016M\132K\000\000(\002\000\000\012\200\000\158\013\192\000\000\000\005 \000$\026\005\001\187@\000I\000\128@\004 \016@\000\000$\000\008\132\019a\018\192\000\n\000\128\000\0032\000'\131p\000\000\000\001H\000\t\006\129@n\208\000\018@ \016\001\008\004\016\000\000\t\000\002!\004\216D\176\000\002\128 \000\000\204\128\t\224\220\000\000\000\000R\000\002A\160P\027\180\000\004\144\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\002\000\192\000\000C \000\000\000@@\001\000\000\019 \008\tT0\001\000a\000\001!\152\019\000\128 !\000\128\000\t\144\196\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\214\171@\002\000@\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000 \012 \000\0042\002`\016\004\004\000\016\000\0012\024\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000D\000\015Z\175\000\n\145\000\018\013\002\160\223\160\000$\128@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t \016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@ \000\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@\000\002\016\008 \000\000\000\001H\000\t\006\129@n\208\000\018@ \016\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002A\160P\027\180\000\004\144\008\000\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\000\000\016\128A\000\000\000\000\n@\000H4\n\003v\128\000\146\001\000\000\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\018\000\004D\008\178I@\000\004\000B\000\000\213\001\016\1948\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\245\170\240\000\169\016\001 \208*\013\250\000\002H\004\002\000! \130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\005\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001 \000D\000\139\000\148\000\000@\004\000\000\013\016\001\012#\128\000\000\000\n@\000H4\n\003v\128\000\146\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\001\000\000\008\000\000\000\000\001\n@\000H4\n\003v\128\000\146\001\000\000\008@ \128\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\004\000\000!\000\130\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\001\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\128\001\016\002,\002P\000\001\000\016\000\000$@\0040\014\000\000\000\000)\000\001 \208(\013\218\000\002H\004\000\000!\000\130\000\000\001 \000D\000\139\000\148\000\000@\004\000\000\t\016\001\012\003\128\000\000\000\n@\000H4\n\003v\128\000\146\001\000\000\008@ \128\000\000H\000\017\000\"\192%\000\000\016\001\000\000\002D\000C\000\224\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@\000\002\016\008 \000\000\018\000\004@\008\176\t@\000\004\000@\000\000\145\000\016\1928\000\000\000\000\164\000\004\131@\1607h\000\t \016\000\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\004\000\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\001\000\000\008@ \128\000\000H\000\017\000\"\192%\000\000\016\001\000\000\002D\000C\000\224\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@\000\002\016\008 \000\000\018\000\004@\008\176\t@\000\004\000@\000\000\145\000\016\1928\000\000\000\000\164\000\004\131@\1607h\000\t \016\000\000\132\002\008\000\000\004\128\001\016\002,\002P\000\001\000\016\000\000$@\0040\014\000\000\000\000)\000\001 \208(\013\218\000\002H\004\000\000!\000\130\000\000\001 \000D\000\139\000\148\000\000@\004\000\000\t\016\001\012\003\128\000\000\000\n@\000H4\n\003v\128\000\146\001\000\000\008@ \128\000\000H\000\017\000\"\192%\000\000\016\001\000\000\002D\000C\000\224\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@0\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t \016\000\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\004\000\000!\000\130\000\000\001 \000D\000\139\000\148\000\000@\004\000\000\t\016\001\012\003\128\000\000\000\n@\000H4\n\003v\128\000\146\001\000\000\008@ \128\000\000H\000\017\000\"\192%\000\000\016\001\000\000\002D\000C\000\224\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@\000\002\016\008 \000\000\018\000\004@\008\176\t@\000\004\000@\000\000\145\000\016\1928\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\005 \000$\026\005\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000@\000z\213x\000@\008\000\000@\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000R\000\002A\160P\027\180\000\004\144\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\030\181^\000\021\"\000$\026\005A\187@\000I\000\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000z\213x\000T\136\000\144h\021\006\237\000\001$\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\008\000\000\000\000\000\000\000\008\000\002 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000$P\192\000\000\004\000\004\002@L\002\000\000\132\002\000\000&\003\016\018(`\000\000\002\000\002\000 &\001\000\000B\001\000\000\019\001\136\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\030\181^\000\016\002\000\000\016\000F\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\004\002\000\000\000\000\000\000\000\000\000\"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004@\000\245\170\240\000\128\016\000\000\128\0020\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000 \000\000\000\000\128\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\245\170\240\000\128\016\000\000\128\0020\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\016\000=j\188\000 \004\000\000 \000\140\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000@\000\000\000\017\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\015Z\175\000\008\001\000\000\008\000#\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\128\004\000\128\000\004\016\016\000\000\000\000@\000\000\000\000 \003\214\171\192\002\000@\000\002\008\008\000\000\000\000 \000\008\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\014\181Z\000\016\002\000\000\000\000@\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002U\012\000@\024@\000Lf\004\192 \008\008@ \000\002d1z\213x\000@\008\000\000A\001\000\000\000\000\004\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\008\000\000\000\000\000\000\001z\213x\000@\008\000\000@\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\030\181^\000\016\002\000\000\016\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\016\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\245\252\016\\\137\000\128c\021\199\239\008\003\245\006\000#X\129A\000\145C\000\000\000\000\000\016\008\0010\000\000\002\016\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\015Z\175\000\008\001\000\000\008\000#\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\245\170\240\000\128\016\000\000\128\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\021\002\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\n\129\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\007\173W\128\004\000\128\000\004\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\"\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\235U\160\001\000 \000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\128\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\004\007 @ \024\133\017\251B\000\253A\128\008\198 P@\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@ \016\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\132\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000?\250\254\008.D\128H5\n\227\247\132\001\250\131\000\145\236a\160\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\016\012\002\128\221\160\000d\128@\000\002\016\008 \000\000\000\001H\000\008\006\001@n\208\0002@ \000\001\008\004\019\214\171\192\002\164@\004\131@\1687h\000\t \016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\n@\000@0\n\003v\128\001\146\001\000\000\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000@0\n\003v\128\001\146\001\000\000\008@ \128\000\000\000\005 \000$\026\005\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\008\006\001@n\208\0002@ \000\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002\001\128P\027\180\000\012\144\008\000\000B\001\004\000\000\000\000)\000\001\000\192(\013\218\000\006H\004\000\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000H\000\017\024&\203%\128\000\020\001\008\000\007T\004\n\014\224\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\192\002\164@\004\131@\1687\232\000\t \016\008\000\132\130\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\128\001\016\130l\"X\000\001@\016\000\000t@\000\160\238\000\000\000\000)\000\001 \208(\013\218\000\002H\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000$\000\008\132\019a\018\192\000\n\000\128\000\003\"\000\005\003p\000\000\000\001H\000\008\006\001@n\208\0002@ \000\001\008\004\016\000\000\t\000\002!\004\216D\176\000\002\128 \000\000\200\128\001@\220\000\000\000\000R\000\002\001\128P\027\180\000\012\144\008\000\000B\001\004\000\000\002@\000\136A6\017,\000\000\160\008\000\0002 \000P7\000\000\000\000\020\128\000\128`\020\006\237\000\003$\002\000\000\016\128A\000\000\000\144\000\"\016M\132K\000\000(\002\000\000\012\136\000\020\013\192\000\000\000\005 \000 \024\005\001\187@\000\201\000\128\000\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\008\006\001@n\208\0002@ \000\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002\001\128P\027\180\000\012\144\008\000\000B\001\004\000\000\002@\000\136A6\017,\000\000\160\008\000\0002 \000P7\000\000\000\000\020\128\000\128`\020\006\237\000\003$\002\000\000\016\128A\000\000\000\144\000\"\016M\132K\000\000(\002\000\000\012\136\000\020\013\192\000\000\000\005 \000 \024\005\001\187@\000\201\000\128\000\004 \016@\000\000$\000\008\132\019a\018\192\000\n\000\128\000\003\"\000\005\003p\000\000\000\001H\000\008\006\001@n\208\0002@ \000\001\008\004\016\000\000\t\000\002!\004\216D\176\000\002\128 \000\000\200\128\001@\220\000\000\000\000R\000\002\001\128P\027\180\000\012\144\008\000\000B\001\004\000\000\002@\000\136A6\017,\000\000\160\008\000\0002 \000P7\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\001\128\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\005 \000 \024\005\001\187@\000\201\000\128\000\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\008\006\001@n\208\0002@ \000\001\008\004\016\000\000\t\000\002!\004\216D\176\000\002\128 \000\000\200\128\001@\220\000\000\000\000R\000\002\001\128P\027\180\000\012\144\008\000\000B\001\004\000\000\002@\000\136A6\017,\000\000\160\008\000\0002 \000P7\000\000\000\000\020\128\000\128`\020\006\237\000\003$\002\000\000\016\128A\000\000\000\144\000\"\016M\132K\000\000(\002\000\000\012\136\000\020\013\222\181^\000\021\"\000$\026\005A\187@\000I\000\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\130A\160P\027\180\000\004\144\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253\127\007\151\"@ \024\197q\251\194\000\253A\128\008\214 P@\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@ \016\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\016\000\000\000\000\000\001\008\128\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\175\224\130\228H\004\003\016\174?x@\031\1680\001\026\196\n\t\255\215\240Ar$\002A\168_\031\188 \015\212\024\004\141b\133\004\255\235\248<\185\018\001\000\198+\143\222\016\007\234\012\000F\177\002\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000?\251\255\015.D\128@1\139\227\247\140\001\250\147\008\017\236q\172\192\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015\254\191\130\011\145 \016\012b\184\253\225\000~\160\192\004k\016('\255_\193\005\200\144\t\006\161|~\240\128?P`\0185\138\020\019\255\175\224\130\228H\004\131P\174?x@\031\1680\t\026\196\026\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\144\000\"0M\150K\000\000(\002\016\000\014\232\008\148\029\192\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\008\014@\128@1\n#\246\132\001\250\131\000\017\140@\160\128\000\000\004\007 @ \024\133\017\251B\000\253A\128\008\198 P@\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000A \208(\013\218\000\002H\004\002\000!\000\130\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\016H4\n\003v\128\000\146\001\000\128\008@ \128\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@ \002\018\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\128\228\008\004\003\016\162?h@\031\1680\001\024\196\n\008\000\000\000@r\004\002\001\136Q\031\180 \015\212\024\000\140b\005\004\000\000\000\000\000\000\000\000\000\000\000\128\000\000\008\000\002\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\016\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\002\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002 \000\000\000\000\000\000\000\000\000\000\000\000@\000\000\004\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002A\160P\027\180\000\004\144\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000H\000\016\024 \201%\128\000\016\000\008\000\0034\004H\008\192\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\128\005H\128\t\006\129Po\208\000\018@ \016\001\t\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000@r\004\002\001\136Q\031\180 \015\212\024\000\140b\005\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\175\224\130\228H\004\131P\174?x@\031\1680\t\026\196\n\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\239\252<\185\018\001\000\198/\143\2220\007\234L G\177\198\179\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\128\004\000\128\000\004\000\016\000\000\000\000@\000\000\000\000\000\000\t\0200\000\000\000\000\001\000\128\019\000\000\000!\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\245\170\240\000\128\016\000\000\128\0020\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000 \000\008\000\000\000\000\000\000R\000\002A\168P\027\180\000\004\144\008\004\000B\001\004\000\000\000\000)\000\001\000\204(\013\218\000\006H\004\002\128!\004\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000@0\n\003v\128\001\146\001\000\000\008@ \128\000\000\000\005 \000$\026\005\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\192\002\164@\004\131@\1687h\000\t \016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\128`\020\006\237\000\003$\002\000\000\016\128A\000\000\000\000\n@\000H4\n\003v\128\000\146\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\016\012\002\128\221\160\000d\128@\000\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\003\000\1607h\000\025 \016\000\000\132\002\008\000\000\000\000R\000\002\001\128P\027\180\000\012\144\008\000\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000  A\146J\000\000 \000\016\000\004(\008\128\001\128\000\000\000\000\000\000\000\000\000\000\016\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\128\005H\128\t\006\129Po\208\000\018@ \016\001\t\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \208(\013\218\000\002H\004\002\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\128\005H\128\t\006\129Pn\208\000\018@ \016\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000R\000\002\001\128P\027\180\000\012\144\008\000\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H4\n\003v\128\000\146\001\000\128\008@ \128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\001\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@ \002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000R\000\002\001\152P\027\180\000\012\144\008\001\000B\001\004\000\000\000\000)\000\001\000\204(\013\218\000\006H\004\002\128!\004\130\000\000\000\002\020\128\000\128f\020\006\237\000\003$\002\001@\016\130A\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\133\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\020\128\000\128f\020\006\237\000\003$\002\000@\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\002\144\000\016\012\194\128\221\160\000d\128@\008\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\001\000\002\012\002P\000\001\000\000\000\000 @\004\000\012\000\000\000\000)\000\001\000\192(\013\218\000\006H\004\000\000!\000\130\000\000\001\000\000@\000\131\000\148\000\000@\000\000\000\008\016\001\000\003\000\000\000\000\n@\000@0\n\003v\128\001\146\001\000\000\008@ \128\000\000@\000\016\000 \192%\000\000\016\000\000\000\002\004\000@\000\192\000\000\000\002\144\000\016\012\002\128\221\160\000d\128@\000\002\016\008 \000\000\016\000\004\000\0080\t@\000\004\000\000\000\000\129\000\016\0000\000\000\000\000\164\000\004\003\000\1607h\000\025 \016\000\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001\000\192(\013\218\000\006H\004\000\000!\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000@0\n\003v\128\001\146\001\000\000\008@ \128\000\000@\000\016\000 \192%\000\000\016\000\000\000\002\004\000@\000\192\000\000\000\002\144\000\016\012\002\128\221\160\000d\128@\000\002\016\008 \000\000\016\000\004\000\0080\t@\000\004\000\000\000\000\129\000\016\0000\000\000\000\000\164\000\004\003\000\1607h\000\025 \016\000\000\132\002\008\000\000\004\000\001\000\002\012\002P\000\001\000\000\000\000 @\004\000\012\000\000\000\000)\000\001\000\192(\013\218\000\006H\004\000\000!\000\130\000\000\001\000\000@\000\131\000\148\000\000@\000\000\000\008\016\001\000\003\000\000\000\000\n@\000@0\n\003v\128\001\146\001\000\000\008@ \128\000\000@\000\016\000 \192%\000\000\016\000\000\000\002\004\000@\000\192\000\000\000\002\144\000\016\012\002\128\221\160\000d\128@\000\002\016\008 \000\000\016\000\004\000\0080\t@\000\004\000\000\000\000\129\000\016\0000\000\000\000\000\164\000\004\003\000\1607h\000\025 \016\000\000\132\002\008\000\000\004\000\001\000\002\012\002P\000\001\000\000\000\000 @\004\000\012\000\000\000\000)\000\001\000\192(\013\218\000\006H\004\000\000!\000\130\000\000\001\000\000@\000\131\000\148\000\000@\000\000\000\008\016\001\000\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000R\000\002\001\152P\027\180\000\012\144\008\005\000B\t\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\128f\020\006\237\000\003$\002\001@\016\130A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\005 \000 \025\133\001\187@\000\201\000\128P\004 \144@\000\000\000\002\144\000\016\012\194\128\221\160\000d\128@\008\002\016H \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\164\000\004\0030\1607h\000\025 \016\n\000\132\018\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\001H\000\008\006a@n\208\0002@ \004\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\192\002\000@\000\002\000\008\192\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H5\n\003v\128\000\146\001\000\128\008@ \128\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000&\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\001\000\001 \000\000\000\000\000\000\000 \000\008\000\000\000\000\000\000\000\000\128\000\144\000\000\000\000\000\000\000\016\000\004\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000z\213x\000@\008\000\000@\001\024\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000@\000\016\000\000\000\000\000\000\164\000\004\131P\1607h\000\t \016\008\000\132\002\008\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\014\181Z\000\016\002\000\000\000\000@\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000@\000\016\000\000\000\000\000\000\164\000\004\131P\1607h\000\t \016\008\000\132\002\008\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253\127\004\023\"@ \024\197q\251\198\000\253A\128\008\214 P@\000\000\000\000\000\000\002\001\000\000\000\002\000\000\000\002 \000\000\003\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\175\224\130\228H\004\003\024\174?x\192\031\1680\129\026\196\n\204\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001 \000D`\155,\150\000@P\004$\000\029\208\016(;\128\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\002\000\000\128\000\000\000\000\000\005 \000$\026\133\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\192\002\000@\000\002\000\008\192\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n@\000H5\n\003v\128\000\146\001\000\128\008@ \128\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\001\000\128\000\000\001\000\000\000\001\016\000\000\001\136\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\235\248 \185\018\001 \212+\143\2220\007\234\012\"F\177\002\179\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000?\250\254\008.D\128@1\138\227\247\140\001\250\131\008\017\172@\172\192\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\007\173W\128\005H\128\t\006\129Po\208\000\018@ \016\001\t\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\002`\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\015Z\175\000\008\001\000\000\008\000#\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\008\000\002\000\000\000\000\000\000\020\128\000\144j\020\006\237\000\001$\002\001\000\016\128A\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\214\171@\002\000@\000\000\000\008\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\008\000\002\000\000\000\000\000\000\020\128\000\144j\020\006\237\000\001$\002\001\000\016\128A\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\235\248 \185\018\001 \212+\143\2220\007\234\012\"F\177\002\179\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\004\002\000\000\000\004\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\255_\193\005\200\144\t\006\161\\~\241\128?P`\0185\136\020\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\t\128@\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\016\000\000\000\000\004\007 @ \024\133\017\251B\000\253A\128\008\198 P@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\001\000\000\000\000\000\000\000\000\000\016\000\031\253\255\132\023#@&\026\133\241\251\198\001\253I\132\200\246:\214`\000\000\002\003\144 \016\012B\136\253\161\000~\160\192\004c\016( \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\175\224\130\228H\004\003\024\190?x@\031\1680\001\030\199\026\008\000\000\000\000\000\000\000@ \000\000\000\000\000\000\000\004\000\000\000\000\255\235\248 \185\018\001\000\198/\143\222\016\007\234\012\000G\177\198\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\008\004\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015\254\191\130\011\145 \018\013B\248\253\225\000~\160\192${\028h \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\175\224\130\228H\004\131P\190?x@\031\1680\t\030\199\026\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\128\000\255\235\248 \185\018\001\000\198/\143\222\016\007\234\012\000F\177B\130\000\000\000\000\000\000\000\016\008\002\000\000\000\000\000\000\001\000\000 \000?\250\254\008.D\128@1\139\227\247\132\001\250\131\000\017\172P\160\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\128@\016\000\000\000\000\000\000\008\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\235\248 \185\018\001 \212/\143\222\016\007\234\012\002F\177B\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000 &\000\000\000@\000\000\000\002\000\000\000\000\000\000\000 \000\192@\000\000\000\000 \000\000\008\000\000@\005\255\215\240Ar$\002\001\140W\031\188 \015\212\024\000\141b\005\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004 \024\008\000\000\000\000\004\000\000\001\000\000\008\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253\127\004\023#@&\026\133q\251\194\001\253A\128H\214\"Po\254\191\130\011\145 \016\012b\184\253\225\000~\160\192\004k\016( \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\255\215\240Ar4\002a\168W\031\188 \031\212\024\004\141b%\006\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\128\000\255\235\248 \185\018\001 \212/\143\222\016\007\234\012\002F\177B\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128@ \000\000\000@\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\245\252\016\\\137\000\144j\021\199\239\024\003\245\006\001#X\129A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\191_\192\005H\144\008\006\001Pn\240\0002@ \000\005\136\020\016\000\000\000\000\164\001\004\131@\1607h\000\t \016\008\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000=\250\254\000*D\128@0\n\131w\128\001\146\001\000\000,@\160\128\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\235U\224\001\000 \000\001\000\004\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\133\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\030\181^\000\016\002\000\000\016\000F\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002A\168P\027\180\000\004\144\008\004\000B\001\004\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0010\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\161@n\208\000\018@ \016\001\008\004\016\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000u\170\208\000\128\016\000\000\000\002\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013B\128\221\160\000$\128@ \002\016\008 \000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\128\000\247\235\248\000\169\018\001\000\192*\013\222\000\006H\004\000\000\177\002\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\144\000 0A\146K\000  \000\018\000\006(\008\016\017\128\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\161@n\208\000\018@ \016\001\008\004\016\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\001\235U\224\001\000 \000\001\000\004`\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\133\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000z\213x\000T\136\000\144h\021\006\253\000\001$\002\001\000\016\144A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000&\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144j\020\006\237\000\001$\002\001\000\016\128A\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007Z\173\000\008\001\000\000\000\000 \000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\000\001 \212(\013\218\000\002H\004\002\000!\000\130\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\004\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000 \000\000\002\002`\000\000\004\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\002\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\008@\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253\127\004\023\"@ \024\197q\251\194\000\253A\128\008\214 P@\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000R\000\002A\160P\027\180\000\004\144\008\004\000B\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\127\245\252\016\\\137\000\144j\021\199\239\008\003\245\006\001#\216\195A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\004 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\008\000\000\000\000\000\000\001\127\245\252\016\\\137\000\128c\021\199\239\008\003\245\006\000#X\129A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253\127\004\023\"@ \024\197q\251\194\000\253A\128\008\214 P@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\016\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\000\000\016\128A\000\000\000\000\000\002\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000@\000\000\000\005 \000$\026\005\001\187@\000I\000\128\000\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@ \000\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\007 @ \024\133\017\251B\000\253A\128\008\198 P@\000\000\000\000\000\128\000\000\000\000\000\000\000\128\000\000\000\000\000\000\016\000\000\001\001\200\016\008\006!D~\208\128?P`\0021\136\020\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@r\004\002\001\136Q\031\180 \015\212\024\000\140b\005\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129@n\208\000\018@ \000\001\008\004\016\000\000\000\000\000 \000\000\000\000\000\000\000 \000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\245\252\000@\008\000\000@\001\000\002\000\000\004\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\002\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000/\254\191\128\008\001\000\000\008\000 \000@\000\000\128\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\175\224\002\000@\000\002\000\008\000\016\000\000 \000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\018\013\002\128\221\160\000$\128@\000\002\016\008 \000\000\000\000\000@\000\000\000\000\000\000\000@\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000z\213x@\225\008\137 B\001\000\000$\000\nP\144\000&\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\235U\224\003\132\" \129\008\004\000\000\144\000)B@\000\152\000\000\245\170\240\001\194\016\000@\132\002\000\000H\000\020\161 \000L\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\016\004\002\000\000\016\000\000\000\000\002\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\004\001\000\000\000\004\000\000\000\000\000\128\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\016\000\000\000@\000\001\000@\000\000\001\000\000\000\000\000 \000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\001\000\000\000\000\000\000\002\000\000\000\000\000\000\000\008\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 @\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\245\170\240\001\194\017\000@\132\002\000\000H\000\020\161 \000D\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000=j\188\000p\132\000\016!\000\128\000\018\000\005(H\000\017\000\000\000\002\000\000\008\002\000\000\000\008\000\000\000\000\001\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\016\000\000\000@\000\001\000@\000\000\001\000\000\000\000\000 \000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\016\004\000\000\000\016\000\000\000\000\002\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\002\000\128\000\000\002\000\000\000\000\000@\001\000\000\000\000\000\000@\000\001\000@\000\000\001\000\000\004\000\000 \000\128\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\008\002\000\000\000\008\000\000\000\000\001\000\004\000\000\000\000\000\001\000\000\004\001\000\000\000\132\000\000\016\000\000\128\002\000\000 \000\000\000\128\000\002\000\128\000\000\002\000\000\000\000\000@\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000 \000\000\128 \000\000\000\128\000\000\000\000\016\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\192\002\000@\000\002\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\004\000z\213x\000@\008\000\000@\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\001\000\000\004\001\000\000\000\134\000\000\000\000\000\128\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\018\000\000\000\000\000\000\000 \000\000\128 \000\000\000\128\000\000\000\000\016\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\001\000\000\000\004\000\000\016\004\000\000\000\016\000\000\000\000\002\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\016\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\017\128\000\002\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\016\004\000\000\000\016\000\000\000\000\002\000\008\000\000\000\000\000\002\000\000\008\002\000\000\000(\000\000 \000\001\000\004\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000@\016\000\000\000@\000\000\000\000\008\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\008\002\000\000\000\008\000\000\000\000\001\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000 \000\000\128 \000\000\000\128\000\000\000\000\016\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\016\004\000\000\000\024\000\000\000\000\002\000\008\000\000\000\000\000\002\000\000\008\002\000\000\001(\000\000 \000\001\000\004\000\000@\000\000\001\000\000\004\001\000\000\000\004\000\000\000\000\000\128\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000@\000\001\000@\000\000\001\000\000\000\000\000 \000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000 \000\000\000\128\000\002\000\128\000\000\002\000\000\000\000\000@\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\002\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\002\000\128\000\000\002\000\000\000\000\000@\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\004\000\000\000\016\000\000@\016\000\000\000@\000\000\000\000\008\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000@\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\001\000@\000\000\001\000\000\000\000\000 \000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000 \008\000\000\000 \000\000\000\000\004\000\016\000\000\000\000\000\004\000\000\016\004\000\000\000P\000\000@\000\002\000\008\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\235u\224\001\128 \000\001\008\132\000\000\000\000\016\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\004\000\000\016\004\000\000\000X\000\000@\000\002\000\008\000\000\128\000\000\002\000\000\008\002\000\000\000\008\000\000\000\000\001\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000=n\188\0000\004\000\000!\024\128\000\000\000\002\000\008\000\000\000\000\000\002\000\000\008\002\000\000\000\008\000\000\000\000\001\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\001\000@\000\000\001\000\000\000\000\000 \000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\008\002\000\000\001\008\000\000\000\000\001\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\128\000\002\000\128\000\000\002\000\000\000\000\000@\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\214\171\194\007\008DI\002\016\008\000\001 \000R\132\128\0010\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\028\006\237\000\001$\002\001\000\016\128A\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\136\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\001\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\012@\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\004\131@\1607h\000\t \016\000\000\132\002\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\008\000\000\000\000\000\020\128\000\144h\020\006\237\000\001$\002\000\000\016\128A\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\247\254\016\\\137\000\144z\029\199\239\008\003\245&\017#X\129Y\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\255\223\248Ar$\002A\232W\031\188 \015\212\152D\141b\005fw\239\220\000\128\016\000\000\000\002\000\000\000\000\000@\000\000\000\000\000\001\"\134\000\000\000\000\000\000\016\000\000\000\000\000 \000\000\000\000\000\029\251\247\000 \004\000\000\000\000\128\000\000\000\000\016\000\000\000\000\000\014\253\251\128\016\002\000\000\000\000@\000\000\000\000\008\000\000\000\000\000\000$P\192\000\000\000\000\000\002\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\138\024\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\002E\012\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\001\"\134\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\145C\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\245\252\030\\\137\000\128c\021\199\239\008\003\245\006\000#X\129A?\250\254\008.D\128@1\138\227\247\132\001\250\131\000\017\172@\160\128\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\015\254\191\130\011\145 \016\012b\184\253\225\000~\160\194\004k\016+0\000\000\000\000\000\000\001\000\128\000\000\000\000\000\000\001\016\000\000\001\136\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@ \016\000\000\000\000\000\000\000\"\000\000\0001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000?\250\254\008.D\128H5\n\227\247\132\001\250\131\008\145\172@\172\192\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\144\000\016\012\194\128\221\160\000d\128@(\002\016\008 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\255\215\240yr$\002\001\140W\031\188 \015\212\024\000\141b\005\004\255\235\248 \185\018\001\000\198+\143\222\016\007\234\012\000F\177\002\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000?\250\254\008.D\128@1\138\227\247\132\001\250\131\008\017\172@\172\192\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015\254\191\131\203\145 \016\012b\184\253\225\000~\160\192\004k\016('\255_\193\005\200\144\008\0061\\~\240\128?P`\0025\136\020\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000{\247\254\000@\008\000\000@\001\000\000\000\000\004 \000\000\000\000\000\000\145C\000\000\000\000\000\016\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\003\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\192\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000=j\188\000 \004\000\000 \000\140\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\"\000\007\173W\128\004\000\128\000\004\000\017\128\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002 \000z\213x\000@\008\000\000@\001\024\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\003\255\175\224\130\228H\004\131P\174?x@\031\1680\t\026\196\026\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\"\134\000\000\000\000\000 \000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\016\008\004\000\000\000\000\000\000\000\008\128\000\000\012@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015\254\191\130\011\145 \018\013B\184\253\225\000~\160\194$k\016+0\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\019\000\000\000 \000\128\000\000\000\196\000\000\000\000\000\128@\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001H\000\t\006\129\192n\208\000\018@ \016\001\008\004\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000b\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005 \000$\026\005\001\187@\000I\000\128@\004 \016@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\003\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\191\240\130\228H\004\131\208\238?x@\031\1690\137\026\196\n\204\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015\254\255\194\011\145 \018\015B\184\253\225\000~\164\194$k\016+0\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\255\191\240\130\228H\004\003\024\174?x@\031\1690\129\026\196\n\204\000\000\000\000\000\000\000@ \000\000\000\000\000\000\000D\000\000\000b\255\239\252 \185\018\001\000\198+\143\222\016\007\234L F\177\002\179\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000?\251\255\008.D\128H5\n\227\247\132\001\250\147\008\145\172@\172\223\253\255\132\023\"@ \024\197q\251\194\000\253I\132\008\214 V`\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\001\000\128\000\000\000\000\000\000\001\016\000\000\001\136\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\255\223\248Ar$\002A\168W\031\188 \015\212\152D\141b\005f\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\247\254\016\\\137\000\144j\021\199\239\008\003\245&\017#X\129Y\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253\255\132\023\"@$\026\133q\251\194\000\253I\132H\214 V`\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\024\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\253\255\132\023\"@$\026\133q\251\194\000\253I\132H\214 V`\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\001\000\128\000\000\000\000\000\000\001\016\000\000\001\136\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\255\223\248Ar$\002A\168W\031\188 \015\212\152D\141b\005f\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\002`\000\000\004\000\016\000\000\000\024\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \002@\000\000\000\000\000\000\000\000\1458\001\128\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000 \000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\000\000 @\000\000\000\000\000\000 \000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\008\016\000\000\000\000\000\000\008\000\000\000\016\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\004\000\128\000\000\000\000\001\000\000\004\008\000\000\000\000\000\000\004\000\000\000\008\000\000\000\000\016\000 \000 \000\000\000\000\000\000\000\140\000\128\001\000\160\000\000\000\000\000@\000\001\002\000\000\000\000\000\000\001\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\002\000\002\000\000\000\000\000\000\000\008\192\008\000\000\n\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000@\000\000\000\000\000\000\000\000\0018\001\128\000\001\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\008\000\000\000\000\000\000\000\000\000#\0000\000\000 \000\000\000\002\000\004\000\000\000\000\000\000\000\000\000\017\128\016\000\000\016\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\004`\004\000\128\004\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000F\000@\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\008\192\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000 \000\000\000\000\000\000\000\000\000\156\000\192\000\000\128\000\000\000\008\000\016\000\000\000\000\000\000\000\000\000F\000`\000\000@\000\000\000\004\000\008\000\000\000\000\000\000\000\000\000#\000 \000\000 \000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\017\128\016\000\000\016\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\008\192\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000 \000\000\000\000\000\000\000\000\000\140\000\192\000\000\128\000\000\000\008\000\016\000\000\000\000\000\000\000\000\000F\000@\000\000@\000\000\000\000\000\008\000\000\000\000\000\000\000\000\000#\000 \000\000 \000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\017\128\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")
   
   let action =
-    ((16, "\001\128\000X\000\000\000\000\001\015\000\000\000\000\000\000\001\128\000\000\002,%\"\000\000\000\127;\144\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\191\000y\000\000%\"#\"CR\000C;\242\000\000\000\000\000\000\000\000B\180\000\005CR\001 CR\000\000\000U\000\000CR\000\000\000\133\000\000\000\000\000\0032\202\000\000\000\0004\156\000\0006\012\000\0006\1402\2022\202\016j\016j6\012\016j\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0004\2502\202\000\000\000\0004\250\000\0004\250\000\0004\250\000\000\000\000\000\000\018\208\000\133\000\000\016j\000\000*\2202\202\02302\202\000\000\000\000\000\000\000\000\000\000\000\000\025`2\202\000\000\026N2\202\026\1742\202\027\1562\202\000\0002\202\000\0002\202\027\2522\202\028\2342\202\029J2\202\03082\202\030\1522\202\00082\202\000\000\000\000\000\000\000\000\000\0002\202\031\1342\202\031\2302\202 \2122\202\000\000\000\0002\202\000\000\015\254%\164\000\000\000\000\000l\000\000\000\000\000\000\023\252\000\000\000\000\000\000\000\000\000\000\014\024\000\127\000\000%\164\000\000\000\251\016j\000\0002\202\000\136\000\000\000\000\000\133\000\000\000\000\000\000\000\000\000\226\000\000\000\000\001\028\000\000\001>6\012\000\000\000\000\000\000\000\000\000\000\000\0006\2282\202\000\0006\228\000\0006\2286\228\000\000\000\000'\164\000\133\000\000\016j\001B\000\0002\202\002\030\000\000\000\000\000\133\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000;`2\202\000\0002\202\000\000\000\000\002L\000\000\000=5\180\002\2522\202\002\204\000\000\000\0006\012\000=\000\000\000\000\000\000\000\000\000\000<\1526\012<\2366\012<\2526\012=\2426\012\000\0006\012\000\0006\012> 6\012>t6\012?V6\012?\1326\012?\2162\202\002\1426\012\000\0006\012@\1866\012@\2326\012A<\002\172\000\000\002\234\000\000\00052\202\000\000\0005\000\000\000\000\000\132%\"\000\000\000\132\000\000\000\000\002\2382\202\000\000\003$\000\000\016j\003\158\000\000\000\000\004p\000\000\016j\003\182\000\000\000\000\003\204\000\000\000\000\000\003\000\000\004\166\000\000%>A\250\004\156\004\148\000\133\004\020\004\216C\240\000C\000\000\000\000\001\006DH\000\000\000\000\000\000\005\000\005\018\001\"\005(C\240\001\222C\240\000\000\000\000\001 \000\000\000\000\004z\000\000\004\142\005BC\240\004\162\000\000\000\000\001\006\000\000\004\176\005\138\000\000D\158C\168\000\000\000\133\005\154\000\000\014\024\000\133\005\156\000\000\000\000#\214CR\004\224\000\000\005X\000\000\004\234\000\000\000\162%\"\000\000%\"\000\000\004\226\000\000\000\162\000\000\012\246\018\240\005\184C\240\005\n\005\224\000\000%\"\000\158\000\000\005\226\000\000\000\000\000\000\000\000\000\000\000\000\005\2002\202\005\028\017\"\005\2102\202\005$\005\206\001\006\005V\006z\000\0007d7\228\016j\0052\000\000\00587\228\000\000\000\000\000\000\000\000\000\000\000\000\000\0008d2\202\000\0008d\000\0008d8d\000\000\000\000\022B\000\133\000\000\016j\005<\000\0002\202\005@\000\000\000\000\000\133\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000&.2\202\000\0002\202\000\000\005b\000\000\0005\000\000\000\000\000\000\000\000\000\000+@7\228,.7\228,b7\228-P7\228\000\0007\228\000\0007\228-\1327\228.r7\228.\1667\228/\1487\228/\2002\202\005\1567\228\000\0007\2280\1827\2280\2347\2281\216\016j\005x\000\000\000\0002\202\000\000\006P\000\000\001J\006&2\202\005\242\000\000\006.2\202\006\000\000\000\003>\000\000\006z\006z\001J\000\000\001J\000\000\012\246\006z\006z\000\000\000\000\000\000\020\172\000\000\000\000\000\000\000\000\006H2\202\005\154\017\"\017\240\000\133\006l\000\000\006R3\132\006v3\132\006x2\202\005\172\017\"\017\"\000g\0026\000Y\000\000\000\000\000\000\0026\000\000\002j\000g\000\000\000\000\005\178\000\000\000\000\000\000\006\132\000\000\006\136\000\000\000\000\006\188\006p2\202\005\194\006\150\000\000\019\190\006|\016j\005\208\017\"\000\000\000\000\005\254\000\000\0009\000\000\003\226\000\000\001J\000\000\000\000\006H\000\000.(\018\240\006\142C\240\005\234\006\188\000\000\000\133\000\000\000\0272\202(J\000\0008\2282\202\005\254\000\000\016j\006\006\000\000\006\008\000\000\000\000\000\000\000\000\000\000\000\000\000\0009d2\202\000\0009d\000\0009d9d\000\000\000\000Dn\000\133\000\000\016j\006\n\000\0002\202\006\012\000\000\000\000\000\133\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016j\006\0189\228\000\000\000\0002\202\000w2\202\006\016\006D(J(\242'\014\006\1902\202\006\140\000\000\000\000\000\133\006L(J\000\000\006T(J\000\000\000\000\020X9\228\021F9\228\025p9\228!\1889\228\000\0009\228\000\0009\228$~9\228(&9\228E\1529\228E\1749\228E\2489\228F&9\228F\1329\228F\154\000\000\000\000\006,\000\000\006>)\154\000\000*B\006B*B1\252\006D*B\000\000\000\000\000\000\000\000\000\000\006n(J\000\000\000\000\006>\000\000\007\024\000\000\000\133\000\000\000\027\007\028\000\000\000N\006\236\000\133\006T\007\012C\240\006^\000@\000\0002\202\0078\000\000\001\022\001\026\003\178\007\030C\240\006r\007L\000\000\000\0052\202\007N\000\000\007T\000\000\014\024\000\133\002\1722\202\007X\000\000\007`\000\000\011\170\0009\000\000\011\170\000\000\000\000\019\190\002\2442\202\007|\000\000\007\128\000\000\000\000\001\154\007^\000\133\006\196\007zC\240\006\206\000\210\000\0002\202\007\160\000\000\0009\000\000\000\000\007\198\000\000\011\170\000\000\007\130\016j\006\214\007\174\000\000\001\022\000\000\007\148C\240\006\230\007\190\000\000\00302\202\007\194\000\000\007\196\000\000\014\024\000\133\003@2\202\007\200\000\000\007\202\000\000\000\000\000\000\007\198\000\000\000\000\0009\000\000\006z\000\000\001\022\000\000\000\000\001\024\017\240\000\000\001\024\000\000\000\000\007\000\000\000\0005\000\003\017\"\000\000\003\226\0009\003\226\000\000\0009\000\000\006z\000\000\006z\000\000\000\000\000\000\006\250\000\000\000\000\007\006\000\000\001\162\005.\000\013\003\226\000\000\000\000\000\000\003\"\000\000\006z\000\000\001\162\000\000\000\000\001\022\003\214\012\246\000\000\014\242\000\000\t\018\012\246\000\000\000\000\t\018\000\000\000\000\007\008\000\000\000\000\007\014\000\000\001\248\006z\000\000\001\248\000\000\000\000\007|\000\000\0009\000\000\006z\000\000\000\000\000\000\015\1283\226\000\000\007\224\000\000\015\128\007\226\000\000\007\232\000\000.(\000\133\002\028\000\0002\202\007\236\000\000\007\212\007\196\000\133\007*\007\230C\240\007H\002d\000\0002\202\008\"\000\000\001\022\002\176\000\0002\202\008$\000\000\014\024\000\133\002\196\000\0002\202\008&\000\000\002\158\015\128\000\000\019\190\003<\000\0002\202\008,\000\000\000\000\000\000\008\014\007\254\000\133\007f\008\024C\240\007j\004$\000\0002\202\008<\000\000\002.\000\000\008.\016j\007\134\008X\000\000\002\188\000\000\004j\000\0002\202\008`\000\000\014\024\000\133\004\140\000\0002\202\008b\000\000\002\158\000\000\000\000\007\150\000\000\002.\003\174\008\006\000\000\000\000\000\000\008\014\000\000\002\016\002d\000\000\012\246\008^\000\000\000\0002\202\007\204\006z\000\000\007\164\000\000\001\006\000\000\000\000\003h\012\246\000\000\012\246\000\000\007\150\000\000\003h\000\0006\012\003\2046\012\000\0006\012\000\000\007\154\000\000\003\204\000\000\017\"\004\028\017\"\000\000\017\"\000\000\007\160\000\000\004\028\000\0006\012\003\204\007\164\000\000:\220\000\133\004 :\220\000\000:\220\000\000\007\168\000\000\004 \000\0006\012\003\204\007\174\000\000\000\000\021\248\000\000\000\000\000\000\000\000\000\000\025H!x\000\000\006\160\000\000\005\222\000\000\000\000\007\240\000\133\000\000\000\000\000\000\000\164\005\222\000\000\002\238\002\130\002\130\000\000\002\018\002\130\000\000\007\206\000\000\000\000\000\000\000\000\000\000\000\000\008N\000\000\"\160\000\000%\"\005\222\000\000\003^\005\222\000\000\008l\000\000\005\222\008p\000\000\005\234\006\030\008~\000\000\008\130\000\000\0076\007\216\005\222\008\012\005\222\008\134\000\000\008\138\000\000\008\140\000\000%\"\000\000\002\154%\"\000\000\008\020\011\188\000\000\001\002\005\222\000\000\004\166\005\222\000\000\004\208\003\136\000\133\000\000\t\004\000\133\000\000\008\024\000\000\000\000\000\000\000\000\008\150\000\000\006\030\005\222\008\158\000\000\008\164\000\000\005\222\008\166\000\000\005\222\008\178\000\000\008\140\005\222\008\182\000\000\015\180\006\030\005\222\008@\005\222\008\186\000\000\008\188\000\000\000\000\004\168\005\222\000\000\004\220\001\130\001\130\000\000\000\000\000\000\003\158\001\130\000\000\008D\000\000\000\000\000\000\000\000\005\222\000\000\004\200\005\222\000\000\004\234\003\196\000\133\008F\000\000\000\000\000\000\000\000\008\196\000\000\008\198\000\000\005\222\008\204\000\000\007\216\005\222\008\206\000\000\008\208\000\000-\006\008\130\008\174\007j\005\222\008\220\000\000\000\000\008\224\000\000\008\182-\006\005\222\008\228\000\000\005\222\008\230\000\000\008\234\000\000\005\222\008v\005\222\008\246\000\000\008\248\000\000\000\133\008t\000\000\000\000\021\248\000\000\000\000\0028\t\\\000\000\000\000\003^\000\000\000\000\000\0002\202\000\135\t\162\008\204\tL6\012\000\000\003\1926\012\000\000\008\160\000\000\000\000\000\000\000\000\000\000\002\150\000\000\003n\000\000\000\000\000\000\003\226B\242\005lB\242B\242\005l\000\000\000\000\000N\000N\000N\000N\000\000\000\000\000\000\000\000\000\000\000\000(J\008\162\000\000\000\000\000\000;`\000N\014@\0009\000\000\000\000\0009\000\000\007\198\000\000\000\000\000\135\000\000\000\000\008\236\001h\t\\ER\000\000\004nE\186\000\000\000\000\t^\tN\000\133\000\000\000\133\000\000\004n\000\000\004\140ER\000\000\000\000\008\178\t\\\006z\008\176\000\000\001\154\0009\000\000\007\198\000\000\014\196\005,\000\000\000\000\tZ\000\000\000\000\0028\000\000\004\172\000\000\000\000\000\0002\202\000\135\000\000\002\150\000\000\004\230\000\000\000\000\000\000\005.\000\000\n^\001\020\n^\000\000\006z\n^\000\000\001\020\000\000\006z\000\000\006z\000\000\006z\000\000\000\000\000\000\000\000\000\000\000\135\000\000\006z\000\000\001\020\000\000\006z\000\000\017H\000\000\000\000\t\018\008\248\000\133\003\144\t\148\004`\000\000\004`\t\190\000\000\t\192\000\000\t\194\000\000\000\000\001*\004`\012\244\004`\000\000\000\000\000\152\008\214\000\000\t\200\000\000\000\000\t\018\007\184\002\202\t\216\n\248\t\216\000\000\000\000\007\250\000\133\000\000\004\024\t0\000\000\000\000\000\000\004\192\000\000\008\238\000\000\000\000\000\000\007\184\002\202\007\250\004\024\004\192\008\244\000\000\000\133\000\000\t\234\t\234\t4\000\133\t\134\000\000"), (16, "\n\141\n\141\n\141\n\141\n\141\n\141\n\141\n\141\n\141\n\141\n\141\000:\n\141\n\141\n\141\n\141\n\141\n\141\n\141\n\141\n\141\t.\000\210\t.\002\162\n\141\000\023\000\027\003i\005\197\007\230\n\141\0055\n\141\n\141\n\141\n)\000\210\n\141\008\026\000z\000\146\n\141\n\141\000\210\n\141\006*\n)\005=\006.\000\162\004^\007\230\020\150\n\141\0062\000~\n\141\n\141\0066\020\154\008\026\020\"\n\141\n\141\000\162\n\141\000\222\n\141\000\174\0111\003\233\000\162\n\141\nJ\n\141\n\141\n\141\n\141\n\141\000\n\011\158\008\158\n\141\n\141\n\141\n\141\n\141\n\141\008\166\n\141\n\141\n\141\n\141\005\229\005\229\011J\n\141\n\141\005\229\000\014\0111\002\253\003\154\011\130\t:\003%\n\141\n\141\n\141\n\141\n\141\n\141\n\141\000\194\n\141\002U\n\141\tv\n\141\002U\003%\n\141\n\141\005\197\005\214\005\157\t:\n\141\011\210\005=\013J\n\141\0111\0111\n\141\011j\022\154\0111\n\141\n\141\n\141\n\141\004v\n\141\n\141\003\233\011j\005=\n\141\n\141\n\141\005=\n\141\012^\n\141\n\141\006\026\n\141\003\181\n\141\n\141\002\014\011\162\n\141\n\141\005\205\005\205\005\205\005\205\005\205\005\205\005\205\005\205\005\205\005\205\005\205\nq\005\205\005\205\005\205\005\205\005\205\005\205\005\205\005\205\005\205\t.\012\162\005\222\004q\005\205\007\234\007\250\008\n\000\162\007\230\005\205\003%\005\205\005\205\005\205\003%\003%\005\205\008\026\004\005\002f\005\205\004q\022\154\005\205\006*\000\182\003%\006.\004v\013&\005\149\020\150\005\205\0062\000\006\002\178\001\"\0066\020\154\011\178\001.\005\205\005\205\017.\000\210\000\210\005\205\005\205\012b\013\026\003%\005\205\022\162\005\205\005\205\005\205\005\205\005\205\007\217\005m\018\018\005\205\005\205\005\205\005\205\005\205\005\205\000\162\005\205\005\205\005\205\005\205\000\162\000\162\018\218\005\205\005\205\001\"\002\210\008\001\001*\001.\012B\t:\004q\006^\005\205\005\205\005\205\005\205\005\205\005\205\005\018\005\205\015\246\005\205\005U\005\205\013\154\005E\005\205\005\205\004q\005\149\005\189\007\013\005\205\002\222\000\162\007\013\005.\008\001\008\001\005\205\022\170\018\222\008\001\005\205\005\205\005\205\005\205\000\162\005\205\005\205\002\230\022\162\003:\005\205\005\205\005\205\005\237\014\130\005\237\005\205\005\205\005\237\005\205\003\181\005\205\005\205\015V\014\026\005\205\005\205\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\008\014\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005e\005e\014\178\004^\005\237\005\237\019\254\005\237\005\165\n\025\005\237\017\022\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\005\237\000.\005\246\016>\016f\016\142\016\158\016\202\005\237\022\210\005:\005\237\017>\n)\002y\014\202\005\237\005\237\005\237\005\237\005\237\015r\005\237\014\134\005\213\014\230\005\173\005\237\019\254\005\237\005\237\005\237\005\237\005\237\014\250\015\222\017J\005\237\005\237\005\237\005\237\005\237\005\237\nA\005\237\005\237\005\237\005\237\003F\n)\014F\005\237\005\237\005\157\008\162\014J\005\237\001\"\005]\014\182\011\178\001.\005\237\005\237\005\237\005\237\005\237\005\237\017:\005\237\003\146\005\237\t.\005\237\008\014\003\162\005\237\005\237\003\170\n)\008\190\007\230\005\237\004*\003\001\015\n\005\237\n)\000\162\005\237\008\026\015\202\006\021\005\237\005\237\011\242\005\237\014\206\005\237\005\237\003\233\005\213\016\030\005\237\017\250\005\213\005\213\014\234\008\018\005\181\005\237\n!\005\237\011j\005\237\005\237\004N\005\213\005\237\005\237\0002\005\250\000F\000J\006\018\000N\006*\000R\000V\006.\000Z\012&\000^\020v\000b\0062\000f\000j\000n\0066\020~\005\213\015r\018.\004m\006:\006\021\004V\nQ\011j\004\142\000r\016F\000\226\006J\006f\t:\007!\006j\014F\004\001\012\190\000v\004m\014J\007\214\016&\015\014\014N\012\222\004v\007\230\007!\019&\000\238\003\233\004\154\007\230\001\"\011j\008\026\011\178\001.\008.\006r\020\186\008\026\011j\0082\013V\000\162\022\246\016n\001\022\016\170\001\026\003\197\000\134\t6\008:\015\202\015B\017\142\006\134\001\"\008>\006\138\008B\001.\000\162\006\142\006\146\008F\006\150\020\015\020\019\016N\022j\008J\020\023\000\162\007!\020g\020k\005\133\022r\004m\020o\006\154\006\158\008N\008R\006\162\008V\018\238\000\162\015z\008j\004\166\003\161\003!\n9\008v\006\170\004m\005\149\t:\022v\005\245\004\178\004\190\020:\t:\015\150\022z\008\150\016v\n1\016\178\008\154\008\214\003\197\tB\004\202\006\174\008\218\004\222\007!\022\254\006\178\003\197\003\197\003\129\023\002\005}\003\197\008\226\004\238\006\182\007!\005\245\005\245\004\242\015F\001^\005\245\0002\005\250\000F\000J\006\018\000N\006*\000R\000V\006.\000Z\004\250\000^\020v\000b\0062\000f\000j\000n\0066\020~\004\254\003\129\018*\022\130\006:\na\nY\005\141\018\214\005u\000r\015~\000\226\006J\006f\019\"\0055\006j\021\139\0055\005&\000v\ni\0055\007\214\0055\006\005\021\143\015\154\0055\0055\021\030\005\253\000\238\022\138\005M\007\230\021\146\005*\006\013\0052\005V\008.\006r\020\186\008\026\021N\0082\013\158\023\n\002m\005^\001\022\005b\001\026\003\213\000\134\t6\008:\018\030\018\202\005j\006\134\001\"\008>\006\138\008B\001.\005~\006\142\006\146\008F\006\150\005\130\021\171\021\175\019\022\008J\017\014\021\179\006\005\005\154\005\170\002V\017\174\004\217\005\253\006\154\006\158\008N\008R\006\162\008V\006\013\000\162\005\190\008j\005\198\003\161\017\018\005\206\008v\006\170\021\207\021\211\017\018\005\235\006\029\021\215\017\022\017\014\t:\006\002\006\n\008\150\017\022\006\014\006\"\008\154\008\214\006>\tB\006F\006\174\008\218\006N\006V\006Z\006\178\0055\003\213\017\018\006b\006z\019\198\008\226\006\130\006\182\006\218\006\029\006\029\017\022\006\230\001^\006\029\0002\005\250\000F\000J\006\018\000N\006*\000R\000V\006.\000Z\007.\000^\020v\000b\0062\000f\000j\000n\0066\020~\018\166\007\166\007\206\t\197\006:\018b\007\226\007\238\007\246\007\221\000r\007\254\000\226\006J\006f\008\006\000\162\006j\008Z\008b\008r\000v\000\162\008z\007\214\008\130\008\138\t\197\008\146\017\"\007\221\008\206\008\222\000\238\008\230\017\"\007\230\008\242\008\246\008\254\007\221\t\002\008\022\006r\t\014\008\026\t\022\0082\000\162\017\006\t&\tJ\001\022\tZ\001\026\003\241\000\134\0086\008:\tb\tf\017\"\006\134\001\"\008>\006\138\008B\001.\t\142\006\142\006\146\008F\006\150\t\154\t\162\t\246\0119\008J\n\002\n6\nR\t\197\nV\nf\017\198\nn\n~\006\154\006\158\008N\008R\006\162\008V\n\138\000\162\011\014\008j\011\022\003\161\011&\0112\008v\006\170\011N\011^\017\018\011f\008\t\011z\011\134\004a\t:\011\142\007\221\008\150\017\022\011\146\011\154\008\154\008\214\003\241\tB\011\170\006\174\008\218\011\190\007\221\011\198\006\178\003\241\003\241\004a\011\202\011\218\003\241\008\226\011\226\006\182\011\250\008\t\008\t\004a\012\002\001^\008\t\0002\005\250\000F\000J\006\018\000N\006*\000R\000V\006.\000Z\012.\000^\0126\000b\0062\000f\000j\000n\0066\017\014\012F\003!\012N\t\185\006:\012R\004a\012Z\012j\012\142\000r\012\150\000\226\006J\006f\012\154\003!\006j\012\170\012\178\017\018\000v\000\162\012\182\007\214\012\198\012\206\t\185\012\230\012\238\017\022\013>\013\134\000\238\013\146\017\"\007\230\014\006\014\018\0142\014^\014j\008\022\006r\014r\008\026\014\142\0082\004a\005\221\014\150\014\154\001\022\014\162\001\026\017\202\000\134\0086\008:\014\166\019^\004a\006\134\001\"\008>\006\138\008B\001.\014\174\006\142\006\146\008F\006\150\014\190\014\214\014\242\0119\008J\015\022\015&\015*\t\185\t\197\0152\0156\015>\015N\006\154\006\158\008N\008R\006\162\008V\003!\000\162\015^\008j\003!\003!\015f\015j\008v\006\170\000\162\015\134\015\162\015\182\0119\015\198\003!\022j\t:\015\214\015\238\008\150\015\254\017\"\016\n\008\154\008\214\0163\tB\016[\006\174\008\218\016\131\005\221\016\155\006\178\016\191\005\221\005\221\016\215\003!\017\026\008\226\t\197\006\182\017V\0119\0119\017s\022\234\001^\0119\0002\005\250\000F\000J\006\018\000N\006*\000R\000V\006.\000Z\017\155\000^\017\167\000b\0062\000f\000j\000n\0066\017\183\005\221\017\191\017\210\017\219\006:\017\227\017\235\018\006\003\141\018F\000r\018[\000\226\006J\006f\018k\nI\006j\018s\018\127\022^\000v\007)\003\141\007\214\018\139\018\146\018\155\018\174\018\183\018\191\018\250\019.\000\238\019C\019K\007\230\007)\019W\019g\019o\019z\008\022\006r\019~\008\026\019\139\0082\019\151\019\158\019\171\019\183\001\022\019\191\001\026\019\202\000\134\0086\008:\019\211\019\219\019\231\006\134\001\"\008>\006\138\008B\001.\020\002\006\142\006\146\008F\006\150\020&\020*\020.\020F\008J\020\194\021\n\021\018\021.\0212\021^\021b\021j\007)\006\154\006\158\008N\008R\006\162\008V\nI\000\162\021\151\008j\nI\nI\022b\003\141\008v\006\170\022\186\003\141\003\141\022n\022~\022\134\022\142\022\183\t:\022\190\022\214\008\150\022\250\003\141\003\141\008\154\008\214\018:\tB\023\019\006\174\008\218\0237\023F\nI\006\178\023J\023N\023W\007)\nI\000\000\008\226\000\000\006\182\000\000\000\000\003\141\000\000\000\000\001^\007)\0002\005\250\000F\000J\006\018\000N\006*\000R\000V\006.\000Z\000\000\000^\020v\000b\0062\000f\000j\000n\0066\020~\000\000\000\000\000\000\000\000\006:\000\000\000\000\000\000\000\000\000\000\000r\000\000\000\226\006J\006f\000\000\000\000\006j\000\000\000\000\000\000\000v\000\000\000\000\007\214\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\238\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008.\006r\000\000\000\000\000\000\0082\021\230\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\134\t6\008:\000\000\000\000\000\000\006\134\001\"\008>\006\138\008B\001.\000\000\006\142\006\146\008F\006\150\000\000\000\000\000\000\000\000\008J\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\154\006\158\008N\008R\006\162\008V\000\000\000\162\000\000\008j\000\000\003\161\000\000\n\017\008v\006\170\000\000\000\000\000\000\000\000\007\237\000\000\000\000\000\000\000\000\000\000\000\000\008\150\000\000\000\000\000\000\008\154\008\214\000\000\tB\000\000\006\174\008\218\000\000\000\000\000\000\006\178\000\000\000\000\000\000\000\000\000\000\000\000\008\226\000\000\006\182\000\000\007\237\007\237\000\000\000\000\001^\007\237\0002\005\250\000F\000J\006\018\000N\006*\000R\000V\006.\000Z\000\000\000^\000\000\000b\0062\000f\000j\000n\0066\0055\000\000\000\000\000\000\000\000\006:\000\000\000\000\000\000\000\000\000\000\000r\n\017\000\226\006J\006f\n\017\n\017\006j\000\000\000\000\0055\000v\000\000\000\000\007\214\000\000\000\000\n\017\000\000\000\000\0055\000\000\000\000\000\238\000\000\000\000\000\000\000\000\022\218\000\000\000\000\000\000\008.\006r\000\000\000\000\000\000\0082\012\n\000\000\000\000\n\017\001\022\000\000\001\026\0055\000\134\t6\008:\000\000\000\000\002V\006\134\001\"\008>\006\138\008B\001.\000\000\006\142\006\146\008F\006\150\000\000\000\000\000\000\011\021\008J\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\154\006\158\008N\008R\006\162\008V\000\000\000\162\000\000\008j\000\000\000\000\000\000\000\000\008v\006\170\0055\000\000\000\000\000\000\011\021\000\000\000\000\000\000\000\000\000\000\000\000\008\150\000\000\0055\000\000\008\154\008\214\000\000\tB\000\000\006\174\008\218\000\000\000\000\000\000\006\178\000\000\000\000\000\000\000\000\000\000\000\000\008\226\000\000\006\182\000\000\011\021\011\021\000\000\000\000\001^\011\021\0002\005\250\000F\000J\006\018\000N\006*\000R\000V\006.\000Z\000\000\000^\000\000\000b\0062\000f\000j\000n\0066\000\000\000\000\000\000\000\000\000\000\006:\000\000\000\000\003\029\000\000\000\000\000r\000\000\000\226\006J\006f\000\000\000\000\006j\000\000\000\000\000\000\000v\003\029\000\000\007\214\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\238\000\000\000\000\000\000\000\000\003\029\000\000\000\000\000\000\008.\006r\000\000\000\000\000\000\0082\013\210\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\134\t6\008:\000\000\000\000\000\000\006\134\001\"\008>\006\138\008B\001.\000\000\006\142\006\146\008F\006\150\000\000\000\000\000\000\000\000\008J\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\154\006\158\008N\008R\006\162\008V\000\000\000\162\000\000\008j\000\000\000\000\003\029\000\000\008v\006\170\003\029\003\029\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008\150\003\029\000\000\000\000\008\154\008\214\000\000\tB\000\000\006\174\008\218\002\142\000F\000J\006\178\000N\003\029\000R\000V\000\000\000Z\008\226\000^\006\182\000b\003\029\000f\022\162\000n\001^\0002\005\250\000F\000J\006\018\000N\006*\000R\000V\006.\000Z\000r\000^\000\000\000b\0062\000f\000j\000n\0066\000\000\000\000\000v\000\000\000\000\006:\000\000\000\000\000\000\000\000\000\000\000r\000\000\000\226\006J\006f\000\000\000\000\006j\000\000\000\000\000\000\000v\000\000\000\000\007\214\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\238\000\000\000\000\000\134\000\000\000\000\000\000\000\000\000\000\008.\006r\000\000\000\000\000\000\0082\020\218\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\134\t6\008:\000\000\000\000\000\000\006\134\001\"\008>\006\138\008B\001.\000\000\006\142\006\146\008F\006\150\000\000\000\162\000\000\000\000\008J\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\154\006\158\008N\008R\006\162\008V\012\162\000\162\000\000\008j\000\000\000\000\000\000\000\000\008v\006\170\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007!\000\000\000\000\008\150\000\000\t.\000\000\008\154\008\214\000\000\tB\000\000\006\174\008\218\007\230\007!\000\000\006\178\001\"\000\000\000\000\011\178\001.\008\026\008\226\000\000\006\182\000\000\0002\005\250\000F\000J\001^\000N\006*\000R\000V\006.\000Z\000\000\000^\000\000\000b\0062\000f\000j\000n\0066\000\000\000\162\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000r\000\000\000\226\006\229\006f\007!\018\162\006j\000\000\000\000\000\000\000v\000\000\000\000\014R\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\238\000\000\000\000\000\000\017\018\000\000\000\000\t:\000\000\014b\006r\000\000\006\229\006\229\017\022\000\000\000\000\006\229\000\000\001\022\0055\001\026\000\000\000\134\000\000\000\000\000\000\000\000\007!\006\134\001\"\000\000\006\138\001*\001.\000\000\006\142\006\146\008F\006\150\007!\0055\000\000\000\000\000\000\000:\000\000\000\000\000\000\000\000\000\000\0055\0055\000\000\006\154\006\158\000\000\000\000\006\162\000\000\000\000\000\162\000\000\0002\0006\000F\000J\000\000\000N\006\170\000R\000V\000\000\000Z\000\000\000^\0055\000b\000\000\000f\000j\000n\002V\000\000\000\000\0055\0055\000\162\tB\000\000\006\174\014f\000\000\000\000\000r\006\178\000\226\000\000\000\230\000\000\017\"\000\234\014n\000\000\006\182\000v\000\000\000\000\000\000\000\000\001^\000\000\000\000\000\000\000\000\000\000\0055\000\238\000\000\000\000\000\242\000\000\000\000\000\000\0055\000\000\001\n\001\006\000\000\001\014\000\000\000\000\000\000\000\000\000\000\000\000\001\022\0055\001\026\000\000\000\134\000\000\000\000\000\000\000\000\000\000\001\030\001\"\000\000\001&\001*\001.\001\130\0012\0016\000\000\001:\0055\000\000\000\000\0055\0055\000\000\000\000\0055\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001>\000\000\0055\001B\000\000\000\000\000\162\000\000\006:\000\000\000\000\000\000\000\000\000\000\001J\000\000\000\226\006J\006f\000\000\000\000\006j\000\000\001N\000\000\000\000\000\000\000\000\007\214\000\000\000\000\000\000\000\000\000\000\000\000\001R\000\000\000\238\000\000\000\000\001V\000\000\000\000\003e\000\000\000\000\008f\006r\000\000\001Z\012\162\0082\000\000\000\000\000\000\001^\001\022\000\000\001\026\000\000\000\000\000\000\008:\000\000\000\000\000\000\006\134\001\"\008>\006\138\008B\001.\000\000\006\142\006\146\000\000\006\150\000\000\000\000\000\000\000\000\008J\000\000\000\000\000\000\000\000\001\"\000\000\000\000\011\178\001.\006\154\006\158\008N\008R\006\162\008V\000\000\000\162\000\000\008j\000\000\000\000\000\000\000\000\008v\006\170\000\000\000\000\000\000\000\000\006:\000\000\000\000\000\000\000\000\000\000\000\162\008\150\000\226\006J\006f\008\154\008\214\006j\000\000\000\000\006\174\008\218\000\000\0089\007\214\006\178\000\000\000\000\000\000\000\000\000\000\000\000\008\226\000\238\006\182\000\000\000\000\000\000\000\000\000\000\001^\000\000\006n\006r\000\000\000\000\000\000\0082\000\000\000\000\000\000\000\000\001\022\000\000\001\026\0089\0089\000\000\008:\000\000\0089\000\000\006\134\001\"\008>\006\138\008B\001.\000\000\006\142\006\146\000\000\006\150\000\000\000\000\000\000\000\000\008J\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\154\006\158\008N\008R\006\162\008V\000\000\000\162\000\000\008j\000\000\000\000\000\000\000\000\008v\006\170\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011e\0055\008\150\011e\0055\000\000\008\154\008\214\0055\000\000\0055\006\174\008\218\000\000\0055\0055\006\178\000\000\011e\000\000\000\000\000\000\011e\008\226\000\000\006\182\001v\011e\000\000\000\000\000\000\001^\000\000\011e\000\000\000\000\011e\011e\000\000\011e\011e\000\000\000\000\001~\000\000\011e\002\170\000\000\000\000\011e\000\000\000\000\011e\000\000\011e\011e\000\000\000\000\000\000\0055\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\146\000\000\000\000\000\000\000\000\000\000\011e\000\000\011e\000\000\000\000\001\"\000\000\000\000\001*\001.\000\000\000\000\011e\000\000\000\000\000\000\000\000\002\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011e\011e\011e\000\162\011e\011e\002\186\0055\011e\000\000\000\000\000\000\004\001\000\000\000\000\004\001\002\194\000\000\000\000\000\000\011e\000\000\000\000\011e\011e\011e\011e\000\000\000\000\000\000\004\001\011e\011e\011e\004\001\011e\011e\011e\004\001\004\001\000\000\000\000\000\000\000\000\000\000\004\001\000\000\000\000\004\001\004\001\000\000\004\001\004\001\000\000\000\000\004\001\000\000\004\001\004\001\000\000\000\000\004\001\000\000\000\000\004\001\000\000\004\001\004\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\210\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\001\000\000\004\001\n\154\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\001\000\000\000\000\000\000\000\000\004\001\000\000\000\000\000\162\n\162\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\001\004\001\004\001\n\170\004\001\004m\004\001\000\000\004\001\n\234\n\242\000\000\004\005\000\000\000\000\004\005\004\001\000\000\000\000\n\202\004\001\000\000\n\178\004\001\n\194\004\001\000\000\000\000\000\000\000\000\004\005\004\001\004\001\004\001\004\005\004\001\004\001\004\001\004\005\004\005\000\000\000\000\000\000\000\000\n\210\004\005\000\000\000\000\004\005\004\005\000\000\004\005\004\005\000\000\000\000\004\005\000\000\004\005\004\005\000\000\000\000\004\005\000\000\000\000\004\005\000\000\004\005\004\005\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\218\000\000\000\000\000\000\000\000\000\000\000\000\n\186\004\005\000\000\004\005\000\181\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\169\004\005\000\000\000\000\000\000\000\000\004\005\000\000\000\000\000\000\n\162\000\000\000\000\000\000\000\000\n\250\n\226\000\000\000\000\000\000\000\000\000\000\004\005\004\005\004\005\n\170\004\005\004q\004\005\000\000\004\005\000\181\000\181\000\000\000\000\000\000\000\000\000\000\004\005\000\000\000\000\n\202\004\005\000\000\n\178\004\005\n\194\004\005\000\000\000\000\000\000\000\000\000\000\004\005\004\005\004\005\000\000\004\005\004\005\004\005\001=\001=\001=\001=\000\000\001=\n\210\001=\001=\000\000\001=\000\000\001=\000\000\001=\000\000\001=\001=\001=\000\000\000\000\000\000\000\000\016\226\000\000\000\000\000\000\000\000\000\000\000\000\001=\001=\001=\000\000\000\000\000\000\000\000\001=\000\000\000\000\n\218\000\000\001=\000\000\000\000\000\000\001=\n\186\000\000\000\000\001=\000\000\000\000\016\230\000\000\000\000\001=\000\000\011\185\000\181\000\000\011\185\000\000\001=\000\000\000\000\000\000\000\000\001=\000\000\000\000\000\000\000\000\000\000\000\181\n\226\011\185\001=\000\000\000\000\011\185\000\000\000\000\000\000\006\202\011\185\000\000\000\000\000\000\000\000\000\000\011\185\000\000\000\000\011\185\011\185\001=\011\185\011\185\001=\000\000\006\210\000\000\011\185\006\222\000\000\000\000\011\185\000\000\000\000\011\185\000\000\011\185\011\185\001=\000\000\001=\000\000\001=\000\000\001=\000\000\000\000\000\000\000\000\001=\000\000\000\000\001=\000\000\000\000\000\000\011\185\000\000\011\185\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001=\011\185\000\000\001=\001=\000\000\006\234\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\234\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011\185\011\185\011\185\000\000\011\185\000\000\006\238\000\000\011\185\000\000\000\000\000\000\001\137\000\000\000\000\001\137\006\246\000\000\000\000\000\000\000\000\000\000\000\000\011\185\000\000\011\185\000\000\000\000\000\000\000\000\001\137\011\185\011\185\011\185\001\137\011\185\011\185\011\185\000\000\001\137\000\000\000\000\000\000\000\000\000\000\001\137\000\000\000\000\001\137\001\137\000\000\001\137\001\137\000\000\000\000\000\000\000\000\001\137\000\000\000\000\000\000\001\137\000\000\000\000\001\137\000\000\001\137\001\137\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\137\000\000\001\137\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\137\004%\000\000\002v\004%\002z\004%\002~\004%\000\000\004%\000\000\000\000\002\130\004%\004%\000\000\000\000\000\000\000\000\000\000\001\137\001\137\001\146\000\000\001\137\001\137\004%\000\000\001\137\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004%\004%\000\000\000\000\001\137\000\000\004%\001\137\001\137\001\137\001\137\000\000\000\000\000\000\000\000\002>\001\137\001\137\000\000\001\137\001\137\001\137\004%\000\000\000\000\004%\000\000\000\000\000\000\000\000\000\000\004%\000\000\000\000\004%\004%\000\000\000\000\000\000\000\000\000\000\000\000\004%\000\000\000\000\004%\004%\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004%\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004%\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004%\000\000\000\000\000\000\004%\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004%\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004%\000\000\000\000\004%\004%\000\000\000\000\004%\000\000\000\000\000\000\000\000\004%\004%\000\000\000\000\000\000\004%\t\181\t\181\t\181\t\181\000\000\t\181\000\000\t\181\t\181\000\000\t\181\000\000\t\181\000\000\t\181\000\000\t\181\t\181\t\181\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\181\t\181\t\181\001\178\000\000\000\000\002\006\t\181\000\000\000\000\000\000\000\157\t\181\000\000\000\000\000\000\016\250\000\000\000\000\000\000\017\002\001\190\000\000\000\000\000\000\002\001\t\181\000\000\000\000\000\157\002\001\000\000\000\000\t\181\000\000\000\000\001\198\000\000\t\181\002\001\002\001\000\000\002&\002.\n\170\000\000\000\000\t\181\002\001\000\000\000\157\000\157\001\230\000\000\000\000\001\206\000\000\001\222\002\001\000\000\000\157\000\000\000\000\n\178\000\000\n\194\t\181\000\000\000\000\t\181\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\238\000\000\002\001\000\000\000\000\000\000\000\000\t\181\000\157\t\181\000\000\t\181\002\001\t\181\000\000\000\000\000\000\000\000\t\181\000\000\000\000\t\181\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\001\001\246\000\000\t\181\002\001\002\001\017v\t\181\001\214\000\157\000\000\000\000\000}\000\000\000\000\000}\n\186\000\000\000\000\000\000\002\001\000\000\000\000\002\001\002\001\002\001\002\001\000\000\000\157\000\000\001\190\000\000\002\001\002\001\000}\0026\001\254\002\001\000\000\000}\000\000\000\000\000\000\000\157\000\157\001\198\000\000\000\000\000}\000}\000\000\000}\000}\000\000\000\000\000\000\000\000\000}\000\000\000\000\000e\001\230\000\000\000e\001\206\000\000\001\222\000}\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000e\000\000\000\000\000\000\000e\000\000\000\000\000\000\001\238\000e\000}\000\000\000\000\000\000\000\000\001\198\000\000\000\000\000e\000e\000}\000e\000e\000\000\000\000\000\000\000\000\000e\000\000\000\000\000\000\000e\000\000\000\000\001\206\000\000\001\222\000e\000\000\000\000\000\000\000}\001\246\000\000\000\000\000}\000}\000\000\000\000\001\214\000\000\000\000\000\000\000\000\000\000\000\000\000e\000\000\000e\000\000\000\000\000}\000\000\000\000\000}\000}\000}\000}\000e\000\000\000\000\000\000\000\000\000}\000}\000\000\000}\001\254\000}\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000e\000e\000\000\000\000\000e\000e\000\000\000\000\001\214\000\000\000\000\000\000\000]\000\000\000\000\000]\000\000\000\000\000\000\000\000\000e\000\000\000\000\000e\000e\000e\000e\000\000\000\000\000\000\000]\000\000\000e\000e\000]\000e\000e\000e\000\000\000]\000\000\000\000\000\000\000\000\000\000\000]\000\000\000\000\000]\000]\000\000\000]\000]\000\000\000\000\000\000\000\000\000]\000\000\000\000\000a\000]\000\000\000a\001\206\000\000\000]\000]\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000a\000\000\000\000\000\000\000a\000\000\000\000\000\000\000]\000a\000]\000\000\000\000\000\000\000\000\000a\000\000\000\000\000a\000a\000]\000a\000a\000\000\000\000\000\000\000\000\000a\000\000\000\000\000\000\000a\000\000\000\000\001\206\000\000\000a\000a\000\000\000\000\000\000\000]\000]\000\000\000\000\000]\000]\000\000\000\000\001\214\000\000\000\000\000\000\000\000\000\000\000\000\000a\000\000\000a\000\000\000\000\000]\000\000\000\000\000]\000]\000]\000]\000a\000\000\000\000\000\000\000\000\000]\000]\000\000\000]\000]\000]\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000a\000a\000\000\000\000\000a\000a\000\000\000\000\001\214\000\000\000\000\000\000\000q\000\000\000\000\000q\000\000\000\000\000\000\000\000\000a\000\000\000\000\000a\000a\000a\000a\000\000\000\000\000\000\001\190\000\000\000a\000a\000q\000a\000a\000a\000\000\000q\000\000\000\000\000\000\000\000\000\000\001\198\000\000\000\000\000q\000q\000\000\000q\000q\000\000\000\000\000\000\000\000\000q\000\000\000\000\000i\000q\000\000\000i\001\206\000\000\001\222\000q\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\190\000\000\000\000\000\000\000i\000\000\000\000\000\000\001\238\000i\000q\000\000\000\000\000\000\000\000\001\198\000\000\000\000\000i\000i\000q\000i\000i\000\000\000\000\000\000\000\000\000i\000\000\000\000\000\000\000i\000\000\000\000\001\206\000\000\001\222\000i\000\000\000\000\000\000\000q\000q\000\000\000\000\000q\000q\000\000\000\000\001\214\000\000\000\000\000\000\000\000\000\000\000\000\000i\000\000\000i\000\000\000\000\000q\000\000\000\000\000q\000q\000q\000q\000i\000\000\000\000\000\000\000\000\000q\000q\000\000\000q\000q\000q\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000i\000i\000\000\000\000\000i\000i\000\000\000\000\001\214\000\000\000\000\000\000\000m\000\000\000\000\000m\000\000\000\000\000\000\000\000\000i\000\000\000\000\000i\000i\000i\000i\000\000\000\000\000\000\001\190\000\000\000i\000i\000m\000i\000i\000i\000\000\000m\000\000\000\000\000\000\000\000\000\000\001\198\000\000\000\000\000m\000m\000\000\000m\000m\000\000\000\000\000\000\000\000\000m\000\000\000\000\000u\000m\000\000\000u\001\206\000\000\001\222\000m\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\190\000\000\000\000\000\000\000u\000\000\000\000\000\000\001\238\000u\000m\000\000\000\000\000\000\000\000\001\198\000\000\000\000\000u\000u\000m\000u\000u\000\000\000\000\000\000\000\000\000u\000\000\000\000\000\000\001\230\000\000\000\000\001\206\000\000\001\222\000u\000\000\000\000\000\000\000m\000m\000\000\000\000\000m\000m\000\000\000\000\001\214\000\000\000\000\000\000\000\000\000\000\000\000\001\238\000\000\000u\000\000\000\000\000m\000\000\000\000\000m\000m\000m\000m\000u\000\000\000\000\000\000\000\000\000m\000m\000\000\000m\000m\000m\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000u\001\246\000\000\000\000\000u\000u\000\000\000\000\001\214\000\000\000\000\000\000\001\178\000\000\000\000\000\133\000\000\000\000\000\000\000\000\000u\000\000\000\000\000u\000u\000u\000u\000\000\000\000\000\000\001\190\000\000\000u\000u\000\133\000u\000u\000u\000\000\000\133\000\000\000\000\000\000\000\000\000\000\001\198\000\000\000\000\000\133\000\133\000\000\000\133\002.\000\000\000\000\000\000\000\000\000\133\000\000\000\000\001\178\001\230\000\000\000y\001\206\000\000\001\222\000\133\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\190\000\000\000\000\000\000\000y\000\000\000\000\000\000\001\238\000y\000\133\000\000\000\000\000\000\000\000\001\198\000\000\000\000\000y\000y\000\133\000y\000y\000\000\000\000\000\000\000\000\000y\000\000\000\000\000\000\001\230\000\000\000\000\001\206\000\000\001\222\000y\000\000\000\000\000\000\000\133\001\246\000\000\000\000\000\133\000\133\000\000\000\000\001\214\000\000\000\000\000\000\000\000\000\000\000\000\001\238\000\000\000y\000\000\000\000\000\133\000\000\000\000\000\133\000\133\000\133\000\133\000y\000\000\000\000\000\000\000\000\000\133\000\133\000\000\0026\001\254\000\133\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000y\001\246\000\000\000\000\000y\000y\000\000\000\000\001\214\000\000\000\000\000\000\001\178\000\000\000\000\000\129\000\000\000\000\000\000\000\000\000y\000\000\000\000\000y\000y\000y\000y\000\000\000\000\000\000\001\190\000\000\000y\000y\000\129\000y\001\254\000y\000\000\000\129\000\000\000\000\000\000\000\000\000\000\001\198\000\000\000\000\000\129\000\129\000\000\000\129\002.\000\000\000\000\000\000\000\000\000\129\000\000\000\000\000\000\001\230\000\000\000\000\001\206\000\000\001\222\000\129\000\000\000\000\000\000\000\000\000\000\t\165\t\165\t\165\t\165\000\000\t\165\000\000\t\165\t\165\000\000\t\165\000\000\t\165\001\238\t\165\000\129\t\165\t\165\t\165\000\000\000\000\000\000\000\000\000\000\000\000\000\129\000\000\000\000\000\000\000\000\t\165\t\165\t\165\000\000\000\000\000\000\000\000\t\165\000\000\000\000\000\000\000\000\t\165\000\000\000\000\000\000\000\129\001\246\000\000\000\000\000\129\000\129\000\000\000\000\001\214\000\149\t\165\000\000\000\000\000\000\000\000\000\000\000\000\t\165\000\000\000\000\000\129\000\000\t\165\000\129\000\129\000\129\000\129\000\149\000\000\000\000\000\000\t\165\000\129\000\129\000\000\000\129\001\254\000\129\000\000\000\000\000\000\000\000\000\149\000\000\000\000\000\000\000\000\000\000\000\149\000\149\t\165\000\000\000\000\t\165\000\000\000\000\000\000\000\000\000\149\000\000\000\000\n\178\000\000\000\149\000\000\000\000\000\000\000\000\t\165\000\000\t\165\000\000\t\165\000\000\t\165\000\000\000\000\000\000\000\000\t\165\000\000\000\000\t\165\000\149\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\165\000\000\000\000\016\254\t\165\t\169\t\169\t\169\t\169\000\000\t\169\000\000\t\169\t\169\000\000\t\169\000\000\t\169\000\000\t\169\000\149\t\169\t\169\t\169\000\000\000\000\000\000\n\186\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\169\t\169\t\169\000\000\000\149\000\000\000\000\t\169\000\000\000\000\000\000\000\000\t\169\000\000\000\000\000\000\017z\000\000\000\000\000\149\000\149\000\000\000\000\000\000\000\000\000\000\t\169\000\000\000\000\000\000\000\000\000\000\000\000\t\169\000\000\000\000\000\000\000\000\t\169\000\000\000\000\004i\000\000\000\000\004i\000\000\004i\t\169\004i\000\000\004i\000\000\000\000\000\000\004i\004i\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\169\004i\000\000\t\169\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004i\004i\000\000\000\000\000\000\000\000\004i\t\169\000\000\t\169\000\000\t\169\000\000\t\169\000\000\000\000\000\000\000\000\t\169\000\000\000\000\t\169\004i\000\000\000\000\004i\000\138\000\000\000\000\000\000\000\000\004i\000\000\000\000\004i\004i\t\169\000\000\000\000\000\000\t\169\000\000\004i\000\000\000\000\004i\004i\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004Q\004i\000\000\004Q\000\000\004Q\000\000\004Q\000\000\004Q\000\000\004i\000\000\004Q\004Q\000\000\000\000\000\000\000\000\004i\000\000\000\000\000\000\004i\000\000\000\000\004Q\000\000\000\000\000\000\000\000\000\000\004i\000\000\000\000\000\000\004Q\004Q\000\000\000\000\000\000\000\000\004Q\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004i\000\000\000\000\004i\004i\000\000\004Q\004i\000\000\004Q\005\182\000\000\004i\004i\000\000\004Q\000\000\004i\004Q\004Q\000\000\000\000\000\000\000\000\000\000\000\000\004Q\000\000\000\000\004Q\004Q\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004Q\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\153\000\000\004Q\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004Q\000\000\000\000\000\000\004Q\000\000\000\000\000\000\000\153\000\000\000\000\000\000\000\000\004Q\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\153\000\000\000\000\000\000\000\000\000\000\000\153\000\153\000\000\000\000\004Q\000\000\000\000\004Q\004Q\000\000\000\153\004Q\000\000\n\178\000\000\000\153\004Q\004Q\000\000\000\000\000\000\004Q\0002\0006\000F\000J\000\000\000N\000\000\000R\000V\000\000\000Z\000\000\000^\000\153\000b\000\000\000f\000j\000n\000\000\0055\000\000\000\000\0055\000\000\000\000\000\000\0055\000\000\0055\017\130\000r\017\158\0055\0055\000\000\000\000\017\170\000\000\000\000\000\000\000\000\000v\000\000\000\000\000\000\000\000\000\153\000\000\000\000\000\000\000\000\000\000\000\000\n\186\000\000\017\194\000\000\000\000\000\000\000\000\000\000\0055\000\130\000\000\000\000\000\153\000\000\017\238\000\000\000\000\0055\000\000\000\000\0055\000\000\0055\000\134\0055\000\000\0055\000\153\000\153\000\000\0055\0055\000\000\002V\000\000\000\000\0055\000\000\000\000\000\000\000\000\000\000\018\014\0055\0055\018^\000\000\0055\0055\000\000\000\000\000\000\000\000\0055\0055\000\000\000\000\0055\000\000\0055\018v\000\000\007\213\000\000\018\130\000\000\018\142\000\000\000\000\000\000\000\000\018\158\000\000\000\000\019N\0055\000\000\000\000\0055\0055\000\000\000\000\000\000\000\000\002V\000\000\000\000\0055\0055\019Z\000\000\000\000\000\000\019r\000\000\0055\000\000\000\000\0055\0055\000\000\001\161\000\000\000\000\001\161\000\000\000\000\000\000\0055\000\000\000\000\0055\0055\000\000\000\000\000\000\000\000\000\000\0055\001\161\0055\0055\000\000\001\161\000\000\0055\0055\000\000\001\161\000\000\0055\000\000\000\000\000\000\001\161\000\000\000\000\001\161\001\161\0055\001\161\001\161\000\000\000\000\000\000\000\000\001\161\000\000\000\000\000\000\001\161\000\000\000\000\001\161\000\000\001\161\001\161\000\000\000\000\0055\000\000\000\000\0055\0055\000\000\000\000\0055\000\000\000\000\000\000\000\000\0055\0055\000\000\000\000\001\161\0055\001\161\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\161\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\161\001\161\007\026\000\000\001\161\000\000\000\000\000\000\001\161\000\000\000\000\000\000\nb\000\000\000\000\000\000\000\000\003I\000\000\003I\000\000\000\000\003I\001\161\000\000\001\161\000\000\000\000\000\000\000\000\000\000\007\"\001\161\001\161\000\000\001\161\001\161\001\161\003I\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003I\003I\000\000\000\000\003I\003I\000\000\000\000\000\000\000\000\003I\000\000\003I\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003I\003I\000\000\003I\003I\003I\000\000\003I\003I\000\000\003I\000\000\000\000\011\157\000\000\000\000\011\157\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003I\003I\000\000\000\000\003I\000\000\011\157\003I\000\000\000\000\011\157\000\000\000\000\000\000\003*\003I\000\000\000\000\000\000\000\000\000\000\011\157\000\000\000\000\003I\011\157\003I\011\157\011\157\000\000\000\000\0032\000\000\000\000\003>\000\000\003I\011\157\000\000\000\000\011\157\003I\011\157\000\000\000\000\000\000\000\000\003I\000\000\000\000\003I\000\000\000\000\000\169\000\000\000\000\003I\000\000\000\000\000\000\000\000\000\000\011\157\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\162\000\000\000\000\011\157\000\000\000\000\000\000\000\000\003J\000\000\000\000\000\000\000\226\000\000\t~\n\170\000\000\t\130\000\000\000\000\000\000\000\169\000\169\000\000\000\000\011\157\011\157\000\000\011\157\000\000\003N\000\169\011\157\000\238\n\178\000\000\n\194\000\000\000\000\000\000\003V\000\000\t\134\n.\011\157\000\000\nB\nZ\000\000\011\157\011\157\000\000\001\022\000\000\001\026\011\157\n\210\000\000\000\000\011\157\011\157\011\157\t\166\001\"\000\000\t\170\008B\001.\000\000\t\174\t\178\000\000\t\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\154\t\186\000\000\000\169\t\190\000\000\000\000\000\162\000\000\000\226\n\186\t~\000\000\000\000\t\130\t\198\000\000\000\000\000\000\000\000\000\000\000\000\000\169\000\000\n^\000\000\nv\000\000\000\000\000\000\000\238\000\000\000\000\000\000\000\000\000\000\t\202\000\169\000\169\t\134\n.\t\206\000\000\nB\nZ\000\000\000\000\011V\000\000\001\022\t\210\001\026\000\000\000\000\000\000\000\000\001^\000\000\000\000\t\166\001\"\000\000\t\170\008B\001.\000\000\t\174\t\178\000\000\t\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\154\t\186\000\000\000\000\t\190\000\000\000\000\000\162\000\000\000\226\000\000\t~\000\000\000\000\t\130\t\198\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n^\000\000\nv\000\000\000\000\000\000\000\238\000\000\000\000\000\000\000\000\000\000\t\202\000\000\000\000\t\134\n.\t\206\000\000\nB\nZ\000\000\000\000\011\002\000\000\001\022\t\210\001\026\000\000\000\000\000\000\000\000\001^\000\000\000\000\t\166\001\"\000\000\t\170\008B\001.\000\000\t\174\t\178\000\000\t\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\154\t\186\000\000\000\000\t\190\000\000\000\000\000\162\000\000\000\226\000\000\t~\000\000\000\000\t\130\t\198\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n^\000\000\nv\000\000\000\000\000\000\000\238\000\000\000\000\000\000\000\000\000\000\t\202\000\000\000\000\t\134\n.\t\206\000\000\nB\nZ\000\000\000\000\004\201\000\000\001\022\t\210\001\026\000\000\000\000\000\000\000\000\001^\000\000\000\000\t\166\001\"\000\000\t\170\008B\001.\000\000\t\174\t\178\000\000\t\182\000\000\000\000\000\000\000\000\001\137\000\000\000\000\001\137\000\000\000\000\000\000\000\000\000\000\000\000\006\154\t\186\000\000\000\000\t\190\000\000\000\000\000\162\001\137\000\000\000\000\000\000\000\000\000\000\000\000\t\198\000\000\001\137\000\000\000\000\000\000\000\000\000\000\001\137\n^\000\000\nv\000\000\000\000\001\137\001\137\000\000\000\000\000\000\000\000\000\000\t\202\000\000\000\000\001\137\007N\t\206\001\137\007\158\001\137\001\137\000\000\001\189\000\000\000\000\t\210\000\000\000\000\000\000\000\000\000\000\001^\000\000\007V\000\000\000\000\000\000\002\017\000\000\001\137\000\000\001\137\002\017\000\000\000\000\000\000\000\000\000\000\007^\000\000\000\000\002\017\002\017\000\000\007\174\007\182\000\000\000\000\000\000\000\000\002\017\000\000\000\000\000\000\007~\000\000\000\000\007f\000\000\007v\002\017\000\000\001\137\001\137\001\138\000\000\001\137\001\137\000\000\000\000\001\137\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\134\000\000\002\017\001\137\000\000\000\000\001\137\001\137\000\000\001\137\000\000\000\000\002\017\000\000\002J\001\137\001\137\000\000\001\137\001\137\001\137\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\017\007\142\000\000\000\000\002\017\000\000\000\000\000\000\007n\000\000\000\000\000\000\001%\000\000\000\000\001%\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\017\000\000\002\017\000\000\000\000\000\000\000\000\007V\000\000\002\017\002\017\001%\007\190\007\150\002\017\001\013\001%\000\000\001\013\000\000\000\000\000\000\007^\000\000\000\000\001%\001%\000\000\001%\001%\000\000\000\000\000\000\001\013\001%\000\000\000\000\001\013\007~\000\000\000\000\007f\001\013\007v\001%\000\000\000\000\000\000\007^\000\000\000\000\001\013\001\013\000\000\001\013\001\013\000\000\000\000\000\000\000\000\001\013\000\000\000\000\007\134\001\013\001%\000\000\007f\000\000\007v\001\013\000\000\000\000\000\000\000\000\001%\0002\0006\000F\000J\000\000\000N\000\000\000R\000V\000\000\000Z\017\014\000^\001\013\000b\001\013\000f\000j\000n\000\000\001%\007\142\000\000\000\000\001%\001\013\000\000\000\000\007n\000\000\000\000\000r\017\018\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\019v\001%\000\000\001%\001\013\001\013\000\000\000\000\001\013\000\000\001%\001%\007n\001%\007\150\001%\001\005\000\000\000\000\001\005\000\000\000\130\000\000\000\000\000\000\000\000\017\238\001\013\000\000\001\013\000\000\000:\000\000\000\000\001\005\000\134\001\013\001\013\001\005\001\013\001\013\001\013\001\t\001\005\000\000\001\t\000\000\000\000\000\000\001\005\000\000\000\000\001\005\001\005\000\000\001\005\001\005\000\000\000\000\000\000\001\t\001\005\000\000\000\000\001\t\001\005\000\000\000\000\007f\001\t\001\005\001\005\000\000\000\162\000\000\001\t\000\000\000\000\001\t\001\t\000\000\001\t\001\t\000\000\000\000\000\000\017\"\001\t\000\000\000\000\001\005\001\t\001\005\000\000\007f\000\000\001\t\001\t\000\000\000\000\000\000\000\000\001\005\0002\tR\000F\000J\000\000\000N\000\000\000R\000V\000\000\000Z\000\000\000^\001\t\000b\001\t\000f\000j\000n\000\000\001\005\001\005\000\000\000\000\001\005\001\t\000\000\000\000\007n\000\000\000\000\000r\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000v\001\005\000\000\001\005\001\t\001\t\000\000\000\000\001\t\000\000\001\005\001\005\007n\001\005\001\005\001\005\001\025\000\000\000\000\001\025\000\000\000\130\000\000\000\000\000\000\000\000\000\000\001\t\000\000\001\t\000\000\000\000\000\000\000\000\007V\000\134\001\t\001\t\001\025\001\t\001\t\001\t\001\017\001\025\000\000\001\017\000\000\000\000\000\000\007^\000\000\000\000\001\025\001\025\000\000\001\025\001\025\000\000\000\000\000\000\007V\001\025\000\000\000\000\001\017\001\025\000\000\000\000\007f\001\017\007v\001\025\000\000\000\162\000\000\007^\000\000\000\000\001\017\001\017\000\000\001\017\001\017\000\000\000\000\000\000\000\000\001\017\000\000\000\000\007\134\001\017\001\025\000\000\007f\000\000\007v\001\017\000\000\000\000\000\000\000\000\001\025\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\017\000\000\001\017\000\000\000\000\000\000\000\000\001\025\001\025\000\000\000\000\001\025\001\017\000\000\000\000\007n\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\025\000\000\001\025\001\017\001\017\000\000\000\000\001\017\000\000\001\025\001\025\007n\001\025\001\025\001\025\001\021\000\000\000\000\001\021\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\017\000\000\001\017\000\000\000\000\000\000\000\000\007V\000\000\001\017\001\017\001\021\001\017\001\017\001\017\001\029\001\021\000\000\001\029\000\000\000\000\000\000\007^\000\000\000\000\001\021\001\021\000\000\001\021\001\021\000\000\000\000\000\000\007V\001\021\000\000\000\000\001\029\001\021\000\000\000\000\007f\001\029\007v\001\021\000\000\000\000\000\000\007^\000\000\000\000\001\029\001\029\000\000\001\029\001\029\000\000\000\000\000\000\000\000\001\029\000\000\000\000\007\134\007~\001\021\000\000\007f\000\000\007v\001\029\000\000\000\000\000\000\000\000\001\021\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\134\000\000\001\029\000\000\000\000\000\000\000\000\001\021\001\021\000\000\000\000\001\021\001\029\000\000\000\000\007n\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\021\000\000\001\021\001\029\007\142\000\000\000\000\001\029\000\000\001\021\001\021\007n\001\021\001\021\001\021\007N\000\000\000\000\001-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\029\000\000\001\029\000\000\000\000\000\000\000\000\007V\000\000\001\029\001\029\001-\001\029\001\029\001\029\007N\001-\000\000\001!\000\000\000\000\000\000\007^\000\000\000\000\001-\001-\000\000\001-\007\182\000\000\000\000\000\000\007V\001-\000\000\000\000\001!\007~\000\000\000\000\007f\001!\007v\001-\000\000\000\000\000\000\007^\000\000\000\000\001!\001!\000\000\001!\001!\000\000\000\000\000\000\000\000\001!\000\000\000\000\007\134\007~\001-\000\000\007f\000\000\007v\001!\000\000\000\000\000\000\000\000\001-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\134\000\000\001!\000\000\000\000\000\000\000\000\001-\007\142\000\000\000\000\001-\001!\000\000\000\000\007n\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001-\000\000\001-\001!\007\142\000\000\000\000\001!\000\000\001-\001-\007n\007\190\007\150\001-\007N\000\000\000\000\001)\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001!\000\000\001!\000\000\000\000\000\000\000\000\007V\000\000\001!\001!\001)\001!\007\150\001!\000\000\001)\000\000\000\000\000\226\000\000\t~\007^\000\000\t\130\001)\001)\000\000\001)\007\182\000\000\000\000\000\000\000\000\001)\000\000\000\000\000\000\007~\000\000\000\238\007f\000\000\007v\001)\000\000\000\000\000\000\000\000\t\134\n.\000\000\000\000\nB\nZ\000\000\000\000\000\000\000\000\001\022\000\000\001\026\000\000\007\134\000\000\001)\000\000\000\000\000\000\t\166\001\"\000\000\t\170\008B\001.\001)\t\174\t\178\000\000\t\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\154\t\186\001)\007\142\t\190\000\000\001)\000\162\000\000\000\000\007n\000\000\000\000\000\000\000\000\t\198\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001)\nv\001)\000\226\000\000\000\230\000\000\000\000\000\234\001)\001)\t\202\001)\007\150\001)\000\000\t\206\000\000\007\218\000\000\000\000\000\000\001\201\000\000\000\238\t\210\000\000\000\242\000\000\000\000\000\000\001^\000\000\001\002\001\006\000\000\001\014\000\000\tz\000\000\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\030\001\"\000\000\001&\001*\001.\000\000\0012\0016\000\000\001:\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001>\000\000\000\000\001B\000\000\000\000\000\162\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001J\000\000\000\000\000\226\000\000\000\230\000\000\000\000\000\234\001N\007\229\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\229\000\000\000\000\001R\000\000\000\000\000\238\000\000\001V\000\242\000\000\007\229\000\000\007\229\000\000\001\002\001\006\001Z\001\014\000\000\000\000\000\000\000\000\001^\000\000\001\022\000\000\001\026\000\000\000\000\000\000\000\000\000\226\000\000\000\230\001\030\001\"\000\234\001&\001*\001.\000\000\0012\0016\000\000\001:\000\000\014V\000\000\000\000\000\000\000\000\000\000\000\238\000\000\000\000\000\242\000\000\000\000\000\000\000\000\001>\001\002\001\006\001B\001\014\000\000\000\162\000\000\000\000\000\000\000\000\001\022\000\000\001\026\001J\000\000\000\000\000\000\000\000\000\000\000\000\001\030\001\"\001N\001&\001*\001.\000\000\0012\0016\000\000\001:\000\000\000\000\000\000\001R\000\000\000\000\000\000\000\000\001V\000\000\000\000\000\000\000\000\000\000\000\000\001>\000\000\001Z\001B\000\000\000\000\000\162\000\000\001^\000\000\000\000\000\000\000\000\000\000\001J\000\000\000\000\000\226\000\000\000\230\000\000\000\000\000\234\001N\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001R\000\000\000\000\000\238\000\000\001V\000\242\000\000\000\000\000\000\000\000\000\000\001\002\004\182\001Z\001\014\000\000\000\000\000\000\000\000\001^\000\000\001\022\000\000\001\026\000\000\000\000\000\000\000\000\000\226\000\000\000\230\001\030\001\"\000\234\001&\001*\001.\000\000\0012\0016\000\000\001:\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\238\000\000\000\000\000\242\000\000\000\000\000\000\000\000\001>\001\002\001F\001B\001\014\000\000\000\162\000\000\000\000\000\000\000\000\001\022\000\000\001\026\001J\000\000\000\000\000\000\000\000\000\000\000\000\001\030\001\"\001N\001&\001*\001.\000\000\0012\0016\000\000\001:\000\000\000\000\000\000\001R\000\000\000\000\000\000\000\000\001V\000\000\000\000\000\000\000\000\000\000\000\000\001>\000\000\001Z\001B\000\000\000\000\000\162\000\000\001^\000\000\000\000\000\000\003\158\000\000\001J\000\000\000\000\003A\000\000\003A\000\000\000\000\003A\001N\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001R\000\000\000\000\003A\000\000\001V\003A\000\000\000\000\000\000\000\000\000\000\003A\003A\001Z\003A\000\000\000\000\000\000\000\000\001^\000\000\003A\000\000\003A\000\000\000\226\000\000\000\246\000\000\000\000\000\250\003A\003A\000\000\003A\003A\003A\000\000\003A\003A\000\000\003A\000\000\000\000\000\000\000\000\000\238\000\000\000\000\000\242\000\000\000\000\000\000\000\000\000\000\000\254\001\018\003A\001\014\000\000\003A\000\000\000\000\003A\000\000\001\022\000\000\001\026\000\000\000\000\000\000\003A\000\000\000\000\000\000\002\234\001\"\000\000\002\238\001*\001.\000\000\002\242\002\246\000\000\002\250\000\000\000\000\000\000\000\226\000\000\000\246\003A\000\000\000\250\000\000\000\000\003A\000\000\000\000\000\000\002\254\000\000\000\000\003\002\000\000\003A\000\162\000\000\000\000\000\238\000\000\003A\000\242\000\000\003\n\000\000\000\000\000\000\000\254\004\158\000\000\001\014\000\000\000\000\000\000\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\226\000\000\000\246\003\014\000\000\000\250\002\234\001\"\003\018\002\238\001*\001.\000\000\002\242\002\246\000\000\002\250\003\022\000\000\000\000\000\000\000\238\000\000\001^\000\242\000\000\000\000\000\000\000\000\000\000\000\254\003\006\002\254\001\014\000\000\003\002\000\000\000\000\000\162\000\000\001\022\000\000\001\026\000\000\000\000\000\000\003\n\000\000\000\000\000\000\002\234\001\"\000\000\002\238\001*\001.\000\000\002\242\002\246\000\000\002\250\000\000\000\000\000\000\000\226\000\000\006f\003\014\000\000\006j\000\000\000\000\003\018\000\000\000\000\000\000\002\254\000\000\000\000\003\002\000\000\003\022\000\162\000\000\000\000\000\238\000\000\001^\000\000\000\000\003\n\000\000\000\000\000\000\006n\007\198\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\000\000\000\000\000\003\014\000\000\000\000\006\134\001\"\003\018\006\138\001*\001.\000\000\006\142\006\146\000\000\006\150\003\022\000\000\000\000\000\226\000\000\006f\001^\000\000\006j\000\000\000\000\000\000\000\000\000\000\006\154\006\158\000\000\000\000\006\162\000\000\000\000\000\162\000\000\000\000\000\238\000\000\000\000\000\000\000\000\006\170\000\000\000\000\000\000\006n\006r\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\000\000\000\000\000\006\174\000\000\000\000\006\134\001\"\006\178\006\138\001*\001.\000\000\006\142\006\146\000\000\006\150\006\182\000\000\000\000\000\226\000\000\006f\001^\000\000\006j\000\000\000\000\000\000\000\000\000\000\006\154\006\158\000\000\000\000\006\162\000\000\000\000\000\162\000\000\000\000\000\238\000\000\000\000\000\000\000\000\006\170\000\000\000\000\000\000\006n\006\166\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\000\000\000\000\000\006\174\000\000\000\000\006\134\001\"\006\178\006\138\001*\001.\000\000\006\142\006\146\000\000\006\150\006\182\000\000\000\000\000\226\000\000\t~\001^\000\000\t\130\000\000\000\000\000\000\000\000\000\000\006\154\006\158\000\000\000\000\006\162\000\000\000\000\000\162\000\000\000\000\000\238\000\000\000\000\000\000\000\000\006\170\000\000\000\000\000\000\t\134\t\146\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\000\000\000\000\000\006\174\000\000\000\000\t\166\001\"\006\178\t\170\001*\001.\000\000\t\174\t\178\000\000\t\182\006\182\000\000\000\000\000\226\000\000\t~\001^\000\000\t\130\000\000\000\000\000\000\000\000\000\000\006\154\t\186\000\000\000\000\t\190\000\000\000\000\000\162\000\000\000\000\000\238\000\000\000\000\000\000\000\000\t\198\000\000\000\000\000\000\t\134\t\194\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\000\000\000\000\000\t\202\000\000\000\000\t\166\001\"\t\206\t\170\001*\001.\000\000\t\174\t\178\000\000\t\182\t\210\000\000\000\000\000\226\000\000\t~\001^\000\000\t\130\000\000\000\000\000\000\000\000\000\000\006\154\t\186\000\000\000\000\t\190\000\000\000\000\000\162\000\000\000\000\000\238\000\000\000\000\000\000\000\000\t\198\000\000\000\000\000\000\t\134\n.\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\022\000\000\001\026\000\000\000\000\000\000\000\000\t\202\000\000\000\000\t\166\001\"\t\206\t\170\001*\001.\000\000\t\174\t\178\000\000\t\182\t\210\000\000\000\000\000\000\000\000\000\000\001^\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\154\t\186\000\000\000\000\t\190\000\000\000\000\000\162\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\198\0002\005\250\000F\000J\006\018\000N\006*\000R\000V\006.\000Z\000\000\000^\000\000\000b\0062\000f\000j\000n\0066\t\202\000\000\000\000\000\000\000\000\t\206\000\000\000\000\000\000\000\000\000\000\000r\000\000\000\000\t\210\000\000\000\000\000\000\000\000\000\000\001^\000\000\000v\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\130\000\000\000\000\0002\tR\000F\000J\000\000\000N\006*\000R\000V\006.\000Z\000\134\000^\020v\000b\0062\000f\000j\000n\0066\020~\001\153\000\000\000\000\001\153\000\000\008F\000\000\000\000\000\000\000\000\000r\000\000\000\000\000\000\007Q\000\000\000\000\000\000\001\153\000\000\000\000\000v\001\153\000\000\000\000\000\000\000\000\000\000\000\162\000\000\000\000\000\000\000\000\001\153\000\000\007Q\000\000\001\153\000\000\001\153\001\153\000\000\000\130\000\000\000\000\007Q\007Q\000\000\000\000\001\153\000\000\007Q\001\153\000\000\001\153\tB\000\134\000\000\0055\000\000\000\000\0055\000\000\000\000\000\000\0055\000\000\0055\000\000\000\000\007Q\0055\0055\000\000\001\153\000\000\000:\000\000\000\000\007Q\007Q\000\000\000\000\000\000\000\000\000\000\001\153\007Q\000\000\000\000\007Q\007Q\000\000\000\000\000\162\000\000\000\000\000\000\003\161\000\000\007Q\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\153\003z\007Q\001\153\000\000\000\000\000\000\001\153\0055\000\000\007Q\000\000\000\000\000\000\000\000\000\000\000\000\000\146\000\000\001\153\007Q\000\000\000\000\007Q\001\153\001\153\000\000\000\000\007Q\000\000\003\130\007Q\007Q\000\000\001\153\001\153\001\153\000\000\000\000\000\000\000\000\007Q\000\000\007Q\000\000\000\000\007Q\007Q\003\210\000\000\007Q\004\"\000\000\000\000\000\000\007Q\007Q\000\000\000\000\007Q\007Q\000\000\000\000\0055\000\000\000\000\003\218\000\000\000\000\000\000\002\t\000\000\007Q\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\226\000\000\000\000\000\000\002\t\000\000\0042\004:\000\000\000\237\000\000\007Q\000\237\000\000\007Q\007Q\004\002\000\213\000\000\003\234\000\213\003\250\000\000\007Q\007Q\000\000\000\000\003\218\007Q\000\000\000\000\000\237\000\000\000\000\000\000\000\213\000\000\000\000\000\000\000\213\000\000\004\n\003\226\000\000\000\000\000\000\000\237\000\000\000\237\000\237\003\226\000\000\000\000\002\t\000\213\000\000\000\213\000\213\004\002\000\000\000\000\003\234\000\000\003\250\000\000\000\000\000\213\000\000\000\000\003\234\000\000\003\250\000\000\000\000\000\000\004\018\000\000\000\000\002\t\000\000\000\000\000\000\003\242\004\n\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\213\000\000\000\000\002\t\000\237\000\000\000\000\000\000\002\t\002\t\000\000\000\000\000\213\000\000\000\000\000\000\000\000\000\000\004B\004\026\002\t\000\000\000\000\000\000\000\000\000\000\004\018\000\000\000\000\000\237\000\000\000\000\000\000\003\242\000\213\000\000\000\000\000\213\000\000\000\000\000\000\003\242\000\000\000\000\000\000\000\237\000\000\000\000\000\000\000\205\000\237\000\237\000\205\000\213\000\000\000\000\000\000\000\000\000\213\000\213\000\237\004\026\000\237\000\000\000\000\000\000\000\000\000\205\000\213\000\213\000\213\000\205\000\209\000\000\000\000\000\209\000\000\000\000\000\000\000\000\000\000\000\000\000\205\000\000\000\000\000\000\000\205\000\000\000\205\000\205\000\209\000\000\000\000\000\000\000\209\000\000\000\000\000\000\000\205\000\000\000\000\003\234\000\000\000\205\000\000\000\209\000\000\000\000\000\000\000\209\000\000\000\209\000\209\000\000\000\225\000\000\000\000\000\225\000\000\000\000\000\000\000\209\000\000\000\205\003\234\000\000\000\209\000\000\000\000\000\000\000\000\000\000\003\218\000\000\000\000\000\205\000\225\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\209\003\226\000\000\000\000\000\000\000\225\000\000\000\225\000\225\000\000\000\000\000\205\000\209\000\000\000\205\000\000\000\000\000\225\003\242\000\000\003\234\000\000\003\250\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\205\000\000\000\000\000\000\000\209\000\205\000\205\000\209\000\000\000\000\000\000\003\242\004\n\000\000\000\000\000\205\000\205\000\205\000\000\000\000\000\000\000\000\000\000\000\209\000\225\000\000\000\000\000\000\000\209\000\209\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\209\000\209\000\209\000\000\000\000\000\000\000\000\000\000\000\225\000\000\000\000\000\225\000\000\000\217\000\000\003\242\000\217\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\225\000\000\000\000\000\000\003\218\000\225\000\225\000\000\000\217\000\221\000\000\000\000\000\221\000\000\000\000\000\225\000\225\000\225\000\000\003\226\000\000\000\000\000\000\000\217\000\000\000\217\000\217\003\218\000\000\000\000\000\000\000\221\000\000\000\000\000\000\000\217\000\000\000\000\003\234\000\000\003\250\000\000\003\226\000\000\000\000\000\000\000\221\000\000\000\221\000\221\000\000\000\229\000\000\000\000\000\229\000\000\000\000\000\000\000\221\000\000\000\217\003\234\000\000\003\250\000\000\000\000\000\000\000\000\000\000\003\218\000\000\000\000\000\217\000\229\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\n\003\226\000\000\000\000\000\000\000\229\000\000\000\229\000\229\000\000\000\000\000\217\000\221\000\000\000\217\000\000\000\000\004\002\003\242\000\000\003\234\000\000\003\250\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\217\000\000\000\000\000\000\000\221\000\217\000\217\000\221\000\000\000\000\000\000\003\242\004\n\000\000\000\000\000\217\000\217\000\217\000\000\000\000\000\000\000\000\000\000\000\221\000\229\000\000\000\000\000\000\000\221\000\221\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\221\000\221\000\221\000\000\000\000\000\000\000\000\000\000\004\018\000\000\000\000\000\229\000\000\003\210\000\000\003\242\000\245\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\229\000\000\000\000\000\000\003\218\000\229\000\229\000\000\000\245\003\210\000\000\000\000\000\233\000\000\000\000\000\229\000\229\000\229\000\000\003\226\000\000\000\000\000\000\000\245\000\000\000\245\004:\003\218\000\000\000\000\000\000\000\233\000\000\000\000\000\000\004\002\000\000\000\000\003\234\000\000\003\250\000\000\003\226\000\000\000\000\000\000\000\233\000\000\000\233\000\233\000\000\003\210\000\000\000\000\000\241\000\000\000\000\000\000\004\002\000\000\004\n\003\234\000\000\003\250\000\000\000\000\000\000\000\000\000\000\003\218\000\000\000\000\000\245\000\241\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\n\003\226\000\000\000\000\000\000\000\241\000\000\000\241\004:\000\000\000\000\004\018\000\233\000\000\000\245\000\000\000\000\004\002\003\242\000\000\003\234\000\000\003\250\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\245\000\000\000\000\000\000\004\018\000\245\000\245\000\233\000\000\000\000\000\000\003\242\004\n\000\000\000\000\004B\004\026\000\245\003\153\000\000\000\000\003\153\000\000\000\233\000\241\003\153\000\000\003\153\000\233\000\233\000\000\003\153\003\153\000\000\000\000\000\000\000\000\000\000\000\233\004\026\000\233\000\000\000\000\000\000\000\000\000\000\004\018\000\000\000\000\000\241\000\000\000\000\000\000\003\242\000\000\000\000\000\000\000\000\000\000\000\000\002-\000\000\000\000\000\000\000\000\000\241\000\000\000\000\000\000\000\000\000\241\000\241\000\000\000\000\000\000\000\000\003\153\000\000\000\000\000\000\000\241\004\026\000\241\000\000\000\000\000\000\000\000\000\000\002-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002-\000\000\000\000\002-\002-\000\000\000\000\000\000\000\000\003Q\003Q\003Q\003Q\002-\003Q\000\000\003Q\003Q\000\000\003Q\000\000\003Q\000\000\003Q\000\000\003Q\003Q\003Q\000\000\000\000\000\000\002-\000\000\000\000\000\000\003\153\000\000\000\170\000\000\000\000\003Q\020z\000F\000J\002-\000N\006*\000R\000V\006.\000Z\003Q\000^\020v\000b\0062\000f\000\000\000n\0066\020~\000\000\000\000\000\000\002-\000\000\000\000\002-\002-\000\000\000\000\000r\003Q\000\000\000\000\000\000\002-\002-\003Q\000\000\000\000\002-\000v\000\000\000\000\000\000\003Q\000\000\0002\000\142\000F\000J\000\000\000N\000\000\000R\000V\000\000\000Z\000\000\000^\000\000\000b\000\000\000f\000j\000n\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\134\000\000\000r\000\000\000\000\000\000\000\000\003Q\000\000\000\000\000\000\000\000\000\000\000v\0002\000\142\000F\000J\000\000\000N\000\000\000R\000V\000\000\000Z\000\000\000^\000\000\000b\000\000\000f\000j\000n\000\000\000\130\000\000\000\000\000\000\000\000\000\000\000\158\000\000\003\161\000\000\000\000\000r\000\000\003Q\000\134\000\000\0002\005\002\000F\000J\000\000\000N\000v\000R\000V\000\000\000Z\000\000\000^\000\000\000b\000\000\000f\000j\000n\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\130\000\000\000\000\000\000\000r\000\000\000\158\000\000\000\000\000\162\000\000\000\000\000\000\000\000\000\134\000v\000\000\0002\005\002\000F\000J\000\000\000N\000\000\000R\000V\000\166\000Z\000\000\000^\000\000\000b\000\000\000f\000j\000n\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000r\n\249\000\134\000\000\000\162\000\000\005\006\005\n\000\000\011\129\000\000\000v\0002\000\142\000F\000J\000\000\000N\000\000\000R\000V\000\166\000Z\000\000\000^\000\000\000b\011\129\000f\000j\000n\000\000\000\130\000\000\000\000\t\230\000\000\000\000\000\000\000\000\000\000\000\000\011\129\000r\002)\000\000\000\134\000\000\011\129\011\129\005\006\005\n\t\238\000\000\000v\t\250\000\000\005\014\011\129\000\000\000\000\011\129\000\000\011\129\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\130\000\000\000\000\000\000\000\000\000\000\000\158\000\000\011\129\000\000\000\000\000\000\000\000\000\000\000\134\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\006\005\022\0002\005\002\000F\000J\000\000\000N\000\000\000R\000V\000\000\000Z\000\000\000^\000\000\000b\011\129\000f\000j\000n\000\000\n\n\000\000\011\129\000\000\000\000\000\162\000\000\000\000\000\000\000\000\n\018\000r\000\000\000\000\011\129\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000v\000\000\000\000\000\000\000\000\000\000\000\000\011\129\011\129\000\000\0002\005\002\000F\000J\000\161\000N\000\000\000R\000V\000\000\000Z\000\130\000^\002!\000b\000\165\000f\000j\000n\000\000\000\000\000\000\n\162\000\000\000\000\000\134\000\000\000\000\000\000\021\022\005\n\000r\000\000\n\162\000\000\000\000\000\000\n\170\000\000\000\000\000\000\000\000\000v\000\161\000\161\000\000\000\000\000\000\n\170\000\000\000\000\000\000\000\173\000\161\000\165\000\165\n\178\000\000\n\194\000\000\000\000\000\000\000\000\000\130\000\165\000\000\000\000\n\178\000\000\n\194\n\162\000\000\000\000\000\000\000\000\n\154\000\000\000\134\000\161\000\000\021\026\021\022\005\n\000\000\000\000\n\170\000\000\000\000\000\000\n\210\000\000\000\173\000\173\n\162\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\202\000\000\000\000\n\178\000\000\n\194\000\000\n\170\000\000\000\000\000\000\000\161\000\000\000\189\n\242\000\000\000\000\000\000\n\186\000\000\000\000\n\154\000\165\n\202\000\000\n\210\n\178\000\000\n\194\n\186\000\161\021\"\n\154\000\000\000\000\000\000\000\000\000\000\000\000\n\162\000\000\000\165\000\000\000\000\000\000\000\161\000\161\000\000\n\210\000\000\n\162\000\000\000\000\000\000\n\170\000\000\000\165\000\165\000\000\n\218\000\177\000\177\000\000\000\000\000\000\n\170\n\186\000\000\000\000\000\000\n\202\000\185\n\242\n\178\000\000\n\194\000\000\000\000\000\173\000\000\000\000\n\202\n\218\000\000\n\178\000\000\n\194\000\000\000\000\n\186\000\000\000\000\000\000\000\173\000\173\n\210\000\000\000\000\000\000\000\000\000\000\000\189\000\000\000\000\000\000\000\000\n\210\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\250\n\226\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\218\000\000\000\000\000\000\000\000\000\000\000\000\n\186\000\000\000\000\000\000\n\218\000\000\000\000\000\000\000\000\000\000\000\000\n\186\000\177\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\185\000\000\000\000\000\000\000\177\n\226\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\185\n\226"))
+    ((16, "\000\172\000\025\000\000\000\000\000\233\000\000\000\000\000\000\000\172\000\000\000\226)\238\000\000\000\129A\002\000\000\000\000\0252\000\000\030v\000\000\000\000\000\000\000\000\000\000\000\000\025\232\000\000\031,\000\000\000\000\000\000\000\000\000\000\031\226\000\000\000\000\000\000\000y\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\215\000o\000\000)\238 \152CJ\000MA\182\000\000\000\000\000\000C\006\000\005*\152\000!CJ\000\000\000\151\000\000CJ\000\000\000y\000\0038.\000\000\000\0009\252\000\000;$\000\000;\1668.8.\018F\018F;$\018F\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000:~8.\000\000\000\000:~\000\000:~\000\000:~\000\000\000\000\000\000\020\158\000y\000\000\018F\000\000\027P8.\027n8.\000\000\000\000\000\000\000\000\000\000\000\000 \2228.\000\000!\2068.\"&8.#\0228.\000\0008.\000\0008.#n8.$^8.$\1828.%\1668.%\2548.\000?8.\000\000\000\000\000\000\000\000\000\0008.&\2388.'F8.(68.\000\000\000\0008.\000\000\000\000\031\002*\224\000\000\000\000\0005\000\000\000\000\000\000\000\000\023\026\000\129\000\000*\224\000\000\001\001\018F\000\0008.\000\140\000\000\000\000\000y\000\000\000\000\000\000\000\000\001\"\000\000\000\000\001&\000\000\001\206;$\000\000\000\000\000\000\000\000\000\000\000\000<L8.\000\000<L\000\000<L<L\000\000\000\000,\190\000y\000\000\018F\001\208\000\0008.\001\244\000\000\000\000\000y\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000A~8.\000\0008.\000\000\000\000\002j\000\000\000\006\028\228\003N8.\003f\000\000\000\000;$\000\006\000\000\000\000\000\000\000\000\000\000CF;$C\156;$D\128;$D\214;$\000\000;$\000\000;$E\186;$F\016;$F\244;$GJ;$H.8.\003:;$\000\000;$H\132;$Ih;$I\190\003\026\000\000\003 \000\000\000\0138.\000\000\000\013\000\000\000\000\000X)\238\000\000\000X\000\000\000\000\003P8.\000\000\003^\000\000\018F\003\132\000\000\000\000\004z\000\000\018F\003\248\000\000\000\000\004\000\000\000\000\000\000\003\000\000\005\014\000\000*\224I\232\004\250\005\026\000y\004\154\005RK\222\0001\000\000\000\000\000\191LH\000\000\000\000\000\000\005b\005h\000!\005\128K\222\000\176K\222\000\000\000\000\000\150\000\000\000\000\004\218\000\000\004\220\005\144K\222\004\224\000\000\000\000\000\191\000\000\004\254\005\216\000\000L\140K8\000\000\000y\005\222\000\000\023\026\000y\005\228\000\000\000\000)\004CJ\005\024\000\000\005\156\000\000\005,\000\000\000\025)\238\000\000)\238\000\000\005\028\000\000\000\025\000\000\015\190\008\030\005\236K\222\005H\006\030\000\000M\240\000\129\000\000\002<\002\232)\238\005T\000\000\000g\000\000\001$\000\000\006&\000\000\000\000\024B\000\129\000\000\000g\000\000\000\000\000\000\000\000\000\000\006:8.\005\138\018\236\006>8.\005\144\006<\000M\005\186\006\142\000\000=\226>d\018F\005\150\000\000\005\152>d\000\000\000\000\000\000\000\000\000\000\000\000\000\000>\1868.\000\000>\186\000\000>\186>\186\000\000\000\000\024Z\000y\000\000\018F\005\172\000\0008.\005\170\000\000\000\000\000y\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000+l8.\000\0008.\000\000\005\180\000\000\000\013\000\000\000\000\000\000\000\000\000\000/\242>d0J>d1:>d1\146>d\000\000>d\000\000>d2\130>d2\218>d3\202>d4\">d5\0188.\005\218>d\000\000>d5j>d6Z>d6\178\018F\005\184\000\000\000\0008.\000\000\006\140\000\000\001N\006f8.\0062\000\000\006j8.\006:\000\000\000\214\000\000\006\142\006\142\001N\000\000\001N\000\000\015\190\006\142\006\142\000\000\000\000\000\000\022~\000\000\000\000\000\000\000\000\006~8.\005\208\018\236\019\188\000y\006\164\000\000\006\1348\212\006\1708\212\006\1948.\006\000\018\236\018\236\000y\001D\000!\000\000\000\000\000\000\001D\000\000\002r\000y\000\000\000\000\006\014\000\000\000\000\000\000\006\234\000\000\006\236\000\000\000\000\007\028\006\2148.\006(\007\002\000\000\021\142\006\228\018F\006@\018\236\000\000\000\000\006n\000\000\0009\000\000\005>\000\000\001N\000\000\000\000\006\186\000\000\026\210\008\030\007\000K\222\006P\007(\000\000\000y\000\000\002\0028.-f\000\000?<8.\006Z\000\000\018F\006Z\000\000\006\\\000\000\000\000\000\000\000\000\000\000\000\000\000\000?\1468.\000\000?\146\000\000?\146?\146\000\000\000\000M,\000y\000\000\018F\006`\000\0008.\006^\000\000\000\000\000y\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\018F\006d@\020\000\000\000\0008.\000k8.\006d\006\150-f.\016,N\007\0208.\006\242\000\000\000\000\000y\006\178-f\000\000\006\180-f\000\000\000\000\012F@\020\013\150@\020\014\230@\020\017t@\020\000\000@\020\000\000@\020+8@\020<\016@\020M\186@\020M\238@\020N.@\020Nb@\020N\132@\020N\220\000\000\000\000\006\138\000\000\006\154.\186\000\000/d\006\164/d7\132\006\170/d\000\000\000\000\000\000\000\000\000\000\006\208-f\000\000\000\000\006\190\000\000\007\166\000\000\000y\000\000\001X\007\168\000\000\007\138\007z\000y\006\220\007\146K\222\006\226\002h\000\0008.\007\182\000\000\001f\001\030\003\190\007\152K\222\006\232\007\190\000\000\002\0208.\007\198\000\000\007\204\000\000\023\026\000y\002\1648.\007\208\000\000\007\212\000\000\011\206\0009\000\000\011\206\000\000\000\000\021\142\002\1668.\007\220\000\000\007\222\000\000\000\000\007\192\007\176\000y\007\026\007\206K\222\007 \002\156\000\0008.\007\244\000\000\0009\000\000\000\000\007\222\000\000\011\206\000\000\007\214\018F\007&\007\250\000\000\001f\000\000\007\224K\222\0076\008\n\000\000\003:8.\008\012\000\000\008\014\000\000\023\026\000y\003\2148.\008\018\000\000\008\022\000\000\000\000\000\000\007\222\000\000\000\000\0009\000\000\006\142\000\000\001p\000\000\000\000\001\158\019\188\000\000\001\158\000\000\000\000\007N\000\000\004\\\000\003\018\236\000\000\003\238\0009\003\238\000\000\0009\000\000\006\142\000\000\006\142\000\000\000\000\000\000\007H\000\000\000\000\007R\000\000\002B\005>\0009\003\238\000\000\000\000\000\000\0009\000\000\006\142\000\000\002B\000\000\000\000\003\186\000\015\015\190\000\000\018\224\000\000\t.\015\190\000\000\000\000\t.\000\000\000\000\007\\\000\000\000\000\007j\000\000\003\138\006\142\000\000\003\138\000\000\000\000\007\218\000\000\0009\000\000\006\142\000\000\000\000\000\000\017\0029V\000\000\008D\000\000\017\002\008F\000\000\008H\000\000\026\210\000y\002\174\000\0008.\008J\000\000\008,\008\028\000y\007\128\008BK\222\007\152\004\026\000\0008.\008p\000\000\001f\004r\000\0008.\008x\000\000\023\026\000y\005@\000\0008.\008z\000\000\003\228\017\002\000\000\021\142\005D\000\0008.\008|\000\000\000\000\000\000\008^\008P\000y\007\178\008fK\222\007\184\005N\000\0008.\008\140\000\000\004^\000\000\008p\018F\007\192\008\148\000\000\001\146\000\000\005T\000\0008.\008\154\000\000\023\026\000y\005j\000\0008.\008\158\000\000\003\228\000\000\000\000\007\214\000\000\004^\005\n\008J\000\000\000\000\000\000\008N\000\000\002\022\000\214\000\000\015\190\008\158\000\000\000\0008.\008\008\006\142\000\000\007\230\000\000\000M\000\000\000\000\001f\015\190\000\000\015\190\000\000\007\246\000\000\001f\000\000;$\002\136;$\000\000;$\000\000\008\012\000\000\002\136\000\000\018\236\002\154\018\236\000\000\018\236\000\000\008\014\000\000\002\154\000\000;$\002\136\008\016\000\000=\154\000y\003v=\154\000\000=\154\000\000\008\018\000\000\003v\000\000;$\002\136\008\022\000\000\000\000\023\206\000\000\000\000\000\000\000\000\000\000\0278\028\190\000\000\006\200\000\000\003r\000\000\000\000\008V\000y\000\000\000\000\000\000\000\000\000o\003r\000\000\003\194\000\242\000\242\000\000\002\134\000\242\000\000\008.\000\000\000\000\000\000\000\000\000\000\000\000\008\174\000\000\029\234\000\000*T\003r\000\000\004\182\003r\000\000\008\192\000\000\003r\008\194\000\000\004\194\0178\008\206\000\000\008\208\000\000\006\018\018\190\003r\008\\\003r\008\216\000\000\008\218\000\000\008\220\000\000)\238\000\000\002\154)\238\000\000\008d\002\212\000\000\000\184\003r\000\000\004\222\003r\000\000\004\004\002\166\000y\000\000\000\154\000y\000\000\008f\000\000\000\000\000\000\000\000\008\232\000\000\007b\020L\008\234\000\000\008\236\000\000\003r\008\238\000\000\003r\008\244\000\000\008\208\003r\008\252\000\000\n\028\0178\003r\008\132\003r\t\000\000\000\t\006\000\000\000\000\005\018\003r\000\000\004f\002\142\001&\000\000\000\000\000\000\003\000\001&\000\000\008\142\000\000\000\000\000\000\000\000\003r\000\000\005\"\003r\000\000\004\224\003V\000y\008\150\000\000\000\000\000\000\000\000\t\020\000\000\t\022\000\000\003r\t$\000\000\n\184\020L\t.\000\000\t0\000\000A\006\008\226\t\014\0160\003r\t:\000\000\000\000\t<\000\000\t\018A\006\003r\t@\000\000\003r\tB\000\000\tD\000\000\012\008\008\204\003r\tV\000\000\tZ\000\000\000y\008\216\000\000\000\000\023\206\000\000\000\000\002>\t\184\000\000\000\000\003h\000\000\000\000\000\0008.\003\026\n\002\t,\t\174;$\000\000\002&;$\000\000\t\000\000\000\000\000\000\000\000\000\000\000\002\158\000\000\003l\000\000\000\000\000\000\003\238K\134\008\254K\134K\134\008\254\000\000\000\000\t.\t.\t.\t.\000\000\000\000\000\000\000\000\000\000\000\000\001N\015\190\t\198\013\030\0009\000\000\000\000\0009\000\000\007\222\000\000-f\t\004\000\000\001N\015\190\t\012\014n\000\000\001N\013\030\000\000\000\000\000\000=\232\nN\000\000\003\026\000\000\000\000\tZ\001\230\t\206L\250\000\000\004\210M>\000\000\000\000\t\212\t\196\000y\000\000\000y\000\000\004\210\000\000\004\212L\250\000\000\000\000\t.\t\220\006\142\t6\000\000\n\198\0009\000\000\007\222\000\000\002\226\000N\000\000\000\000\t\242\000\000\000\000\002>\000\000\003\184\000\000\000\000\000\0008.\003\026\000\000\002\158\000\000\004R\000\000\000\000\000\000\005>\000\000\n~\001\024\n~\000\000\006\142\n~\000\000\001\024\000\000\006\142\000\000\006\142\000\000\006\142\000\000\000\000\000\000\000\000\000\000\003\026\000\000\006\142\000\000\001\024\000\000\006\142\000\000\0042\000\000\000\000\t.\t\156\000y\004r\n.\003\024\000\000\003\024\n^\000\000\n`\000\000\nb\000\000\000\000\003\220\003\024\017\154\003\024\000\000\000\000\005.\tt\000\000\t.\nf\000\000\005\218\008z\nx\011\026\nx\000\000\000\000\006\028\000y\000\000\006`\t\210\000\000\000\000\000\000\001\206\000\000\t\132\000\000\000\000\000\000\000\000\t.\005\218\008z\006\028\006`\001\206\t\144\000\000\005\218\008z\006\028\006`\001\206\t\150\000\000\000y\000\000\n\142\n\140\t\214\000y\n*\000\000"), (16, "\n\209\n\209\n\209\n\209\n\209\n\209\n\209\n\209\n\209\n\209\n\209\000:\n\209\n\209\n\209\n\209\n\209\n\209\n\209\n\209\n\209\n\209\t\146\002\206\002\150\000\n\n\209\003u\005q\000\158\000\194\008J\n\209\006\002\n\209\n\209\n\209\000\218\007]\n\209\008~\n\181\005q\n\209\n\209\000\014\n\209\000\023\000\027\005y\003\245\000\218\008J\007]\000\250\n\209\005>\000\162\n\209\n\209\005\145\008~\000\198\006\001\n\209\n\209\005q\n\209\001\026\n\209\000\242\011u\004\138\000\158\n\209\t\002\n\209\n\209\n\209\n\209\n\209\022\031\n\174\001\006\n\209\n\209\n\209\n\209\n\209\n\209\022#\n\209\n\209\n\209\n\209\003\t\017\150\006\n\n\209\n\209\022&\000\162\007]\011u\011\174\002J\006\194\t\158\n\209\n\209\n\209\n\209\n\209\n\209\n\209\016Z\n\209\000\006\n\209\t\n\005\129\n\209\004\162\n\141\n\209\n\209\003\245\002a\t\158\002\166\n\209\002a\005y\013\174\n\209\011u\011u\n\209\003\198\005Z\011u\n\209\n\209\n\209\n\209\008r\n\209\n\209\005\217\007]\005y\n\209\n\209\n\209\005y\n\209\005\169\n\209\n\209\006\001\n\209\007]\n\209\n\209\000\158\017z\n\209\n\209\006\t\006\t\006\t\006\t\006\t\006\t\006\t\006\t\006\t\006\t\006\t\008v\006\t\006\t\006\t\006\t\006\t\006\t\006\t\006\t\006\t\006\t\t\146\017\166\000\162\004\173\006\t\008N\008^\008n\005\209\008J\006\t\n\141\006\t\006\t\006\t\n\141\n\141\006\t\008~\004\017\008\021\006\t\004\173\018z\006\t\000.\006\"\016\162\016\202\016\242\017\002\017.\nm\006\t\016\130\006j\007I\002\222\018\162\013\006\007I\014\170\006\t\006\t\013\006\n\141\014\174\006\t\006\t\005f\014\178\n\141\006\t\002\133\006\t\006\t\006\t\006\t\006\t\005\161\005\161\015\214\006\t\006\t\006\t\006\t\006\t\006\t\019F\006\t\006\t\006\t\006\t\000\162\000\162\001^\006\t\006\t\012\022\001j\001^\008=\016.\012\022\001j\t\158\004\173\006\t\006\t\006\t\006\t\006\t\006\t\013~\006\t\013\138\006\t\001^\016\138\006\t\012\022\001j\006\t\006\t\004\173\000J\000\162\000N\006\t\000V\002\254\000\162\003\n\008=\008=\006\t\000Z\nm\008=\006\t\006\t\006\t\006\t\t\006\006\t\006\t\nm\005\153\000\162\006\t\006\t\006\t\006)\011\206\006)\006\t\006\t\006)\006\t\001^\006\t\006\t\001f\001j\006\t\006\t\006)\006)\006)\006)\006)\006)\006)\006)\006)\006)\006)\005\193\006)\006)\006)\006)\006)\006)\006)\006)\006)\006)\012\002\023\154\000\162\005\249\006)\020f\006)\000^\n]\013\254\006)\016\170\006)\006)\006)\006)\005q\006)\006)\006)\016\210\006)\006)\000n\006)\000r\012\194\000z\003\018\003f\nm\nm\t\218\006)\000~\014\230\006)\005\021\005q\019B\006)\0126\006)\006)\006)\006)\006)\006)\005q\003r\011\206\018\150\006)\020f\006)\006)\006)\006)\006)\011\206\016B\013\006\006)\006)\006)\006)\006)\006)\020\162\006)\006)\006)\006)\005q\nu\016\178\006)\006)\005q\002\150\019F\006)\023\006\012\006\016\218\005\225\000\162\006)\006)\006)\006)\006)\006)\000\130\006)\017r\006)\001^\000\162\006)\012\022\001j\006)\006)\023\n\nm\t\"\003\190\006)\012\198\003\013\023\014\006)\012V\012\138\006)\017\178\017v\014\234\006)\006)\005q\006)\n\133\006)\006)\018b\017z\000\162\006)\017\014\011\206\011\206\ne\005\185\005q\006)\003\206\006)\019\142\006)\006)\007!\005\201\006)\006)\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\017\134\000\146\020\222\000\150\006\150\000\154\000\174\000\178\000\182\006\154\020\230\023\022\013\006\020\138\004\169\006\158\014~\007!\007!\003\214\019V\000\186\007!\001\030\006\174\006\202\nm\n}\006\206\000\162\004\013\013\"\000\190\004\169\004V\008:\004z\017\022\017\162\004\130\004\162\023.\023\030\000\162\001*\006!\006!\021\"\001^\011\206\006!\012\022\001j\008\146\006\214\021N\021Z\017\138\008\150\013\186\015\022\015^\006Q\001R\004\186\001V\003\209\000\206\t\154\008\158\004\198\018\146\013\006\006\234\001^\008\162\006\238\008\166\001j\000\162\006\242\006\246\008\170\006\250\020w\020{\020\207\020\211\008\174\020\127\004\210\020\215\005\233\t\146\015\186\006A\005\177\004\169\006\254\007\002\008\178\008\182\007\006\008\186\015.\000\162\018\022\008\206\001^\013B\003\173\012\022\001j\008\218\007\014\004\169\005\209\006Q\004\222\0061\019>\004\138\004\138\021n\022?\022C\008\250\011\206\017v\022G\008\254\t:\003\209\t\166\023>\007\018\t>\005\241\017z\000\162\007\022\003\209\003\209\015\026\0069\0236\003\209\tF\004\234\007\026\006A\0061\0061\008u\004\246\001\154\0061\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\017\134\000\146\020\222\000\150\006\150\000\154\000\174\000\178\000\182\006\154\020\230\0031\015\214\019\138\005\n\006\158\n\149\008u\008u\0152\005\026\000\186\008u\001\030\006\174\006\202\0031\022\254\006\206\005\217\005\217\0069\000\190\022c\022g\008:\n\165\006I\022k\015J\004\162\015n\023.\000\162\001*\005\030\015\166\008J\001^\015\222\003-\012\022\001j\008\146\006\214\021N\008~\017\138\008\150\014\002\015\250\005&\n\157\001R\005*\001V\003\225\000\206\t\154\008\158\n\173\017\246\005R\006\234\001^\008\162\006\238\008\166\001j\000\162\006\242\006\246\008\170\006\250\005V\021\178\021\226\005^\008\174\005\137\002y\018\134\006I\005\130\005\138\005\142\005\150\003-\006\254\007\002\008\178\008\182\007\006\008\186\0031\000\162\018.\008\206\0031\0031\003\173\005\170\003-\008\218\007\014\005\174\005\209\0192\005\198\006Y\0031\005\214\015N\t\158\015r\019~\008\250\005\234\017v\015\170\008\254\t:\015\226\t\166\005\242\007\018\t>\005\250\017z\006\023\007\022\006.\003\225\015\254\0031\006\025\0236\tF\0066\007\026\006:\006Y\006Y\006Z\006r\001\154\006Y\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\017\134\000\146\020\222\000\150\006\150\000\154\000\174\000\178\000\182\006\154\020\230\023\134\006\162\006\170\006\178\006\158\006\186\006\190\006\198\006\222\006\230\000\186\003-\001\030\006\174\006\202\003-\003-\006\206\008\025\007>\007J\000\190\007\146\008\n\008:\0082\008F\003-\022\254\008R\008Z\008b\000\162\001*\008j\008\190\008J\008\198\008\214\008\222\008\025\008\230\008z\006\214\006\025\008~\017\138\008\150\006\025\006\025\008\025\003-\001R\008\238\001V\003\253\000\206\008\154\008\158\017j\023z\008\246\006\234\001^\008\162\006\238\008\166\001j\t2\006\242\006\246\008\170\006\250\tB\tJ\tV\011}\008\174\023\142\tZ\008\025\tb\003\141\023\146\006\025\tf\tr\006\254\007\002\008\178\008\182\007\006\008\186\tz\000\162\017r\008\206\t\138\t\174\003\173\t\190\t\198\008\218\007\014\t\202\t\242\t\254\n\006\008E\nZ\nf\n\154\t\158\n\182\n\186\008\250\n\202\017v\003\141\008\254\t:\003\253\t\166\008\025\007\018\t>\n\210\017z\n\226\007\022\003\253\003\253\n\238\011r\011z\003\253\tF\008\025\007\026\011\138\008E\008E\011\150\011\178\001\154\008E\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\018\202\000\146\011\194\000\150\006\150\000\154\000\174\000\178\000\182\006\154\011\202\011\222\011\230\011\234\011\242\006\158\011\246\011\254\012\014\012\"\012*\000\186\012.\001\030\006\174\006\202\012>\005q\006\206\012F\005q\012^\000\190\012f\005q\008:\005q\012\146\012\154\012\166\012\170\005q\005q\000\162\001*\012\178\012\182\008J\012\190\012\206\012\242\012\250\012\254\008z\006\214\013\014\008~\017\138\008\150\013\022\013\026\013*\0132\001R\013J\001V\013R\000\206\008\154\008\158\013\162\013\234\013\246\006\234\001^\008\162\006\238\008\166\001j\014j\006\242\006\246\008\170\006\250\014v\014\150\005q\011}\008\174\014\194\014\206\014\214\014\242\014\250\014\254\000\218\015\006\023b\006\254\007\002\008\178\008\182\007\006\008\186\015\n\000\162\001^\008\206\015\018\001f\001j\015\"\006\017\008\218\007\014\015:\015V\015z\015\138\011}\015\142\015\150\015\154\t\158\015\162\015\178\008\250\015\194\015\202\015\206\008\254\t:\015\234\t\166\016\006\007\018\t>\000\162\016\026\005q\007\022\016*\005q\016:\016R\016b\005q\tF\005q\007\026\016n\011}\011}\005q\005q\001\154\011}\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\016\151\000\146\020\254\000\150\006\150\000\154\000\174\000\178\000\182\006\154\021\002\016\191\016\231\016\255\017#\006\158\017;\017~\017\190\003\153\017\219\000\186\006\017\001\030\006\174\006\202\006\017\006\017\006\206\018\003\018\015\022\242\000\190\007e\003\153\008:\018\031\018'\006\017\002\150\018:\018C\018K\018S\001*\018n\018\174\008J\007e\018\195\018\211\018\219\018\231\008z\006\214\018\243\008~\018\250\008\150\019\003\019\022\019\031\006\017\001R\019'\001V\019b\000\206\008\154\008\158\019\150\019\171\019\179\006\234\001^\008\162\006\238\008\166\001j\019\191\006\242\006\246\008\170\006\250\019\207\019\215\005q\019\226\008\174\019\230\019\243\019\255\020\006\020\019\020\031\020'\0202\007e\006\254\007\002\008\178\008\182\007\006\008\186\020;\000\162\020C\008\206\023N\020O\003\193\020j\003\153\008\218\007\014\023R\003\153\003\153\020\142\019\n\020\146\020\150\020\174\t\158\021.\021V\008\250\021f\003\153\003\153\008\254\t:\021\158\t\166\021\166\007\018\t>\021\194\021\198\006\142\007\022\017v\006\146\021\242\007e\021\246\020\254\tF\006\150\007\026\021\254\017z\003\153\006\154\021\002\001\154\007e\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\022+\000\146\020\222\000\150\006\150\000\154\000\174\000\178\000\182\006\154\020\230\022\246\023\002\017\134\000:\006\158\023\018\023\026\023\"\023K\023V\000\186\023f\001\030\006\174\006\202\023\138\023\163\006\206\017r\011\230\006\142\000\190\023\207\006\146\008:\023\235\023\250\020\254\023\254\006\150\024\002\024\011\000\000\001*\006\154\021\002\000\000\000\000\000\000\000\000\017v\000\000\008\146\006\214\000\000\000\162\000\000\008\150\022z\000\000\017z\000\000\001R\000\000\001V\000\000\000\206\t\154\008\158\017\138\000\000\000\000\006\234\001^\008\162\006\238\008\166\001j\000\000\006\242\006\246\008\170\006\250\000\000\000\000\003\193\000\000\008\174\000\000\012\166\019\198\000\000\000\000\000\000\000\000\000\000\000\000\006\254\007\002\008\178\008\182\007\006\008\186\000\000\000\162\000\000\008\206\000\000\000\000\003\173\000\000\nU\008\218\007\014\000\000\000\000\000\000\000\000\008)\000\000\000\000\000\000\000\000\000\000\000\000\008\250\000\000\000\000\000\000\008\254\t:\000\000\t\166\000\162\007\018\t>\000\000\000\000\000\000\007\022\000\000\000\000\000\000\000\000\000\000\003\193\tF\017\138\007\026\000\000\008)\008)\000\000\000\000\001\154\008)\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\000\000\000\146\000\000\000\150\006\150\000\154\000\174\000\178\000\182\006\154\000\000\000\000\000\000\000\000\000\000\006\158\000\000\000\000\000\000\000\000\000\000\000\186\nU\001\030\006\174\006\202\nU\nU\006\206\017r\000\000\000\000\000\190\000\000\000\000\008:\000\000\000\000\nU\000\000\000\000\000\000\000\000\000\000\001*\000\000\000\000\000\000\000\000\023j\000\000\017v\000\000\008\146\006\214\000\000\000\000\000\000\008\150\012n\000\000\017z\nU\001R\000\000\001V\000\000\000\206\t\154\008\158\000\000\n\254\000\000\006\234\001^\008\162\006\238\008\166\001j\000\000\006\242\006\246\008\170\006\250\000\000\000\000\020.\011Y\008\174\011\006\000\000\017\134\000\000\000\000\000\000\000\000\000\000\000\000\006\254\007\002\008\178\008\182\007\006\008\186\011\014\000\162\000\000\008\206\000\000\000\000\011N\011V\000\000\008\218\007\014\000\000\000\000\000\000\000\000\011Y\011.\000\000\000\000\011\022\000\000\011&\008\250\000\000\000\000\000\000\008\254\t:\000\000\t\166\000\162\007\018\t>\000\000\000\000\000\000\007\022\000\000\000\000\000\000\000\000\0116\000\000\tF\017\138\007\026\000\000\011Y\011Y\000\000\000\000\001\154\011Y\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\000\000\000\146\000\000\000\150\006\150\000\154\000\174\000\178\000\182\006\154\000\000\000\000\011>\000\000\000\000\006\158\000\000\000\000\000\000\011\030\000\000\000\186\000\000\001\030\006\174\006\202\000\000\000\000\006\206\000\000\000\000\004\229\000\190\000\000\000\000\008:\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001*\000\000\011^\011F\000\000\000\000\000\000\000\000\000\000\008\146\006\214\000\000\000\000\000\000\008\150\0212\000\000\000\000\000\000\001R\000\000\001V\000\000\000\206\t\154\008\158\000\000\000\181\000\000\006\234\001^\008\162\006\238\008\166\001j\000\000\006\242\006\246\008\170\006\250\000\000\000\000\000\000\000\000\008\174\011\006\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\254\007\002\008\178\008\182\007\006\008\186\011\014\000\162\000\000\008\206\000\000\000\000\000\181\000\181\000\000\008\218\007\014\000\000\000\000\000\000\000\000\011\165\011.\000\000\000\000\011\022\000\000\011&\008\250\000\000\000\000\000\000\008\254\t:\000\000\t\166\000\000\007\018\t>\000\000\000\000\000\000\007\022\000\000\000\000\000\000\000\000\0116\000\000\tF\000\000\007\026\000\000\011\165\011\165\000\000\000\000\001\154\011\165\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\000\000\000\146\000\000\000\150\006\150\000\154\000\174\000\178\000\182\006\154\000\000\000\000\011>\000\000\000\000\006\158\000\000\000\000\000\000\011\030\000\000\000\186\000\000\001\030\006\174\006\202\000\000\000\000\006\206\000\000\000\000\000\181\000\190\000\000\000\000\008:\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001*\000\000\000\181\011F\000\000\000\000\000\000\000\000\000\000\008\146\006\214\000\000\000\000\000\000\008\150\0212\000\000\000\000\000\000\001R\000\000\001V\000\000\000\206\t\154\008\158\000\000\000\157\000\000\006\234\001^\008\162\006\238\008\166\001j\000\000\006\242\006\246\008\170\006\250\000\000\000\000\000\000\000\000\008\174\000\157\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\254\007\002\008\178\008\182\007\006\008\186\011\014\000\162\000\000\008\206\000\000\000\000\000\157\000\157\000\000\008\218\007\014\000\000\000\000\000\000\000\000\011\161\000\157\000\000\000\000\011\022\000\000\011&\008\250\000\000\000\000\000\000\008\254\t:\000\000\t\166\000\000\007\018\t>\000\000\000\000\000\000\007\022\000\000\000\000\000\000\000\000\000\157\000\000\tF\000\000\007\026\000\000\011\161\011\161\000\000\000\000\001\154\011\161\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\000\000\000\146\000\000\000\150\006\150\000\154\000\174\000\178\000\182\006\154\000\000\000\000\000\157\000\000\000\000\006\158\000\000\000\000\000\000\011\030\000\000\000\186\000\000\001\030\006\174\006\202\000\000\000\000\006\206\000\000\000\000\000\157\000\190\000\000\000\000\008:\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001*\000\000\000\157\000\157\000\000\000\000\000\000\000\000\000\000\008\146\006\214\000\000\000\000\004\149\008\150\0146\000\000\000\000\000\000\001R\000\000\001V\000\000\000\206\t\154\008\158\000\000\000\000\000\000\006\234\001^\008\162\006\238\008\166\001j\004\149\006\242\006\246\008\170\006\250\000\000\000\000\000\000\000\000\008\174\004\149\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\254\007\002\008\178\008\182\007\006\008\186\000\000\000\162\000\000\008\206\000\000\000\000\000\000\000\000\000\000\008\218\007\014\000\000\000\000\t\245\000\000\004\149\004\149\000\000\000\000\000\000\000\000\000\000\008\250\000\000\000\000\000\000\008\254\t:\000\000\t\166\000\000\007\018\t>\000\000\000\000\000\000\007\022\t\245\000\000\000\000\000\000\000\000\000\000\tF\000\000\007\026\000\000\0002\006&\000F\000b\001\154\000f\006\142\000j\000\134\006\146\000\138\004\149\000\146\000\000\000\150\006\150\000\154\000\174\000\178\000\182\006\154\000\000\000\000\000\000\000\000\004\149\000\000\000\000\000\000\000\000\000\000\000\000\000\186\000\000\001\030\000\000\006\202\000\000\017r\006\206\000\000\000\000\000\000\000\190\000\000\t\245\014\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001*\000\000\000\000\000\000\000\000\017v\000\000\000\000\000\000\014\198\006\214\000\000\000\000\000\000\000\000\017z\000\000\000\000\000\000\001R\000\000\001V\000\000\000\206\000\149\000\000\000\000\000\000\000\000\006\234\001^\000\000\006\238\001f\001j\000\000\006\242\006\246\008\170\006\250\019\014\000\000\000\149\n\001\000\000\017\134\000\000\000\000\000\000\000\000\000\000\003)\000\000\000\000\006\254\007\002\000\000\000\149\007\006\000\000\000\000\000\162\000\000\000\149\000\149\000\000\003)\n\001\000\000\000\000\007\014\000\000\000\000\000\149\000\000\000\000\011\022\000\000\000\149\000\000\000\000\000\000\003)\000\000\000\000\000\000\000\000\000\000\000\162\t\166\000\000\007\018\014\202\000\000\000\000\000\000\007\022\000\000\000\149\000\000\000\000\000\000\017\138\014\210\000\000\007\026\000\000\0002\0006\000F\000b\001\154\000f\000\000\000j\000\134\000\000\000\138\000\000\000\146\000\000\000\150\n\001\000\154\000\174\000\178\000\182\000\000\000\000\000\000\000\000\000\000\000\000\000\149\000\000\000\000\000\000\000\000\000\000\000\186\011\030\001\030\000\000\001\"\003)\000\000\001&\000\000\003)\003)\000\190\000\000\000\149\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003)\000\000\001*\000\000\000\000\001.\000\000\000\149\000\149\000\000\000\000\001F\001B\000\000\001J\003)\000\000\000\000\017r\000\000\000\000\001R\000\000\001V\003)\000\206\0236\000\000\000\000\000\000\000\000\001Z\001^\000\000\001b\001f\001j\001\190\001n\001r\017v\001v\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\017z\000\000\000\000\000\000\000\000\000\000\006\158\001z\000\000\000\000\001~\000\000\000\000\000\162\001\030\006\174\006\202\000\000\007]\006\206\000\000\000\000\001\134\t\146\000\000\0182\008:\000\000\000\000\000\000\017\134\001\138\008J\007]\000\000\001*\000\000\000\000\000\000\000\000\000\000\008~\000\000\001\142\008\202\006\214\000\000\000\000\001\146\008\150\000\000\003q\n\001\000\000\001R\000\000\001V\001\150\000\000\000\000\008\158\000\000\000\000\001\154\006\234\001^\008\162\006\238\008\166\001j\000\000\006\242\006\246\000\162\006\250\000\000\000\000\000\000\000\000\008\174\000\000\000\000\007]\000\000\000\000\000\000\000\000\017\138\000\000\006\254\007\002\008\178\008\182\007\006\008\186\000\000\000\162\000\000\008\206\000\000\000\000\000\000\000\000\000\000\008\218\007\014\000\000\n\001\t\158\000\000\006\158\000\000\000\000\000\000\000\000\000\000\000\000\008\250\001\030\006\174\006\202\008\254\t:\006\206\000\000\000\000\007\018\t>\000\000\007]\008:\007\022\000\000\000\000\000\000\000\000\000\000\000\000\tF\001*\007\026\007]\000\000\000\000\000\000\000\000\001\154\000\000\006\210\006\214\000\000\000\000\000\000\008\150\000\000\000\000\000\000\000\000\001R\000\000\001V\000\000\000\000\000\000\008\158\000\000\000\000\017r\006\234\001^\008\162\006\238\008\166\001j\000\000\006\242\006\246\000\000\006\250\000\000\000\000\000\000\000\000\008\174\000\000\000\000\000\000\000\000\000\000\017v\000\000\000\000\000\000\006\254\007\002\008\178\008\182\007\006\008\186\017z\000\162\000\000\008\206\000\000\000\000\000\000\000\000\000\000\008\218\007\014\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011\185\000\000\008\250\011\185\000\000\000\000\008\254\t:\n\013\000\000\017\134\007\018\t>\000\000\000\000\000\000\007\022\000\000\011\185\000\000\000\000\000\000\011\185\tF\000\000\007\026\001\178\011\185\000\000\000\000\000\000\001\154\n\013\011\185\000\000\000\000\011\185\011\185\000\000\011\185\011\185\000\000\000\000\001\186\000\000\011\185\002\214\000\000\000\000\011\185\000\000\000\000\011\185\000\162\011\185\011\185\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\017\138\000\000\000\000\000\000\000\000\000\000\000\000\011\185\000\000\011\185\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011\185\n\013\000\000\000\000\000\000\002\226\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011\185\011\185\011\185\000\000\011\185\011\185\002\230\000\000\011\185\000\000\000\000\000\000\004\013\000\000\000\000\004\013\002\238\000\000\000\000\000\000\011\185\000\000\000\000\011\185\011\185\011\185\011\185\000\000\000\000\000\000\004\013\011\185\011\185\011\185\004\013\011\185\011\185\011\185\004\013\004\013\000\000\000\000\000\000\000\000\000\000\004\013\000\000\000\000\004\013\004\013\000\000\004\013\004\013\000\000\000\000\004\013\000\000\004\013\004\013\000\000\000\000\004\013\000\000\000\000\004\013\000\000\004\013\004\013\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\158\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\013\000\000\004\013\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\013\000\000\000\000\000\000\000\000\004\013\000\000\000\000\000\162\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\013\004\013\004\013\000\000\004\013\004\169\004\013\000\000\004\013\000\000\000\000\000\000\004\017\000\000\000\000\004\017\004\013\000\000\000\000\000\000\004\013\000\000\000\000\004\013\000\000\004\013\000\000\000\000\000\000\000\000\004\017\004\013\004\013\004\013\004\017\004\013\004\013\004\013\004\017\004\017\000\000\000\000\000\000\000\000\000\000\004\017\000\000\000\000\004\017\004\017\000\000\004\017\004\017\000\000\000\000\004\017\000\000\004\017\004\017\000\000\000\000\004\017\000\000\000\000\004\017\000\000\004\017\004\017\000\000\002\186\000F\000b\000\000\000f\000\000\000j\000\134\000\000\000\138\000\000\000\146\000\000\000\150\000\000\000\154\000\174\004\017\000\182\004\017\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\017\000\000\000\186\000\000\000\000\004\017\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\190\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\017\004\017\004\017\000\000\004\017\004\173\004\017\000\000\004\017\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\017\000\000\000\000\000\000\004\017\000\000\000\000\004\017\000\000\004\017\000\206\000\000\000\000\000\000\000\000\004\017\004\017\004\017\000\000\004\017\004\017\004\017\001=\001=\001=\001=\000\000\001=\000\000\001=\001=\000\000\001=\000\000\001=\000\000\001=\000\000\001=\001=\001=\001=\000\000\000\000\000\000\000\000\017F\000\000\000\162\000\000\000\000\000\000\000\000\001=\001=\001=\000\000\000\000\000\000\000\000\001=\000\000\000\000\000\000\000\000\001=\000\000\000\000\000\000\001=\000\000\000\000\000\000\001=\000\000\000\000\017J\000\000\000\000\001=\000\000\006~\006J\000b\000\000\000f\001=\006N\000\134\000\000\000\138\001=\000\146\000\000\000\150\000\000\000\154\000\174\000\000\000\182\001=\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\186\000\000\012\013\000\000\000\000\012\013\000\000\001=\000\000\000\000\001=\000\190\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\012\013\000\000\000\000\000\000\012\013\001=\000\000\001=\007.\012\013\001=\000\000\001=\000\000\000\000\012\013\000\000\001=\012\013\012\013\001=\012\013\012\013\000\000\000\000\0076\000\206\012\013\007B\000\000\000\000\012\013\000\000\000\000\012\013\001=\012\013\012\013\001=\001=\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\017N\000\000\000\000\000\000\000\000\000\000\000\000\012\013\000\000\012\013\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\012\013\000\000\000\000\000\000\000\000\007N\0041\000\000\000J\0041\000N\0041\000V\0041\000\000\0041\000\000\000\000\000\000\000Z\0041\0041\012\013\012\013\012\013\000\000\012\013\000\000\007R\000\000\012\013\000\000\000\000\0041\000\000\000\000\000\000\000\000\007Z\000\000\000\000\000\000\000\000\0041\0041\012\013\000\000\012\013\000\000\0041\000\000\000\000\000\000\012\013\012\013\012\013\000\000\012\013\012\013\012\013\000\000\000\000\000\000\000\000\000\000\0041\000\000\000\000\0041\000\000\000\000\000\000\000\000\0041\0041\000\000\000\000\0041\000^\000\000\000\000\000\000\000\000\000\000\000\000\0041\000\000\000\000\0041\0041\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0045\0041\000n\0045\000r\0045\000z\0045\000\000\0045\000\000\0041\000\000\000~\0045\0045\000\000\000\000\000\000\0041\000\000\000\000\000\000\000\000\0041\000\000\000\000\0045\000\000\000\000\000\000\000\000\000\000\0041\000\000\000\000\000\000\0045\0045\000\000\000\000\000\000\000\000\0045\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0041\000\000\000\000\0041\0041\000\000\0045\0041\000\000\0045\000\000\000\000\0041\0041\0045\0045\000\000\0041\0045\000\130\000\000\000\000\000\000\000\000\000\000\000\000\0045\000\000\000\000\0045\0045\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0045\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0045\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0045\0002\t\182\000F\000b\0045\000f\000\000\000j\000\134\000\000\000\138\000\000\000\146\0045\000\150\000\000\000\154\000\174\000\178\000\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\186\0045\000\000\000\000\0045\0045\000\000\000\000\0045\000\000\000\000\000\190\000\000\0045\0045\000\000\000\000\000\000\0045\t\241\t\241\t\241\t\241\000\000\t\241\000\000\t\241\t\241\000\000\t\241\000\000\t\241\000\202\t\241\000\000\t\241\t\241\t\241\t\241\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\206\000\000\000\000\000\000\t\241\t\241\t\241\001\137\000\000\000\000\001\137\t\241\000\000\000\000\000\000\000\000\t\241\000\000\000\000\000\000\017^\000\000\001\137\000\000\017f\001\137\000\000\000\000\000\000\000\000\t\241\000\000\000\000\000\000\001\137\000\000\000\000\t\241\000\162\000\000\001\137\000\000\t\241\000\000\001\137\000\000\001\137\001\137\000\000\001\137\000\000\t\241\000\000\000\000\000\000\001\137\001\137\000\000\001\137\001\137\000\000\001\137\001\137\000\000\000\000\000\000\000\000\001\137\000\000\000\000\t\241\001\137\000\000\t\241\001\137\000\000\001\137\001\137\000\000\000\000\000\000\001\137\000\000\001\137\000\000\000\000\000\000\000\000\t\241\000\000\t\241\000\000\000\000\t\241\000\000\t\241\001\137\000\000\001\137\000\000\t\241\000\000\000\000\t\241\000\000\000\000\000\000\000\000\001\137\000\000\000\000\000\000\000\000\000\000\000\000\001\137\001\137\001\198\t\241\001\137\001\137\017\222\t\241\001\137\000\000\000\000\000\000\000\000\000\000\000\000\001\137\001\137\001\206\000\000\001\137\001\137\000\000\000\000\001\137\001\137\000\000\001\137\000\000\000\000\000\000\000\000\002\134\001\137\001\137\000\000\001\137\001\137\001\137\001\137\001\137\001\137\001\137\000\000\000\000\000\000\000\000\002z\001\137\001\137\000\000\001\137\001\137\001\137\t\225\t\225\t\225\t\225\000\000\t\225\000\000\t\225\t\225\000\000\t\225\000\000\t\225\000\000\t\225\000\000\t\225\t\225\t\225\t\225\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\225\t\225\t\225\000\000\000\000\000\000\000\000\t\225\000\000\000\000\000\000\000\000\t\225\000\000\000\000\000\000\000\000\003\202\000\000\000\000\000\000\000\000\003M\000\000\003M\000\000\t\225\003M\000\000\000\000\000\000\000\000\000\000\t\225\000\000\000\000\000\000\000\000\t\225\000\000\000\000\000\000\000\000\003M\000\000\000\000\003M\t\225\000\000\000\000\000\000\000\000\003M\003M\000\000\003M\000\000\000\000\000\000\000\000\000\000\000\000\003M\000\000\003M\000\000\t\225\000\000\000\000\t\225\000\000\000\000\003M\003M\000\000\003M\003M\003M\000\000\003M\003M\000\000\003M\000\000\t\225\000\000\t\225\000\000\000\000\t\225\000\000\t\225\000\000\000\000\000\000\000\000\t\225\000\000\003M\t\225\000\000\003M\000\000\000\000\003M\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003M\t\225\000\000\000\000\017b\t\225\t\229\t\229\t\229\t\229\000\000\t\229\000\000\t\229\t\229\000\000\t\229\000\000\t\229\000\000\t\229\003M\t\229\t\229\t\229\t\229\003M\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003M\000\000\t\229\t\229\t\229\000\000\003M\000\000\000\000\t\229\000\000\000\000\000\000\000\000\t\229\000\000\000\000\000\000\017\226\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\229\000\000\000\000\000\000\000\000\000\000\000\000\t\229\000\000\000\000\000\000\000\000\t\229\000\000\000\000\000\000\000\000\000\000\000\000\004i\000\000\t\229\004i\000R\004i\000\000\004i\000\000\004i\000\000\000\000\000\000\000\000\004i\004i\000\000\000\000\000\000\000\000\000\000\t\229\000\000\000\000\t\229\000\000\000\000\004i\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004i\004i\t\229\000\000\t\229\000\000\004i\t\229\000\000\t\229\000\000\000\000\000\000\000\000\t\229\000\000\000\000\t\229\000\000\000\000\000\000\000\000\004i\000\000\000\000\004i\000\000\000\000\000\000\000\000\004i\004i\t\229\000\000\004i\004i\t\229\000\000\005q\000\000\000\000\000\000\004i\000\000\000\000\004i\004i\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004m\004i\000\000\004m\000v\004m\005q\004m\000\000\004m\000\000\004i\000\000\000\000\004m\004m\005q\005q\000\000\004i\000\000\000\000\000\000\000\000\004i\000\000\000\000\004m\000\000\000\000\000\000\000\000\000\000\004i\000\000\000\000\000\000\004m\004m\000\000\000\000\005q\000\000\004m\000\000\000\000\005q\002\150\000\000\000\000\005q\000\000\000\000\004i\000\000\000\000\004i\004i\000\000\004m\004i\000\000\004m\000\000\000\000\004i\004i\004m\004m\000\000\004i\004m\004m\000\000\000\000\000\000\000\000\000\000\000\000\004m\000\000\005q\004m\004m\000\000\000\000\000\000\000\000\000\000\005q\000\000\004q\004m\000\000\004q\000\142\004q\000\000\004q\000\000\004q\000\000\004m\005q\000\000\004q\004q\000\000\000\000\000\000\004m\000\000\000\000\000\000\000\000\004m\000\000\000\000\004q\000\000\000\000\000\000\000\000\005q\004m\000\000\005q\005q\004q\004q\005q\000\000\000\000\000\000\004q\000\000\000\000\000\000\000\000\000\000\005q\000\000\000\000\000\000\004m\000\000\000\000\004m\004m\000\000\004q\004m\000\000\004q\000\000\000\000\004m\004m\004q\004q\000\000\004m\004q\004q\000\000\000\000\000\000\000\000\000\000\000\000\004q\000\000\000\000\004q\004q\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\165\004q\000\000\004\165\000\000\004\165\000\000\004\165\000\000\004\165\000\000\004q\000\000\000\000\004\165\004\165\000\000\000\000\000\000\004q\000\000\000\000\000\000\000\000\004q\000\000\000\000\004\165\000\000\000\000\000\000\000\000\000\000\004q\000\000\000\000\000\000\004\165\004\165\000\000\000\000\000\000\000\000\004\165\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\238\000\000\004q\002B\000\000\004q\004q\000\000\004\165\004q\000\000\004\165\000\210\000\000\004q\004q\004\165\004\165\001\250\004q\004\165\004\165\002\001\000\000\000\000\000\000\000\000\002\001\004\165\000\000\000\000\004\165\004\165\002\002\000\000\000\000\002\001\002\001\000\000\002b\002j\004\165\000\000\000\000\000\000\002\001\000\000\000\000\000\000\002\"\000\000\004\165\002\n\000\000\002\026\002\001\000\000\000\000\000\000\004\165\000\000\000\000\000\000\000\000\004\165\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\165\002*\000\000\002\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\001\000\000\000\000\000\000\000\000\000\000\000\000\004\165\000\000\000\000\004\165\004\165\000\000\000\000\004\165\000\000\000\000\000\000\000\000\004\165\004\165\000\000\002\001\0022\004\165\000\000\002\001\002\001\000\000\000\000\002\018\000\000\000\000\000\000\000}\000\000\000\000\000}\000\000\000\000\000\000\000\000\002\001\000\000\000\000\002\001\002\001\002\001\002\001\000\000\000\000\000\000\001\250\000\000\002\001\002\001\000}\002r\002:\002\001\000\000\000}\000\000\000\000\000\000\000\000\000\000\002\002\000\000\000\000\000}\000}\000\000\000}\000}\000\000\000\000\000\000\000e\000}\000\000\000e\000\000\002\"\000\000\000\000\002\n\000\000\002\026\000}\000\000\000\000\000\000\000\000\000\000\000\000\000e\000\000\000\000\000\000\000e\000\000\000\000\000\000\000\000\000e\000\000\000\000\002*\000\000\000}\002\002\000\000\000\000\000e\000e\000\000\000e\000e\000\000\000}\000\000\000\000\000e\000\000\000\000\000\000\000e\000\000\000\000\002\n\000\000\002\026\000e\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000}\0022\000\000\000\000\000}\000}\000\000\000\000\002\018\000\000\000e\000\000\000e\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000}\000\000\000e\000}\000}\000}\000}\000\000\000\000\000\000\000\000\000\000\000}\000}\000\000\000}\002:\000}\000\000\000\000\000\000\000\000\000\000\000\000\000e\000e\000\000\000\000\000e\000e\000\000\000\000\002\018\000\000\000\000\000\000\000]\000\000\000\000\000]\000\000\000\000\000\000\000\000\000e\000\000\000\000\000e\000e\000e\000e\000\000\000\000\000\000\000]\000\000\000e\000e\000]\000e\000e\000e\000\000\000]\000\000\000\000\000\000\000\000\000\000\000]\000\000\000\000\000]\000]\000\000\000]\000]\000\000\000\000\000\000\000a\000]\000\000\000a\000\000\000]\000\000\000\000\002\n\000\000\000]\000]\000\000\000\000\000\000\000\000\000\000\000\000\000a\000\000\000\000\000\000\000a\000\000\000\000\000\000\000\000\000a\000\000\000\000\000]\000\000\000]\000a\000\000\000\000\000a\000a\000\000\000a\000a\000\000\000]\000\000\000\000\000a\000\000\000\000\000\000\000a\000\000\000\000\002\n\000\000\000a\000a\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000]\000]\000\000\000\000\000]\000]\000\000\000\000\002\018\000\000\000a\000\000\000a\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000]\000\000\000a\000]\000]\000]\000]\000\000\000\000\000\000\000\000\000\000\000]\000]\000\000\000]\000]\000]\000\000\000\000\000\000\000\000\000\000\000\000\000a\000a\000\000\000\000\000a\000a\000\000\000\000\002\018\000\000\000\000\000\000\000q\000\000\000\000\000q\000\000\000\000\000\000\000\000\000a\000\000\000\000\000a\000a\000a\000a\000\000\000\000\000\000\001\250\000\000\000a\000a\000q\000a\000a\000a\000\000\000q\000\000\000\000\000\000\000\000\000\000\002\002\000\000\000\000\000q\000q\000\000\000q\000q\000\000\000\000\000\000\000i\000q\000\000\000i\000\000\000q\000\000\000\000\002\n\000\000\002\026\000q\000\000\000\000\000\000\000\000\000\000\000\000\001\250\000\000\000\000\000\000\000i\000\000\000\000\000\000\000\000\000i\000\000\000\000\002*\000\000\000q\002\002\000\000\000\000\000i\000i\000\000\000i\000i\000\000\000q\000\000\000\000\000i\000\000\000\000\000\000\000i\000\000\000\000\002\n\000\000\002\026\000i\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000q\000q\000\000\000\000\000q\000q\000\000\000\000\002\018\000\000\000i\000\000\000i\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000q\000\000\000i\000q\000q\000q\000q\000\000\000\000\000\000\000\000\000\000\000q\000q\000\000\000q\000q\000q\000\000\000\000\000\000\000\000\000\000\000\000\000i\000i\000\000\000\000\000i\000i\000\000\000\000\002\018\000\000\000\000\000\000\000m\000\000\000\000\000m\000\000\000\000\000\000\000\000\000i\000\000\000\000\000i\000i\000i\000i\000\000\000\000\000\000\001\250\000\000\000i\000i\000m\000i\000i\000i\000\000\000m\000\000\000\000\000\000\000\000\000\000\002\002\000\000\000\000\000m\000m\000\000\000m\000m\000\000\000\000\000\000\000u\000m\000\000\000u\000\000\000m\000\000\000\000\002\n\000\000\002\026\000m\000\000\000\000\000\000\000\000\000\000\000\000\001\250\000\000\000\000\000\000\000u\000\000\000\000\000\000\000\000\000u\000\000\000\000\002*\000\000\000m\002\002\000\000\000\000\000u\000u\000\000\000u\000u\000\000\000m\000\000\000\000\000u\000\000\000\000\000\000\002\"\000\000\000\000\002\n\000\000\002\026\000u\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000m\000m\000\000\000\000\000m\000m\000\000\000\000\002\018\000\000\002*\000\000\000u\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000m\000\000\000u\000m\000m\000m\000m\000\000\000\000\000\000\000\000\000\000\000m\000m\000\000\000m\000m\000m\000\000\000\000\000\000\000\000\000\000\000\000\000u\0022\000\000\000\000\000u\000u\000\000\000\000\002\018\000\000\000\000\000\000\001\238\000\000\000\000\000\133\000\000\000\000\000\000\000\000\000u\000\000\000\000\000u\000u\000u\000u\000\000\000\000\000\000\001\250\000\000\000u\000u\000\133\000u\000u\000u\000\000\000\133\000\000\000\000\000\000\000\000\000\000\002\002\000\000\000\000\000\133\000\133\000\000\000\133\002j\000\000\000\000\000\000\001\238\000\133\000\000\000y\000\000\002\"\000\000\000\000\002\n\000\000\002\026\000\133\000\000\000\000\000\000\000\000\000\000\000\000\001\250\000\000\000\000\000\000\000y\000\000\000\000\000\000\000\000\000y\000\000\000\000\002*\000\000\000\133\002\002\000\000\000\000\000y\000y\000\000\000y\000y\000\000\000\133\000\000\000\000\000y\000\000\000\000\000\000\002\"\000\000\000\000\002\n\000\000\002\026\000y\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\133\0022\000\000\000\000\000\133\000\133\000\000\000\000\002\018\000\000\002*\000\000\000y\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\133\000\000\000y\000\133\000\133\000\133\000\133\000\000\000\000\000\000\000\000\000\000\000\133\000\133\000\000\002r\002:\000\133\000\000\000\000\000\000\000\000\000\000\000\000\000y\0022\000\000\000\000\000y\000y\000\000\000\000\002\018\000\000\000\000\000\000\001\238\000\000\000\000\000\129\000\000\000\000\000\000\000\000\000y\000\000\000\000\000y\000y\000y\000y\000\000\000\000\000\000\001\250\000\000\000y\000y\000\129\000y\002:\000y\000\000\000\129\000\000\000\000\000\000\000\000\000\000\002\002\000\000\000\000\000\129\000\129\000\000\000\129\002j\000\000\000\000\000\000\000\000\000\129\000\000\000\000\000\000\002\"\000\000\000\000\002\n\000\000\002\026\000\129\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002*\000\000\000\129\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\129\004\133\000\000\000\000\004\133\000\000\004\133\000\000\004\133\000\000\004\133\000\000\000\000\000\000\000\000\004\133\004\133\000\000\000\000\000\000\000\000\000\000\000\129\0022\000\000\000\000\000\129\000\129\004\133\000\000\002\018\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\133\004\133\000\000\000\000\000\129\000\000\004\133\000\129\000\129\000\129\000\129\000\000\000\000\000\000\000\000\000\000\000\129\000\129\000\000\000\129\002:\000\129\004\133\000\000\000\000\004\133\005\226\000\000\000\000\000\000\004\133\004\133\000\000\000\000\004\133\004\133\000\000\000\000\000\000\000\000\000\000\000\000\004\133\000\000\000\000\004\133\004\133\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\133\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\133\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\133\0002\0006\000F\000b\004\133\000f\000\000\000j\000\134\000\000\000\138\000\000\000\146\004\133\000\150\000\000\000\154\000\174\000\178\000\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\186\004\133\000\000\000\000\004\133\004\133\000\000\000\000\004\133\000\000\000\000\000\190\000\000\004\133\004\133\000\000\000\000\000\000\004\133\0002\0006\000F\000b\000\000\000f\000\000\000j\000\134\000\000\000\138\000\000\000\146\000\202\000\150\000\000\000\154\000\174\000\178\000\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\206\000\000\000\000\000\000\017\234\000\186\018\006\0002\000\214\000F\000b\018\018\000f\000\000\000j\000\134\000\190\000\138\000\000\000\146\000\000\000\150\000\000\000\154\000\174\000\178\000\182\000\000\000\000\000\000\018*\000\000\000\000\000\000\000\000\000\000\000\000\000\202\000\000\000\186\000\000\000\000\018V\000\000\000\000\000\000\000\000\000\000\000\000\005q\000\190\000\206\005q\000\000\005q\000\000\005q\000\000\005q\000\000\000\000\000\000\000\000\005q\005q\000\000\000\000\000\000\000\000\000\000\018v\000\202\000\000\018\198\000\000\000\000\005q\000\230\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\206\005q\005q\018\222\000\000\008\017\000\000\005q\018\234\000\000\018\246\000\000\000\000\000\000\000\000\019\006\000\000\000\000\019\182\000\000\000\000\000\000\000\000\005q\000\153\000\000\005q\000\000\000\000\000\000\000\000\005q\002\150\019\194\000\000\005q\005q\019\218\000\162\000\000\000\000\000\000\000\153\005q\000\000\000\000\005q\005q\000\000\000\000\001\161\000\000\000\000\001\161\000\000\000\000\005q\000\153\000\000\000\000\000\000\000\000\000\000\000\153\000\153\000\000\005q\000\000\001\161\000\000\000\000\000\000\001\161\000\153\005q\000\000\011\022\001\161\000\153\005q\000\000\000\000\000\000\001\161\000\000\000\000\001\161\001\161\005q\001\161\001\161\000\000\000\000\000\000\000\000\001\161\000\000\000\000\000\153\001\161\000\000\000\000\001\161\000\000\001\161\001\161\000\000\000\000\005q\000\000\000\000\005q\005q\000\000\000\000\005q\000\000\000\000\000\000\000\000\005q\005q\000\000\000\000\001\161\005q\001\161\000\000\000\000\000\000\000\000\000\000\000\000\000\153\000\000\000\000\001\161\000\000\000\000\000\000\011\030\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\153\000\000\000\000\000\000\000\000\000\000\001\161\001\161\007~\000\000\001\161\000\000\000\000\000\000\001\161\000\153\000\153\000\000\n\198\000\000\000\000\000\000\000\000\003U\000\000\003U\000\000\000\000\003U\001\161\000\000\001\161\000\000\000\000\000\000\000\000\000\000\007\134\001\161\001\161\000\000\001\161\001\161\001\161\003U\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003U\003U\000\000\000\000\003U\003U\000\000\000\000\000\000\000\000\003U\000\000\003U\000\000\011\241\000\000\000\000\011\241\000\000\000\000\003U\003U\000\000\003U\003U\003U\000\000\003U\003U\000\000\003U\000\000\011\241\000\000\000\000\000\000\011\241\000\000\000\000\000\000\003V\000\000\000\000\000\000\000\000\003U\003U\011\241\000\000\003U\000\000\011\241\003U\011\241\011\241\000\000\000\000\003^\000\000\000\000\003j\003U\000\000\011\241\000\000\000\000\011\241\000\000\011\241\000\000\003U\000\000\003U\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003U\000\000\000\000\000\000\000\000\003U\011\241\000\000\000\000\000\000\000\000\003U\000\000\000\000\003U\000\000\000\000\000\000\011\241\000\000\003U\000\000\000\000\003v\000\000\000\000\000\000\000\000\001\030\000\000\t\226\000\000\000\000\t\230\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011\241\011\241\000\000\011\241\000\000\003z\000\000\011\241\001*\000\000\000\000\000\000\000\000\000\000\000\000\003\130\000\000\t\234\n\146\011\241\000\000\n\166\n\190\000\000\011\241\011\241\000\000\001R\000\000\001V\011\241\000\000\000\000\000\000\011\241\011\241\011\241\n\n\001^\000\000\n\014\008\166\001j\000\000\n\018\n\022\000\000\n\026\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\254\n\030\000\000\000\000\n\"\000\000\000\000\000\162\000\000\000\000\001\030\000\000\t\226\000\000\000\000\t\230\n*\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\194\000\000\n\218\000\000\000\000\000\000\001*\000\000\000\000\000\000\000\000\000\000\n.\000\000\000\000\t\234\n\146\n2\000\000\n\166\n\190\000\000\000\000\011\186\000\000\001R\n6\001V\000\000\000\000\000\000\000\000\001\154\000\000\000\000\n\n\001^\000\000\n\014\008\166\001j\000\000\n\018\n\022\000\000\n\026\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\254\n\030\000\000\000\000\n\"\000\000\000\000\000\162\000\000\000\000\001\030\000\000\t\226\000\000\000\000\t\230\n*\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\194\000\000\n\218\000\000\000\000\000\000\001*\000\000\000\000\000\000\000\000\000\000\n.\000\000\000\000\t\234\n\146\n2\000\000\n\166\n\190\000\000\000\000\011f\000\000\001R\n6\001V\000\000\000\000\000\000\000\000\001\154\000\000\000\000\n\n\001^\000\000\n\014\008\166\001j\000\000\n\018\n\022\000\000\n\026\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\254\n\030\000\000\000\000\n\"\000\000\000\000\000\162\000\000\000\000\001\030\000\000\t\226\000\000\000\000\t\230\n*\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\194\000\000\n\218\000\000\000\000\000\000\001*\000\000\000\000\000\000\000\000\000\000\n.\000\000\000\000\t\234\n\146\n2\000\000\n\166\n\190\000\000\000\000\005\005\000\000\001R\n6\001V\000\000\000\000\000\000\000\000\001\154\000\000\000\000\n\n\001^\000\000\n\014\008\166\001j\000\000\n\018\n\022\007\178\n\026\000\000\008\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\254\n\030\007\186\000\000\n\"\000\000\002\017\000\162\000\000\000\000\000\000\002\017\000\000\000\000\000\000\000\000\n*\007\194\000\000\000\000\002\017\002\017\000\000\008\018\008\026\n\194\000\000\n\218\001%\002\017\000\000\001%\000\000\007\226\000\000\000\000\007\202\n.\007\218\002\017\000\000\000\000\n2\000\000\000\000\000\000\007\186\000\000\001\189\000\000\001%\n6\000\000\000\000\000\000\001%\000\000\001\154\007\234\000\000\002\017\007\194\000\000\000\000\001%\001%\000\000\001%\001%\000\000\002\017\000\000\000\000\001%\000\000\000\000\000\000\007\226\000\000\000\000\007\202\000\000\007\218\001%\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\017\007\242\000\000\000\000\002\017\000\000\000\000\000\000\007\210\000\000\007\234\000\000\001%\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001%\002\017\000\000\002\017\000\000\000\000\000\000\000\000\000\000\000\000\002\017\002\017\000\000\008\"\007\250\002\017\000\000\000\000\000\000\000\000\000\000\000\000\001%\007\242\000\000\000\000\001%\000\000\000\000\000\000\007\210\000\000\000\000\000\000\001\013\000\000\000\000\001\013\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001%\000\000\001%\000\000\000\000\000\000\000\000\001\013\000\000\001%\001%\001\013\001%\007\250\001%\000\000\001\013\000\000\000\000\000\000\000\000\000\000\007\194\000\000\000\000\001\013\001\013\000\000\001\013\001\013\000\000\000\000\000\000\001\005\001\013\000\000\001\005\000\000\001\013\000\000\000\000\007\202\000\000\007\218\001\013\000\000\000\000\000\000\000\000\000\000\000\000\001\005\000\000\000\000\000\000\001\005\000\000\000\000\000\000\000\000\001\005\000\000\000\000\001\013\000\000\001\013\001\005\000\000\000\000\001\005\001\005\000\000\001\005\001\005\000\000\001\013\000\000\000\000\001\005\000\000\000\000\000\000\001\005\000\000\000\000\007\202\000\000\001\005\001\005\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\013\001\013\000\000\000\000\001\013\000\000\000\000\000\000\007\210\000\000\001\005\000\000\001\005\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\005\001\013\000\000\001\013\000\000\000\000\000\000\000\000\000\000\000\000\001\013\001\013\000\000\001\013\001\013\001\013\000\000\000\000\000\000\000\000\000\000\000\000\001\005\001\005\000\000\000\000\001\005\000\000\000\000\000\000\007\210\000\000\000\000\000\000\001\t\000\000\000\000\001\t\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\005\000\000\001\005\000\000\000\000\000\000\000\000\001\t\000\000\001\005\001\005\001\t\001\005\001\005\001\005\000\000\001\t\000\000\000\000\000\000\000\000\000\000\001\t\000\000\000\000\001\t\001\t\000\000\001\t\001\t\000\000\000\000\000\000\001\025\001\t\000\000\001\025\000\000\001\t\000\000\000\000\007\202\000\000\001\t\001\t\000\000\000\000\000\000\000\000\000\000\000\000\007\186\000\000\000\000\000\000\001\025\000\000\000\000\000\000\000\000\001\025\000\000\000\000\001\t\000\000\001\t\007\194\000\000\000\000\001\025\001\025\000\000\001\025\001\025\000\000\001\t\000\000\000\000\001\025\000\000\000\000\000\000\001\025\000\000\000\000\007\202\000\000\007\218\001\025\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\t\001\t\000\000\000\000\001\t\000\000\000\000\000\000\007\210\000\000\007\234\000\000\001\025\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\025\001\t\000\000\001\t\000\000\000\000\000\000\000\000\000\000\000\000\001\t\001\t\000\000\001\t\001\t\001\t\000\000\000\000\000\000\000\000\000\000\000\000\001\025\001\025\000\000\000\000\001\025\000\000\000\000\000\000\007\210\000\000\000\000\000\000\001\017\000\000\000\000\001\017\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\025\000\000\001\025\000\000\000\000\000\000\000\000\007\186\000\000\001\025\001\025\001\017\001\025\001\025\001\025\000\000\001\017\000\000\000\000\000\000\000\000\000\000\007\194\000\000\000\000\001\017\001\017\000\000\001\017\001\017\000\000\000\000\000\000\001\021\001\017\000\000\001\021\000\000\001\017\000\000\000\000\007\202\000\000\007\218\001\017\000\000\000\000\000\000\000\000\000\000\000\000\007\186\000\000\000\000\000\000\001\021\000\000\000\000\000\000\000\000\001\021\000\000\000\000\001\017\000\000\001\017\007\194\000\000\000\000\001\021\001\021\000\000\001\021\001\021\000\000\001\017\000\000\000\000\001\021\000\000\000\000\000\000\001\021\000\000\000\000\007\202\000\000\007\218\001\021\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\017\001\017\000\000\000\000\001\017\000\000\000\000\000\000\007\210\000\000\007\234\000\000\001\021\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\021\001\017\000\000\001\017\000\000\000\000\000\000\000\000\000\000\000\000\001\017\001\017\000\000\001\017\001\017\001\017\000\000\000\000\000\000\000\000\000\000\000\000\001\021\001\021\000\000\000\000\001\021\000\000\000\000\000\000\007\210\000\000\000\000\000\000\001\029\000\000\000\000\001\029\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\021\000\000\001\021\000\000\000\000\000\000\000\000\007\186\000\000\001\021\001\021\001\029\001\021\001\021\001\021\000\000\001\029\000\000\000\000\000\000\000\000\000\000\007\194\000\000\000\000\001\029\001\029\000\000\001\029\001\029\000\000\000\000\000\000\007\178\001\029\000\000\001-\000\000\007\226\000\000\000\000\007\202\000\000\007\218\001\029\000\000\000\000\000\000\000\000\000\000\000\000\007\186\000\000\000\000\000\000\001-\000\000\000\000\000\000\000\000\001-\000\000\000\000\007\234\000\000\001\029\007\194\000\000\000\000\001-\001-\000\000\001-\008\026\000\000\001\029\000\000\000\000\001-\000\000\000\000\000\000\007\226\000\000\000\000\007\202\000\000\007\218\001-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\029\007\242\000\000\000\000\001\029\000\000\000\000\000\000\007\210\000\000\007\234\000\000\001-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001-\001\029\000\000\001\029\000\000\000\000\000\000\000\000\000\000\000\000\001\029\001\029\000\000\001\029\001\029\001\029\000\000\000\000\000\000\000\000\000\000\000\000\001-\007\242\000\000\000\000\001-\000\000\000\000\000\000\007\210\000\000\000\000\000\000\007\178\000\000\000\000\001!\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001-\000\000\001-\000\000\000\000\000\000\000\000\007\186\000\000\001-\001-\001!\008\"\007\250\001-\000\000\001!\000\000\000\000\000\000\000\000\000\000\007\194\000\000\000\000\001!\001!\000\000\001!\001!\000\000\000\000\000\000\007\178\001!\000\000\001)\000\000\007\226\000\000\000\000\007\202\000\000\007\218\001!\000\000\000\000\000\000\000\000\000\000\000\000\007\186\000\000\000\000\000\000\001)\000\000\000\000\000\000\000\000\001)\000\000\000\000\007\234\000\000\001!\007\194\000\000\000\000\001)\001)\000\000\001)\008\026\000\000\001!\000\000\000\000\001)\000\000\000\000\000\000\007\226\000\000\000\000\007\202\000\000\007\218\001)\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001!\007\242\000\000\000\000\001!\000\000\000\000\000\000\007\210\000\000\007\234\000\000\001)\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001)\001!\000\000\001!\000\000\000\000\000\000\000\000\000\000\000\000\001!\001!\000\000\001!\007\250\001!\000\000\000\000\000\000\000\000\000\000\000\000\001)\007\242\000\000\000\000\001)\000\000\000\000\000\000\007\210\001\030\000\000\t\226\000\000\000\000\t\230\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001)\000\000\001)\000\000\000\000\000\000\000\000\001*\000\000\001)\001)\000\000\001)\007\250\001)\000\000\t\234\n\146\000\000\000\000\n\166\n\190\000\000\000\000\000\000\000\000\001R\000\000\001V\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\n\001^\000\000\n\014\008\166\001j\000\000\n\018\n\022\000\000\n\026\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\254\n\030\000\000\000\000\n\"\000\000\000\000\000\162\000\000\000\000\001\030\000\000\001\"\000\000\000\000\001&\n*\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008>\000\000\n\218\000\000\000\000\000\000\001*\000\000\000\000\001.\000\000\000\000\n.\000\000\000\000\001>\001B\n2\001J\000\000\t\222\000\000\000\000\001\201\000\000\001R\n6\001V\000\000\000\000\000\000\000\000\001\154\000\000\000\000\001Z\001^\000\000\001b\001f\001j\000\000\001n\001r\000\000\001v\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001z\000\000\000\000\001~\000\000\000\000\000\162\001\030\000\000\001\"\000\000\000\000\001&\000\000\000\000\001\134\000\000\000\000\000\000\000\000\000\000\000\000\008!\000\000\001\138\008!\000\000\000\000\001*\000\000\000\000\001.\000\000\000\000\000\000\000\000\001\142\001>\001B\000\000\001J\001\146\000\000\000\000\008!\000\000\008!\001R\000\000\001V\001\150\000\000\000\000\000\000\000\000\000\000\001\154\001Z\001^\000\000\001b\001f\001j\000\000\001n\001r\000\000\001v\000\000\000\000\000\000\000\000\001\030\000\000\001\"\000\000\000\000\001&\000\000\000\000\000\000\000\000\000\000\001z\000\000\000\000\001~\014\186\000\000\000\162\000\000\000\000\000\000\001*\000\000\000\000\001.\000\000\001\134\000\000\000\000\000\000\001>\001B\000\000\001J\000\000\001\138\000\000\000\000\000\000\000\000\001R\000\000\001V\000\000\000\000\000\000\000\000\001\142\000\000\000\000\001Z\001^\001\146\001b\001f\001j\000\000\001n\001r\000\000\001v\001\150\000\000\000\000\000\000\000\000\000\000\001\154\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001z\000\000\000\000\001~\000\000\000\000\000\162\001\030\000\000\001\"\000\000\000\000\001&\000\000\000\000\001\134\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\138\000\000\000\000\000\000\001*\000\000\000\000\001.\000\000\000\000\000\000\000\000\001\142\001>\004\226\000\000\001J\001\146\000\000\000\000\000\000\000\000\000\000\001R\000\000\001V\001\150\000\000\000\000\000\000\000\000\000\000\001\154\001Z\001^\000\000\001b\001f\001j\000\000\001n\001r\000\000\001v\000\000\000\000\000\000\000\000\001\030\000\000\001\"\000\000\000\000\001&\000\000\000\000\000\000\000\000\000\000\001z\000\000\000\000\001~\000\000\000\000\000\162\000\000\000\000\000\000\001*\000\000\000\000\001.\000\000\001\134\000\000\000\000\000\000\001>\001\130\000\000\001J\000\000\001\138\000\000\000\000\000\000\000\000\001R\000\000\001V\000\000\000\000\000\000\000\000\001\142\000\000\000\000\001Z\001^\001\146\001b\001f\001j\000\000\001n\001r\000\000\001v\001\150\000\000\000\000\000\000\000\000\000\000\001\154\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001z\000\000\000\000\001~\000\000\000\000\000\162\001\030\000\000\0012\000\000\000\000\0016\000\000\000\000\001\134\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\138\000\000\000\000\000\000\001*\000\000\000\000\001.\000\000\000\000\000\000\000\000\001\142\001:\001N\000\000\001J\001\146\000\000\000\000\000\000\000\000\000\000\001R\000\000\001V\001\150\000\000\000\000\000\000\000\000\000\000\001\154\003\022\001^\000\000\003\026\001f\001j\000\000\003\030\003\"\000\000\003&\000\000\000\000\000\000\000\000\001\030\000\000\0012\000\000\000\000\0016\000\000\000\000\000\000\000\000\000\000\003*\000\000\000\000\003.\000\000\000\000\000\162\000\000\000\000\000\000\001*\000\000\000\000\001.\000\000\0036\000\000\000\000\000\000\001:\004\202\000\000\001J\000\000\000\000\000\000\000\000\000\000\000\000\001R\000\169\001V\000\000\000\000\000\000\000\000\003:\000\000\000\000\003\022\001^\003>\003\026\001f\001j\000\000\003\030\003\"\011\006\003&\003B\000\000\000\000\000\000\000\000\000\000\001\154\000\000\000\000\000\000\000\000\000\000\000\000\011\014\000\000\003*\000\000\000\000\003.\000\169\000\169\000\162\001\030\000\000\0012\000\000\000\000\0016\000\000\000\169\0036\000\000\011\022\000\000\011&\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001*\000\000\000\000\001.\000\000\000\000\000\000\000\000\003:\001:\0032\0116\001J\003>\000\000\000\000\000\000\000\000\000\000\001R\000\000\001V\003B\000\000\000\000\000\000\000\000\000\000\001\154\003\022\001^\000\000\003\026\001f\001j\000\000\003\030\003\"\000\000\003&\000\000\000\000\000\000\000\000\000\000\000\000\000\169\000\000\000\000\000\000\000\000\000\000\000\000\011\030\000\000\003*\000\000\000\000\003.\000\000\000\000\000\162\000\000\000\000\000\000\000\169\000\000\000\000\000\000\000\000\0036\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\169\000\169\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003:\000\000\000\000\000\000\000\000\003>\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003B\000\000\000\000\000\000\000\000\000\000\001\154\0002\006&\000F\000b\006>\000f\006\142\000j\000\134\006\146\000\138\000\000\000\146\000\000\000\150\006\150\000\154\000\174\000\178\000\182\006\154\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\186\000\000\000\000\000\000\000\000\000\000\000\000\0002\t\182\000F\000b\000\190\000f\006\142\000j\000\134\006\146\000\138\000\000\000\146\020\222\000\150\006\150\000\154\000\174\000\178\000\182\006\154\020\230\000\000\000\000\000\000\000\202\000\000\000\000\000\000\000\000\000\000\001\030\000\186\006\202\000\000\000\000\006\206\000\000\000\000\000\206\000\000\000\000\000\000\000\190\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001*\000\000\008\170\000\000\000\000\000\000\000\000\000\000\000\000\006\210\008*\000\000\000\202\000\000\000\000\000\000\000\000\000\000\000\000\001R\000\000\001V\000\000\000\000\000\000\000\162\000\206\000\000\000\000\006\234\001^\000\000\006\238\001f\001j\000\000\006\242\006\246\000\000\006\250\000\000\000\000\000\000\000\000\001\030\000\000\006\202\000\000\000\000\006\206\000\000\000\000\000\000\t\166\006\254\007\002\000\000\000\000\007\006\000\000\000\000\000\162\000\000\000\000\000\162\001*\000\000\000\000\000\000\003\173\007\014\000\000\000\000\000\000\006\210\006\214\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001R\000\000\001V\001\030\000\000\006\202\000\000\007\018\006\206\000\000\006\234\001^\007\022\006\238\001f\001j\000\000\006\242\006\246\000\000\006\250\007\026\000\000\000\000\001*\000\000\000\000\001\154\000\000\000\000\000\000\000\000\000\000\006\210\007\n\006\254\007\002\000\000\000\000\007\006\000\000\000\000\000\162\001R\000\000\001V\000\000\000\000\000\000\000\000\000\000\007\014\000\000\006\234\001^\000\000\006\238\001f\001j\000\000\006\242\006\246\000\000\006\250\000\000\000\000\000\000\000\000\001\030\000\000\t\226\000\000\007\018\t\230\000\000\000\000\000\000\007\022\006\254\007\002\000\000\000\000\007\006\000\000\000\000\000\162\007\026\000\000\000\000\001*\000\000\000\000\001\154\000\000\007\014\000\000\000\000\000\000\t\234\t\246\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001R\000\000\001V\001\030\000\000\t\226\000\000\007\018\t\230\000\000\n\n\001^\007\022\n\014\001f\001j\000\000\n\018\n\022\000\000\n\026\007\026\000\000\000\000\001*\000\000\000\000\001\154\000\000\000\000\000\000\000\000\000\000\t\234\n&\006\254\n\030\000\000\000\000\n\"\000\000\000\000\000\162\001R\000\000\001V\000\000\000\000\000\000\000\000\000\000\n*\000\000\n\n\001^\000\000\n\014\001f\001j\000\000\n\018\n\022\000\000\n\026\000\000\000\000\000\000\000\000\001\030\000\000\t\226\000\000\n.\t\230\000\000\000\000\000\000\n2\006\254\n\030\000\000\000\000\n\"\000\000\000\000\000\162\n6\000\000\000\000\001*\000\000\000\000\001\154\000\000\n*\000\000\000\000\000\000\t\234\n\146\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001R\000\000\001V\000\000\000\000\000\000\000\000\n.\000\000\000\000\n\n\001^\n2\n\014\001f\001j\000\000\n\018\n\022\000\000\n\026\n6\000\000\000\000\000\000\000\000\000\000\001\154\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\254\n\030\000\000\000\000\n\"\000\000\000\000\000\162\000\000\000\000\000\000\000\000\0002\0006\000F\000b\n*\000f\000\000\000j\000\134\007\141\000\138\017r\000\146\000\000\000\150\000\000\000\154\000\174\000\178\000\182\000\000\000\000\000\000\000\000\000\000\n.\000\000\000\000\000\000\000\000\n2\007\141\000\186\017v\000\000\000\000\000\000\000\000\000\000\n6\000\000\007\141\007\141\019\222\000\000\001\154\000\000\007\141\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\202\000\000\007\141\000\000\000\000\018V\000\000\007\141\000:\017\134\000:\007\141\007\141\000\000\000\206\000\000\000\000\000\000\001\153\007\141\000\000\001\153\007\141\007\141\000\000\000\000\000\000\000\000\000\000\000\000\005q\000\000\007\141\005q\000\000\000\000\001\153\005q\000\000\005q\001\153\000\000\007\141\000\000\005q\005q\000\000\000\000\000\000\000\000\007\141\001\153\000\162\000\000\000\000\001\153\000\000\001\153\001\153\000\000\000\000\000\000\000\000\000\000\007\141\000\000\017\138\001\153\000\000\000\000\001\153\000\000\001\153\007\141\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\141\000\000\000\000\007\141\007\141\005q\000\000\007\141\001\153\000\000\000\000\000\000\007\141\007\141\000\218\000\000\000\000\007\141\000\000\000\000\001\153\000\000\000\000\000\000\000\000\007\141\000\000\000\000\007\141\007\141\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\141\000\000\000\000\000\000\000\000\001\153\003\166\000\000\001\153\000\000\000\000\000\000\001\153\000\000\000\000\000\000\000\000\000\000\007\141\000\000\000\000\000\000\000\000\005q\001\153\000\000\000\000\000\000\000\000\001\153\001\153\000\000\007\141\000\000\000\000\003\174\000\000\000\000\000\000\001\153\001\153\001\153\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\141\000\000\000\000\007\141\007\141\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\141\007\141\000\000\000\000\000\000\007\141\003]\003]\003]\003]\000\000\003]\000\000\003]\003]\000\000\003]\000\000\003]\000\000\003]\000\000\003]\003]\003]\003]\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\238\000\000\000\000\003]\000\000\0002\000\214\000F\000b\000\000\000f\000\000\000j\000\134\003]\000\138\000\000\000\146\000\000\000\150\000\000\000\154\000\174\000\178\000\182\003\254\000\000\000\000\004N\000\000\000\000\000\000\000\000\000\000\000\000\003]\000\000\000\186\000\000\000\000\000\000\003]\000\000\004\006\000\000\000\000\000\000\002\t\000\190\003]\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\014\000\000\000\000\000\000\002\t\000\000\004^\004f\000\000\000\000\000\237\000\202\000\000\000\237\000\000\000\000\004.\000\230\000\000\004\022\000\000\004&\000\000\000\000\000\000\000\206\000\000\000\000\004\006\003]\000\000\000\000\000\237\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0046\000\000\004\014\000\000\000\000\000\000\000\237\000\000\000\237\000\237\000\000\000\000\002\t\000\000\000\000\000\000\000\000\000\000\004.\000\000\000\000\004\022\000\162\004&\000\000\000\000\000\000\000\000\000\000\003]\000\000\000\000\000\000\000\000\000\000\004>\000\000\000\000\002\t\000\000\000\234\000\000\004\030\0046\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\t\000\237\000\000\000\000\000\000\002\t\002\t\000\000\000\000\011=\000\000\000\000\000\000\000\000\000\000\004n\004F\002\t\000\000\000\000\000\000\000\000\000\000\000\000\004>\000\000\000\000\000\237\000\000\000\213\000\000\004\030\000\213\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\237\000\000\000\000\000\000\000\213\000\237\000\237\000\000\000\213\000\000\000\000\000\000\000\000\000\000\000\000\000\237\004F\000\237\000\000\004\014\000\000\000\000\000\000\000\213\000\000\000\213\000\213\000\000\000\000\000\205\000\000\000\000\000\205\000\000\000\000\000\213\000\000\000\000\004\022\000\000\004&\000\000\000\000\000\000\000\000\000\000\000\000\000\205\000\000\000\000\000\000\000\205\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\213\000\000\000\205\000\000\000\000\000\000\000\205\000\000\000\205\000\205\000\000\000\000\000\213\000\000\000\000\000\000\000\000\000\000\000\205\000\000\000\000\004\022\000\000\000\205\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\213\000\000\000\000\000\213\000\000\000\000\000\000\004\030\000\205\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\213\000\205\000\000\000\000\000\000\000\213\000\213\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\213\000\213\000\213\000\000\000\000\000\000\000\000\000\000\000\000\000\205\000\000\000\000\000\205\000\000\000\209\000\000\004\030\000\209\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\205\000\000\000\000\000\000\000\209\000\205\000\205\000\000\000\209\000\000\000\000\000\000\000\000\000\000\000\000\000\205\000\205\000\205\000\000\000\209\000\000\000\000\000\000\000\209\000\000\000\209\000\209\000\000\000\000\000\225\000\000\000\000\000\225\000\000\000\000\000\209\000\000\000\000\004\022\000\000\000\209\000\000\000\000\000\000\000\000\000\000\000\000\004\006\000\000\000\000\000\000\000\225\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\209\000\000\004\014\000\000\000\000\000\000\000\225\000\000\000\225\000\225\000\000\000\000\000\209\000\000\000\000\000\000\000\000\000\000\000\225\000\000\000\000\004\022\000\000\004&\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\209\000\000\000\000\000\209\000\000\000\000\000\000\004\030\0046\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\209\000\225\000\000\000\000\000\000\000\209\000\209\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\209\000\209\000\209\000\000\000\000\000\000\000\000\000\000\000\000\000\225\000\000\000\000\000\225\000\000\000\217\000\000\004\030\000\217\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\225\000\000\000\000\000\000\004\006\000\225\000\225\000\000\000\217\000\000\000\000\000\000\000\000\000\000\000\000\000\225\000\225\000\225\000\000\004\014\000\000\000\000\000\000\000\217\000\000\000\217\000\217\000\000\000\000\000\221\000\000\000\000\000\221\000\000\000\000\000\217\000\000\000\000\004\022\000\000\004&\000\000\000\000\000\000\000\000\000\000\000\000\004\006\000\000\000\000\000\000\000\221\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\217\000\000\004\014\000\000\000\000\000\000\000\221\000\000\000\221\000\221\000\000\000\000\000\217\000\000\000\000\000\000\000\000\000\000\000\221\000\000\000\000\004\022\000\000\004&\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\217\000\000\000\000\000\217\000\000\000\000\000\000\004\030\0046\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\217\000\221\000\000\000\000\000\000\000\217\000\217\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\217\000\217\000\217\000\000\000\000\000\000\000\000\000\000\000\000\000\221\000\000\000\000\000\221\000\000\000\229\000\000\004\030\000\229\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\221\000\000\000\000\000\000\004\006\000\221\000\221\000\000\000\229\000\000\000\000\000\000\000\000\000\000\000\000\000\221\000\221\000\221\000\000\004\014\000\000\000\000\000\000\000\229\000\000\000\229\000\229\000\000\000\000\003\254\000\000\000\000\000\245\000\000\000\000\004.\000\000\000\000\004\022\000\000\004&\000\000\000\000\000\000\000\000\000\000\000\000\004\006\000\000\000\000\000\000\000\245\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0046\000\000\004\014\000\000\000\000\000\000\000\245\000\000\000\245\004f\000\000\000\000\000\229\000\000\000\000\000\000\000\000\000\000\004.\000\000\000\000\004\022\000\000\004&\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004>\000\000\000\000\000\229\000\000\000\000\000\000\004\030\0046\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\229\000\245\000\000\000\000\000\000\000\229\000\229\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\229\000\229\000\229\000\000\000\000\000\000\000\000\000\000\000\000\004>\000\000\000\000\000\245\000\000\003\254\000\000\004\030\000\233\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\245\000\000\000\000\000\000\004\006\000\245\000\245\000\000\000\233\000\000\000\000\000\000\000\000\000\000\000\000\004n\004F\000\245\000\000\004\014\000\000\000\000\000\000\000\233\000\000\000\233\000\233\000\000\000\000\003\254\000\000\000\000\000\241\000\000\003\165\004.\000\000\003\165\004\022\000\000\004&\003\165\000\000\003\165\000\000\000\000\000\000\004\006\003\165\003\165\000\000\000\241\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0046\000\000\004\014\000\000\000\000\000\000\000\241\000\000\000\241\004f\000\000\000\000\000\233\000\000\000\000\000\000\000\000\002-\004.\000\000\000\000\004\022\000\000\004&\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\165\000\000\004>\000\000\000\000\000\233\000\000\000\000\000\000\004\030\0046\000\000\002-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002-\000\233\000\241\002-\002-\000\000\000\233\000\233\000\000\000\000\000\000\000\000\000\000\002-\000\000\000\000\000\233\004F\000\233\000\000\000\000\000\000\000\000\000\000\000\000\004>\000\000\000\000\000\241\000\000\000\000\002-\004\030\000\000\000\000\000\000\003\165\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\241\002-\000\000\000\000\000\000\000\241\000\241\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\241\004F\000\241\000\000\000\000\000\000\002-\000\000\000\000\002-\002-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002-\002-\000\000\000\000\000\000\002-\0002\000\214\000F\000b\000\000\000f\000\000\000j\000\134\000\000\000\138\000\000\000\146\000\000\000\150\000\000\000\154\000\174\000\178\000\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\186\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\226\000F\000b\000\190\000f\006\142\000j\000\134\006\146\000\138\000\000\000\146\020\222\000\150\006\150\000\154\000\174\000\000\000\182\006\154\020\230\000\000\000\000\000\000\000\202\000\000\000\000\000\000\000\000\000\000\000\230\000\186\000\000\000\000\000\000\000\000\000\000\000\000\000\206\000\000\000\000\000\000\000\190\0002\005.\000F\000b\000\000\000f\000\000\000j\000\134\000\000\000\138\000\000\000\146\000\000\000\150\000\000\000\154\000\174\000\178\000\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\186\000\162\000\206\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\190\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\234\000\000\0002\005.\000F\000b\000\000\000f\000\000\000j\000\134\000\000\000\138\000\202\000\146\000\000\000\150\000\000\000\154\000\174\000\178\000\182\000\000\002)\000\000\000\000\003\173\000\206\000\000\000\000\000\000\0052\0056\000\000\000\186\000\000\0002\000\214\000F\000b\000\000\000f\000\000\000j\000\134\000\190\000\138\000\000\000\146\000\000\000\150\000\000\000\154\000\174\000\178\000\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\202\000\000\000\186\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\190\000\206\000\000\000\000\005:\0052\0056\000\000\000\000\000\000\000\000\000\000\0002\005.\000F\000b\000\000\000f\000\000\000j\000\134\000\202\000\138\000\000\000\146\000\000\000\150\000\230\000\154\000\174\000\178\000\182\000\000\000\000\000\000\000\206\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\186\000\000\0002\005.\000F\000b\000\000\000f\000\000\000j\000\134\000\190\000\138\005B\000\146\011\213\000\150\000\000\000\154\000\174\000\178\000\182\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\162\000\000\000\000\000\202\011\213\000\186\000\000\000\000\000\000\000\000\000\000\000\000\nJ\000\000\000\000\000\000\000\190\000\206\000\000\011\213\000\000\021\170\0056\000\000\000\000\011\213\011\213\000\000\000\000\nR\000\000\000\000\n^\000\000\000\000\011\213\000\000\000\202\011\213\000\000\011\213\002!\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\206\000\000\000\000\000\000\021\170\0056\000\161\000\000\000\000\011\213\000\000\0002\006B\006J\000b\000\000\000f\000\000\006N\000\134\000\000\000\138\021\174\000\146\011\006\000\150\nj\000\154\000\174\000\178\000\182\000\000\000\165\000\000\000\000\000\000\000\000\000\000\000\000\011\014\000\000\000\000\000\000\000\186\011\213\000\161\000\161\000\000\000\000\nn\011\006\011\213\000\000\000\000\000\190\000\161\021\182\000\000\011\022\nv\011&\000\000\000\000\011\213\000\173\011\014\000\000\000\000\000\000\000\000\000\000\000\165\000\165\000\000\000\000\006R\000\000\000\000\011\213\011\213\000\161\000\165\011\006\000\000\011\022\000\000\011&\000\000\000\000\000\206\n\254\000\000\000\000\000\000\000\000\000\000\000\000\011\014\000\000\000\000\000\000\000\000\000\000\000\173\000\173\000\000\0116\n\254\011\006\000\000\000\000\000\000\000\000\011.\000\000\000\161\011\022\000\000\011&\000\000\000\000\000\000\011\030\011\014\000\000\011\006\000\000\000\000\000\000\000\189\011V\000\000\000\000\000\000\000\161\000\000\000\000\000\000\0116\011.\011\014\000\165\011\022\000\000\011&\000\000\000\177\000\177\011\030\000\161\000\161\n\254\000\000\000\000\000\000\000\000\011.\000\000\000\000\011\022\000\165\011&\000\000\000\000\0116\000\000\000\000\000\000\000\000\011\006\000\000\000\000\000\000\011>\000\000\000\165\000\165\000\000\000\000\000\000\011\030\0116\000\000\000\000\011\014\000\000\000\000\000\000\000\000\000\000\000\185\011V\000\173\000\000\000\000\000\000\000\000\000\000\000\000\011>\011.\000\000\000\000\011\022\000\000\011&\011\030\000\173\000\173\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011>\000\000\000\189\000\000\000\000\000\000\000\000\011\030\000\000\0116\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011^\011F\000\177\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\177\011F\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011>\000\000\000\000\000\000\000\000\000\000\000\000\011\030\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\185\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\185\011F"))
   
   let lhs =
-    (16, "\000\012\000\011\000\n\000\t\000\008\000\007\000\006\000\005\000\004\000\003\000\002\000\001\000\000\001\003\001\003\001\003\001\002\001\002\001\002\001\002\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\254\000\254\000\254\000\254\000\254\000\254\000\254\000\254\000\254\000\254\000\254\000\254\000\254\000\254\000\253\000\253\000\253\000\253\000\252\000\251\000\251\000\251\000\250\000\250\000\250\000\249\000\249\000\249\000\248\000\248\000\248\000\247\000\246\000\245\000\244\000\244\000\243\000\243\000\242\000\242\000\241\000\241\000\240\000\240\000\239\000\238\000\238\000\237\000\237\000\236\000\236\000\236\000\235\000\235\000\234\000\233\000\232\000\231\000\230\000\229\000\228\000\227\000\226\000\225\000\224\000\223\000\222\000\222\000\221\000\221\000\220\000\220\000\219\000\219\000\218\000\218\000\218\000\217\000\217\000\217\000\217\000\217\000\216\000\216\000\215\000\214\000\214\000\214\000\214\000\213\000\213\000\212\000\211\000\210\000\210\000\210\000\209\000\209\000\209\000\208\000\208\000\208\000\208\000\207\000\207\000\207\000\207\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\206\000\205\000\204\000\204\000\203\000\203\000\203\000\202\000\202\000\201\000\201\000\201\000\200\000\200\000\199\000\198\000\197\000\197\000\196\000\196\000\195\000\195\000\194\000\194\000\193\000\193\000\192\000\191\000\190\000\190\000\189\000\189\000\188\000\187\000\187\000\187\000\187\000\186\000\185\000\184\000\184\000\183\000\182\000\182\000\181\000\181\000\181\000\181\000\181\000\180\000\180\000\180\000\180\000\179\000\179\000\179\000\179\000\178\000\178\000\178\000\178\000\177\000\176\000\176\000\175\000\175\000\175\000\174\000\173\000\173\000\173\000\173\000\172\000\171\000\171\000\171\000\171\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\169\000\169\000\168\000\168\000\167\000\167\000\166\000\166\000\165\000\165\000\165\000\165\000\164\000\164\000\164\000\163\000\163\000\163\000\163\000\163\000\163\000\163\000\162\000\161\000\161\000\161\000\160\000\159\000\159\000\158\000\158\000\157\000\157\000\156\000\156\000\155\000\155\000\154\000\154\000\153\000\153\000\153\000\153\000\153\000\153\000\153\000\152\000\151\000\150\000\150\000\149\000\149\000\148\000\148\000\147\000\147\000\146\000\146\000\145\000\145\000\144\000\144\000\143\000\143\000\142\000\142\000\141\000\141\000\140\000\140\000\139\000\139\000\138\000\138\000\137\000\137\000\136\000\136\000\135\000\135\000\134\000\134\000\133\000\133\000\132\000\132\000\131\000\131\000\130\000\130\000\129\000\129\000\128\000\128\000\127\000\127\000~\000~\000}\000}\000|\000|\000{\000{\000z\000z\000y\000y\000x\000x\000w\000w\000v\000u\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000s\000r\000q\000p\000o\000n\000m\000l\000k\000j\000j\000j\000i\000i\000i\000h\000h\000h\000h\000g\000f\000e\000d\000c\000b\000a\000a\000a\000`\000`\000`\000_\000_\000^\000^\000^\000]\000]\000\\\000[\000[\000[\000Z\000Y\000Y\000X\000X\000W\000W\000V\000V\000U\000U\000T\000T\000S\000S\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000Q\000Q\000P\000P\000O\000O\000N\000N\000N\000N\000N\000M\000M\000L\000L\000L\000L\000K\000J\000I\000I\000I\000H\000H\000H\000G\000G\000G\000G\000G\000G\000F\000F\000F\000F\000F\000E\000E\000E\000E\000E\000E\000E\000D\000D\000D\000D\000D\000D\000D\000C\000C\000C\000C\000C\000C\000C\000B\000B\000B\000B\000B\000B\000B\000A\000A\000A\000A\000A\000A\000A\000A\000A\000A\000A\000A\000A\000@\000@\000@\000@\000@\000@\000@\000@\000@\000@\000@\000@\000@\000?\000?\000?\000?\000?\000?\000?\000?\000?\000?\000?\000?\000?\000>\000>\000>\000>\000>\000>\000>\000>\000>\000>\000>\000>\000>\000=\000=\000=\000=\000=\000<\000;\000;\000;\000;\000;\000:\0009\0008\0007\0006\0005\0005\0005\0005\0005\0005\0005\0004\0004\0004\0003\0002\0002\0001\0001\0000\0000\000/\000/\000.\000.\000-\000-\000,\000,\000+\000+\000*\000*\000)\000)\000(\000(\000'\000'\000&\000&\000%\000%\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000#\000#\000#\000\"\000\"\000\"\000\"\000!\000!\000!\000!\000!\000 \000\031\000\031\000\031\000\030\000\030\000\029\000\028\000\027\000\027\000\027\000\027\000\026\000\026\000\026\000\025\000\025\000\024\000\024\000\024\000\023\000\023\000\023\000\022\000\022\000\022\000\021\000\021\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\018\000\018\000\018\000\018\000\018\000\018\000\018\000\017\000\017\000\017\000\017\000\017\000\017\000\017\000\016\000\016\000\016\000\016\000\016\000\015\000\015\000\014\000\013\000\013\000\013\000\013\000\013")
+    (16, "\000\012\000\011\000\n\000\t\000\008\000\007\000\006\000\005\000\004\000\003\000\002\000\001\000\000\001\004\001\004\001\004\001\003\001\003\001\003\001\003\001\002\001\002\001\002\001\002\001\002\001\002\001\002\001\002\001\002\001\002\001\002\001\002\001\002\001\002\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\254\000\254\000\254\000\254\000\253\000\252\000\252\000\252\000\251\000\251\000\251\000\250\000\250\000\250\000\249\000\249\000\249\000\248\000\247\000\246\000\245\000\245\000\244\000\244\000\243\000\243\000\242\000\242\000\241\000\241\000\240\000\239\000\239\000\238\000\238\000\237\000\237\000\237\000\236\000\236\000\235\000\234\000\233\000\232\000\231\000\230\000\229\000\228\000\227\000\226\000\225\000\224\000\223\000\223\000\222\000\222\000\221\000\221\000\220\000\220\000\219\000\219\000\219\000\218\000\218\000\218\000\218\000\218\000\217\000\217\000\217\000\217\000\217\000\216\000\215\000\215\000\215\000\215\000\214\000\214\000\213\000\212\000\211\000\211\000\211\000\210\000\210\000\210\000\209\000\209\000\209\000\209\000\208\000\208\000\208\000\208\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\207\000\206\000\205\000\205\000\204\000\204\000\204\000\203\000\203\000\202\000\202\000\202\000\201\000\201\000\200\000\199\000\198\000\198\000\197\000\197\000\196\000\196\000\195\000\195\000\194\000\194\000\193\000\192\000\191\000\191\000\190\000\190\000\189\000\188\000\188\000\188\000\188\000\187\000\186\000\185\000\185\000\184\000\183\000\183\000\182\000\182\000\182\000\182\000\182\000\181\000\181\000\181\000\181\000\180\000\180\000\180\000\180\000\179\000\179\000\179\000\179\000\178\000\177\000\177\000\176\000\176\000\176\000\175\000\174\000\174\000\174\000\174\000\173\000\172\000\172\000\172\000\172\000\171\000\171\000\171\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\170\000\169\000\169\000\168\000\168\000\167\000\167\000\166\000\166\000\165\000\165\000\165\000\165\000\164\000\164\000\164\000\163\000\163\000\163\000\163\000\163\000\163\000\163\000\162\000\161\000\161\000\161\000\160\000\159\000\159\000\158\000\158\000\157\000\157\000\156\000\156\000\155\000\155\000\154\000\154\000\153\000\153\000\153\000\153\000\153\000\153\000\153\000\152\000\151\000\150\000\150\000\149\000\149\000\148\000\148\000\147\000\147\000\146\000\146\000\145\000\145\000\144\000\144\000\143\000\143\000\142\000\142\000\141\000\141\000\140\000\140\000\139\000\139\000\138\000\138\000\137\000\137\000\136\000\136\000\135\000\135\000\134\000\134\000\133\000\133\000\132\000\132\000\131\000\131\000\130\000\130\000\129\000\129\000\128\000\128\000\127\000\127\000~\000~\000}\000}\000|\000|\000{\000{\000z\000z\000y\000y\000x\000x\000w\000w\000v\000u\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000t\000s\000r\000q\000p\000o\000n\000m\000l\000k\000j\000j\000j\000i\000i\000i\000h\000h\000h\000h\000g\000f\000e\000d\000c\000b\000a\000a\000a\000`\000`\000`\000_\000_\000^\000^\000^\000]\000]\000\\\000[\000[\000[\000Z\000Y\000Y\000X\000X\000W\000W\000V\000V\000U\000U\000T\000T\000S\000S\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000R\000Q\000Q\000P\000P\000O\000O\000N\000N\000N\000N\000N\000M\000M\000L\000L\000L\000L\000K\000J\000I\000I\000I\000H\000H\000H\000G\000G\000G\000G\000G\000G\000F\000F\000F\000F\000F\000E\000E\000E\000E\000E\000E\000E\000D\000D\000D\000D\000D\000D\000D\000C\000C\000C\000C\000C\000C\000C\000B\000B\000B\000B\000B\000B\000B\000A\000A\000A\000A\000A\000A\000A\000A\000A\000A\000A\000A\000A\000@\000@\000@\000@\000@\000@\000@\000@\000@\000@\000@\000@\000@\000?\000?\000?\000?\000?\000?\000?\000?\000?\000?\000?\000?\000?\000>\000>\000>\000>\000>\000>\000>\000>\000>\000>\000>\000>\000>\000=\000=\000=\000=\000=\000<\000;\000;\000;\000;\000;\000;\000:\0009\0008\0007\0006\0005\0005\0005\0005\0005\0005\0005\0004\0004\0004\0004\0003\0002\0002\0001\0001\0000\0000\000/\000/\000.\000.\000-\000-\000,\000,\000+\000+\000*\000*\000)\000)\000(\000(\000'\000'\000&\000&\000%\000%\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000$\000#\000#\000#\000\"\000\"\000\"\000\"\000!\000!\000!\000!\000!\000 \000\031\000\031\000\031\000\030\000\030\000\029\000\028\000\027\000\027\000\027\000\027\000\026\000\026\000\026\000\025\000\025\000\024\000\024\000\024\000\023\000\023\000\023\000\022\000\022\000\022\000\022\000\022\000\022\000\022\000\021\000\021\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\018\000\018\000\018\000\018\000\018\000\018\000\018\000\017\000\017\000\017\000\017\000\017\000\017\000\017\000\016\000\016\000\016\000\016\000\016\000\015\000\015\000\014\000\013\000\013\000\013\000\013\000\013")
   
   let goto =
-    ((16, "\000\183\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\021\000\000\000\135\001\148\000\000\000\137\000Y\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004v\000\000\005z\000\137\000Y\000\000\000\000\000\000\000\000\000\000\000\000\t*\000\023\006B\000\000\000\000\000\000\0014\000\000\000_\000\000\000\000\000K\016\164\000\000\000\000\000L\000\000\000\014\000\000\011\168\021\006$\250%\222$\250\006\160&\152\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011Z%\222\000\000\000\000\013P\000\000\016\216\000\000\017\226\000\000\000\000\000\000\000\000\000\166\000\000\000\218\000\000\000\000\002\136\000\000\015\202\000\000\000\000\000\000\000\000\000\000\000\000\000\000\n\132\000\000\000\000\027t\000\000&\158\000\000/J\000\0001\192\000\0007\130\000\0007\142\000\0007\154\000\0008\030\000\0008>\000\000+\206\000\000(8\000\000\000\000\000\000\000\000\000\0008J\000\0008t\000\0008\132\000\000\019\144\000\000\000\000\0312\000\000\000[\000Y\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000N\0004\000\000\000\003\000\000\000\000%~\000\0002j\000\000\000\000\000\000\000\246\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\192\000\000\000\000\000\000\000\000\000\000\000\000\014\248&\152\000\000\020\004\000\000\0234\024\020\000\000\000\000\000\000\001,\000\000!\138\000\000\000\0002\136\000\000\000\000\000\000\001\194\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0006\222\000\0007T\000\000\000\000\000\000\000\000\000\209\000\000\000\0003\024\000\000\000\000\000\000\008\190\000\015\000\000\000\000\000\000\000\000\000\000\000\000\012\224\000\000\013f\000\000\023\230\000\000\028\210\000\000 \192\000\000!P\000\000!\196\000\000#|\000\000&X\000\000-d\000\000+\210\000\000\002\182\000\0002\206\000\0004(\000\0008\130\000\000\000\000\000\000\000\000\000\000\000#3d\000\000\001\194\000\000\000\000\000W\003\178\000\000\0038\000\000\000\000\000\000\000\016\000\000\000\000\000\000'\030\000\000\000\000\000\000\000\000\000\000'~\000\000\000\000\000\000\000\000\000\000\000\000\003\178\000\000\000\000\000\000\000,\000\000\000\000\000\000\000\234\000\000\000\000\007\212\000\137\000\000\000\000\002\004\004\220\000\000\000\000\000\000\000\000\000\000\003<\000\000\013`\000\000\014,\000\000\000\000\004.\000\000\000\000\000\000\000\000\000\000\000\000\015\190\000\000\000\000\000\000\003.\000\000\000\000\000\000\000\000\006l\024\180\000\000\002\228\000\000\000\000\000T\004\252\000\000\000\000\000\000\000\000\014\252\000\000\000\000\000\000\000\000\000\000\000\000\002\138\005N\000\000\008\210\000\000\000\000\000\000\003J\000\000\012z\0005\000\000\020\210\000\000\000\000\000\000\014\148\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0003\238\000\000\030\170\000\0004\016\000\000\000\000\0004\000\000\007b\000\000\003\208$6'\162\000\000\000\000\000\000\000\019\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005\000'\162\000\000\011\198\000\000\012.\017\150\000\000\000\000\000\000\004\132\000\000\".\000\000\000\00042\000\000\000\000\000\000\005\190\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0007`\000\0007d\000\000\000\000\000\000\004\022\000\000\000\000\000\000\000\000\000\000\000\000\008\\\000\000\020\188\000\000%L\000\000*\004\000\000*\154\000\000,d\000\000,\238\000\000-N\000\000.\128\000\0000d\000\000,\154\000\000\000\152\000\0002\176\000\0008\176\000\0009\022\000\000(2\000\000\000\000\000\0004\154\000\000\000\000\000\000\000\007\000\0004\178\000\000\000\000\000\0005$\000\000\000\000\003\200\000\000\024\160\000`\000\132\000\000\002Z\000\000\013:\002\"\007\244\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0005H\000\000 \230%\194\005\202\000\000\000\000\000\000,\198\000\000,\222\000\000-^\000\000( )\006\002`\000\213\006`\000\000\000\000\000\000\000\157\000\000\000\000\004\012\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0005\140\000\000\000\000\000\000\000\000\000\000\"\250\000\000)\030\000\000\000\000\000\000\000\000\000\000\000\000\014\006\000\000\004\142\000\000\000\000\000\000\000\000\006v\003\024\000\000\029T\000\000\000\000\000\000\001\014\000\000\000\000-\130\003\168\000\000\0082-\128\000\000\000\000)\152\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016j)\152\000\000\018\022\000\000\018Z\023\240\000\000\000\000\000\000\006\138\000\000#B\000\000\000\0005\194\000\000\000\000\000\000\006\240\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000* \000\000\007\222\000\000\000\0005\216\000\0006@\000\000\000\000\003\018\t\178\000\000\000\000.,\000\000\000\000\000\000\006\242\000\000\020\020\000\000\000\000\025\178\000\000\000\000\000\000\008\128\000\000\011\132\000\000\019>\000\000\0252\000\000\031\018\000\000!n\000\0008\002\000\0008\138\000\00092\000\0009>\000\0009b\000\0009\128\000\0009\178\000\000\000\000\000\000\000\000\000\000\000\000\024\002\000\000\004\020\000\000\025x\"\004\000\000\025\142\000\000\000\000\000\000\000\000\000\000\000\000\"\236\000\000\000\000\000\000\000\000\000\000\000\000\002\\\000\000\000\000\000\000\000\000\000\000\000\000\004\254\000\000\000\000#,\000\000\000\000\000\000.N\000\000\000\000\000\180\000\000\000\000\000\000$l\000\000\000\000\000\000\000\000.l\000\000\000\000\000\000\000\000\000\204\002\178\000\000/\016\000\000\000\000\000\000\000\000\025X\002\234\000\000\026,\000\000\000\000\003^\000\000/(\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005\150\000\000\000\000&\202\000\000\000\000\000\000/\210\000\000\000\000\005&\000\000\000\000\014\128\000\000\026\166\000\000\000\000#\208\000\000\000\000\000\000\000W\000\000\000\000)\138\000\000\000\000\000\000\000\000/\212\000\000\000\000\000\000\000\000\003t\008r\000\000/\244\000\000\000\000\000\000\000\000\000\000\000\000\015L\000\000\000\000\006X\000\000\015\222\000\000\000W\000\000\000\000\005,+P\000\000\006v\000\000\000\000\000\000\000\000\004\022\000\000*L\000\000\027&\004\128\027\232\000\000\004\252\000\000\016\148\000\000\017`\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\150\028h\001j\028\232\000\000\000\000\000\000\006\240\000\000\017\218\000\000\006\194\000\000\000\000\000W\000\196\030*\000\000\001\240\000\000\018\164\030\164\000\000\000\000\019f\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\216\008\170\000\000\007\140\000\000\000\000\000\000\000\000\006j\000\000\0200\000\000\000\000\000\000 \2246v\000\000\000\000\000\000 f\000\000\000\000\000\000\000\000\013\008\005\206\000\000\000\0000 \000\000\000\000\000\000\000\000\005\244\000\000\000\000)\176\000\000\000\000\000\0000\176\000\000\000\000\001\246\000\000\000\0000\216\000\000\000\000\005\228\006\236\000\000\000\0001z\000\000\000\000\007\154!F\000\000\007\022\000\000\000\0001\156\000\000\000\000\000\000\000\000\000\000\000\000\007>\000\000\000\0003|\000\000\000\000\000\0001\190\000\000\000\000\000\000\000\000\000\000#\230\000\000\000\000\000\000\004\200\000\000\000\000\000\0001\196\000\000\000\000\006\024\008\146\000\000\000\0002>\000\000\000\000\007\190\000\000\000\000\000\000\000\000\004\022\004\216\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\198\000\000\020\172\000\000\000\000\000\0006\150\000\000\tv\000\000\000\000\000\000\004\174\000\000\000\000\005\172\021v\000\000\022.\000\000\000\000\000\000\006\132\000\000\018J\0072\023>\000\000\025\166\000\000\000\000\000\000\007\194\000\000*d\007\200+8\000\000+\162\000\000\000\000\000\000\007\208\000\000\028|\007\248\000\000\000\000\021f\003^\008 \021\224\000\000'\198\000\000\000\000\000\000\008B\000\000\030\184\008V\000\000\000\000\000\000\001\132\000\000\000\000\000\000\000\000\000\000\001\178\000\000\000\000\002\154\000\000\000;\000\000\000\000\000\000\002\246\000\000\000\000\000\000\000\000\000/\000\000\006l\002\216\001\176\000\000\000\000\002\204\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002|\001\214\000\000\000\000\004\008\000\000\000\000\000\000\006F\000\000\000\000\012B\012\164\000\000\000\000\000\000\000\000\014\170\014\214\000\025\000\000\015\196\000\000\000\000\000\000\000\000\000\000\000\000\004L\000\000\000\000\002f\000\000\000\000\003\198\000\000\000\000\tX\000\000\000\000\000\004\000\000\007\220\004\194\000\170\000\000\000\000\0007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\011\226\018\240\000\000\000\000\000\000\000\000\013\222\000\000\000\000\018\150\000\000\000\000\000\000\018\252\000\000\000\000\002z\019(\000\162\000\000\020\180\000\000\000\000\000\000\000\000\000\000\000\000\006R\000\000\008l\002\236\000\022\000\000\000\000\000\000\000\000\006\202\000\000\000\000\000\000\000\000\000\000\000\000\0088\000\000\000\000\005\144\000\000\008\128\004\196\000\184\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\250\000\000\000\000\018\226\020\204\000\000\000\000\000\000\000\000\0024\000\000\002\246\000\000\011\128\000\000\000\000\000\000\000\000\000\000\000\000\000r\012P\000\000\000\000\012Z\000\000\000\000\000\000\000\000\000'\000\000\013\198\000\000\000\000\000\000\000\000\004\198\000\000\000\000\000\000\003\216\000\000\000\000\001\024\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\222\005\214\000\000\000\000\000\000\012\184\000\000\000\000\021\178\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003n\000\000\000\000\000\000\000\000\000\000\000!\005\156\000\137\006\014\t&\004\028\000\000\000\000\003|\005\008\007\240\008*\000\000\000\000\000\000\000\000\000\000\000\000\023\132\000\000\000\000\000\000\000\000\018\178\003|\031$\007f\000\000\000\000\008\228\000\000\023\002\000\000\000\000\008\156\000\000\000\000\000\000\007\172\000\000\004\194\000\000\007\162\014`\000\000\000\000\000\000\000\000\003<\000\000\004.\000\000\007\196\000\000\000\000\012L\000\000\000\000\000\000\000\000\t\240\000\000\000\000\003|\t\130\000\000\023\186\000\000\000W\004\186\000\000\000\000\000\000\000\000\000\000\000\143\000\000\000\000\000\000\000\000\000\0002T\008\176\000\000\003x\000\000\000\000\000\000\000\000\000\000\001\162\000\000\nl\007n\0118\000\000\003d\011\248\000\000\tr\000\000\003\222\000\000\004Z\000\000\005\160\000\000\000\000\000\000\000\000\000\000\008\222\000\000\006\028\000\000\t\128\000\000\006\150\000\000\000W\005\252\000\000\000#\000\000\006\002\005\022\000\000\001,\000\000\008\228\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\\\000\000\t~\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005`\005F\002p\006\136\000\000\006\190\000\000\000\000\008V\t\138\000\000\005\178\000\000\000\000\000\000\000\000\006\184\000\000\000\000\000\000\000\000\000\000\006\204\0080\t\"\006\236\007&\000\000\000\000\002L\000\000\000\000\000\000\000\000\007\250\000\000\000\000"), (16, "\001\175\001\198\005i\005j\002\\\000\n\0052\001\175\001\196\004J\002\008\002\t\0053\0006\000-\004M\004\144\002\238\0054\0056\003\007\000\017\004\177\000\199\000Y\000\222\004K\000\236\000n\000\t\004N\004Z\004K\004\142\000[\005\177\004N\004Z\002,\004\178\004\181\004Z\004\137\005\178\003\008\000\016\001\177\004t\004Z\0006\001\178\000[\000\005\001\177\000Y\005n\004\185\001\178\0011\004\135\001 \004\138\004Z\000\017\001\175\001\198\002.\000[\000[\000-\000\201\004\186\000-\000\\\000\202\000\008\000\t\000]\000-\002\008\002\t\000'\002T\003U\003=\001\026\0047\000-\005>\004[\002-\000\237\001\175\001\196\001\"\004[\004\196\000\227\000[\004[\000\215\000f\001i\000\\\000\151\000&\004[\000]\003\008\005?\001\177\0014\005\022\004\197\001\178\000\165\004\200\004Z\002-\001\028\004[\001\136\0007\000'\000\239\000Y\0007\003\250\004\141\000b\003*\000f\000-\003v\002C\004\141\000[\002\\\001\177\000-\004\171\004Z\001\178\0006\001\191\004\142\004\233\001\128\000\167\002H\002\238\001\191\004\142\002I\0019\003\015\005A\001\192\001m\003\132\001\138\001\203\002\251\001\021\001\192\005B\005\\\005\200\0017\000[\005]\001:\003/\004\002\000\\\004[\004\236\0006\000]\004\187\000\216\000g\002\\\0006\000-\0003\002M\0002\000\237\0033\003\030\005_\001,\003\128\004\\\0006\002\011\003#\002C\004[\000\157\005a\000f\0035\001\207\000h\000\230\004\246\001\191\000\166\0006\000g\000\166\002H\0004\0015\003i\002I\0019\003\015\005\165\001\192\003\134\003c\001\208\001\175\001\198\000\149\000\240\001\209\003\016\001\197\000-\001\210\003Q\000h\001\191\005x\001\211\000-\000\199\004\190\000\220\0054\005y\003\007\005\002\005\003\000\241\001\192\002M\001%\000_\000\242\003>\000\157\003]\000\243\000\157\0007\004Q\003#\000\244\002\239\000\157\003t\005\007\0035\001\207\003\008\004\004\001\177\000\166\000\157\004\228\001\178\000\163\004b\004`\000\149\005\139\004\239\000g\003v\000[\0006\0007\000\201\001\208\001\175\001\198\000\202\000\176\001\209\004c\004Z\001\235\001\210\000\152\000\153\000\155\000\156\001\211\000-\0007\002\244\000h\002T\003U\003=\004<\002\238\000-\004\145\002\008\002\t\001\208\000\215\000\157\000\204\004\203\004\196\002\248\005\022\0019\000\157\000\162\001\026\000\163\005\140\001\211\000\135\001>\003\008\004R\001\177\001;\000-\004\197\001\178\000Y\004\200\004Z\003y\000d\005\208\004=\001b\000-\002\220\002]\005\172\000j\004[\005\209\004\128\000\136\003k\004\177\002C\000\137\001\027\0006\000\199\0006\000\220\000l\002\222\000\168\001\191\000\157\001e\000\149\001h\002H\004\178\004\181\004Z\002I\0019\003\015\005\142\001\192\000Y\000[\003d\001\203\000b\001\021\000\\\005B\005\\\002\\\000]\000\213\005\144\005\008\000\216\003\004\004\231\004[\004\225\004T\001\\\003\249\0006\004\195\000[\003\005\002v\000\201\002M\002\143\004C\000\202\003\030\005\146\000f\000\157\001u\0007\000\163\003#\002C\002\239\000\157\005\148\000[\0035\001\207\0006\002\n\000\\\001\191\004\186\004[\000]\004\241\002H\004H\000\215\005\186\002I\0019\003\015\004U\001\192\004>\003f\001\208\001\175\001\198\000\149\002B\001\209\003\016\000[\002x\001\210\003Q\000f\002y\004f\001\211\000-\000\221\003\178\001z\0054\005~\003=\0007\000-\002/\0006\002M\004R\000\149\002\\\003>\005(\003]\004W\001|\002v\000\017\003#\002\143\000\149\000\157\003t\0006\0035\001\207\003\008\001]\001\177\000g\000\157\004\228\001\178\000\163\0036\000-\001\175\001\245\004\229\0022\0023\0025\005\136\001\175\001\198\001\208\0007\001 \005r\002\221\001\209\005s\000\216\000h\001\210\000\157\004~\000-\000\163\001\211\002B\0054\005~\003=\002x\003\244\000\157\004\228\002y\000\163\002v\0007\000g\002\143\004\192\004\210\005\024\000'\000i\005\025\000[\001!\001\177\005\199\001^\002\134\001\178\003\008\002\210\001\177\004e\005\021\002\252\001\178\002\162\001}\000h\005\029\002\135\000j\001\012\002V\005w\005\131\000\146\001\175\001\198\004c\004Z\003\000\0006\001|\000-\000l\002B\001W\002C\001f\002x\000-\000\241\000\135\002y\0054\005~\003=\001\191\0006\002\008\002\t\004}\002H\0007\000-\000\244\002I\0019\003\015\005\132\001\192\004\253\004\254\000j\003W\000\166\003\247\000\136\005B\005\\\003\008\000\137\001\177\002K\0016\005\022\001\178\000l\001\026\005,\005\022\002\134\002\194\002\215\002\197\004\131\005\133\004[\002\165\002M\002\162\0006\000-\003>\002\135\005\134\000\149\001]\002C\003\t\003#\001\191\002\166\000\157\003(\000-\0035\001\207\001\191\001\175\001\195\000\157\001\206\002H\001\192\002\200\003\013\002I\0019\003\015\005\132\001\192\004\147\004\205\004\249\002\238\003W\001\208\005#\005B\005\\\005(\001\209\002\238\002K\002\134\001\210\003\029\002\201\001\021\002/\001\211\000\157\001\031\002\162\000\163\005S\003\005\002\135\005g\002M\0006\0006\000[\003>\001\177\005\134\001S\001G\001\178\002C\003#\000-\002\165\000\157\003(\002P\0035\001\207\002\203\001\191\003\245\001H\000\149\0021\002H\001 \002\166\0015\002I\0019\003\015\005\132\001\192\000-\000/\001s\0002\001\208\001\175\001\198\005B\005\\\001\209\000\149\003\247\002K\001\210\004>\004\005\001\180\000-\001\211\000-\004\199\005!\003_\0054\005~\003=\001\"\002\209\002M\003L\0004\004\251\003>\002\165\005\134\000\157\004~\004\197\000\163\003#\004\200\004Z\000\157\003(\0006\0035\001\207\002\166\0019\003\008\0007\001\177\004\129\000-\003*\001\178\000\157\001\029\0007\000\163\005K\0019\003*\003N\0006\005\135\001\208\001\175\001\198\001\191\0006\001\209\0006\001I\000-\001\210\0007\0007\005!\000-\001\211\000-\001\192\003\184\003Z\0054\005~\003=\005V\005\150\005W\0006\005N\005+\000\157\005O\003\222\000\163\005\154\004[\000-\000/\0000\0002\003\222\001Q\003C\000\157\001R\003\228\000\163\003\008\004\004\001\177\004b\003\143\003\005\001\178\000\149\004\180\005\173\000-\001j\002\227\001c\003\005\000-\005\143\001\175\001\198\0004\004c\004Z\000\199\004\012\000\222\004\178\004\181\004Z\002C\0019\005\179\000-\005\019\005\180\0006\0054\005~\003=\001\191\004\014\0004\001;\0007\002H\005\185\002[\005\"\002I\0019\003\015\005\132\001\192\001b\000\157\001w\0006\000\163\005.\005%\005B\005\\\003\008\001\189\001\177\002K\004X\000[\001\178\002\028\000\201\0007\005\184\004\189\000\202\005\194\000\157\001e\005\147\001h\004[\002M\003i\000\166\003L\003>\004[\005\134\004\186\003\019\0007\002C\003#\000\157\005\020\000\157\003(\000\227\0035\001\207\000\215\001\191\004Y\003q\005\"\0006\002H\0006\0006\000\166\002I\0019\003\015\005\132\001\192\005-\005%\003\160\003M\001\208\001\175\001\198\005B\005\\\001\209\003q\0006\002K\001\210\000\157\0019\0058\004\015\001\211\000-\003\137\003\168\003s\002T\003U\003=\003\005\001;\002M\002+\005{\0006\003>\004\014\005\134\000\157\0019\002C\001b\003#\000\157\0019\000\157\003(\003r\0035\001\207\001\191\001;\003\008\002{\001\177\002H\002\224\003\139\001\178\002I\0019\003\015\005\132\001\192\000\157\001e\005\196\001h\000\216\001\208\002v\005B\005\\\002\143\001\209\005\137\002K\004i\001\210\000-\000\228\001\175\001\198\001\211\004\187\000\157\001e\001l\001h\000[\000\157\002\236\002M\002\250\000\230\000-\003>\005(\005\134\002T\003U\003=\0007\003#\002\132\002\159\000\157\003(\004\022\0035\001\207\003n\002v\003\137\000[\002\139\000\240\005\201\002x\003\234\005\204\005\205\002y\0007\004\024\003\008\005(\001\177\005\213\000\000\001\208\001\178\001N\001\175\001\196\001\209\000\241\003\234\004\196\001\210\004\148\000\242\002C\0007\001\211\000\243\001H\003\138\003\185\000\000\000\244\002v\001\191\003\236\002\143\004\197\000[\002H\004\200\004Z\002x\002I\0019\003\015\002y\001\192\003\253\003c\000\000\003\194\005P\003\235\001\175\001\198\003\016\002\\\004\149\000[\002K\001\177\004\025\004 \000\199\001\178\000\222\004#\000-\005R\0006\003\204\002T\003U\003=\000\000\002M\000[\004\024\004\"\003>\002x\003]\004\"\005D\002y\0006\003#\000-\004&\000\157\003(\005;\0035\001\207\004\193\002\134\002C\003\008\004[\001\177\0019\003\005\004\206\001\178\004\024\005\202\001\191\000[\002\135\004/\000\201\002H\001I\001\208\000\202\002I\0019\003\015\001\209\001\192\003a\003c\001\210\005\189\005*\0041\0042\001\211\003\016\000-\004\194\000-\002K\005!\001q\0045\005\165\002\134\004\207\001T\000\215\001_\0041\005Q\001Q\000\000\000\157\001R\002M\000\163\002\135\004\024\003>\005)\003]\001\175\001\198\005@\001\191\003#\005Q\0004\000\157\003(\004\134\0035\001\207\005p\000\000\000-\005^\001\192\005{\002T\003U\003=\002\134\002\144\0007\005{\003\005\004\135\000\000\004\138\004Z\002v\001\208\002C\002\143\002\135\005\141\001\209\005\188\005\198\0007\001\210\005\165\001\191\000\000\003\008\001\211\001\177\002H\000\000\004\208\001\178\002I\0019\003\015\004\142\001\192\003\136\003c\005\165\005\129\005\199\001\175\001\198\005\020\003\016\000\216\005\145\000\000\002K\0037\005\203\000\000\000\149\005\020\002B\000-\000\000\000\000\002x\002T\003U\003=\002y\001\208\002M\003\229\003;\004[\003>\004\196\003]\000\238\000\000\000\000\000\000\003#\005\020\001\213\000\157\003(\000\000\0035\001\207\002\165\000\000\003\008\004\197\001\177\000\000\004\200\004Z\001\178\005\166\000\240\005\"\000\000\0019\002\168\000\157\001y\000\000\000\163\001\208\001\175\001\198\005$\005%\001\209\001;\000\000\000\000\001\210\000\000\000\241\002C\000Y\001\211\000-\000\242\000n\005\198\0054\000\243\003\007\001\191\000\000\000\000\000\244\000\000\002H\000\000\000\000\000\000\002I\0019\003\015\000\000\001\192\004\001\003c\000\157\000\000\000\157\001e\000\000\001h\003\016\003\008\004[\001\177\002K\000\000\005\168\001\178\002\134\002\194\002\195\002\197\000\000\000[\000\000\000\000\000\000\002\162\000\\\005\138\002M\002\135\000]\005\170\003>\000\000\003]\000\000\004\150\002C\000\000\003#\000\000\000\000\000\157\003(\000\000\0035\001\207\001\191\000\000\000\000\002\200\000\000\002H\000\000\000f\000\000\002I\0019\003\015\000\000\001\192\005Z\003c\000\000\000\000\000\000\001\208\001\175\001\198\003\016\000\000\001\209\000\000\002K\000\000\001\210\000\000\000\000\000\000\000\000\001\211\000-\000\000\000\000\000Y\0054\000\000\003\007\000\182\002M\000\000\000\000\000\000\003>\000\000\003]\000\000\000\000\002\165\002C\003#\000\000\000\000\000\157\003(\002v\0035\001\207\002\143\001\191\000\000\003\008\002\166\001\177\002H\000\000\004\213\001\178\002I\0019\003\015\005}\001\192\000\199\000\000\001+\004\196\001\208\000[\005|\005B\005\\\001\209\000\\\000g\005\128\001\210\000]\001\175\001\194\000\000\001\211\000\000\004\197\000\000\000\000\004\200\004Z\000\000\000[\000\000\002M\000\000\002x\000\000\003\030\005\130\002y\000h\000\000\000\000\000f\003#\001\175\001\198\000\157\003(\000[\0035\001\207\000\201\000\000\000\000\000\000\000\202\000\000\004\134\000-\000\000\000\000\000\000\0054\000[\003\007\001\177\000\000\000\000\000\000\001\178\001\208\001\175\001\193\000\000\004\135\001\209\004\138\004Z\000\000\001\210\000\000\000\215\002C\000\000\001\211\000j\004[\000\000\003\008\000\000\001\177\000\000\001\191\000\000\001\178\000\000\000\000\002H\000\000\000o\000-\002I\0019\003\015\005}\001\192\005\127\004b\000\000\001\175\001\198\004\196\000\000\005B\005\\\000[\004\196\001\177\005\128\000\000\000\000\001\178\000g\000-\004c\004Z\000\000\002T\004\197\003\007\002\134\004\200\004Z\004\197\002M\004[\004\200\004Z\003\030\005\130\000\199\000\000\000\222\002\135\000\000\003#\000h\000\000\000\157\003(\000\000\0035\001\207\003\008\005S\001\177\004b\000\000\000\000\001\178\000\199\000\216\000\220\001\191\000\000\000\000\000\000\000\000\000\000\000\000\005\013\000\000\001\208\004c\004Z\000\000\001\192\001\209\002C\000\000\000\000\001\210\000\000\004[\000[\004\007\001\211\000\201\001\191\003\131\004[\000\202\004\226\002H\000-\004[\000\000\002I\0019\003\015\005}\001\192\000\000\000\000\000[\001\175\001\198\000\201\000\000\005B\005\\\000\202\002\165\000\000\005\128\001\191\000Y\000\215\000\000\000-\000\179\000\000\000\000\002T\003\159\003\007\002\170\000\199\001\192\000\220\002M\000\000\004[\000\000\003\030\005\130\000\000\000\215\000-\000\000\0019\003#\004\156\002C\000\157\003(\000\000\0035\001\207\003\008\000\000\001\177\005K\001\191\000\000\001\178\000\000\000\000\002H\000\000\000[\000\000\002I\0019\003\015\000\\\001\192\000\000\001\208\000]\000\000\000[\000\000\001\209\000\201\003\016\000\000\001\210\000\202\003x\005U\003\129\001\211\000\000\005N\003\131\000\157\005O\000\000\000\163\000\000\001N\004o\000f\000\000\002M\004\234\000\216\004\196\003\030\003z\004\237\000\000\000\000\000\215\001H\003#\001\175\001\198\000\157\003(\004\134\0035\001\207\002R\004\197\000\000\000\216\004\200\004Z\000\000\000-\000\000\005\014\000\000\002T\003\002\003\007\004\135\000\000\004\138\004Z\000\000\001\208\0019\000\000\000\000\000\000\001\209\002C\000-\004m\001\210\000\000\000\000\000\240\003\165\001\211\000\000\001\191\000\000\003\008\000\000\001\177\002H\005\017\000\000\001\178\002I\0019\003\015\000\000\001\192\000\000\000\000\000\241\000-\000\000\001\175\001\198\000\242\003\016\000\000\000g\000\243\003x\003 \004[\0019\000\244\000\157\003\177\000-\003\183\000\216\000\241\002T\003!\003=\004[\001I\002M\000-\001N\000\000\003\030\003z\000h\000\000\000\246\000\000\000\000\003#\000\000\000\000\000\157\003(\001H\0035\001\207\000\000\000\000\003\008\000\000\001\177\004b\000\000\001T\001\178\001U\005J\000\000\001Q\000\000\000\157\001R\000\000\000\163\000\199\001\208\000\219\000\000\004c\004Z\001\209\000\000\000\000\004b\001\210\000\000\000\000\002C\000\000\001\211\000-\000/\001o\0002\000\000\000\000\000\000\001\191\000\241\000\000\004c\004Z\002H\000\000\000\000\000\000\002I\0019\003\015\000\000\001\192\000\000\000\248\000\000\000\000\000\000\001\175\001\198\000[\003\016\0004\000\201\000\000\003B\003@\000\202\0019\000\000\000\000\004\244\000-\000\000\000\000\000\000\002T\003!\003=\004[\001I\002M\000\000\000\000\004\159\003\030\003D\000\000\000\000\000\000\002C\000\000\003#\000\215\0019\000\157\003F\000\000\0035\001\207\001\191\004[\003\008\000\000\001\177\002H\005K\001P\001\178\002I\0019\003\015\001Q\001\192\000\157\001R\000\000\000\163\000\000\001\208\000\149\000Y\003\016\000\000\001\209\000d\002K\000\000\001\210\000-\000\000\001\175\001\198\001\211\000\000\000\000\000\000\000\000\005N\003E\000\157\005O\002M\000\163\004b\000-\003>\000\000\003?\002T\003!\003=\000\000\003#\000\000\000\000\000\157\003(\000\000\0035\001\207\004c\004Z\000\000\000\000\000[\000\157\001\134\000\000\000\163\000\\\000\000\0019\000\216\000]\003\008\000\000\001\177\000\000\000\000\001\208\001\178\001N\000\000\001;\001\209\000\000\000\000\004z\001\210\000\000\000\000\002C\000\000\001\211\001b\001H\000\000\000f\000\000\000\000\002v\001\191\000\000\002\138\000\000\000\000\002H\000\000\000\000\004x\002I\0019\003\015\000\000\001\192\000\000\000\000\000\157\001e\004[\001h\001\175\001\198\003\016\000\000\000\000\000\000\002K\000\000\000Y\000\000\000\000\000\000\000b\000\000\000-\000\000\000\000\000\000\002T\003U\003=\000\000\002M\000[\000\000\000\000\003>\002x\003?\000\000\000\000\002y\000\000\003#\000Y\000\000\000\157\003(\000\178\0035\001\207\000\000\000\000\002C\003\008\000\000\001\177\0019\000\000\000\000\001\178\000\000\000[\001\191\000\000\000\000\000g\000\\\002H\001I\001\208\000]\002I\0019\003\015\001\209\001\192\000\000\000\000\001\210\000\000\0012\000\000\000\000\001\211\003\016\000\000\000\000\000[\002K\000h\000\000\000\000\000\\\000\000\000f\001T\000]\001Z\000\000\000\000\001Q\000\000\000\157\001R\002M\000\163\000\000\000\000\003>\000\000\003?\001\175\001\198\000\000\000i\003#\004v\000\000\000\157\003(\000f\0035\001\207\000\000\000\000\000-\000\000\000\000\000\000\002T\003U\003=\002\134\000\000\000\000\000j\000\000\000\000\001\175\001\176\000k\000\000\001\208\002C\000\000\002\135\000\000\001\209\000\000\000l\000\000\001\210\000\000\001\191\000\000\003\008\001\211\001\177\002H\000\000\000\000\001\178\002I\0019\003\015\000\000\001\192\000\000\003\\\000\000\000\000\000\000\001\175\001\198\000g\003\016\000Y\000\000\000\000\002K\000Z\000\000\000[\000\000\001\177\000\000\000-\000\000\001\178\000\000\002T\003U\003=\000\134\000\000\002M\000\000\000\000\000h\003>\000g\003]\002v\000\000\000\000\002\137\003#\000\000\000\000\000\157\003(\000\000\0035\001\207\000\000\000\000\003\008\000\000\001\177\000\000\000[\000\000\001\178\000\135\000h\000\\\000\000\000\000\000\199\000]\000\222\000\000\000\000\001\208\000\000\000\000\002v\000\000\001\209\002\136\000\000\000\000\001\210\000\000\000j\002C\000[\001\211\000\136\000\000\002x\000\000\000\137\000f\002y\001\191\000\000\000\000\000l\000\000\002H\000\000\000\000\000\000\002I\0019\003\015\000\000\001\192\000\000\003^\000\000\000[\001\175\001\198\000\201\000\000\003\016\000\000\000\202\000[\002K\001\191\000\000\002x\000\000\000\000\000-\002y\000\000\004\134\002T\003{\003=\000-\001\192\000\000\002M\005!\000\000\000\000\003>\000\000\003]\000\000\000\215\002C\004\135\003#\004\138\004Z\000\157\003(\000\000\0035\001\207\001\191\003\008\000\000\001\177\000\000\002H\000\000\001\178\002[\002I\0019\003\015\004\134\001\192\000\000\003p\000\000\000g\000\000\001\208\000\000\004b\003\016\000\000\001\209\000\000\002K\004b\001\210\004\135\002\134\004\138\004Z\001\211\002v\003}\000\000\002\143\004c\004Z\000\000\000h\002M\002\135\004c\004Z\003>\000\000\003]\004b\000\000\000\000\004[\003#\001\175\001\198\000\157\003(\000\000\0035\001\207\000\000\000\000\000\000\002\134\000\000\004c\004Z\000-\000\216\000\000\000\000\002T\003{\003=\000Y\000\000\002\135\000[\000d\001\208\000\000\002x\000\000\000\000\001\209\002y\000\000\000\000\001\210\004[\002C\000\000\000\000\001\211\004\017\000\000\004[\003\008\000\000\001\177\001\191\000\000\004[\001\178\000\000\002H\000\000\000\000\000\000\002I\0019\003\015\000\000\001\192\000\000\000\000\000\240\0019\000[\000\000\000\000\000\000\003\016\000\\\004[\000\000\002K\000]\005$\0055\000\000\003\127\000\199\000\000\000\218\000\000\000\241\000\000\000\000\000\000\002v\000\242\002M\002\143\000\000\000\243\003>\000\000\003~\000\000\000\244\000f\000\000\003#\001\175\001\198\000\157\003(\004\162\0035\001\207\000\000\003\145\000\157\002\236\000\000\002\250\000\000\000-\000\000\000\000\000\000\002T\003!\003=\000\000\000[\002\134\000\000\000\201\001\208\000\000\000\000\000\202\002B\001\209\000\000\002C\002x\001\210\002\135\000\000\002y\000\000\001\211\000\000\004\219\001\191\003\008\000\000\001\177\000\000\002H\000\000\001\178\004\154\002I\0019\003\015\000\215\001\192\004\166\000\000\000\000\000\000\000\000\001\175\001\198\000\000\003\016\000\000\000\000\000\000\002K\001\175\001\196\000\000\000\000\000\000\000\000\000-\000g\000\000\004\175\002T\000\000\003\007\000\000\000\000\002M\000\000\000\000\000\000\003>\000\000\003~\004b\000\000\000\000\000-\003#\000\000\000\000\000\157\003(\000h\0035\001\207\004b\002\165\003\008\000Y\001\177\004c\004Z\000b\001\178\000\000\000[\000\000\001\177\000\000\000\000\002\172\001\178\004c\004Z\001\208\000\000\000\000\000i\000\000\001\209\000\000\002\134\000\000\001\210\002\161\002C\000\216\000\000\001\211\003\251\002\162\000\000\000\000\003\131\002\135\001\191\000\000\000\000\000j\001N\002H\000\000\000[\000\145\002I\0019\003\015\000\\\001\192\000\000\000\000\000]\000l\001H\001\175\001\198\000\000\003\016\000\000\004[\000-\002K\000\000\000\000\002T\000\000\000\000\000\000\000-\000\000\000\000\004[\002T\000\000\003\007\000f\000\000\002M\000\000\000\000\000\000\003>\000\000\003?\000\199\000\000\000\222\002C\003#\000\000\004)\000\157\003(\000\000\0035\001\207\001&\001\191\003\008\000\000\001\177\000\000\002H\002\165\001\178\001\191\002I\0019\003\015\000\000\001\192\000\000\000\000\000\000\005\016\001\208\000\000\002\166\001\192\003\016\001\209\000-\000\000\003x\001\210\002T\0019\000\000\000[\001\211\004\t\000\201\000\000\000\000\003\131\000\202\000\000\000\000\001I\002M\000\000\000\000\000\000\003\030\003z\000\000\001\175\001\198\000\000\000\000\003#\004)\000\000\000\157\003(\000g\0035\001\207\000\000\000\000\000-\000\215\000\000\000\000\002T\001T\003\007\001\130\004\173\000\000\001Q\000\000\000\157\001R\001\023\000\163\000\000\001\208\000\000\000h\004\217\000\000\001\209\000\000\000\000\001\208\001\210\000\000\002C\000\000\003\008\001\211\001\177\000\000\000\000\000\000\001\178\000\000\001\191\001\215\0019\003\015\000\000\002H\000\135\000\000\000\000\002I\0019\003\015\000\000\001\192\003\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\016\000\000\004\011\000\000\003x\000j\003\131\000\000\000\000\000\136\000\000\000\000\000\000\000\137\000\000\000\000\004*\000\000\000\000\000l\002M\000\216\000\000\003#\003\030\003z\000\157\003(\000\000\0035\000\000\003#\001\175\001\198\000\157\003(\000\000\0035\001\207\000\000\005=\0019\003\015\000\000\000\000\000\000\000-\005\014\000\000\000\000\002T\003!\003=\003\016\000\000\000\000\000\000\000\199\001\208\000\217\002C\000\000\000\199\001\209\000\222\000\000\000\000\001\210\000\000\000\240\001\191\000\000\001\211\000\000\000\000\002H\003\008\004,\001\177\002I\0019\003\015\001\178\001\192\003#\000\000\000\000\000\157\003(\000\241\0035\000\000\003\016\000\000\000\242\000\000\003x\002v\000\243\000\000\002\143\000[\000\000\000\244\000\201\000\000\000[\000\000\000\202\000\201\000\000\000\000\002M\000\202\000\000\000\000\003\030\003z\000\000\000\000\000\000\000\000\000\000\003#\001\175\001\198\000\157\003(\000\000\0035\001\207\000\000\005`\000\000\000\215\000\000\000\000\000\000\000-\000\215\000\000\002B\002T\003!\003=\002x\000\199\000\000\000\220\002y\001\208\002v\000\000\000\000\002w\001\209\000\000\000\000\000\000\001\210\002v\000\000\000\000\002\143\001\211\000\000\002C\000\000\003\008\000\199\001\177\000\200\000\000\000\000\001\178\000\000\001\191\000\000\000\000\000\000\000\000\002H\000\000\000\000\000\000\002I\0019\003\015\000\000\001\192\000[\000\000\000\000\000\201\000\000\000[\000\000\000\202\003\016\002x\000\000\000\000\002K\002y\002B\000\000\000\000\000\000\002x\000\000\000\000\000\000\002y\000[\000\216\000\000\000\201\000\000\002M\000\216\000\202\000\000\003>\000\215\003?\000\000\000\000\000\000\000\000\003#\000\000\000\000\000\157\003(\000\000\0035\001\207\000\000\003\140\001\175\001\198\002\134\002\194\0050\002\197\004\019\000\215\000\000\000\000\000\000\002\162\000\000\000\000\000-\002\135\000\000\001\208\002T\002C\003=\000\000\001\209\000\000\000-\001d\001\210\0002\000\240\001\191\000\000\001\211\000\000\000\000\002H\000\000\002\200\000\000\002I\0019\003\015\000\000\001\192\000\000\003\008\000\000\001\177\000\000\000\241\000\000\001\178\003\016\000\000\000\242\0004\002K\002\134\000\243\000\000\000\000\000\000\000\000\000\244\000\000\000\216\002\134\002\199\000\000\002\197\002\135\000\000\002M\000\000\002v\002\162\003>\002\143\003?\002\135\000\000\000\000\000\000\003#\000\000\002\165\000\157\003(\000\216\0035\001\207\000\000\000\000\001\175\001\198\000\000\000\000\000\000\000\000\002\166\002\200\000\000\000\000\000\000\003A\000\000\000\000\000-\000\000\002v\001\208\002T\002\143\003\007\000\000\001\209\000\000\000\000\000[\001\210\002v\000\000\002x\002\143\001\211\000\000\002y\000\000\000\000\000\000\000\000\000\000\000\199\000\241\000\222\002C\000\000\003\008\002v\001\177\000\000\002\143\000\000\001\178\000\000\001\191\000\000\000\250\002\165\000\000\002H\000\000\000\000\002B\002I\0019\003\015\002x\001\192\000\000\000\000\002y\002\166\000\000\002B\0019\000\000\003\016\002x\000\000\000\000\003\142\002y\000\000\000\000\000\000\000[\001;\000\000\000\201\000\000\000\000\002B\000\202\000\000\000\000\002x\002M\001b\000\000\002y\003>\000\000\003\144\000\000\000\000\000\000\000\000\003#\001\175\001\198\000\157\003(\000\000\0035\001\207\000\000\000\000\000\000\000\215\003\006\000\157\001e\000-\001h\000\000\000\000\002T\002\134\003\007\000\000\000\000\000\000\000\000\000\000\001\208\000\000\002C\000\000\000\000\001\209\002\135\000\000\000\000\001\210\000\000\000\000\001\191\000\000\001\211\000\000\000\000\002H\003\008\000\000\001\177\002I\0019\003\015\001\178\001\192\000\000\000\000\002\134\000\000\000\000\002\201\000\000\000\000\003\016\001\175\001\198\002\162\003\028\002\134\000\000\002\135\002\201\000\000\000\000\000\000\003\"\000\000\002\162\000-\000\000\000\000\002\135\002T\002M\003\007\000\000\002\134\003\030\003\031\002\164\000\000\002\203\000\000\000\216\003#\002\162\000\000\000\157\003(\002\135\0035\001\207\002\203\000\000\002\165\000\000\000\000\000\000\003\008\000\000\001\177\000\000\000\000\000\000\001\178\000\000\000\000\000\000\002\174\004\021\000\000\001\208\000\000\000\000\000\000\000\000\001\209\000\000\001\175\001\198\001\210\000\000\000\000\002\208\000\000\001\211\000\000\002C\000\000\002\165\000\000\000\240\000-\000\000\002\206\000\000\002T\001\191\003\007\000\000\002\165\000\000\002H\002\166\000\000\000\000\002I\0019\003\015\000\000\001\192\000\241\000\000\000\000\002\166\000\000\000\242\000Y\002\165\003\016\000\243\000n\003\008\003\028\001\177\000\244\000\000\000\000\001\178\000\000\000\000\000\000\002\166\000\000\000\000\000\000\000\000\000\000\000\000\002M\000\000\000\000\000\000\003\030\003\031\000\000\000\000\000\000\002C\000\000\003#\000\000\000\000\000\157\003(\000\000\0035\001\207\001\191\000\000\000\000\000[\000\000\002H\000\000\000\000\000\\\002I\0019\003\015\000]\001\192\000\000\000\000\000\000\001\175\001\198\001\208\000\000\000\000\003\016\000\000\001\209\000\000\003\028\000\000\001\210\000\000\000\000\000-\000\000\001\211\000\000\002T\000f\003\007\000\000\000\000\000\000\000\000\002M\000\000\000\000\000\000\003\030\003\031\000\000\000\000\000\000\000\000\000\000\003#\002C\000\000\000\157\003(\000\000\0035\001\207\003\008\000\000\001\177\001\191\000\000\000\000\001\178\000\000\002H\000\000\000\000\000\000\002I\0019\003\015\000\000\001\192\000\000\000\000\001\208\001\175\001\198\003`\000\000\001\209\003\016\000\000\000\000\001\210\003Y\000\199\000\000\000\222\001\211\000-\000\000\000\000\000\000\002T\000\000\003\007\000\000\000\000\000\000\000\000\002M\000\000\000\000\000\000\003\030\003[\000\000\000\000\000\000\000\000\000g\003#\000\000\000\000\000\157\003(\000\000\0035\001\207\003\008\000\000\001\177\000\000\000\000\000\000\001\178\000\000\000\000\000\199\000[\000\220\000\000\000\201\000\000\000h\000\000\000\202\000\000\001\208\001\175\001\198\000\000\000\000\001\209\000\000\002C\000\000\001\210\000\000\000\000\000\000\000\000\001\211\000-\000\000\001\191\000\000\002T\000\000\003\007\002H\000\000\000\215\000\000\002I\0019\003\015\000\000\001\192\000\000\000\000\000\000\000[\000\000\003X\000\201\000\000\003\016\000\000\000\202\000j\003Y\000\000\003\008\000\000\001\177\000\000\000\000\000\000\001\178\000\000\000\000\000\000\000\000\000q\000\000\000\000\002M\000\000\000\000\000\000\003\030\003[\000\000\000\000\000\215\000\000\000-\003#\002C\000\000\000\157\003(\000\000\0035\001\207\000\000\000\000\000\000\001\191\000\000\000\000\000\000\000\000\002H\000\000\000\000\000\000\002I\0019\003\015\000\000\001\192\000\000\000\000\001\208\000\000\003l\000\000\000\000\001\209\003\016\000\216\000\000\001\210\003m\000\000\000\000\000\000\001\211\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001N\002M\000\000\000\000\000\000\003\030\003o\000\000\004%\000\000\000\000\000\000\003#\002C\001H\000\157\003(\000\000\0035\001\207\000\000\000\000\000\000\001\191\000\000\000\216\000\000\000\000\002H\000\000\000\240\000\000\002I\0019\003\015\000\000\001\192\000\000\000\000\001\208\001\175\001\198\003j\000\000\001\209\003\016\000\000\000\000\001\210\003Y\000\241\000\000\000\000\001\211\000-\000\242\000\000\000\000\002T\000\243\003\007\000\000\000\000\000\000\000\244\002M\000\000\000\000\000\000\003\030\003[\000\000\000\000\000\000\000\000\000\000\003#\000\000\000\000\000\157\003(\000\000\0035\001\207\003\008\000\000\001\177\0019\000\000\000\000\001\178\000\000\000\000\000\241\000\000\000\000\000\000\000\000\000\000\001I\000\000\001\175\001\198\001\208\001\175\001\198\000\000\000\252\001\209\000\000\000\000\000\199\001\210\000\222\000\000\000-\000\000\001\211\000\000\002T\003w\003\007\000\000\000\000\002;\004\006\001T\000\000\002X\000\000\000\000\001Q\000\000\000\157\001R\000\000\000\163\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\008\000\000\001\177\002B\000\000\001\177\001\178\000\000\000\000\001\178\000[\002v\000\000\000\201\002\143\000\000\000\000\000\202\000\000\000\000\001\175\001\198\000\000\000\000\000\000\000\000\000\000\000Y\000\000\002C\0059\000d\000\000\000\000\000-\000\000\003|\000\000\002T\001\191\003\007\000\000\000\000\000\215\002H\000\000\000\000\000\000\002I\0019\003\015\000\000\001\192\000\000\000\000\000[\000\000\000\000\000\000\002x\000\000\003\016\000\000\002y\003\008\003x\001\177\000\000\000\000\000\000\001\178\000[\000\000\000\000\000\000\000\000\000\\\000\000\000\000\000\000\000]\002M\000\000\000\000\000\000\003\030\003z\000\000\000\000\000\000\002C\000\000\003#\002C\000\000\000\157\003(\000\000\0035\001\207\001\191\000\000\000\000\001\191\000f\002H\000\000\000\000\002H\002I\0019\003\015\002I\001\192\000\000\000\000\001\192\000\000\000\000\001\208\000\000\000\000\003\016\000\216\001\209\000\000\003x\000\000\001\210\002K\000\000\000\000\000\000\001\211\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002M\000\000\000\000\002M\003\030\003z\000\000\0044\000\000\000\000\000\000\003#\002C\002\134\000\157\003(\000\000\0035\001\207\000\000\000\000\001\207\001\191\000\000\000\000\000\000\002\135\002H\000\000\000\240\000\000\002I\0019\003\015\000\000\001\192\000\000\000\000\001\208\001\175\001\198\001\208\000g\001\209\003\016\000\000\001\209\001\210\005:\000\241\001\210\000\000\001\211\000-\000\242\001\211\000\000\003\158\000\243\000\000\000\000\000\000\000\000\000\244\002M\000\000\000h\000\000\003\030\005<\000\000\000\000\000\000\000\000\000\000\003#\003\190\000\000\000\157\003(\000\000\0035\001\207\003\193\000\199\001\177\000\220\000\000\000\000\001\178\000\000\000i\000\000\000\000\000\000\002\165\000\000\000\000\000\000\000\000\001\175\001\198\001\208\001\175\001\198\003\199\000\000\001\209\000\000\002\176\000\000\001\210\000j\000\000\000-\000\000\001\211\000\148\003\158\000\000\000\000\000\000\000\000\002;\003R\000\000\000l\000\000\000[\000\000\000\000\000\201\000\000\003\237\000\000\000\202\001\203\003\241\001\021\000\000\000\000\000\000\000\000\000\000\003\193\000\000\001\177\002B\000\000\001\177\001\178\001\175\001\198\001\178\000\000\000\000\000\199\000\000\000\220\000\000\000\000\000\215\000\000\000\000\000\000\000-\003\199\000\000\000\000\003\158\000\000\002v\000\000\000\000\002\143\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\191\000\000\000Y\000\000\000\000\003\192\000b\000\000\000\000\000\000\0019\003\200\003\193\001\192\001\177\000\000\000-\000[\001\178\000\000\000\201\000\000\003\201\000\000\000\202\000\000\003\239\000\000\000\000\000\000\000\000\000\199\000[\000\220\003\199\000\000\002x\000\000\000\000\000\000\002y\000\000\000\000\000\000\000\000\000\000\000[\000\000\000\000\000\000\000\215\000\\\000\000\003\215\002C\000]\000\157\003\240\000\216\003\227\001\207\001\191\000\000\002v\001\191\000\000\002\143\000\000\000\000\002H\000\000\0019\003\200\002I\001\192\000[\000\000\001\192\000\201\000f\001\208\000\000\000\202\003\201\000Y\001\209\000\000\003\213\000b\001\210\002K\000\000\000\000\000\000\001\211\000\000\000\000\000\000\000-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002M\002B\000\215\000\000\000\000\002x\001\191\000\000\003\215\002y\000\000\000\157\003\220\000\000\003\227\001\207\0019\003\200\001\207\001\192\000\241\000\000\000[\000\000\000\216\000\000\002\134\000\\\003\201\000\000\000\000\000]\003\213\000\000\000\254\001\208\000\000\000\000\001\208\002\135\001\209\000\000\000\000\001\209\001\210\000\000\000\000\001\210\000\000\001\211\000\149\000\000\001\211\000g\000\000\000f\000\000\000\000\000\000\003\215\000\000\000\000\000\157\003\220\000\000\003\227\001\207\000\000\000\000\000\152\000\206\000\155\000\156\002v\000\000\000\000\002\143\000h\000\000\000\000\000Y\000\000\000\216\000\000\000b\000\000\001\208\000\000\000\000\000\000\000\000\001\209\000\241\000\000\000-\001\210\000\157\000\162\000\000\000\163\001\211\002\134\000\135\000\000\002\204\000\000\001\000\000\000\002\165\000\000\002\162\000\000\000\000\000\000\002\135\000\000\000Y\002B\000\000\000-\000b\002x\002\178\000j\000[\002y\000\000\000\136\000\000\000\\\000-\000\137\000\149\000]\000\000\000g\000\000\000l\000\000\000\168\000\000\000\000\000\000\000\000\000\000\000\199\000\000\000\220\000\000\000\000\000\241\000\152\001\182\000\155\000\156\000\000\000\000\000f\000\000\000h\000[\000\000\000\000\000\000\001\002\000\\\000\000\000\000\000\000\000]\000\000\000\000\001N\000\000\000\000\000\000\002\207\000\000\000\157\000\162\000\000\000\163\000\000\002\165\000\135\000\000\001H\000Y\000\000\000[\000\000\000b\000\201\000f\000\000\000\000\000\202\002\166\000Y\000\000\000\000\000-\000b\000\000\000\000\000j\000\000\000\000\000\000\000\136\000\000\000\000\000-\000\137\000\000\000\000\000\000\002\134\000\000\000l\002\213\000\168\000\215\000\000\000\000\000\000\002\162\000\000\000\000\000\000\002\135\000[\000\000\000\000\000\149\000\000\000\\\000g\001\175\001\198\000]\000\000\000[\000\000\000\000\000\000\000\000\000\\\000\000\000\000\000\000\000]\000\000\000\152\002E\000\155\000\156\000\000\000\000\0019\000\000\000h\000\000\000\000\000f\000\000\000\000\000\000\000\000\000\000\000\149\001I\000\000\000g\000\000\000f\000\000\000\000\000\000\000-\000\157\000\162\000[\000\163\001\177\000\000\000\135\000\000\001\178\000\152\002}\000\155\000\156\000\000\000\000\000\000\000\000\000h\001T\002\165\002\230\000\000\000\216\001Q\000\000\000\157\001R\000j\000\163\000\000\000\000\000\136\000\000\002\166\000\000\000\137\000\157\000\162\000\000\000\163\000\000\000l\000\135\000\168\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001N\000\000\000\000\001\203\000Y\000\000\000\000\000\000\000b\000\149\000\000\000j\000g\000\000\001H\000\136\000\000\000\000\000-\000\137\000\149\000\000\000\000\000g\000\000\000l\000\000\000\168\000\152\003%\000\155\000\156\000\000\000\000\000\000\000\000\000h\000\000\000\241\000\152\003\217\000\155\000\156\000\000\000\000\001\175\001\196\000h\000[\000\000\001\191\000\000\001\004\000\\\000\000\000\157\000\162\000]\000\163\000\000\000\000\000\135\000\000\001\192\000\000\000\000\000\157\000\162\000\000\000\163\000Y\000\000\000\135\000\000\000b\000\000\001\205\000\000\000\000\000\000\000\000\000f\000j\000\000\000-\000\000\000\136\0019\000\000\000[\000\137\001\177\000\000\000j\000\000\001\178\000l\000\136\000\168\001I\000\000\000\137\001\019\001\021\001\175\001\198\000\000\000l\000\000\000\168\001\207\000\000\000\000\000\000\000[\000\000\000\000\000\000\000Y\000\\\000\000\000\000\000b\000]\003I\000\000\001T\000\000\002\241\000\000\001\208\001Q\000-\000\157\001R\001\209\000\163\000\000\000\000\001\210\000\000\000\000\000\000\000\000\001\211\000\000\000\000\000f\002B\000\000\001\177\000\000\000\000\000\000\001\178\000\000\000\000\000\000\000\149\000\000\000\000\000g\000[\000\000\000\000\000\000\000\000\000\\\000\000\000\000\000\000\000]\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\199\001\023\000\220\000\000\000\000\000\000\000h\000\000\000\000\000\000\001\191\000\000\000\000\000\000\000\000\000\000\000f\000\000\003O\000\000\000\000\000\000\001\203\001\192\000\000\000\157\001\029\000\000\000\163\000\000\000\000\000\135\000Y\000\000\000\000\000Y\000b\000\000\000\000\000n\000\000\000\000\000\000\000\000\000[\000\149\000-\000\201\000g\000\000\000\000\000\202\000j\000\000\000\000\000\000\000\136\000\000\000\000\002C\000\137\000\000\000\000\000\000\000\170\000\000\000l\000\156\000\000\001\191\000\000\000-\000h\000\000\002H\000\000\000[\000\215\002I\000[\000\000\000\\\001\192\000\000\000\\\000]\000\000\000\000\000]\000\000\001\208\000\157\000\162\000\149\000\163\003Q\000g\000\135\000\000\000Y\000\000\000\000\000\000\000b\001\217\000\000\000\000\000\000\000\000\000f\000\000\002M\000f\000-\000\000\000\180\000\000\000\000\000j\000\000\000h\000\000\000\136\000\000\001N\000\000\000\137\000\000\000\000\001\207\000\000\000\000\000l\000\000\000\168\000\000\000\000\000\000\001H\000\157\001#\000\000\000\163\000[\000\000\000\135\000\000\000Y\000\\\001\208\000\000\000b\000]\000\000\001\209\000\000\000\000\000\216\001\210\000\000\000\000\000-\000\000\001\211\000\000\000Y\000j\000\000\000\000\000b\000\136\000\000\000\000\000\000\000\137\000\000\000f\000\000\000\000\000-\000l\000\000\000\000\000\000\000\000\000\000\000\149\000\000\000\000\000g\000\000\000[\000g\000\000\000\000\000\000\000\\\000-\000\000\000\000\000]\002T\000\000\000\000\000\000\000\000\000\000\000\000\000\183\000[\000\000\0019\000\000\000h\000\\\000\000\000h\000\000\000]\000\000\000\000\000\000\000\000\001I\000f\000\241\000\000\004)\001\175\001\198\000\000\000\000\000\157\000\185\000\000\000\163\000\000\000Y\000\135\001\006\000Y\000b\000f\000\000\000n\000\000\000\000\000\000\002;\003H\001T\000-\003\022\000\149\000\000\001Q\000g\000\157\001R\000j\000\163\000\000\000j\000\136\000\000\000\000\000\000\000\137\000\000\000\000\000\000\000\000\002B\000l\001\177\000\183\000s\000\000\001\178\000\000\000h\000[\000\000\000\000\000[\000\000\000\\\000\000\000\000\000\\\000]\000\000\000\000\000]\000\000\000\000\000\000\000\000\000\000\000\157\001)\000\149\000\163\000\000\000g\000\135\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000f\000\000\000\000\000f\000\000\000\149\000\000\000\000\000g\000\180\000\000\000\000\000j\000\000\000h\000\000\000\136\000\000\000\000\000\000\000\137\000\000\000\000\0019\003\015\000\000\000l\001\158\000\000\001\175\001\198\000\000\000h\000\157\001/\003\016\000\163\000\000\000\000\000\135\000\000\001\175\001\198\000\000\000\000\000\000\000\000\000\000\002C\002;\002<\000\157\001\160\000\000\000\163\000\000\000\000\000\135\001\191\004.\000j\002;\002G\002H\000\136\000\000\003#\002I\000\137\000\157\003(\001\192\0035\002B\000l\001\177\000\000\000\149\000j\001\178\000g\000\000\000\136\000g\002K\002B\000\137\001\177\000\000\000\000\000\000\001\178\000l\000\000\000\000\000\000\000\000\000\000\000\000\001\158\002M\000\000\000Y\000\000\000h\000\000\000b\000h\000\000\000-\000\000\000\000\000\000\000\000\000\000\000\000\000-\000\000\001\207\000\000\000\000\000\000\000\000\000\157\001\243\000\000\000\163\000\000\000-\000\135\000\000\000\000\000\133\000\000\000\000\000\000\000\000\000\000\001\208\000\000\000\000\000\000\000\000\001\209\000\000\000\000\000[\001\210\000\000\000\000\000j\000\\\001\211\000j\000\136\000]\001\175\001\196\000\137\000\000\000\000\000\000\001N\002C\000l\000\000\000\000\000l\000\000\000\000\000Y\000\000\000\000\001\191\000b\002C\001H\000\000\002H\000f\000\000\001N\002I\000\000\000-\001\191\001\192\000\000\000\000\000\000\002H\000\000\001\175\001\198\002I\001H\000\000\000\000\001\192\002K\000[\000\000\001\177\000\000\001\175\001\198\001\178\000\000\000\000\000\000\000\000\002K\002;\003T\000[\002M\000\000\000\000\000\000\000\\\000\000\000\000\000\000\000]\002;\004\027\000\000\002M\000\000\000\000\000\000\001\175\001\196\001\207\000\000\000\000\002B\000\000\001\177\000\000\000\000\000\000\001\178\000\000\000\000\001\207\000\000\000f\002B\0019\001\177\000\000\000\000\001\208\001\178\000\000\000\149\000\000\001\209\000g\000\000\001I\001\210\000\000\000\000\001\208\000\000\001\211\0019\000\000\001\209\000\000\000\000\000\000\001\210\000[\000\000\001\177\002f\001\211\001I\001\178\000\000\000h\000\000\000\000\000\000\000\000\001T\000\000\003,\000\000\000\000\001Q\000\000\000\157\001R\000\000\000\163\000\000\001\191\000\000\000\157\002h\000\000\000\163\000\000\001T\000\135\003\171\001\175\001\198\001Q\001\192\000\157\001R\000\000\000\163\000\000\000\000\000\000\000\000\001\175\001\198\000\149\000\000\002C\000g\000\000\000j\002;\004\029\000\000\000\136\000\000\000\000\001\191\000\137\002C\000\000\000\000\002H\003K\000l\000\000\002I\002f\000\000\001\191\001\192\000\000\000h\000\000\002H\002B\000\000\001\177\002I\000\000\000\000\001\178\001\192\002K\001\175\001\198\000\000\002B\000\000\001\177\000\000\000\157\002\141\001\178\000\163\002K\001\191\000\135\000\000\002M\000\000\001\208\000\000\000\000\002;\004\031\000Y\000\000\000Y\001\192\000b\002M\000b\000\000\000\000\001\219\000\000\001\207\000j\000\000\000\000\000\000\000\136\000\000\000\000\000\000\000\137\000\000\002B\001\207\001\177\000\000\000l\000\000\001\178\000\000\000\000\001\208\000\000\000\000\000\000\000\000\001\209\000\000\000\000\000\000\001\210\000\000\000\000\001\208\000[\001\211\000[\000\000\001\209\000\\\000\000\000\\\001\210\000]\000\000\000]\000\000\001\211\000\000\002C\000\000\000\000\000\000\000\131\000\000\001\n\000\000\000\000\000\000\001\191\001\208\002C\000\000\000\000\002H\001\175\001\196\000f\002I\000f\000\000\001\191\001\192\000\000\001\221\000\000\002H\000\000\000\000\000\000\002I\000\000\000\000\000\000\001\192\002K\000\000\000\000\000\000\000\000\000\000\000\000\000Y\000\000\000\000\000\000\000b\002K\000\000\000\000\000\000\002M\002C\000\000\000\000\000\000\000\000\000\000\000\000\000[\000\000\001\177\001\191\002M\000Y\001\178\000\000\002H\000b\001\207\000\000\002I\000\000\000\000\000\000\001\192\000Y\000\000\000\000\000\000\000b\001\207\000\000\000\000\001\175\001\196\000[\000\000\002K\001\208\000\000\000\\\000\000\000\000\001\209\000]\000\000\000g\001\210\000g\000\000\001\208\000\000\001\211\002M\001\233\001\209\000\000\000[\000\000\001\210\000\000\000\000\000\\\000\000\001\211\000\134\000]\000\134\000f\000[\000h\001\207\000h\000\000\000\\\000\000\002 \000[\000]\001\177\000\000\001\175\001\196\001\178\000\000\000\000\000\000\000\000\002\"\000Y\000f\001\208\000\199\000b\000\220\000\135\001\209\000\135\000\000\000\000\001\210\000\000\000f\000\000\000\000\001\211\000Y\000Y\001\191\000\000\000b\000b\000\000\000\000\000\000\000\000\000j\000\000\000j\000\000\000\136\001\192\000\136\000\000\000\137\000[\000\137\001\177\000\000\000\000\000l\001\178\000l\000[\000\000\000\000\000[\000\000\000\\\000\201\000\000\000\000\000]\000\202\000\000\000\000\000\000\000\000\000g\000\000\000[\000[\002$\000\000\000\000\000\\\000\\\000\000\000\000\000]\000]\000\000\000\000\000\000\000\000\000\000\000f\000\134\000\000\000\215\000g\000\000\000h\000\000\000\000\000\000\000\000\001\191\000\000\000\000\000\000\000\000\000g\000f\000f\000\000\000\000\000\000\001\208\000\134\001\192\000\000\000Y\000\000\000h\000\000\000b\000\135\000\000\000\000\000\000\000\134\001\223\000\000\002c\000\000\000h\000\000\000\000\000Y\000\000\000\000\000\000\000b\000\000\000\000\000\000\000\000\000j\000\135\000\000\000\000\000\136\000\000\000Y\001\191\000\137\000\000\000b\000\000\000\000\000\135\000l\000\000\001\175\001\196\000[\000\000\001\192\000\000\000j\000\\\000\000\000\000\000\136\000]\000g\000\000\000\137\000\216\000\000\000\000\000j\000[\000l\002\217\000\136\001\208\000\\\000\000\000\137\000\000\000]\000g\000g\000\134\000l\000\000\000[\000f\000h\001\225\000\000\000\\\000\000\000\000\000\000\000]\000[\000\000\001\177\000\000\001\023\002\157\001\178\000\000\000f\000h\000h\000\000\000\000\000\000\000\000\000\000\000\000\000\135\000\000\000\000\000\000\000\000\000\000\000f\000\000\000\000\000\000\001\208\000Y\000\000\000\000\000\000\000b\000\000\000\135\000\135\000\000\000\000\000j\000\241\000Y\001\227\000\136\000\000\000b\000\000\000\137\000\000\000\000\000\000\000\000\000\000\000l\001\008\000\000\000j\000j\000Y\000\000\000\136\000\136\000n\002\155\000\137\000\137\000\000\000\000\000\000\000\000\000l\000l\000g\000[\000\000\000\000\000\000\000\000\000\\\000\000\002\234\000\000\000]\000\000\000\000\000[\000\000\000\000\000\000\000g\000\\\002\157\000\000\000\000\000]\002\246\000h\000\000\000\000\000\000\000\000\001\191\000[\000\000\000g\000\000\000f\000\\\002\157\000\000\000\000\000]\000\000\000h\001\192\000\000\000\000\000\000\000f\000\000\000\000\000\135\000\000\002\157\000\000\000\000\000Y\000Y\000h\000\000\000b\000b\000\000\000\000\000\000\000f\000\000\000\000\000\135\000\000\000\000\000\000\000j\000Y\000\000\000\000\000\136\000b\000\000\000\000\000\137\000\000\000\000\000\135\000\000\000\000\000l\000\000\000\000\000j\000\000\000\000\000\000\000\136\000\000\000Y\000\000\000\137\000\000\000b\000[\000[\000\000\000l\000j\000\\\000\\\002\254\000\136\000]\000]\001\208\000\137\000\000\000\000\000\000\000g\000[\000l\003\011\000\000\000\000\000\\\000\000\000\000\001\229\000]\000\000\000g\001\175\001\196\000\000\000\000\000f\000f\002\157\000\000\000\000\000\000\000[\000h\000\000\000\000\000\000\000\\\000g\000\000\002\157\000]\000\000\000f\000\000\000h\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\135\000\000\000Y\000\000\000h\000\000\000b\000f\000[\000\000\001\177\000\000\000\135\000\000\001\178\000\000\000\000\000\000\000\000\000\000\000\000\000j\000Y\000\000\000\000\000\136\000b\000\000\000\000\000\137\000\000\000\000\000\000\000j\000\000\000l\000\000\000\136\000\000\003\026\0031\000\137\000\000\000\000\000\000\000\000\000[\000l\000g\000g\000j\000\\\000\000\000\000\000\000\000]\0039\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000u\000g\000[\002\157\002\157\000\000\000\000\000\\\000h\000h\000\000\000]\000\000\000\000\003\163\000f\000\000\000\000\000\000\000\000\002\157\000\000\000\000\000g\000\000\000h\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\135\000\135\000f\000\000\000\000\000\000\000Y\000\000\000\000\002\157\000b\001\191\000\000\000\000\000h\000\000\000\000\000\135\000\000\000\000\000\000\000j\000j\000Y\001\192\000\136\000\136\000b\000\000\000\137\000\137\000\000\000\000\000\000\000\000\000l\000l\000\000\000j\000\135\000Y\000Y\000\136\000Y\000b\000n\000\137\000b\000\000\000\000\000[\000\000\000l\003\175\000\000\000\\\000\000\000\000\000\000\000]\000j\000\000\000g\000\000\000\136\000\000\000\000\000[\000\137\000\000\000\000\000\000\000\\\003\181\000l\000\000\000]\000\000\000\000\000\000\000\000\002\157\000g\000f\000[\000[\000h\000[\000\000\000\\\000\\\001\208\000\\\000]\000]\000\000\000]\000\000\000\000\000\000\000f\002\157\000\000\000\000\000Y\001\231\000h\000\000\000b\000\000\000\000\000\135\000\000\000\000\000\000\000Y\000\000\000f\000f\000b\000f\000\000\000\000\000\000\000\000\000\000\000Y\000\000\005o\000\000\000b\000\135\000j\000\000\000\000\000\000\000\136\000\000\000\000\000\000\000\137\000Y\000\000\000\000\000\000\000b\000l\000\000\000[\000\000\000\000\000\000\000j\000\\\003\188\000\000\000\136\000]\000\000\000[\000\137\001\175\001\196\000g\000\\\000\000\000l\000\000\000]\000\000\000[\003\197\000\000\000\000\000\000\000\\\000\199\000\000\000\220\000]\000g\000f\002\157\000\000\000\000\000[\000\000\000h\003\211\000\000\000\\\003\225\000f\000\000\000]\000\000\000\000\000g\000g\002\157\000g\000\000\000\000\000f\000h\000[\000\000\001\177\000\000\000\000\000\000\001\178\000\135\000Y\000\000\000\000\002\157\000b\000f\002\157\000[\000h\000h\000\201\000h\000\000\000\000\000\202\000\000\000\135\000\000\000\000\000\000\000j\000\000\000\000\000\000\000\136\000\000\000\000\000\000\000\137\000\000\000\000\000\000\000\000\000\135\000l\000\000\000\135\000j\000Y\003\232\000\215\000\136\000b\000\000\000[\000\137\000\000\000\000\000g\000\\\000\000\000l\000\000\000]\000j\000j\000\000\000j\000\136\000g\000\000\000\136\000\137\000\000\000-\000\137\000\000\002\157\000l\000w\000g\000l\000h\000\000\000\000\000\000\000\000\000f\005\021\000\000\000\000\000\000\000[\000h\000\000\000g\000\000\000\\\000\000\000\172\000\000\000]\001\191\000\000\000h\000\000\000\000\000\135\000\000\000\000\000\000\000\000\000\000\000\000\000\209\001\192\000\000\000Y\000\135\000h\000\000\000b\000\000\000\000\000\000\000f\000\000\001N\000j\000\135\000\216\000\000\000\136\000\000\000Y\000\000\000\137\000\000\000b\000j\000\000\001H\000l\000\136\000\135\000\000\000\199\000\137\000\220\000\000\000j\000Y\000\000\000l\000\136\000b\000\000\000\000\000\137\000\000\000\000\000[\000\000\000\000\000l\000j\000\\\000g\000\000\000\136\000]\000\000\000\000\000\137\000\000\000\000\000\000\000\000\000[\000l\000\000\000\000\001\208\000\\\000\000\000\000\000\234\000]\000\000\000\000\000[\000h\000\000\000\201\000f\000[\001\237\000\202\000\241\000\000\000\\\000\000\000\000\000Y\000]\000g\000\000\000b\000\000\000\000\000\000\000f\001\014\000\000\0019\000Y\000\135\000\000\000\000\000b\000\000\000\000\000\000\000\215\001\025\000\000\001I\000\000\000f\000h\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000j\000\000\000\000\000\000\000\136\000\000\000\000\000\000\000\137\000\000\000[\000\000\000\000\000\000\000l\000\\\001T\000\135\003\207\000]\000\000\001Q\000[\000\157\001R\000\000\000\163\000\\\000\000\000\000\000\000\000]\000\000\000\000\000\000\000Y\000\000\000g\000j\000b\000\000\000\000\000\136\000f\000\000\000\000\000\137\000\000\000\000\000\000\000\000\000\000\000l\000Y\000g\000f\001\145\000b\000\000\000\000\000\000\000h\000\000\000\000\000\000\000\000\000\216\000\000\000\000\000\000\000\000\000g\000\000\001\149\000\000\000\000\000\000\000\000\000h\000[\000\000\000\000\000\000\000\000\000\\\000\000\000\135\000Y\000]\000\000\001\185\000b\000\000\000\000\000\000\000h\000\000\000[\000\000\000\000\000\000\000\000\000\\\000\135\000\000\000\000\000]\000j\000\000\000\000\000\000\000\136\000f\000\000\000Y\000\137\000\000\000\000\000b\000\000\000\135\000l\000\000\000g\000j\000Y\000\000\000\000\000\136\000b\000f\000[\000\137\000\000\000\241\000g\000\\\000\000\000l\000\000\000]\000j\001\248\000\000\000\000\000\136\000\000\000h\001\016\000\137\000\000\000\000\000\000\000\000\001\253\000l\000\000\000\000\000[\000h\000\000\000\000\000\000\000\\\000f\000\000\000\000\000]\000\000\000[\000\000\000\000\000\135\000\000\000\\\000\000\000\000\000Y\000]\000\000\000\000\000b\000\000\000\000\000\135\000\000\000\000\000\000\000\000\000\000\000\000\000f\000g\000j\000\000\000\000\000\000\000\136\000\000\000\000\000\000\000\137\000f\000\000\000Y\000j\000\000\000l\000b\000\136\000g\002\001\000\000\000\137\000\000\000\000\000h\000\000\000\000\000l\000Y\000[\000\000\000\000\000b\000\000\000\\\000\000\000\000\002\024\000]\000\000\000\000\000\000\000h\000\000\000\000\000\000\000\000\000\000\000\000\000\135\000\000\000\000\000g\000\000\000\000\000\000\000[\000\000\000\000\000\000\000\000\000\\\000f\000\000\000Y\000]\000\000\000\135\000d\000\000\000j\002?\000[\000\000\000\136\000\000\000h\000\\\000\137\000g\000\000\000]\000\000\000\000\000l\000\000\000\000\000\000\000j\000f\000g\000\000\000\136\000\000\000\000\000\000\000\137\000\000\002\128\000\000\000\000\000\135\000l\000h\000\000\000f\000\000\000\000\000[\002\146\000\000\000\000\000\000\000\\\000h\000\000\000\000\000]\000\000\000\000\000\000\000\000\000j\000Y\000\000\000\000\000\136\000d\000\135\000Y\000\137\000Y\000\000\000d\000\000\000d\000l\000\000\000\000\000\135\000\000\000f\000g\000\000\000\000\000\000\000Y\000\000\000\000\000j\000n\000\000\000Y\000\136\000\000\000\000\000n\000\137\000Y\000\000\000j\002\148\000n\000l\000\136\000\000\000h\000[\000\137\000g\000\000\000\000\000\\\000[\000l\000[\000]\000\000\000\\\000\000\000\\\000\000\000]\000\000\000]\000g\000\000\000\000\003\151\000\000\000[\000\135\000\000\000h\000\000\000\\\000[\000\000\000\000\000]\000f\000\\\000[\000\000\003\255\000]\000f\000\\\000f\000h\002v\000]\000j\002\143\000\000\000\000\000\136\000\000\000\135\000\000\000\137\000g\000\000\000f\000Y\000\000\000l\000\000\000n\000f\000\000\000\000\000\000\000\000\000\135\000f\000\000\000\000\000\000\000j\000Y\000\000\000\000\000\136\000n\000h\000Y\000\137\000\000\000\000\000n\000\000\000\000\000l\000[\000j\000\000\000\000\002x\000\136\000\000\000\000\002y\000\137\000\000\000\000\000\000\000Y\000[\000l\000i\000n\000\000\000\\\000\199\000Y\000\220\000]\002v\000n\000g\002\143\000\000\000\000\000[\000\000\000g\000\000\000g\000\\\000[\000j\000\000\000]\000\000\000\\\000\224\001\175\001\196\000]\000\000\000f\000\000\000g\000h\000l\000\000\000\000\000\000\000g\000h\000[\000h\000\000\000\000\000g\000\\\000f\000[\000[\000]\000\201\000[\000f\000\\\000\202\002x\000h\000]\000i\002y\000\000\000\000\000h\000\000\000i\000\000\000i\000\000\000h\000\000\000[\000\000\001\177\000f\000\000\000\000\001\178\001\175\001\196\000j\000\215\000f\000\000\002\134\000\226\000j\000\000\000j\000\000\000\000\001\200\002v\001\202\000l\002\143\000\000\002\135\002v\000\000\000l\002\143\000l\000j\000\000\000\000\000\000\000\000\000\000\000j\000\000\000g\000\000\000\000\000\000\000j\002v\000y\000\000\002\143\000\000\000\000\000[\000{\001\177\000\000\000\000\000g\001\178\000}\000\000\002v\000\000\000g\002\143\000h\000[\000\000\000\000\000\000\002x\000\000\000[\000\000\002y\000\000\002x\000\000\000\000\000\000\002y\000h\002\134\000\000\000g\000\000\002v\000h\000\000\002\143\000[\000\216\000g\000\000\002x\002\135\002\165\000\000\002y\000\000\000\000\001\191\000\000\000\000\000\000\000[\000\000\000\000\000h\002x\002\180\000j\000\000\002y\001\192\000\000\000h\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\127\000\000\000j\000\000\000\000\000[\000\000\000\000\000j\002x\000\000\000\000\000\000\002y\000\000\000\000\000\129\000\000\000\000\000\000\000\000\000\000\000\139\000\000\000\000\000\000\000\000\001\191\000\000\000j\000\000\000\000\000\000\000\000\000\241\000\000\000\000\000j\000\000\002\165\001\192\002\134\000\000\000\141\000\000\000\000\000\000\002\134\001\018\000\000\000\000\000\143\000\000\002\182\002\135\000\000\001\208\000\000\000\000\000\000\002\135\000\000\000\000\000\000\000\000\002\134\000\000\000\000\000\000\000\000\001\239\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\135\000\000\002\134\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\135\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\134\000\000\001\208\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\135\000\000\000\000\001\241\000\000\002\165\000\000\000\000\000\000\000\000\000\000\002\165\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\184\000\000\000\000\000\000\000\000\000\000\002\186\000\000\000\000\000\000\002\165\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\188\002\165\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\190\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\165\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\192"))
+    ((16, "\000\t\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\000\000\001!\012\230\000\000\000}\000_\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\025\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000t\000\000\008\180\000}\000\236\000\000\000\000\000\000\000\000\000\000\007\228\000\n\022\238\000\000\000\000\000\000\024\132\000\000\002L\000\203\000\242\000\000\000\000\000\002\000\000\001\002\000\000\000\016'\n\000t%\188\000t\004\238%\218\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007n%\188\000\000\000\000\014\014\000\000\017\022\000\000\017\192\000\000\000\000\000\000\000\000\000\136\000\000!\234\000\000\000\000\002\130\000\000 \206\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \212\000\000\000\000,\030\000\0006\232\000\0007\012\000\00076\000\0007l\000\0007\182\000\0007\212\000\0007\224\000\0008\030\000\000\007\206\000\0005t\000\000\000\000\000\000\000\000\000\0008*\000\0008D\000\0008R\000\000'\218\000\000\000\000*J\000\000\000\000\000\173\000S\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\014\000v\000\000\000(\000\000\000\000%\028\000\0000\148\000\000\000\000\000\000\002\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000.\000\000\000\000\000\000\000\000\000\000\000\000\005\208%\218\000\000\005\242\000\000\015N\019\128\000\000\000\000\000\000\003\158\000\000\"j\000\000\000\0001\024\000\000\000\000\000\000\005.\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000/\252\000\0001\142\000\000\000\000\000\000\000\000\000\003\000\000\000\0001X\000\000\000\000\000\000\000\202\000`\000\000\000\000\000\000\000\000\000\000\000\000\006\016\000\000\025\230\000\000\026\254\000\000\027\186\000\000\029\192\000\000\031\166\000\000,J\000\000-H\000\0000h\000\00036\000\000\011\210\000\000\003j\000\0008b\000\0008\224\000\0008\246\000\000\000\000\000\000\000\000\000\000\000\1751\220\000\000\000s\000\000\000\000\002\008\012\250\000\000\002\026\000\000\000\000\000\000\000T\000\000\000\000\000\000&T\000\000\000\000\000\000\000\000\000\000&\170\000\000\000\000\000\000\000\000\000\000\000\000\000\158\000\000\000\000\000\000\0006\000\000\000\000\000\000\003n\000\000\000\000 B\000}\000\000\000\000\000\146\006\176\000\000\000\000\000\000\000\000\000\000\005\170\000\000-&\000\0000\136\000\000\000\000\005\236\000\000\000\000\000\000\000\000\000\000\000\000-\208\000\000\000\000\000\000\001\190\000\000\000\000\000\000\000\000\001\248#\018\000\000\003\222\000\000\000\000\000\014\004\018\000\000\000\000\000\000\000\000\025v\000\000\000\000\000\000\000\000\000\000\000\000\001~\013\146\000\000\015n\000\000\000\000\000\000\002\002\000\000\012&\001\164\000\000/\172\000\000\000\000\000\000\000\220\001\214\000\000\000\000\000\000\002\014\000\000\000\000\001\140\000\000\003\170\000\000\000\000\000\000\000\000\0001\002\n\000\000\002\214\000\000\000\000\000\000\000\000\000\000\000\0001\226\000\000&\222\000\0002&\000\000\000\000\002\164\000\000\005\228\000\000\000V\012\144'`\000\000\000\000\000\000\020\180\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\146'`\000\000\006\212\000\000\t6\011\152\000\000\000\000\000\000\006\012\000\000\"\192\000\000\000\0002f\000\000\000\000\000\000\006V\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0005\020\000\0005*\000\000\000\000\000\000\004\138\000\000\000\000\000\000\000\000\000\000\000\000\014\130\000\000\014\150\000\000\028L\000\000\0292\000\000\030v\000\000 P\000\000(.\000\000,6\000\0001P\000\0002\128\000\000\014Z\000\000\n\196\000\0008\206\000\0009\012\000\0009H\000\000'z\000\000\000\000\000\0002\166\000\000\000\000\000\000\000\021\000\0002\234\000\000\000\000\000\0003\004\000\000\000\000\001\228\000\000\024\014\000!\000\013\000\000\003\014\000\000\012\168\002`\006\236\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0003t\000\000'\174\028\026\006b\000\000\000\000\000\000\018(\000\000\019l\000\000\020\176\000\000(\000)`\000\166\004`\006x\000\000\000\000\000\000\004r\000\000\000\000\000\146\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0003\130\000\000\000\000\000\000\000\000\000\000#x\000\000)\158\000\000\000\000\000\000\000\000\000\000\000\000\013j\000\000\003B\000\000\000\000\000\000\000\000\0166\0048\000\0004\174\000\000\000\000\000\000\005v\000\000\000\000\021\244\006z\000\000\000z+n\000\000\000\000)\026\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005R)\026\000\000\019B\000\000\022\218&*\000\000\000\000\000\000\006\128\000\000#\142\000\000\000\0003\194\000\000\000\000\000\000\006\140\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)\206\000\000%\152\000\000\000\0004\"\000\0004\146\000\000\000\000\025\242\t\214\000\000\000\000\0238\000\000\000\000\000\000\006\232\000\000$\n\000\000\000\0005b\000\000\000\000\000\000\007\146\000\000\023\230\000\0002\188\000\0008\028\000\0009n\000\0009r\000\0009|\000\0009\216\000\0009\246\000\0009\250\000\000:\030\000\000:d\000\000:r\000\000\000\000\000\000\000\000\000\000\000\000\np\000\000\016\250\000\000\"\218\001\130\000\000$h\000\000\000\000\000\000\000\000\000\000\000\0005\152\000\000\000\000\000\000\000\000\000\000\000\000\002\142\000\000\000\000\000\000\000\000\000\000\000\000\004n\000\000\000\00058\000\000\000\000\000\000\030N\000\000\000\000\002\242\000\000\000\000\000\0005\210\000\000\000\000\000\000\000\000+\226\000\000\000\000\000\000\000\000\004\164\007L\000\000,\"\000\000\000\000\000\000\000\000\024\208\0042\000\000\025R\000\000\000\000\n*\000\000-*\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004v\000\000\000\0005\248\000\000\000\000\000\000-0\000\000\000\000\004R\000\000\000\000\013\236\000\000\026\020\000\000\000\000$4\000\000\000\000\000\000\003\026\000\000\000\0006^\000\000\000\000\000\000\000\000-\176\000\000\000\000\000\000\000\000\006*\015\178\000\000-\180\000\000\000\000\000\000\000\000\000\000\000\000\014\174\000\000\000\000\005\214\000\000\0150\000\000\003\026\000\000\000\000\005n+\154\000\000\005\226\000\000\000\000\000\000\000\000\004\138\000\000*\018\000\000\026\150\005(\027X\000\000\005P\000\000\015\242\000\000\016v\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\152\027\218\0038\028\156\000\000\000\000\000\000\005~\000\000\0178\000\000\006\186\000\000\000\000\019\254\004L\029^\000\000\006(\000\000\017\186\029\224\000\000\000\000\018|\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\238\007h\000\000\007\"\000\000\000\000\000\000\000\000\007F\000\000\018\254\000\000\000\000\000\000 \2324\160\000\000\000\000\000\000 h\000\000\000\000\000\000\000\000\025 \004\188\000\000\000\000-\206\000\000\000\000\000\000\000\000\005\006\000\000\000\0006t\000\000\000\000\000\000-\212\000\000\000\000\003\130\000\000\000\000.\194\000\000\000\000\008*\005f\000\000\000\000.\218\000\000\000\000\007v!X\000\000\005z\000\000\000\000.\224\000\000\000\000\000\000\000\000\000\000\000\000\005\204\000\000\000\0006|\000\000\000\000\000\000/\134\000\000\000\000\000\000\000\000\000\000%\002\000\000\000\000\000\000\002\254\000\000\000\000\000\000/\174\000\000\000\000\008\198\006\136\000\000\000\000/\188\000\000\000\000\007\174\000\000\000\000\000\000\000\000\004\138\002\254\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000B\000\000\019\192\000\000\000\000\000\0004\222\000\000\0082\000\000\000\000\000\000\004 \000\000\000\000\006^\020B\000\000\021\004\000\000\000\000\000\000\006\140\000\000\011\160\006\196\012\136\000\000\015\024\000\000\000\000\000\000\006\208\000\000*\164\007x+(\000\000+\160\000\000\000\000\000\000\007\156\000\000\017\162\007\156\000\000\000\000!\218\n*\007\168#\192\000\000(\230\000\000\000\000\000\000\007\202\000\000\020*\008\140\000\000\000\000\000\000\003\012\000\000\000\000\000\000\000\000\000\000\003\164\000\000\000\000\004H\000\000\008$\000\000\000\000\000\000\004z\000\000\000\000\000\000\000\000\000\000\0007\000\000\000\167\004\152\000@\000\000\000\000\000h\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\238\002\154\000\000\000\000\000K\000\000\000\000\000\000\011\240\000\000\000\000\0134\014x\000\000\000\000\000\000\000\000\015H\016>\001.\000\000\016\138\000\000\000\000\000\000\000\000\000\000\000\000\007\194\000\000\000\000\011>\000\000\000\000\004\178\000\000\000\000\011x\000\000\000\000\004\210\000\000\003D\005n\002\156\000\000\000\000\001\144\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\015\008\018T\000\000\000\000\000\000\000\000\017\146\000\000\000\000\020\026\000\000\000\000\000\000\018f\000\000\000\000\n\194\018\210\005\252\000\000\021\176\000\000\000\000\000\000\000\000\000\000\000\000\000;\000\000\007\030\004&\000P\000\000\000\000\000\000\000\000\003\146\000\000\000\000\000\000\000\000\000\000\000\000\004\132\000\000\000\000\000\007\000\000\007(\006\004\003L\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\017\174\000\000\000\000\023\226\022\018\000\000\000\000\000\000\000\000\000\026\000\000\004z\000\000\0206\000\000\000\000\000\000\000\000\000\000\000\000\000\011\021\\\000\000\000\000\022\160\000\000\000\000\000\000\000\000\008\246\000\000\022\212\000\000\000\000\000\000\000\000\0003\000\000\000\000\000\000\000\214\000\000\000\000\001\202\000\000\000\000\000\000\000\000\000\000\000\000\000\00006\006x\000\000\000\000\000\000\026\212\000\000\000\000\008\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\160\000\000\000\000\000\000\000\000\000\000\000\152\008\188\000}\017\024\030$\005z\000\000\000\000\004~\008\n\008@\008B\000\000\000\000\000\000\000\000\000\000\000\000\003T\021\134\000\000\030\162\008$\000\000\000\000\008\224\000\000\022H\000\000\nJ\000\000\000\000\004T\022\202\000\000\031$\000\000\006\254\031\230\000\000\000\000\000\000\015t\004~\000\000\006\148\000\000\000\000\000\000\007\"\000\000\t&\000\000\005\140\030h\000\000\000\000\000\000\000\000\005\170\000\000\005\236\000\000\007\228\000\000\000\000\014t\000\000\000\000\000\000\000\000\008\236\000\000\000\000\004~\008\232\000\000\023\140\000\000\003\026\006R\000\000\000\000\000\000\000\000\000\000\001\212\000\000\000\000\000\000\000\000\000\0000\212\008>\000\000\000}\000\000\000\000\000\000\000\000\000\000\001\220\000\000\t\182\004f\n\226\000\000\002\220\011d\000\000\t\026\000\000\003`\000\000\003\228\000\000\004`\000\000\000\000\000\000\000\000\000\000\008\156\000\000\004\228\000\000\tj\000\000\005h\000\000\003\026\007\002\000\000\001\250\000\000\007\148\006\160\000\000\002\004\000\000\008\n\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\008Z\000\000\008\192\000\000\000\000\000\000\000\000\000\000\006\194\000\000\000\000\006\224\006D\008h\000\000\008v\000\000\000\000\006\018\0024\000\000\007\190\000\000\000\000\000\000\000\000\008\142\000\000\000\000\000\000\000\000\000\000\000\000\008h\008V\008\186\008\224\008|\008\186\000\000\000\000\008n\008\190\008\240\008\138\008\200\000\000\000\000\td\000\000\000\000\000\000\000\000\t\148\000\000\000\000"), (16, "\001\200\001\223\004r\002!\002\"\004\127\000>\002!\002\"\004P\005\151\004g\004\206\005\152\000>\001%\000\n\000h\002m\003n\003V\001<\004}\004t\000\210\000>\0016\000\017\004e\004\204\004\207\004t\004h\004t\004\222\005\019\004\225\000>\004s\000\210\000\t\000\231\000\016\000>\003!\001%\001\202\001?\000*\001'\001\203\004\223\004\222\004\223\004\226\004t\004\226\004t\000h\001\200\002\014\000j\000}\000\167\005\156\000*\000k\001t\000j\004\223\000l\000\212\004\226\004t\000h\000\213\004k\002\143\000q\001&\002\164\004u\004\018\000j\005\003\004\211\000\212\0009\000>\004u\000\213\004u\001\200\001\223\000u\003\157\004n\001\228\005_\001 \004\212\000\226\000j\000j\005`\001\202\000>\000k\0008\001\203\005a\000l\003 \004u\005\006\004u\000\226\000\210\000j\000\233\004\019\000j\0050\000k\002$\002\145\005\021\000l\000*\002\146\000\247\004u\004\251\000*\002\\\000u\003!\000h\001\202\000\005\000>\000q\001\203\000*\001\216\000\210\001\162\000\233\000\176\002a\004l\000u\001@\002b\000\164\001D\003(\000+\001\217\003\159\003|\000j\000\008\000\t\000\212\000\164\000\165\003)\000\213\000\178\004l\003j\001\030\001 \001x\000v\001E\000\164\000\177\000\250\005c\000j\000\227\000\164\000\165\0052\000k\002f\0053\000j\000l\003W\000\212\003v\000\226\000\248\000\213\000\227\003<\000w\001=\005d\003\141\001\216\003N\001\232\0057\000\016\004\213\002\143\004\142\004t\002\168\004\254\000u\000\174\000v\001\217\001g\000\238\005\t\002\159\000\226\005\023\005\024\001\233\002\\\001A\000\164\000\165\001\234\004\254\000v\000\174\001\235\002\160\001\216\000n\004\255\001\236\000w\002a\002H\004\170\000\248\002b\000\164\001D\003(\005f\001\217\001\"\002H\002[\001\200\001\223\000w\002\145\005g\005\129\004\168\002\146\004o\005\130\0050\000\232\005\157\0008\000>\004u\000j\004\216\005a\005\158\003 \000\227\001(\002J\000\174\002f\001\152\000\150\000>\0037\005\132\001n\0010\002K\002L\002N\003<\004\013\004\016\000>\005\134\000v\003N\001\232\003!\000\017\001\202\000\249\000y\000\227\001\203\005\236\000\151\005\142\005\143\005\176\000\152\001h\000E\005\237\000\149\0017\000{\001\233\000*\000w\001\200\001\223\001\234\000\251\001\146\005\224\001\235\001\154\005\202\000\241\001\159\001\236\001@\001\133\000>\005\028\005\029\000h\002m\003n\003V\000s\004\168\000\252\000\150\001\200\001\220\001\153\000\253\001\135\001\161\000\251\000\254\002\159\000*\005!\002\229\000\255\005\177\0009\005\147\004W\002\187\001+\003!\000y\001\202\002\160\001i\000\151\001\203\000\252\001+\000\152\002\245\004|\000\253\004\167\001\150\000{\000\254\000j\001\200\001\223\001\139\000\255\000k\000*\002\\\000j\000l\001\202\004}\004t\004\168\001\203\000>\001-\001\216\001\136\005a\005\163\003V\002a\002!\002\"\001,\002b\000\164\001D\003(\005\179\001\217\0050\000u\001\135\003}\001\228\0050\001 \005g\005\129\000\164\001D\002u\005\181\003!\000\187\001\202\002\232\002!\002\"\001\203\000\164\000\165\001F\002\190\003\007\005\245\002!\002\"\002f\005\173\003\007\002u\0037\005\183\003\130\001\200\001\223\002\191\004u\003<\000\210\002\\\000\231\005\185\003\007\003N\001\232\005\209\001h\000>\000F\001\216\004\167\005a\005\163\003V\002a\001p\001w\001s\002b\000\164\001D\003(\004\014\001\217\001\233\003\127\001(\004\168\000\174\001\234\004\027\001+\003)\001\235\001\216\001\156\003j\003!\001\236\001\202\000v\000F\000j\001\203\000*\000\212\004\016\004\215\001\217\000\213\004\174\004U\002f\005\168\003\007\001B\003W\001\163\003v\001\200\001\223\002\\\004\212\003<\000w\001-\002#\003\141\000*\003N\001\232\001\216\004z\000>\001\158\000\226\002a\005a\005\163\003V\002b\000\164\001D\003(\005\169\001\217\004\175\004V\002\246\000x\001\233\000F\002i\005g\005\129\001\234\003\008\000F\002d\001\235\000*\005J\003C\003!\001\236\001\202\004\128\003\029\004\171\001\203\000y\000F\002!\002\"\002f\000\161\003C\003\030\003W\005\170\005\171\001\200\001\223\0036\000{\003<\000*\002\\\004\029\003A\003\143\003N\001\232\003\030\003\132\000>\004\212\001\216\003\013\005a\005\163\003V\002a\005\160\003\247\000j\002b\000\164\001D\003(\005\169\001\217\001\233\000F\005B\003\017\000\227\001\234\003H\005g\005\129\001\235\004\222\000F\002d\003!\001\236\001\202\003\008\000>\004\213\001\203\000*\004\\\000\017\003L\000*\000\215\004a\004\223\002f\005\172\004\226\004t\003W\005\174\005\171\001\200\001\223\004W\003\153\003<\000\210\002\\\000\233\003A\004\229\003N\001\232\003\020\001I\000>\004\163\001\216\001\023\005a\005\163\003V\002a\000F\003\203\000*\002b\000\164\001D\003(\005\169\001\217\001\233\004\161\004\030\004\164\004t\001\234\000\252\005g\005\129\001\235\001%\005X\002d\003!\001\236\001\202\0009\000F\000j\001\203\000\255\000\212\003p\004u\002\143\000\213\004\218\002\163\002f\005\180\000*\002E\003W\004q\005\171\001\200\001\223\002\\\001q\003<\002G\002o\003p\003A\001\231\003N\001\232\001\216\000\238\000>\000*\000\226\002a\005a\005\163\003V\002b\000\164\001D\003(\005\169\001\217\004u\000F\001u\003\130\001\233\000F\000j\005g\005\129\001\234\002\145\002u\002d\001\235\002\146\004\157\000*\003!\001\236\001\202\004\173\005F\002F\001\203\000*\000\210\000*\000\230\002f\000\164\000\177\002F\003W\005\184\005\171\001\200\001\223\003\\\004\029\003<\000F\002\\\000\210\003A\000\229\003N\001\232\003\030\002\252\000>\000*\001\216\003,\002m\003n\003V\002a\000\210\003e\000\231\002b\000\164\001D\003(\005\169\001\217\001\233\000*\004\234\000j\000\227\001\234\000\212\005g\005\129\001\235\000\213\000F\002d\003!\001\236\001\202\000\239\000*\000>\001\203\000j\003\185\003\143\000\212\004\197\004t\003g\000\213\002f\004\231\000\241\000\224\003W\000*\005\171\000j\000\226\003x\000\212\003<\002\159\002\\\000\213\003A\002\143\003N\001\232\002\168\003O\005=\003e\001\216\000\251\000\226\002\160\005u\002a\003s\003\193\000F\002b\000\164\001D\003(\005\169\001\217\001\233\000F\000\226\000F\000*\001\234\000\252\005g\005\129\001\235\000*\000\253\002d\003\135\001\236\000\254\003\146\004u\003f\000>\000\255\000*\002[\001\200\001\219\000*\002\145\001b\002f\000*\002\146\000*\003W\005\140\005\171\001\200\001\223\002\\\005\225\003<\003\210\002!\002\"\003A\000F\003N\001\232\001\216\002v\000>\003\219\000\227\002a\002m\003n\003V\002b\000\164\001D\003(\001^\001\217\004\022\003|\005\222\002\247\001\233\000j\000\227\001\202\003)\001\234\001R\001\203\002d\001\235\001\205\000*\003\138\003!\001\236\001\202\005v\000\227\005\187\001\203\001S\004%\005-\003\168\002f\003\229\000\164\000\177\003W\003\138\003v\001\200\001\223\003\030\000h\003<\005e\004'\000\193\003A\000j\003N\001\232\005\234\004(\000>\003\140\001\214\002u\002m\003n\003V\002\143\0025\003\162\002\168\002\159\002\219\002\240\002\222\004'\000*\001\233\003\139\002D\002\187\004\219\001\234\002\148\004\232\002\160\001\235\000F\004/\002\157\003!\001\236\001\202\000j\0042\003\162\001\203\000h\000k\005.\000\252\000q\000l\003\164\0041\000>\002\225\005]\000\164\001D\0041\000j\005\191\005.\001\001\002\145\001\216\004\220\002\\\002\146\004\233\001T\000>\004\151\005\235\001|\000u\000>\001\216\003\163\001\217\005\210\005\215\002a\003\254\002\184\004\003\002b\000\164\001D\003(\000j\001\217\003z\003|\005B\000k\001\200\001\223\005N\000l\003)\000E\001\\\002\190\002d\001]\000>\000\174\003\030\000\146\000>\004d\005\216\004\003\002m\003n\003V\002\191\005i\004\005\002f\005B\005B\000u\003W\0049\003v\005\001\004e\002\\\005\202\003<\004h\004t\000F\003A\003\209\003N\001\232\001\216\003!\004;\001\202\004<\002a\004?\001\203\004\004\002b\000\164\001D\003(\004H\001\217\003\161\003|\000v\005\221\001\233\004;\002\159\0041\003)\001\234\005\220\005\011\002d\001\235\004J\004K\005\202\000\210\001\236\000\233\002\160\000>\000@\001~\000C\000>\000w\003\021\002f\005;\000>\004J\003W\005w\003v\001\200\001\223\004u\005Q\003<\000\164\000\165\005\131\003A\003\025\003N\001\232\005*\003\030\000>\000v\000E\003\030\002m\003n\003V\005\230\000\164\001D\005\149\003\253\000j\000\164\000\165\000\212\004\203\001\233\005\202\000\213\000\149\001F\001\234\001\200\001\218\000w\001\235\002\\\005\160\000>\003!\001\236\001\202\004\204\004\207\004t\001\203\001\216\005E\004\152\002\190\000\174\002a\000\164\000\177\000\226\002b\000\164\001D\003(\000\150\001\217\004\026\003|\002\193\004\155\001p\005\178\001s\005\203\003)\004\254\004N\000\174\002d\005D\005C\000j\005\160\001\202\005\166\000y\005.\001\203\005\240\000\151\005\247\005v\0041\000\152\002f\005\253\005\232\005x\003W\000{\003v\001\200\001\223\005\238\005\254\003<\005\241\004u\004v\003A\005\239\003N\001\232\005\205\005\248\000>\005\242\002\143\005\243\005a\002\168\003 \005\246\005\249\005\182\005\250\000\164\001D\006\002\000\000\000\164\005<\001\233\005.\002\\\000\164\000\177\001\234\000\000\001F\000\227\001\235\005H\005?\001\216\003!\001\236\001\202\000\000\002a\001m\001\203\000\000\002b\000\164\001D\003(\000\000\001\217\005\127\003|\002[\000\000\005\175\005\207\002\145\005(\003)\000\000\002\146\000\000\002d\000\000\000\000\001p\002\143\001s\005\234\002\168\000\000\000\000\001\216\000\000\000\164\001D\005\234\000\000\002f\000\251\000\000\002u\003W\000\000\003v\002\143\001\217\005p\002\168\003<\005\235\000\000\005\235\003A\000*\003N\001\232\000\000\000\000\000\252\000\000\000\000\000\000\000\000\000\253\000\000\000\000\005\016\000\254\000\000\002[\000\000\000\000\000\255\002\145\005{\001\233\005|\002\146\005s\000\000\001\234\005t\000\000\000\174\001\235\002\\\001\200\001\221\002[\001\236\000\000\000\000\002\145\000\000\000\000\001\216\002\146\000\000\000\000\000\000\002a\001\200\001\223\000\000\002b\000\164\001D\003(\005\162\001\217\004\203\002\159\002\219\002\220\002\222\000>\000\000\005g\005\129\005a\002\187\003 \005\165\000\000\000\000\002\160\000\000\004\204\004\207\004t\000j\000\000\001\202\000\000\000\000\000\000\001\203\000\000\002f\000\000\000\000\000\000\0037\005\167\000\000\003!\002\225\001\202\000\000\003<\000\000\001\203\000\000\003A\000\000\003N\001\232\000\000\004\221\000\000\000\000\000>\000F\005\161\000\000\000\000\001\200\001\223\000\000\002\159\002\219\005U\002\222\000\000\000\000\000\000\001\233\000\000\002\187\004\154\000>\001\234\000\000\002\160\005a\001\235\003 \004u\002\159\002\224\001\236\002\222\001\200\001\201\002\190\000\000\000\210\002\187\000\233\000\000\004\160\000\000\002\160\000\000\002\225\000\000\000\000\000\000\002\191\003\"\003!\000\000\001\202\000\000\000\000\000\000\001\203\004\161\000\000\004\164\004t\000h\000\000\002\225\000\000\000q\003&\000\000\005\164\000\000\001\216\000\000\000\000\000\000\000\000\002\\\000j\000\000\001\202\000\000\000j\000\000\001\203\000\212\001\217\001\216\000\000\000\213\000\000\000\000\002a\000\000\002\190\000\000\002b\000\164\001D\003(\005\162\001\217\000\000\000\000\004|\001\200\001\223\000j\002\191\005g\005\129\000\000\000k\002\190\005\165\000\226\000l\000\000\000\000\000>\004u\004}\004t\002m\000\000\003 \001\021\002\191\000\000\000\000\002f\000\000\000\000\002\004\0037\005\167\000\000\000\000\004\236\000\000\000u\003<\002\\\000\164\000\165\003A\000\000\003N\001\232\003!\000\000\001\202\001\216\001\233\000\210\001\203\000\233\002a\001\200\001\223\000\000\002b\000\164\001D\003(\005\162\001\217\001\236\001\233\000\000\001\200\001\223\000\000\001\234\005g\005\129\000\000\001\235\001\216\005\165\004u\004 \001\236\000\000\000>\003\156\000\000\000\000\002m\000\000\003 \004\152\001\217\000\174\000\000\002f\000\227\000\000\000j\0037\005\167\000\212\000j\000\000\001\202\000\213\003<\000\000\001\203\000\000\003A\000\000\003N\001\232\003!\000>\001\202\000\000\000\000\000\000\001\203\000v\004*\000\000\000\000\000>\000\000\000\000\004\176\000\000\000\000\000\226\000\000\001\233\000\000\000\000\000\000\000\000\001\234\002\\\000\149\000\000\001\235\000\000\000\251\000w\003\154\001\236\000\000\001\216\003\156\000\000\000\000\000\000\002a\001\228\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\252\000\000\004|\001\200\001\223\000\253\000\150\000\000\003)\000\254\002k\000\000\003\145\000\000\000\255\000\000\000\000\000>\000\000\004}\004t\002m\003\027\003 \000\000\000\000\004\131\000y\002f\000\000\000\000\000\151\0037\003\147\000\000\000\152\000\000\000>\001\216\003<\002\\\000{\000\000\003A\000\000\003N\001\232\003!\000\227\001\202\001\216\000\000\001\217\001\203\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\001\230\001\233\000\000\001\200\001\223\000\000\001\234\000\000\003)\004,\001\235\0039\003\145\004u\000\000\001\236\000\000\000>\000\000\000\000\000h\002m\003:\003V\000\190\000\000\000\164\000\165\002f\000\000\000\000\000\251\0037\003\147\001\232\000\000\000\164\000\165\000\000\003<\000\000\000\000\000\000\003A\000\000\003N\001\232\003!\000\000\001\202\000\000\000\252\000\000\001\203\001\233\000\000\000\253\000\000\000h\001\234\000\254\000\000\000q\001\235\000j\000\255\001\233\000\000\001\236\000k\000\000\001\234\002\\\000l\001\128\001\235\000\174\000\000\001\200\001\221\001\236\000\000\001\216\000\000\001*\000>\000\174\002a\001\200\001\221\000\000\002b\000\164\001D\003(\000\000\001\217\000u\000\000\004|\001\200\001\223\000j\000\000\000\000\003)\000\000\000k\003Y\003[\000\000\000l\000\164\000\165\000>\000\000\004}\004t\002m\003:\003V\002\002\000j\004\137\001\202\002f\000\000\000\000\001\203\0037\003]\000\000\000j\000\000\001\202\000u\003<\002\\\001\203\005x\003_\000\000\003N\001\232\003!\000\000\001\202\001\216\000\000\000\000\001\203\000\000\002a\000\210\000\000\000\233\002b\000\164\001D\003(\001\130\001\217\000\174\001\233\000\000\001\200\001\223\000\000\001\234\004\160\003)\000\000\001\235\003^\002d\004u\000\000\001\236\000v\000>\000\210\000\000\000\228\002m\003:\003V\004\161\000\000\004\164\004t\002f\000\000\000\000\000\000\003W\000\000\003X\000j\000\000\000\000\000\212\003<\000w\004|\000\213\003A\000\000\003N\001\232\003!\000>\001\202\000\000\000>\000\000\001\203\000v\005;\000\000\000\000\004}\004t\001\216\000\000\000j\000\164\001D\000\212\001\233\000\000\000\226\000\213\001\216\001\234\002\\\000\149\001\217\001\235\005p\000\000\000w\000\000\001\236\002t\001\216\000\000\001\217\004u\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\226\001\217\000\000\000\000\002u\001\200\001\223\000\000\000\150\005z\003)\000\000\000\000\005s\002d\000\000\005t\000*\000\174\000>\000\000\000\000\004u\002m\003n\003V\000\000\000\000\004\135\000y\002f\000\000\000\000\000\151\003W\000\000\003X\000\152\000\000\000\000\000\000\003<\002\\\000{\000\000\003A\001\233\003N\001\232\003!\000\000\001\202\001\216\000>\000\227\001\203\001\233\002a\000\000\000\000\001\238\002b\000\164\001D\003(\000\000\001\217\000\000\001\233\004|\001\240\001\200\001\223\001\234\000\000\003)\000\000\001\235\000\000\002d\004.\000\227\001\236\002t\000\000\000>\004}\004t\000\000\002m\003n\003V\000\000\000\164\000\165\002f\000\164\001D\004\182\003W\000\000\003X\000\251\000\000\000\000\000\000\003<\004|\005>\005b\003A\000\000\003N\001\232\000\000\003!\000\000\001\202\000\000\000\000\000\000\001\203\000\252\000\000\004}\004t\000F\000\253\000\000\000\000\000\000\000\254\004\148\001\233\000\000\000\000\000\255\002\143\001\234\002\\\002\168\001\132\001\235\000\174\003\005\004u\003\019\001\236\000\000\001\216\000\000\000h\000\000\000\000\002a\000\189\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\003u\000>\000\000\001\200\001\223\005;\000\000\003)\003P\000\000\000\000\002d\000\000\000\000\000\000\000\000\002[\000>\004u\000\000\002\145\002m\003n\003V\002\146\003T\000\000\002f\000\164\001D\000j\003W\000\000\003v\000\000\000k\000\000\000\000\003<\000l\002\\\002\249\003A\000\000\003N\001\232\000\000\003!\000\000\001\202\001\216\000\000\000\000\001\203\000\000\002a\000\210\000\000\000\233\002b\000\164\001D\003(\000u\001\217\001\233\003w\000\000\001\200\001\223\001\234\000h\004\160\003)\001\235\000i\003\005\002d\003\019\001\236\000\000\000\000\000>\000\000\000\000\004\222\002m\003\148\003V\004\161\004\146\004\164\004t\002f\000\000\000\000\000\000\003W\000\000\003v\000j\000\000\004\223\000\212\003<\004\226\004t\000\213\003A\000\000\003N\001\232\003!\000\000\001\202\000j\002\159\000\000\001\203\002\226\000k\000\000\000\000\000h\000l\002\187\000\000\000q\004\144\000\000\002\160\001\233\000\000\000\226\000\000\000\000\001\234\002\\\000\000\000\000\001\235\000\164\005<\000\000\000v\001\236\003\150\001\216\000u\000\000\004u\002\228\002a\005G\005?\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\003\137\004u\001\200\001\223\000j\000w\000\000\003)\004|\000k\000\000\002d\000\000\000l\000\000\000\000\000>\004|\000\000\000\000\002m\003\148\003V\0029\000\000\004}\004t\002f\000\000\000\000\002\234\003W\000\000\003v\004}\004t\002\190\000u\003<\002\\\000\000\000\000\003A\000\000\003N\001\232\003!\000\000\001\202\001\216\002\191\000\227\001\203\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\001\233\000v\001\200\001\223\000\000\001\234\004|\003)\000\000\001\235\003\170\002d\004>\000\000\001\236\003\152\000>\000\000\000\000\004u\002m\003:\003V\004}\004t\000w\000\000\002f\004u\000\000\004\185\003W\000\000\003\151\000\251\000\000\002\143\000\000\003<\002\162\000\000\000\000\003A\004\239\003N\001\232\003!\000\000\001\202\000\000\000\000\000\000\001\203\000v\000\252\000\000\000\000\000h\000\000\000\253\000\000\000q\000\000\000\254\000\000\001\233\000\000\000\210\000\255\000\211\001\234\002\\\000\149\000\000\001\235\000\000\000\000\000w\000\000\001\236\000j\001\216\004u\000\000\002\145\000\000\002a\000\000\002\146\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\000\000\000\000\001\200\001\223\000j\000\150\000\000\003)\000\000\000k\000\000\002d\000\000\000l\000j\000\000\000>\000\212\000\000\000\000\002m\000\213\003 \002;\000\000\000\000\000y\002f\000\000\000\000\000\151\003W\004\180\003\151\000\152\000\000\000\000\000u\003<\002\\\000{\004\192\003A\000\000\003N\001\232\003!\000\226\001\202\001\216\000\000\000\000\001\203\000\000\002a\000\210\000\000\000\233\002b\000\164\001D\003(\000\000\001\217\002u\001\233\000\000\001\200\001\223\000\000\001\234\004\160\003)\000\000\001\235\000\000\002d\003\007\004\020\001\236\000\000\000>\003\156\002\159\004\222\002m\000\000\003 \004\161\000\000\004\164\004t\002f\000\000\000\000\004\201\003W\002\160\003X\000j\000\000\004\223\000\212\003<\004\226\004t\000\213\003A\000\000\003N\001\232\003!\000\000\001\202\000\000\000\000\000\000\001\203\000v\000\000\001+\000\000\000h\000\000\001\200\001\221\000q\000\000\000\227\000\000\001\233\000\000\000\226\000\000\000\000\001\234\002\\\000\149\000\000\001\235\000\000\000\000\000w\004\"\001\236\000\000\001\216\003\156\000\000\004u\000\000\002a\000\000\000\000\001-\002b\000\164\001D\003(\000\000\001\217\000\000\000\000\004u\001\200\001\223\000j\000\150\000j\003)\001\202\000k\000\000\003\145\001\203\000l\000\000\000\000\000>\000\000\000\000\000\000\002m\000\000\003 \002=\000F\000\000\000y\002f\000\000\003C\000\151\0037\003\147\000\000\000\152\000\000\000\000\000u\003<\002\\\000{\000\000\003A\000\000\003N\001\232\003!\000\000\001\202\001\216\000\000\000\227\001\203\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\001\233\000\000\001\200\001\223\004\222\001\234\003H\003)\000\000\001\235\000\000\003\145\004M\004$\001\236\000\000\000>\003\156\000\000\000\000\002m\004\223\003 \003L\004\226\004t\000\000\002f\000\000\000\000\004\188\0037\003\147\000\000\000\251\000\000\000\000\000\000\003<\000\000\000\000\001\216\003A\004\252\003N\001\232\003!\000\000\001\202\004|\000\000\000\000\001\203\000v\000\252\001\217\000\000\000h\000\000\000\253\000\000\000q\000\000\000\254\000\000\001\233\004}\004t\000\255\000\000\001\234\002\\\000\149\000\000\001\235\000\000\000\000\000w\005K\001\236\000\000\001\216\003\156\004u\000\000\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\000\000\004|\001\200\001\223\000j\000\150\000\000\003)\000\000\000k\005S\003\145\000\000\000l\000\000\000\000\000>\000\000\004}\004t\002m\003:\003V\000\000\000\000\001\222\000y\002f\004u\000\000\000\151\0037\003\147\000\000\000\152\000\000\000\000\000u\003<\002\\\000{\000\000\003A\000\000\003N\001\232\003!\000\000\001\202\001\216\000\000\000\000\001\203\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\001\233\000\000\001\200\001\223\004\222\001\234\000\000\003)\000\000\001\235\002\143\003\145\004u\002\161\001\236\000\000\000>\000\000\000\000\000\000\002m\004\223\003 \000\000\004\226\004t\000\000\002f\005\004\000\000\004\222\0037\003\147\000\000\000>\000@\000A\000C\003<\000\000\000\000\000\000\003A\002\242\003N\001\232\003!\004\223\001\202\000\000\004\226\004t\001\203\000v\000j\000\000\000\000\000h\002\145\000\000\000\000\000q\002\146\000\000\000E\001\233\000\000\000\000\000\000\000\000\001\234\002\\\002\182\004\199\001\235\000\000\000\000\000w\005Y\001\236\000\000\001\216\003\156\004u\000\000\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\000\000\000\000\001\200\001\223\000j\000\150\000\000\003)\000\000\000k\005\133\002d\004u\000l\000\000\000\000\000>\000\000\000\000\000\000\002m\003:\003V\000\000\000\000\004\243\000y\002f\000\000\000\000\000\151\003W\000\000\003X\000\152\000\000\000\000\000u\003<\002\\\000{\000\000\003A\000\000\003N\001\232\003!\002\143\001\202\001\216\002\168\000\000\001\203\000\000\002a\000\000\000\000\002\159\002b\000\164\001D\003(\000\000\001\217\000\000\001\233\003\165\001\200\001\223\004\160\001\234\002\160\003)\000\000\001\235\000\000\003\145\000\164\001D\001\236\000\000\000>\000\000\000\000\000\000\002m\004\161\003V\004\164\004t\001F\000j\002f\005\007\000\000\002\145\0037\003\147\000\000\002\146\000\000\001m\000\000\003<\000\000\000\000\000\000\003A\002\180\003N\001\232\003!\000\000\001\202\000\000\000\000\000\000\001\203\000v\005\014\000\000\000\000\000\000\000\000\000\000\001p\000\000\001s\000\000\000\000\001\233\000\000\000\000\000\000\000\000\001\234\002\\\002\182\000\000\001\235\000>\000D\000w\000C\001\236\000\000\001\216\004u\000\000\000\000\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\000\000\000\000\001\200\001\223\000\000\000\150\000\000\003)\000E\000\000\000\000\002d\000\000\003Z\000\000\000\000\000>\000\000\000\000\000\000\002m\000\000\003 \000\000\000\000\000\000\000y\002f\000\000\002\159\000\151\003W\000\000\003X\000\152\000\000\000\000\000\000\003<\002\\\000{\000\000\003A\002\160\003N\001\232\003!\000\000\001\202\001\216\000\000\000\000\001\203\000\000\002a\000\000\000>\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\001\233\000\000\001\200\001\223\000\000\001\234\000\000\003)\000\000\001\235\000\000\003\167\000\000\003\031\001\236\000\000\000>\000\000\000\000\000\000\002m\003\184\003 \000\000\000\000\000\000\000\000\002f\004\245\000\000\000\000\003W\000\000\003\169\000>\000@\001z\000C\003<\000\000\000\000\000\000\003A\000\000\003N\001\232\003!\002\190\001\202\000\000\000\000\000\000\001\203\000\164\001D\000\000\000\000\000\000\000\000\000\000\000\000\002\195\000\000\000\000\000E\001\233\001F\000\000\000\000\000\000\001\234\002\\\000\000\000\000\001\235\000\000\000\210\001m\000\231\001\236\000\000\001\216\002\143\000\000\000\000\002\168\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\000\000\000\000\001\200\001\223\001p\000\000\001s\003)\000\000\000\000\000\000\0035\000\000\003;\000\000\000\000\000>\000\000\000\000\000\000\002m\000\000\003 \000j\000\000\000\000\000\212\002f\000\000\002[\000\213\0037\0038\002\145\000\164\001D\000\000\002\146\003<\002\\\000\000\000\000\003A\000\000\003N\001\232\003!\003\190\001\202\001\216\000\000\000\000\001\203\000\000\002a\000\000\000\226\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\001\233\000\000\001\200\001\223\000\000\001\234\000\000\003)\000\000\001\235\000\000\0035\000\164\001D\001\236\000\000\000>\003\202\000\000\003\208\002m\000\000\003 \000\000\000\000\001F\000\000\002f\000\000\000\000\000\000\0037\0038\000\210\000\000\000\233\001m\000\000\003<\000\000\000\000\000\000\003A\000\000\003N\001\232\003!\000\000\001\202\000\000\000\000\000\000\001\203\000\000\000\210\000\000\000\231\000\000\000\000\000\000\001p\000\000\001s\005'\002\159\001\233\000\000\002\235\000\000\000\000\001\234\002\\\000\227\002\187\001\235\000\000\000\000\000j\002\160\001\236\000\212\001\216\000\000\000\000\000\213\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\000\000\000j\001\200\001\223\000\212\000\000\000\000\003)\000\213\000\000\000\000\0035\000\000\000\226\000\000\000\000\000>\000\000\000\000\000\000\002m\000\000\003 \000\000\000\000\000\000\000\000\002f\000\000\000\000\000\000\0037\0038\000\000\000\226\000\000\000\000\000\000\003<\002\\\000\000\000\000\003A\000\252\003N\001\232\003!\000\000\001\202\001\216\002\190\000\210\001\203\000\231\002a\000\000\000\000\001\003\002b\000\164\001D\003(\000\000\001\217\002\191\001\233\000\000\001\200\001\223\003y\001\234\000\000\003)\000\000\001\235\000\000\003r\000\000\000\000\001\236\000\000\000>\000\000\000\000\000\000\002m\000\000\003 \000\000\000\000\000\000\000\000\002f\000\000\000\227\000j\0037\003t\000\212\001\200\001\223\000\000\000\213\003<\000\000\000\000\000\000\003A\000\000\003N\001\232\003!\000\000\001\202\000\000\000\227\000\000\001\203\000\000\003b\005(\000\000\000\000\000\000\001\200\001\221\000\000\000\000\000\226\000\000\001\233\000\000\000\000\000\000\000\000\001\234\002\\\000\000\000\000\001\235\000\000\000\000\000\251\002[\001\236\001\202\001\216\000\000\000\000\001\203\000\000\002a\005+\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\000\252\000\000\001\200\001\223\003q\000\253\000j\003)\001\202\000\254\000\000\003r\001\203\000\000\000\255\000\000\000>\000\000\000\000\000\000\002m\000\252\003 \000\000\000\000\000\000\000\000\002f\000\000\000\000\003h\0037\003t\000\000\001\228\001\005\000\000\000\000\003<\002\\\000\000\000\000\003A\000\000\003N\001\232\003!\000\227\001\202\001\216\000\000\000\000\001\203\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\001\233\000\000\000\000\003\133\000\000\001\234\002\\\003)\000\000\001\235\000\000\003\134\001\200\001\221\001\236\000\000\001\216\000\000\000\000\000\000\000\000\002a\000\000\000\000\000\000\002b\000\000\002f\000\000\000\000\001\217\0037\003\136\000\000\001\200\001\223\000\000\000\000\003<\000\000\000\000\001\216\003A\003j\003N\001\232\000\000\000\000\000>\000\000\000\252\000\000\002m\000\000\003 \001\217\000j\000\000\001\202\002f\000\000\000\000\001\203\000\000\001\007\001\233\000\000\000\000\000\000\000\000\001\234\002\\\000\000\000\000\001\235\000\000\000\000\001\232\003!\001\236\001\202\001\216\000\000\000\210\001\203\000\231\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\001\233\000\000\001\200\001\223\003\131\001\234\000\000\003)\000\000\001\235\000\000\003r\000\000\000\000\001\236\000\000\000>\003\144\000\000\000\000\002m\000\000\003 \000\000\000\000\001\233\000\000\002f\000\000\000\000\000j\0037\003t\000\212\000\000\000\000\000\000\000\213\003<\001\242\000\000\000\000\003A\000\000\003N\001\232\003!\000\000\001\202\000\000\000>\000\000\001\203\000\000\005;\000\000\000\000\000h\000\000\001\216\000\000\000q\000\000\000\226\000\000\001\233\000\000\000\000\000\000\000\000\001\234\002\\\000\000\001\217\001\235\000\000\000\000\001\200\001\221\001\236\000\000\001\216\003\149\000\000\000>\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\000\000\000\000\001\200\001\223\000j\000\000\000\000\003)\000\000\000k\000\000\003\145\005O\000l\000\000\000\000\000>\000\000\000\000\000\000\002m\000\000\003 \000\000\000j\000\000\001\202\002f\000\000\000\000\001\203\0037\003\147\000\000\000\000\000\000\000\000\000u\003<\002\\\000\000\005o\003A\001\233\003N\001\232\003!\000\227\001\202\001\216\000\000\000\000\001\203\000\000\002a\000\000\000\000\001\244\002b\000\164\001D\003(\000\000\001\217\000\000\001\233\000\000\001\200\001\223\000\000\001\234\000\000\003)\000\000\001\235\000\000\003\145\005[\000\000\001\236\000\000\000>\000\000\000\000\000\000\002m\000\000\003 \000\000\000\000\000\000\000\000\002f\000\164\005<\000\000\0037\003\147\000\000\000\000\000\000\000\000\000\000\003<\000\000\005>\005?\003A\003\003\003N\001\232\003!\000\000\001\202\000\000\000\252\000\000\001\203\000v\000\000\000\000\000\000\000\000\000\000\001\216\000\000\000\000\000\164\001D\001\t\001\233\000\000\000\210\000\000\000\231\001\234\002\\\002\182\001\217\001\235\005p\000\000\000w\000\000\001\236\000\000\001\216\000\000\000\000\000\000\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\000\000\000\000\000\000\001\200\001\223\000\000\000\150\000\000\003)\000\000\000\000\005s\005P\005^\005t\000j\000\174\000>\000\212\000\000\000\000\002m\000\213\003 \000\000\000\000\000\000\000y\002f\000\000\000\000\000\151\0037\005R\000\000\000\152\000\000\000\000\000\000\003<\002\\\000{\000\000\003A\001\233\003N\001\232\003!\000\226\001\202\001\216\000\000\000\000\001\203\000\000\002a\001\200\001\221\001\246\002b\000\164\001D\003(\000>\001\217\000\000\001\233\000\000\001\200\001\223\000\000\001\234\000\000\003)\000\000\001\235\000\000\005P\000\000\000\000\001\236\000\000\000>\000\000\000\000\000\000\003\183\000\000\000\000\000\000\000\000\000\000\000\000\002f\000\000\000\000\000\000\0037\005R\000\000\000j\000\000\001\202\000\000\003<\003\215\001\203\000\000\003A\000\000\003N\001\232\003\218\000\000\001\202\000\000\001Y\000\000\001\203\000h\000\000\000\000\000h\000s\000\000\000\000\000}\000\000\000\000\000\227\001S\001\233\001\200\001\223\003\224\000\000\001\234\002\\\000\000\000\000\001\235\000\000\000\000\000\000\000\000\001\236\000>\001\216\000\000\000\000\003\183\000\000\002a\000\000\000\000\000\000\002b\000\164\001D\003(\000\000\001\217\004\006\000j\000\000\001\228\000j\001 \000k\004\n\003)\000k\000l\000\000\005P\000l\003\218\000\000\001\202\000\000\000\000\000\000\001\203\000\000\000\000\000\000\000\000\000\000\001\200\001\223\002f\000\000\000\000\000\000\0037\005R\000u\000\252\003\224\000u\001\216\003<\000>\000\164\001D\003A\003\183\003N\001\232\000\000\000\000\001\011\001\216\000\000\001\217\000\000\001T\000\000\000\000\000\000\000\000\000\000\000\164\001D\003\225\003\217\001\217\000\000\001\233\000\000\000\000\000\000\003\218\001\234\001\202\003\226\000\000\001\235\001\203\004\008\000\000\000\000\001\236\001_\000\000\001j\000\000\000\000\001\\\000\000\000\000\001]\000\000\000\174\003\224\000\000\000\000\000\000\000\000\000\000\000\000\000h\000\000\000\000\000\000\000q\003\240\000>\000\000\000\000\004\t\002m\003\252\001\232\000\000\000>\001\216\000v\000\000\000\000\000v\001\233\000\000\000\000\000\000\000\000\000\164\001D\003\225\000\000\001\217\000\000\000\000\001\233\000\000\001\248\000\000\004B\001\234\003\226\000\000\000w\001\235\003\238\000w\000j\000\000\001\236\000\000\000\000\000k\000\000\000\000\000\000\000l\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000h\000x\000\000\000\000\000q\003\240\000\000\001\216\000\000\003\245\000\000\003\252\001\232\000u\000>\000\000\000\000\000\164\001D\003\225\000\000\001\217\000y\000\000\000\000\000y\000\000\000z\000\000\000\000\003\226\000\000\001\233\000\000\003\238\000\000\000{\001\234\000\000\000~\000\000\001\235\000\000\000h\000j\000\000\001\236\000q\000\000\000k\000\000\000\000\000\000\000l\000\000\000\000\002\143\000>\000\000\002\168\000\000\003\240\000\000\000\000\000\000\003\245\000\000\003\252\001\232\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000u\000\000\000\000\000\000\000\000\000\164\001D\003(\000\000\000\000\000j\001\233\000\000\000\164\000\165\000k\001\234\000v\003)\000l\001\235\000>\001o\002[\000C\001\236\000\000\002\145\000\000\000\000\000\000\002\146\000\000\000\168\000\169\000\171\000\172\000\000\000\000\000\000\000\000\000w\004C\000u\000\000\000\000\000\000\000\000\000\000\003<\000\000\000E\000\000\003A\000\000\003N\000\000\000\000\000h\000\000\000\000\000\173\000q\000\174\000\000\000\000\000\150\000\000\000\000\000h\000\000\000\000\000>\000q\000\000\000\000\000\000\000\164\000\165\000\000\000\000\000v\000\000\000>\000\000\000\000\000\000\000y\000\000\000\000\000\000\000\151\000\000\000\000\000\000\000\152\000\000\000\168\000\217\000\171\000\172\000{\000j\000\179\000\000\000w\000\000\000k\000>\000\000\000\000\000l\002m\000j\000\000\000\000\000\000\000\000\000k\000\000\000\164\000\165\000l\002\159\000v\000\173\002\226\000\174\000\000\000\000\000\150\002\143\002\187\000\000\002\168\000u\000\000\002\160\004B\000\000\000\168\001\207\000\171\000\172\000\000\000\000\000u\000\000\000w\000\000\000\000\000y\000h\000\000\000\000\000\151\000q\000\000\002\228\000\152\000\000\000\164\001D\000\000\000\000\000{\000>\000\179\000\173\000\000\000\174\000\000\000\000\000\150\001F\002[\000\000\000\000\002\143\002\145\000\000\002\168\000\000\002\146\000\000\001m\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000y\000\000\000j\000\000\000\151\000\000\002\233\000k\000\152\000\000\000\000\000l\002\190\000\000\000{\001p\000\179\001s\000\164\000\165\000\000\000\000\000v\000\000\000\000\000\000\002\191\000\000\002[\000\164\000\165\000\000\002\145\000v\000\000\000u\002\146\000\000\000\168\002^\000\171\000\172\000\000\000\000\000\000\000\000\000w\000\000\000\000\000\168\002\150\000\171\000\172\000\000\000\164\001D\003(\000w\000\000\000\000\000\000\000h\000\000\000\000\000\000\000q\000\173\003)\000\174\000\000\000\000\000\150\000\000\000\000\000h\000>\000\000\000\173\000q\000\174\000\000\002\159\000\150\000\000\002\186\000\000\000\000\000\000\000>\000\000\002\187\004E\000y\000\000\000\000\002\160\000\151\000\000\003<\000\000\000\152\000\000\003A\000y\003N\000j\000{\000\151\000\179\000\000\000k\000\152\000\164\000\165\000l\000\000\000v\000{\000j\000\179\000\000\000\000\000\000\000k\000\000\000\000\000\000\000l\002\159\000\000\000\000\002\226\000\168\003>\000\171\000\172\002\143\002\187\000u\002\168\000w\000\000\002\160\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000u\000\000\000\000\000h\000\000\000\000\000\000\000q\000\000\000\173\000\000\000\174\002\228\002\190\000\150\000\000\000\000\000>\000h\000\000\000\000\000\000\000q\000\000\000\000\000\000\000\000\002\191\000\000\000j\000\000\000\000\000>\002\145\000\000\000y\000\000\002\146\000\000\000\151\000\000\000\000\000\000\000\152\000\000\000\000\000\000\000j\000\000\000{\000\000\000\179\000k\000\000\002\231\000\000\000l\000\000\002\143\000\000\002\190\002\144\000j\000\000\000\164\000\165\000\000\000k\000v\000\000\000\000\000l\000\000\000\000\002\191\000\000\000\000\000\164\000\165\000h\000u\000v\000\000\000q\000\168\003\242\000\171\000\172\000\000\000\000\000\000\000\000\000w\000>\000\000\000u\000\000\000\181\000\000\000\000\000\172\000\000\000j\000\000\000\000\000w\002\145\000\000\000\000\000\000\002\146\000\000\000\173\000\000\000\174\000\000\000\000\000\150\000\000\000\000\000\000\000\000\000h\000j\000\000\000\173\000q\000\174\000k\002\159\000\150\000\000\000l\000\000\000\000\000\000\000>\000\000\000y\000\000\000\000\000\000\000\151\002\160\000\000\000\000\000\152\000\000\001\200\001\223\000\000\000y\000{\000\000\000\179\000\151\000u\000\164\000\165\000\152\000\000\000v\000\000\000\000\000\000\000{\000j\000\179\002T\004\031\000h\000k\000\164\000\165\000q\000l\000v\000\000\000\000\000\000\000\191\000\000\000\000\000\000\000\000\000w\000\000\000\000\000\000\000\000\000\000\000\000\002[\000\000\001\202\000\194\000\000\000\000\001\203\000u\000w\000\000\002\159\000\000\000\000\001.\000\000\000\174\000\000\000\000\000\150\000\000\002\169\000h\000j\000\000\002\160\000q\000\000\000k\000\196\000\000\000\174\000l\000\000\000\150\000h\000>\000\000\000\000\000q\000y\000\000\000\164\000\165\000\151\000\000\000v\000\000\000\152\000>\000\000\000\000\000\000\000\000\000{\000y\000u\000\000\000\000\000\151\000\000\001\200\001\223\000\152\000\000\000\194\000j\000\000\000\000\000{\000w\000k\000\000\000\000\000\000\000l\000\000\0011\000\000\000j\000\000\002T\003k\000h\000k\000\164\000\165\000s\000l\000v\0014\002\\\000\174\000\000\000\000\000\150\000\000\000\000\000\000\000u\000\000\001\216\001\200\001\223\000\000\002[\002a\001\202\000\191\000\000\002b\001\203\000u\000w\000\000\001\217\000y\000\000\000\000\000\000\000\151\000\000\002T\003a\000\152\001\200\001\221\000j\002d\000\000\000{\000\000\000k\001:\000\000\000\174\000l\000v\000\150\000\000\000\000\000\000\000\000\000\000\002f\000\000\002[\000\000\001\202\000\000\000\000\000\000\001\203\000\000\000\000\000\000\001\"\000\000\000\000\000y\000u\000w\001\232\000\151\000\000\000\000\000\000\000\152\000\000\000j\000\000\001\202\000\000\000{\000\000\001\203\000\164\000\165\000\000\000\000\000v\000\000\001\233\000\000\000\000\000\000\000\150\001\234\000\000\000\164\000\165\001\235\000\000\000v\000\000\002\\\001\236\000\000\000\000\001\183\000\000\000\000\000\000\000\000\000w\001\216\000\000\000y\000\000\000\000\002a\000\151\001\183\000\000\002b\000\152\000\000\000w\000\000\001\217\000\000\000{\000\000\000\000\001\185\000\000\000\174\000\000\000\000\000\150\000\000\000>\002d\000\000\000\000\002m\002\\\002\012\000\000\000\174\000\000\000v\000\150\000h\000\000\000\000\001\216\000q\002f\000\000\000y\002a\000\000\000\000\000\151\002b\000\000\000>\000\152\000\000\001\217\004B\000\000\000y\000{\000w\001\232\000\151\000\000\001\216\000\000\000\152\000\000\002d\000\000\000\000\000\000\000{\001\200\001\223\000\000\000\000\000\000\001\217\000\000\000\000\001\233\000j\000\000\002f\000x\001\234\000k\000\000\000\000\001\235\000l\000\000\002T\002U\001\236\000\000\000\000\000\000\000\000\000\000\000\000\001\232\000\000\001\200\001\223\000y\000\000\000\000\000\000\000\000\000\160\000\000\000\000\000\000\000u\000\000\002[\000\000\001\202\000{\000\000\001\233\001\203\002T\002`\000\000\001\234\000h\000\000\000\000\001\235\000q\000\000\000\000\000\000\001\236\000\000\000\000\000\000\000\000\000\000\000>\000\000\000\000\001\233\000\000\000\000\002[\000\000\001\202\000\000\000\000\000\000\001\203\000\000\000\000\000\000\000\000\001\250\000\000\000\000\001\200\001\223\000\000\000\000\000\164\001D\003(\000\000\000\000\000\000\000j\000\000\000\000\000\000\000\000\000k\000\000\003)\000\000\000l\002T\003m\000\000\000\000\000\000\000\000\000\000\000\000\000h\000\000\000\164\000\165\000s\000\000\000v\000\000\000\000\000\000\000\000\000\000\000\000\004G\000\000\000u\002[\002\\\001\202\000\000\003<\000\000\001\203\000\000\003A\002\127\003N\001\216\000\000\000\000\000w\000\000\002a\000\000\000\000\000\000\002b\000\000\000\000\000\000\000\000\001\217\000\000\000\000\000j\001\200\001\223\000\000\002\\\000k\002\129\000\000\000\174\000l\002d\000\150\000\000\000\000\001\216\000\000\000\000\000\000\000\000\002a\000\000\002T\0044\002b\000\000\000\000\002f\000\000\001\217\000\000\000\000\000\000\000y\000u\000\000\000\000\000\151\000\000\000\000\000\000\000\152\002d\000\000\000\000\001\232\002[\000{\001\202\000\164\000\165\000\000\001\203\000v\000\000\000\000\000\000\000\000\002f\000\000\000\000\000\000\000\000\002\\\000\000\001\233\000\000\000\000\001\200\001\223\001\234\000\000\002\127\001\216\001\235\000\000\001\232\000w\002a\001\236\000\000\000\000\002b\000\000\000\000\000\000\000\000\001\217\002T\0046\000\000\000\000\000\000\000\000\000\000\000\000\001\233\002\166\000\000\000\174\002d\001\234\000\150\000h\000\000\001\235\000\000\000q\000\000\000\000\001\236\000\000\002[\000\000\001\202\000v\002f\000\000\001\203\000\000\000\000\000\000\000\000\000y\000\000\001\200\001\223\000\151\001\200\001\223\000\000\000\152\000\000\000\000\001\232\000\000\002\\\000{\000\000\000w\000\000\000\000\000\000\000\000\000\000\003d\001\216\000j\002T\0048\000\000\002a\000k\000\000\001\233\002b\000l\000\000\000\000\001\234\001\217\000h\000\000\001\235\000x\000q\000\000\000\000\001\236\002[\000\000\001\202\002[\002d\001\202\001\203\000\000\000\000\001\203\000\000\000u\000\000\000\000\000\000\000\000\000y\000\000\000\000\000\000\002f\000\163\000h\000\000\000h\000\000\000}\000\000\000q\000\000\000{\000\000\002|\002\\\001\200\001\221\000j\000\000\001\232\000\000\000\000\000k\000\000\001\216\000\210\000l\000\231\000\000\002a\000\000\000\000\000\000\002b\000\000\000\000\000\000\000\000\001\217\001\233\000\000\000\000\000\000\000\000\001\234\000\000\000\000\000j\001\235\000j\000u\002d\000k\001\236\000k\000\000\000l\000\000\000l\000j\000\000\001\202\000\000\000\000\000\000\001\203\000\000\002f\000\000\000j\000\000\002\\\000\212\000v\002\\\000\000\000\213\000\000\000\000\000\000\000u\001\216\000u\000\000\001\216\001\232\002a\000\000\000\000\002a\002b\000\000\001\"\002b\000\000\001\217\000\000\000w\001\217\000\000\000\000\000\000\000\226\000\000\000\000\001\233\000\000\000\000\002d\000\000\001\234\002d\000\000\000\000\001\235\000\000\000\000\000\000\000\000\001\236\000\000\003\015\000\150\000\000\002f\000\000\000\000\002f\000\000\000\000\000\000\000v\000\000\000\000\000\000\000\000\000\000\000h\000\000\000\000\000h\000q\001\232\000y\000q\001\232\000\000\000\151\000\000\000>\002\182\000\152\000\210\003\023\000\231\000w\000\000\000{\000\000\001\216\000\000\000v\001\233\000v\000\000\001\233\000\000\001\234\000\000\000\000\001\234\001\235\000\000\001\217\001\235\000\000\001\236\000\000\000\000\001\236\000\150\000j\002\182\000\227\000j\000w\000k\000w\000\000\000k\000l\000\000\000\000\000l\000\000\000\000\000j\000\000\000\000\000\212\000\000\000y\001Y\000\213\000h\000\151\000h\000\000\000q\000\152\000q\000\000\000\150\000\000\000u\000{\001S\000u\000\000\000h\000\000\000\000\000h\000q\000\000\000\000\000q\000\000\000\000\000\226\000\000\000y\000\000\000y\000>\000\000\000\000\000\151\000\000\000\000\001\233\000\152\000\000\000\000\000\000\000\128\000\000\000{\000j\000\000\000j\000\252\000\000\000k\001\252\000k\000\000\000l\000\000\000l\000\000\000\000\000\000\000j\000\000\001\013\000j\000\000\000k\000\000\000\000\000k\000l\000\000\000\000\000l\000\000\000\000\000\000\000\000\000\000\000u\000\000\000u\000\000\003$\000\000\001Y\0033\000\164\001D\000\000\000\000\000\000\000\000\000v\000u\000\000\000v\000u\000\000\001S\001T\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\227\000\000\000\000\000\000\002\182\000\000\000\000\002\182\000\000\000w\000\000\000\000\000w\000\000\000\000\000\000\000\000\000\000\000\000\001_\000\000\001`\000\000\000\000\001\\\000\000\000\000\001]\000\000\000\174\000\000\000h\000\000\000\000\000\150\000q\000\000\000\150\000\000\000\000\000\000\000\000\003J\000h\003R\000\000\000h\000q\000\000\000\000\000q\000\000\000v\000\000\000v\000y\000\000\003\188\000y\000\151\003\200\000\000\000\151\000\152\000\164\001D\000\152\000v\000\252\000{\000v\002\182\000{\002\182\000\000\000j\000w\001T\000w\000\000\000k\000\000\001\015\000\000\000l\000\000\002\182\000j\000\000\002\182\000j\000w\000k\000\000\000w\000k\000l\000\000\000\000\000l\000\000\000\150\000\000\000\150\001_\000\000\001e\000\000\000u\001\\\000\000\000\000\001]\000\000\000\174\000\000\000\150\000\000\000\000\000\150\000u\000\000\000y\000u\000y\000\000\000\151\000\000\000\151\000h\000\152\000\000\000\152\000q\000\000\000\000\000{\000y\000{\000\000\000y\000\151\000\000\000\000\000\151\000\152\000\000\000\000\000\152\000h\000\000\000{\000\000\000q\000{\000\000\000h\000\000\000\000\000\000\000q\000\000\000>\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000j\000\000\000\000\000\000\000\000\000k\003\206\000\000\000\000\000l\000\000\000\000\000\000\000\000\000\000\000h\000v\000\000\003\213\000s\000j\003\222\000\000\000\000\000\000\000k\000\000\000j\000v\000l\000\000\000v\000k\000u\000\000\002\182\000l\000\000\000\000\000\000\000w\000\000\001Y\000\000\000h\000\000\000\000\002\182\000q\000\000\002\182\000\000\000w\000u\000\000\000w\001S\005\"\000\000\000j\000u\000\000\000\000\000\000\000k\000\150\000\000\000\000\000l\000\210\000\000\000\231\000\000\000\000\000\000\000\000\000\000\000\150\000\000\000\000\000\150\000\000\000\000\000\000\000\000\000\000\000y\000\000\000j\000\000\000\151\000h\000u\000k\000\152\000q\000\000\000l\000y\000>\000{\000y\000\151\000\000\003\236\000\151\000\152\000\000\000\000\000\152\000\000\000\000\000{\000j\000v\000{\000\212\000\000\000\000\000\000\000\213\000u\000\000\000h\003\250\000\000\000\000\000q\000\000\000\164\001D\004\001\000\000\002\182\000v\000j\005\148\000\000\000w\000\000\000k\000v\001T\000\000\000l\000\000\000\226\000\000\000\000\000\000\000\000\000\000\001Y\002\182\000\000\000\000\000\000\000h\000w\000\000\002\182\000q\000\000\000\150\000\000\000w\001S\000j\000u\001_\000\000\001\141\000k\000v\001\\\000\000\000l\001]\000\000\000\174\000\000\000\000\000\000\000\150\000y\001\200\001\221\000\000\000\151\000h\000\150\000\000\000\152\000q\000\000\000\000\000\000\000w\000{\000\000\000u\000j\000v\000\000\000y\000\000\000k\000\000\000\151\000\000\000l\000y\000\152\000\000\000\000\000\151\000h\000\000\000{\000\152\000s\005/\000x\000\000\000\000\000{\000w\000\227\000\000\000j\000\000\001\202\000\000\000j\000u\001\203\000\000\000\000\000k\000\164\001D\000\000\000l\000y\000\000\000\000\000\000\000\000\000\235\000v\000\000\000\150\001T\000\000\000\000\000h\000\000\000{\000h\000q\000j\000\000\000q\000\000\000\000\000k\000u\000\000\000\183\000l\000\000\000\000\000y\000w\000\000\000\000\000\151\000\000\000\000\001[\000\152\000v\000\000\000\000\001\\\000\000\000{\001]\000\000\000\174\000\000\000\000\000h\000u\000\000\000\252\000q\000\000\000\150\000j\005/\000\000\000j\000\000\000k\000w\000\000\000k\000l\001\017\000\000\000l\000\000\000\000\000\000\000v\000\000\000\000\000\000\000y\000\000\000\000\000\000\000\151\000h\000\000\000\000\000\152\000q\001\216\000\150\000\000\000u\000{\000\220\000u\000j\001\200\001\221\000w\000\000\000k\000\000\001\217\000\000\000l\000\000\000v\000\000\000\000\000\000\000y\000\000\000\000\000\000\000\151\000h\000\000\000\000\000\152\000q\000\000\000\000\000\000\000\150\000{\000\245\002\143\000j\000u\002\168\000w\000\000\000k\000v\000\000\000\000\000l\000\000\000\000\000\000\000j\000\000\001\202\000\000\000y\000\000\001\203\000\000\000\151\000h\000\000\000\000\000\152\000q\000\000\000\150\000\000\000w\000{\000j\000u\000\000\000h\000\000\000k\000\000\000q\000\000\000l\001\233\000j\000\000\000v\000\000\002\145\000v\000y\000\000\002\146\000\000\000\151\000\000\000x\001\254\000\152\000\000\000\000\000\210\000\000\000\231\000{\001$\000u\000j\001\170\000\000\000w\000\000\000k\000w\000\000\000\000\000l\000y\000\000\000\000\000j\000\000\000\237\000v\000\000\000k\000\000\000\000\000\000\000l\000\000\000{\000h\000\000\000\000\000\150\000q\000\000\000\150\000h\000u\000\000\001\174\000q\000\000\000j\000\000\000w\000\212\000\000\000\000\000\000\000\213\000u\001\216\000v\000y\000\000\000\000\000y\000\151\000\000\000\000\000\151\000\152\000\000\000\000\000\152\001\217\000\000\000{\000h\000\150\000{\001\210\000q\000j\000\000\000\226\000w\000\000\000k\000\000\000j\002\159\000l\000\000\000v\000k\000\000\000\000\000\000\000l\000y\000\000\000\000\000\000\000\151\002\160\000\000\000\000\000\152\000\000\000\000\000\150\000\000\002\017\000{\000\000\000u\000\000\000w\000\000\000\000\000\000\000j\000u\000\000\000\000\000h\000k\000v\000\000\000q\000l\000y\000\000\000\000\000\000\000\151\000\000\000\000\000\000\000\152\000v\001\233\000\150\000\000\000\000\000{\002\022\000\000\000\000\000\000\000\000\000w\000\000\000\000\000u\002\000\000\000\000\000\000\000\002\026\000\000\000\000\000\000\000y\000w\000\227\000\000\000\151\000\000\000j\000\000\000\152\000\000\002\190\000k\000\000\000\150\000{\000l\000\000\000\000\000h\000\000\000\000\000\000\000q\000\000\002\197\000h\000\150\000\000\000\000\000q\000\000\000\000\000\000\000v\000y\000\000\000\000\000\000\000\151\000u\000v\000\000\000\152\000\000\000\000\000\000\000>\000y\000{\000\000\000\000\000\151\0021\000\000\000\000\000\152\000h\000w\000\000\002X\000q\000{\000j\000\000\000w\000\000\000\000\000k\000\000\000j\000\252\000l\000v\000\000\000k\000\000\000\000\000\000\000l\000\000\000\000\000\000\000\150\000h\001\019\000\000\000\000\000s\000\000\000\150\000\000\002\153\000\000\000\000\000h\000u\000w\000\000\000s\001Y\000j\000\000\000u\000y\000\000\000k\000\000\000\151\000\000\000l\000y\000\152\000\000\001S\000\151\000>\000\000\000{\000\152\000\000\000v\000\150\002\143\000\000\000{\002\168\000\000\000j\000\000\000\000\000\000\000h\000k\000u\000\000\000}\000l\000\000\000j\002\171\000\000\000\000\000y\000k\000w\000\000\000\151\000l\000\000\002\143\000\152\000\000\002\168\000\000\000\000\000\000\000{\000\000\000\000\000\000\000u\000\000\000\000\000\000\000\000\000\000\002[\000\000\001Y\000\150\002\145\000u\000\000\000\000\002\146\000j\000v\000\000\000\000\000\000\000k\000\000\001S\000v\000l\000\000\000\164\001D\000\000\000\000\000y\000\000\000>\002[\000\151\002\173\000\000\002\145\000\152\001T\000w\002\146\003\176\000\000\000{\000\000\000\000\000w\000u\000\000\000\000\000>\000\000\000\000\000v\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\150\001_\000\000\002q\000\000\000\000\001\\\000\150\004\024\001]\000\000\000\174\000\000\000w\000\000\000\000\000v\000\000\000\000\000\000\001Y\000y\000\000\000\000\000\000\000\151\000\000\000v\000y\000\152\000\164\001D\000\151\000\000\001S\000{\000\152\000>\000\150\001Y\000w\002\159\000{\001T\002\189\000\000\000\000\000\000\000>\000\000\002\187\000w\000>\001S\000\000\002\160\000\000\000\000\000\000\000y\000\000\000\000\000\000\000\151\000v\000x\000\000\000\152\002\159\000\000\001_\002\238\002\255\000{\000\000\001\\\000x\002\187\001]\000\000\000\174\000\000\002\160\000\000\000\000\000\000\000y\000\000\000w\000\000\001Y\001\225\000h\000\000\000\000\000\000\000}\000y\000\000\000\000\000{\001Y\001\227\000\000\001S\001Y\000\000\000\164\001D\000\000\000h\000{\000\000\000\148\000}\001S\000\000\000\000\000\000\001S\001T\000\000\000\000\000\000\002\190\000\000\000\164\001D\000\000\000\000\000\000\000h\000\000\000\000\000y\000}\000j\000\000\002\191\001T\000\000\000k\000\000\000\000\000\000\000l\000\000\001_\000{\003\n\000\000\002\190\001\\\000\000\000j\001]\000\000\000\174\000h\000k\000\000\000\000\000}\000l\000\000\002\191\001_\000\000\003/\000u\000\000\001\\\000\000\000\000\001]\000j\000\174\000\164\001D\000\000\000k\000\000\000\000\000\000\000l\000\000\000\000\000u\000\164\001D\001T\000\000\000\164\001D\000\000\000h\000\000\000\000\000\000\000}\000\000\001T\000j\000\000\000\000\001T\000\000\000k\000u\000\000\000h\000l\000\000\000\000\000}\000\000\000h\001_\000\000\003E\000}\000\000\001\\\000\000\000\000\001]\000\000\000\174\001_\000\000\003\196\000\000\001_\001\\\003\232\000u\001]\001\\\000\174\000j\001]\000\000\000\174\000\000\000k\000\000\002\143\000h\000l\002\168\000v\000}\000\000\000h\000j\000\000\000\000\000}\000\000\000k\000j\000\000\000\000\000l\000\000\000k\000h\000\000\000v\000l\000}\000\000\000u\000h\000w\000\000\000\000\000}\000\000\000\000\000\000\000\210\000\000\000\231\000\000\000\000\000\000\000u\000\000\000v\000j\000j\000w\000u\002\145\000\000\000k\000j\002\146\000\000\000l\000\000\000k\000\000\000\000\000\000\000l\000\000\000\000\000\000\000j\000\000\000\000\000w\000\000\000k\000v\000j\000\000\000l\000y\000\000\000k\000\000\000u\000j\000l\000\000\000\212\000\000\000u\000\000\000\213\000\000\000\130\001\200\001\221\000\000\000y\000\000\000w\000\000\000\000\000u\000\210\000\000\000\231\000\000\000\000\000\000\000u\000\000\000\132\000v\000\000\000\210\000\000\000\231\000\226\000y\000\000\000\000\000\000\000\000\000\000\000\000\001\200\001\221\000v\000\000\000\000\000\000\000\000\000\134\000v\000\000\000\000\000w\000\000\000j\000\000\001\202\000\000\000\000\000\000\001\203\000y\000\000\000j\000\000\002\159\000\212\000w\000\000\000\000\000\213\001\200\001\221\000w\000j\000\136\000\000\000\212\000\000\002\160\000v\000\213\000\000\000\000\000\000\000j\000v\001\202\000\000\000\000\002\143\001\203\002\143\002\168\000\000\002\168\000\226\002\143\000y\000v\002\168\000\000\000\000\000\000\000w\000\000\000v\000\226\000\000\000\000\000w\000\000\000\138\000y\000\227\000j\000\000\001\202\000\000\000y\000\000\001\203\000\000\000w\000\000\000\000\000\000\000\140\000\000\000\000\000w\000\000\000\000\000\142\000j\000\000\000j\000\000\002\145\000\000\002\145\000j\002\146\002\143\002\146\002\145\002\168\000\000\002\190\002\146\000y\000\000\000\000\000\000\001\216\000\000\000y\000\000\002\143\000\000\002\143\002\168\002\199\002\168\000\144\000\000\000\000\000\000\001\217\000y\000\154\000\000\000\000\000\000\000\000\000\000\000y\000\227\002\143\000\000\000\000\002\168\000\252\000\156\000\000\001\216\000\000\000j\000\227\000\000\000\158\002\145\000\000\000\000\000\000\002\146\001\025\000\000\000\000\001\217\000\000\000\000\000j\000\000\000j\000\000\002\145\000\000\002\145\000\000\002\146\000\000\002\146\002\143\000\000\001\216\002\168\000\000\000\000\000\000\002\143\000\000\000j\002\168\000\000\000\000\002\145\000\000\000\000\001\217\002\146\000\000\000\000\000\000\002\159\001\233\002\159\000\000\000\000\000\000\000\000\002\159\000\000\000\000\000\000\000\252\000\000\000\000\002\160\002\006\002\160\000\000\000\000\000\000\000\000\002\160\000\252\000j\000\000\001\027\000\000\002\145\000\000\000\000\000j\002\146\001\233\000\000\002\145\000\000\001\029\000\000\002\146\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\008\000\000\000\000\000\000\000\000\000\000\000\000\002\159\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\233\000\000\000\000\000\000\000\000\002\160\002\159\000\000\002\159\000\000\000\000\000\000\000\000\000\000\002\n\000\000\000\000\000\000\000\000\000\000\002\160\002\190\002\160\002\190\000\000\000\000\002\159\000\000\002\190\000\000\000\000\000\000\000\000\000\000\000\000\002\201\000\000\002\203\000\000\000\000\002\160\000\000\002\205\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\159\000\000\000\000\000\000\000\000\000\000\000\000\002\159\000\000\000\000\000\000\000\000\000\000\002\190\002\160\000\000\000\000\000\000\000\000\000\000\000\000\002\160\000\000\000\000\000\000\000\000\000\000\002\207\002\190\000\000\002\190\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\209\000\000\002\211\000\000\000\000\000\000\002\190\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\213\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\190\000\000\000\000\000\000\000\000\000\000\000\000\002\190\000\000\000\000\000\000\000\000\000\000\000\000\002\215\000\000\000\000\000\000\000\000\000\000\000\000\002\217"))
   
   let semantic_action =
     [|
@@ -1491,9 +1505,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_aexpr = 
-# 1663 "parser_cocci_menhir.mly"
+# 1740 "parser_cocci_menhir.mly"
       ( Ast0.set_arg_exp _1 )
-# 1497 "parser_cocci_menhir.ml"
+# 1511 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1514,12 +1528,12 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 65 "parser_cocci_menhir.mly"
        (Parse_aux.list_info)
-# 1518 "parser_cocci_menhir.ml"
+# 1532 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_aexpr = 
-# 1665 "parser_cocci_menhir.mly"
+# 1742 "parser_cocci_menhir.mly"
       ( let (nm,lenname,pure,clt) = _1 in
       let nm = P.clt2mcode nm clt in
       let lenname =
@@ -1527,7 +1541,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
          Some nm -> Some(P.clt2mcode nm clt)
        | None -> None in
       Ast0.wrap(Ast0.MetaExprList(nm,lenname,pure)) )
-# 1531 "parser_cocci_menhir.ml"
+# 1545 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1549,9 +1563,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_aexpr = 
-# 1673 "parser_cocci_menhir.mly"
+# 1750 "parser_cocci_menhir.mly"
       ( Ast0.set_arg_exp(Ast0.wrap(Ast0.TypeExp(_1))) )
-# 1555 "parser_cocci_menhir.ml"
+# 1569 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1571,9 +1585,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_any_strict = 
-# 1717 "parser_cocci_menhir.mly"
+# 1794 "parser_cocci_menhir.mly"
             ( Ast.WhenAny )
-# 1577 "parser_cocci_menhir.ml"
+# 1591 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1593,9 +1607,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_any_strict = 
-# 1718 "parser_cocci_menhir.mly"
+# 1795 "parser_cocci_menhir.mly"
             ( Ast.WhenStrict )
-# 1599 "parser_cocci_menhir.ml"
+# 1613 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1615,9 +1629,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_any_strict = 
-# 1719 "parser_cocci_menhir.mly"
+# 1796 "parser_cocci_menhir.mly"
             ( Ast.WhenForall )
-# 1621 "parser_cocci_menhir.ml"
+# 1635 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1637,9 +1651,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_any_strict = 
-# 1720 "parser_cocci_menhir.mly"
+# 1797 "parser_cocci_menhir.mly"
             ( Ast.WhenExists )
-# 1643 "parser_cocci_menhir.ml"
+# 1657 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1661,9 +1675,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1191 "parser_cocci_menhir.mly"
+# 1242 "parser_cocci_menhir.mly"
                                             ( _1 )
-# 1667 "parser_cocci_menhir.ml"
+# 1681 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1695,15 +1709,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 1699 "parser_cocci_menhir.ml"
+# 1713 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1193 "parser_cocci_menhir.mly"
+# 1244 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Mul _1 _2 _3 )
-# 1707 "parser_cocci_menhir.ml"
+# 1721 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1735,15 +1749,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 96 "parser_cocci_menhir.mly"
        (Ast_cocci.arithOp * Data.clt)
-# 1739 "parser_cocci_menhir.ml"
+# 1753 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1195 "parser_cocci_menhir.mly"
+# 1246 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.arith_op op _1 clt _3 )
-# 1747 "parser_cocci_menhir.ml"
+# 1761 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1775,15 +1789,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 1779 "parser_cocci_menhir.ml"
+# 1793 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1197 "parser_cocci_menhir.mly"
+# 1248 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Plus _1 _2 _3 )
-# 1787 "parser_cocci_menhir.ml"
+# 1801 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1815,15 +1829,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 1819 "parser_cocci_menhir.ml"
+# 1833 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1199 "parser_cocci_menhir.mly"
+# 1250 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Minus _1 _2 _3 )
-# 1827 "parser_cocci_menhir.ml"
+# 1841 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1855,15 +1869,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 95 "parser_cocci_menhir.mly"
        (Ast_cocci.arithOp * Data.clt)
-# 1859 "parser_cocci_menhir.ml"
+# 1873 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1201 "parser_cocci_menhir.mly"
+# 1252 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.arith_op op _1 clt _3 )
-# 1867 "parser_cocci_menhir.ml"
+# 1881 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1895,15 +1909,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 94 "parser_cocci_menhir.mly"
        (Ast_cocci.logicalOp * Data.clt)
-# 1899 "parser_cocci_menhir.ml"
+# 1913 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1203 "parser_cocci_menhir.mly"
+# 1254 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.logic_op op _1 clt _3 )
-# 1907 "parser_cocci_menhir.ml"
+# 1921 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1935,15 +1949,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 93 "parser_cocci_menhir.mly"
        (Data.clt)
-# 1939 "parser_cocci_menhir.ml"
+# 1953 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1205 "parser_cocci_menhir.mly"
+# 1256 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.Eq _1 _2 _3 )
-# 1947 "parser_cocci_menhir.ml"
+# 1961 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -1975,15 +1989,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 93 "parser_cocci_menhir.mly"
        (Data.clt)
-# 1979 "parser_cocci_menhir.ml"
+# 1993 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1207 "parser_cocci_menhir.mly"
+# 1258 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.NotEq _1 _2 _3 )
-# 1987 "parser_cocci_menhir.ml"
+# 2001 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2015,15 +2029,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 92 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2019 "parser_cocci_menhir.ml"
+# 2033 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1209 "parser_cocci_menhir.mly"
+# 1260 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.And _1 _2 _3 )
-# 2027 "parser_cocci_menhir.ml"
+# 2041 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2055,15 +2069,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 90 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2059 "parser_cocci_menhir.ml"
+# 2073 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1211 "parser_cocci_menhir.mly"
+# 1262 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Or _1 _2 _3 )
-# 2067 "parser_cocci_menhir.ml"
+# 2081 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2095,15 +2109,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 91 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2099 "parser_cocci_menhir.ml"
+# 2113 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1213 "parser_cocci_menhir.mly"
+# 1264 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Xor _1 _2 _3 )
-# 2107 "parser_cocci_menhir.ml"
+# 2121 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2135,15 +2149,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 89 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2139 "parser_cocci_menhir.ml"
+# 2153 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1215 "parser_cocci_menhir.mly"
+# 1266 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.AndLog _1 _2 _3 )
-# 2147 "parser_cocci_menhir.ml"
+# 2161 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2175,15 +2189,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 88 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2179 "parser_cocci_menhir.ml"
+# 2193 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_dot_expressions_ = 
-# 1217 "parser_cocci_menhir.mly"
+# 1268 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.OrLog _1 _2 _3 )
-# 2187 "parser_cocci_menhir.ml"
+# 2201 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2205,9 +2219,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1191 "parser_cocci_menhir.mly"
+# 1242 "parser_cocci_menhir.mly"
                                             ( _1 )
-# 2211 "parser_cocci_menhir.ml"
+# 2225 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2239,15 +2253,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2243 "parser_cocci_menhir.ml"
+# 2257 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1193 "parser_cocci_menhir.mly"
+# 1244 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Mul _1 _2 _3 )
-# 2251 "parser_cocci_menhir.ml"
+# 2265 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2279,15 +2293,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 96 "parser_cocci_menhir.mly"
        (Ast_cocci.arithOp * Data.clt)
-# 2283 "parser_cocci_menhir.ml"
+# 2297 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1195 "parser_cocci_menhir.mly"
+# 1246 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.arith_op op _1 clt _3 )
-# 2291 "parser_cocci_menhir.ml"
+# 2305 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2319,15 +2333,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2323 "parser_cocci_menhir.ml"
+# 2337 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1197 "parser_cocci_menhir.mly"
+# 1248 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Plus _1 _2 _3 )
-# 2331 "parser_cocci_menhir.ml"
+# 2345 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2359,15 +2373,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2363 "parser_cocci_menhir.ml"
+# 2377 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1199 "parser_cocci_menhir.mly"
+# 1250 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Minus _1 _2 _3 )
-# 2371 "parser_cocci_menhir.ml"
+# 2385 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2399,15 +2413,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 95 "parser_cocci_menhir.mly"
        (Ast_cocci.arithOp * Data.clt)
-# 2403 "parser_cocci_menhir.ml"
+# 2417 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1201 "parser_cocci_menhir.mly"
+# 1252 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.arith_op op _1 clt _3 )
-# 2411 "parser_cocci_menhir.ml"
+# 2425 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2439,15 +2453,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 94 "parser_cocci_menhir.mly"
        (Ast_cocci.logicalOp * Data.clt)
-# 2443 "parser_cocci_menhir.ml"
+# 2457 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1203 "parser_cocci_menhir.mly"
+# 1254 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.logic_op op _1 clt _3 )
-# 2451 "parser_cocci_menhir.ml"
+# 2465 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2479,15 +2493,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 93 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2483 "parser_cocci_menhir.ml"
+# 2497 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1205 "parser_cocci_menhir.mly"
+# 1256 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.Eq _1 _2 _3 )
-# 2491 "parser_cocci_menhir.ml"
+# 2505 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2519,15 +2533,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 93 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2523 "parser_cocci_menhir.ml"
+# 2537 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1207 "parser_cocci_menhir.mly"
+# 1258 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.NotEq _1 _2 _3 )
-# 2531 "parser_cocci_menhir.ml"
+# 2545 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2559,15 +2573,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 92 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2563 "parser_cocci_menhir.ml"
+# 2577 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1209 "parser_cocci_menhir.mly"
+# 1260 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.And _1 _2 _3 )
-# 2571 "parser_cocci_menhir.ml"
+# 2585 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2599,15 +2613,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 90 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2603 "parser_cocci_menhir.ml"
+# 2617 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1211 "parser_cocci_menhir.mly"
+# 1262 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Or _1 _2 _3 )
-# 2611 "parser_cocci_menhir.ml"
+# 2625 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2639,15 +2653,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 91 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2643 "parser_cocci_menhir.ml"
+# 2657 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1213 "parser_cocci_menhir.mly"
+# 1264 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Xor _1 _2 _3 )
-# 2651 "parser_cocci_menhir.ml"
+# 2665 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2679,15 +2693,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 89 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2683 "parser_cocci_menhir.ml"
+# 2697 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1215 "parser_cocci_menhir.mly"
+# 1266 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.AndLog _1 _2 _3 )
-# 2691 "parser_cocci_menhir.ml"
+# 2705 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2719,15 +2733,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 88 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2723 "parser_cocci_menhir.ml"
+# 2737 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_invalid_ = 
-# 1217 "parser_cocci_menhir.mly"
+# 1268 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.OrLog _1 _2 _3 )
-# 2731 "parser_cocci_menhir.ml"
+# 2745 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2749,9 +2763,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1191 "parser_cocci_menhir.mly"
+# 1242 "parser_cocci_menhir.mly"
                                             ( _1 )
-# 2755 "parser_cocci_menhir.ml"
+# 2769 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2783,15 +2797,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2787 "parser_cocci_menhir.ml"
+# 2801 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1193 "parser_cocci_menhir.mly"
+# 1244 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Mul _1 _2 _3 )
-# 2795 "parser_cocci_menhir.ml"
+# 2809 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2823,15 +2837,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 96 "parser_cocci_menhir.mly"
        (Ast_cocci.arithOp * Data.clt)
-# 2827 "parser_cocci_menhir.ml"
+# 2841 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1195 "parser_cocci_menhir.mly"
+# 1246 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.arith_op op _1 clt _3 )
-# 2835 "parser_cocci_menhir.ml"
+# 2849 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2863,15 +2877,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2867 "parser_cocci_menhir.ml"
+# 2881 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1197 "parser_cocci_menhir.mly"
+# 1248 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Plus _1 _2 _3 )
-# 2875 "parser_cocci_menhir.ml"
+# 2889 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2903,15 +2917,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 2907 "parser_cocci_menhir.ml"
+# 2921 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1199 "parser_cocci_menhir.mly"
+# 1250 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Minus _1 _2 _3 )
-# 2915 "parser_cocci_menhir.ml"
+# 2929 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2943,15 +2957,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 95 "parser_cocci_menhir.mly"
        (Ast_cocci.arithOp * Data.clt)
-# 2947 "parser_cocci_menhir.ml"
+# 2961 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1201 "parser_cocci_menhir.mly"
+# 1252 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.arith_op op _1 clt _3 )
-# 2955 "parser_cocci_menhir.ml"
+# 2969 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -2983,15 +2997,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 94 "parser_cocci_menhir.mly"
        (Ast_cocci.logicalOp * Data.clt)
-# 2987 "parser_cocci_menhir.ml"
+# 3001 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1203 "parser_cocci_menhir.mly"
+# 1254 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.logic_op op _1 clt _3 )
-# 2995 "parser_cocci_menhir.ml"
+# 3009 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3023,15 +3037,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 93 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3027 "parser_cocci_menhir.ml"
+# 3041 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1205 "parser_cocci_menhir.mly"
+# 1256 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.Eq _1 _2 _3 )
-# 3035 "parser_cocci_menhir.ml"
+# 3049 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3063,15 +3077,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 93 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3067 "parser_cocci_menhir.ml"
+# 3081 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1207 "parser_cocci_menhir.mly"
+# 1258 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.NotEq _1 _2 _3 )
-# 3075 "parser_cocci_menhir.ml"
+# 3089 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3103,15 +3117,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 92 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3107 "parser_cocci_menhir.ml"
+# 3121 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1209 "parser_cocci_menhir.mly"
+# 1260 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.And _1 _2 _3 )
-# 3115 "parser_cocci_menhir.ml"
+# 3129 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3143,15 +3157,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 90 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3147 "parser_cocci_menhir.ml"
+# 3161 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1211 "parser_cocci_menhir.mly"
+# 1262 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Or _1 _2 _3 )
-# 3155 "parser_cocci_menhir.ml"
+# 3169 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3183,15 +3197,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 91 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3187 "parser_cocci_menhir.ml"
+# 3201 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1213 "parser_cocci_menhir.mly"
+# 1264 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Xor _1 _2 _3 )
-# 3195 "parser_cocci_menhir.ml"
+# 3209 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3223,15 +3237,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 89 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3227 "parser_cocci_menhir.ml"
+# 3241 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1215 "parser_cocci_menhir.mly"
+# 1266 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.AndLog _1 _2 _3 )
-# 3235 "parser_cocci_menhir.ml"
+# 3249 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3263,15 +3277,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 88 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3267 "parser_cocci_menhir.ml"
+# 3281 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_eexpr_nest_expressions_ = 
-# 1217 "parser_cocci_menhir.mly"
+# 1268 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.OrLog _1 _2 _3 )
-# 3275 "parser_cocci_menhir.ml"
+# 3289 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3293,9 +3307,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1191 "parser_cocci_menhir.mly"
+# 1242 "parser_cocci_menhir.mly"
                                             ( _1 )
-# 3299 "parser_cocci_menhir.ml"
+# 3313 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3327,15 +3341,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3331 "parser_cocci_menhir.ml"
+# 3345 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1193 "parser_cocci_menhir.mly"
+# 1244 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Mul _1 _2 _3 )
-# 3339 "parser_cocci_menhir.ml"
+# 3353 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3367,15 +3381,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 96 "parser_cocci_menhir.mly"
        (Ast_cocci.arithOp * Data.clt)
-# 3371 "parser_cocci_menhir.ml"
+# 3385 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1195 "parser_cocci_menhir.mly"
+# 1246 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.arith_op op _1 clt _3 )
-# 3379 "parser_cocci_menhir.ml"
+# 3393 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3407,15 +3421,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3411 "parser_cocci_menhir.ml"
+# 3425 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1197 "parser_cocci_menhir.mly"
+# 1248 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Plus _1 _2 _3 )
-# 3419 "parser_cocci_menhir.ml"
+# 3433 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3447,15 +3461,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3451 "parser_cocci_menhir.ml"
+# 3465 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1199 "parser_cocci_menhir.mly"
+# 1250 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Minus _1 _2 _3 )
-# 3459 "parser_cocci_menhir.ml"
+# 3473 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3487,15 +3501,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 95 "parser_cocci_menhir.mly"
        (Ast_cocci.arithOp * Data.clt)
-# 3491 "parser_cocci_menhir.ml"
+# 3505 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1201 "parser_cocci_menhir.mly"
+# 1252 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.arith_op op _1 clt _3 )
-# 3499 "parser_cocci_menhir.ml"
+# 3513 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3527,15 +3541,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 94 "parser_cocci_menhir.mly"
        (Ast_cocci.logicalOp * Data.clt)
-# 3531 "parser_cocci_menhir.ml"
+# 3545 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1203 "parser_cocci_menhir.mly"
+# 1254 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in P.logic_op op _1 clt _3 )
-# 3539 "parser_cocci_menhir.ml"
+# 3553 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3567,15 +3581,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 93 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3571 "parser_cocci_menhir.ml"
+# 3585 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1205 "parser_cocci_menhir.mly"
+# 1256 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.Eq _1 _2 _3 )
-# 3579 "parser_cocci_menhir.ml"
+# 3593 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3607,15 +3621,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 93 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3611 "parser_cocci_menhir.ml"
+# 3625 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1207 "parser_cocci_menhir.mly"
+# 1258 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.NotEq _1 _2 _3 )
-# 3619 "parser_cocci_menhir.ml"
+# 3633 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3647,15 +3661,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 92 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3651 "parser_cocci_menhir.ml"
+# 3665 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1209 "parser_cocci_menhir.mly"
+# 1260 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.And _1 _2 _3 )
-# 3659 "parser_cocci_menhir.ml"
+# 3673 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3687,15 +3701,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 90 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3691 "parser_cocci_menhir.ml"
+# 3705 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1211 "parser_cocci_menhir.mly"
+# 1262 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Or _1 _2 _3 )
-# 3699 "parser_cocci_menhir.ml"
+# 3713 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3727,15 +3741,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 91 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3731 "parser_cocci_menhir.ml"
+# 3745 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1213 "parser_cocci_menhir.mly"
+# 1264 "parser_cocci_menhir.mly"
       ( P.arith_op Ast.Xor _1 _2 _3 )
-# 3739 "parser_cocci_menhir.ml"
+# 3753 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3767,15 +3781,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 89 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3771 "parser_cocci_menhir.ml"
+# 3785 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1215 "parser_cocci_menhir.mly"
+# 1266 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.AndLog _1 _2 _3 )
-# 3779 "parser_cocci_menhir.ml"
+# 3793 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3807,15 +3821,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 88 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3811 "parser_cocci_menhir.ml"
+# 3825 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_arith_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_arith_expr_expr_invalid_ = 
-# 1217 "parser_cocci_menhir.mly"
+# 1268 "parser_cocci_menhir.mly"
       ( P.logic_op Ast.OrLog _1 _2 _3 )
-# 3819 "parser_cocci_menhir.ml"
+# 3833 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3835,9 +3849,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_arity = 
-# 435 "parser_cocci_menhir.mly"
+# 445 "parser_cocci_menhir.mly"
               ( Ast.UNIQUE )
-# 3841 "parser_cocci_menhir.ml"
+# 3855 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3857,9 +3871,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_arity = 
-# 436 "parser_cocci_menhir.mly"
+# 446 "parser_cocci_menhir.mly"
               ( Ast.OPT )
-# 3863 "parser_cocci_menhir.ml"
+# 3877 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3879,9 +3893,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_arity = 
-# 437 "parser_cocci_menhir.mly"
+# 447 "parser_cocci_menhir.mly"
               ( Ast.MULTI )
-# 3885 "parser_cocci_menhir.ml"
+# 3899 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3896,9 +3910,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_arity = 
-# 438 "parser_cocci_menhir.mly"
+# 448 "parser_cocci_menhir.mly"
                    ( Ast.NONE )
-# 3902 "parser_cocci_menhir.ml"
+# 3916 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3929,20 +3943,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let r : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3933 "parser_cocci_menhir.ml"
+# 3947 "parser_cocci_menhir.ml"
         ) = Obj.magic r in
         let i : 'tv_option_eexpr_ = Obj.magic i in
         let l : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 3939 "parser_cocci_menhir.ml"
+# 3953 "parser_cocci_menhir.ml"
         ) = Obj.magic l in
         let _startpos = _startpos_l_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_array_dec = 
-# 1004 "parser_cocci_menhir.mly"
+# 1055 "parser_cocci_menhir.mly"
                                            ( (l,i,r) )
-# 3946 "parser_cocci_menhir.ml"
+# 3960 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3964,9 +3978,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_assign_expr_eexpr_dot_expressions_ = 
-# 1163 "parser_cocci_menhir.mly"
+# 1214 "parser_cocci_menhir.mly"
                                            ( _1 )
-# 3970 "parser_cocci_menhir.ml"
+# 3984 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -3998,17 +4012,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 107 "parser_cocci_menhir.mly"
        (Ast_cocci.assignOp * Data.clt)
-# 4002 "parser_cocci_menhir.ml"
+# 4016 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_unary_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_assign_expr_eexpr_dot_expressions_ = 
-# 1165 "parser_cocci_menhir.mly"
+# 1216 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in
       Ast0.wrap(Ast0.Assignment(_1,P.clt2mcode op clt,
                                Ast0.set_arg_exp _3,false)) )
-# 4012 "parser_cocci_menhir.ml"
+# 4026 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4040,17 +4054,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4044 "parser_cocci_menhir.ml"
+# 4058 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_unary_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_assign_expr_eexpr_dot_expressions_ = 
-# 1169 "parser_cocci_menhir.mly"
+# 1220 "parser_cocci_menhir.mly"
       ( Ast0.wrap
          (Ast0.Assignment
             (_1,P.clt2mcode Ast.SimpleAssign _2,Ast0.set_arg_exp _3,false)) )
-# 4054 "parser_cocci_menhir.ml"
+# 4068 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4072,9 +4086,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_assign_expr_eexpr_nest_expressions_ = 
-# 1163 "parser_cocci_menhir.mly"
+# 1214 "parser_cocci_menhir.mly"
                                            ( _1 )
-# 4078 "parser_cocci_menhir.ml"
+# 4092 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4106,17 +4120,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 107 "parser_cocci_menhir.mly"
        (Ast_cocci.assignOp * Data.clt)
-# 4110 "parser_cocci_menhir.ml"
+# 4124 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_unary_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_assign_expr_eexpr_nest_expressions_ = 
-# 1165 "parser_cocci_menhir.mly"
+# 1216 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in
       Ast0.wrap(Ast0.Assignment(_1,P.clt2mcode op clt,
                                Ast0.set_arg_exp _3,false)) )
-# 4120 "parser_cocci_menhir.ml"
+# 4134 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4148,17 +4162,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4152 "parser_cocci_menhir.ml"
+# 4166 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_unary_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_assign_expr_eexpr_nest_expressions_ = 
-# 1169 "parser_cocci_menhir.mly"
+# 1220 "parser_cocci_menhir.mly"
       ( Ast0.wrap
          (Ast0.Assignment
             (_1,P.clt2mcode Ast.SimpleAssign _2,Ast0.set_arg_exp _3,false)) )
-# 4162 "parser_cocci_menhir.ml"
+# 4176 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4180,9 +4194,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_assign_expr_expr_invalid_ = 
-# 1163 "parser_cocci_menhir.mly"
+# 1214 "parser_cocci_menhir.mly"
                                            ( _1 )
-# 4186 "parser_cocci_menhir.ml"
+# 4200 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4214,17 +4228,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 107 "parser_cocci_menhir.mly"
        (Ast_cocci.assignOp * Data.clt)
-# 4218 "parser_cocci_menhir.ml"
+# 4232 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_unary_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_assign_expr_expr_invalid_ = 
-# 1165 "parser_cocci_menhir.mly"
+# 1216 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in
       Ast0.wrap(Ast0.Assignment(_1,P.clt2mcode op clt,
                                Ast0.set_arg_exp _3,false)) )
-# 4228 "parser_cocci_menhir.ml"
+# 4242 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4256,17 +4270,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4260 "parser_cocci_menhir.ml"
+# 4274 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_unary_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_assign_expr_expr_invalid_ = 
-# 1169 "parser_cocci_menhir.mly"
+# 1220 "parser_cocci_menhir.mly"
       ( Ast0.wrap
          (Ast0.Assignment
             (_1,P.clt2mcode Ast.SimpleAssign _2,Ast0.set_arg_exp _3,false)) )
-# 4270 "parser_cocci_menhir.ml"
+# 4284 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4288,9 +4302,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_assign_expr_bis = 
-# 1174 "parser_cocci_menhir.mly"
+# 1225 "parser_cocci_menhir.mly"
                                                             ( _1 )
-# 4294 "parser_cocci_menhir.ml"
+# 4308 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4322,17 +4336,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 107 "parser_cocci_menhir.mly"
        (Ast_cocci.assignOp * Data.clt)
-# 4326 "parser_cocci_menhir.ml"
+# 4340 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_unary_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_assign_expr_bis = 
-# 1176 "parser_cocci_menhir.mly"
+# 1227 "parser_cocci_menhir.mly"
       ( let (op,clt) = _2 in
       Ast0.wrap(Ast0.Assignment(_1,P.clt2mcode op clt,
                                Ast0.set_arg_exp _3,false)) )
-# 4336 "parser_cocci_menhir.ml"
+# 4350 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4364,17 +4378,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4368 "parser_cocci_menhir.ml"
+# 4382 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_unary_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_assign_expr_bis = 
-# 1180 "parser_cocci_menhir.mly"
+# 1231 "parser_cocci_menhir.mly"
       ( Ast0.wrap
          (Ast0.Assignment
             (_1,P.clt2mcode Ast.SimpleAssign _2,Ast0.set_arg_exp _3,false)) )
-# 4378 "parser_cocci_menhir.ml"
+# 4392 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4396,9 +4410,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_basic_expr_eexpr_dot_expressions_ = 
-# 1160 "parser_cocci_menhir.mly"
+# 1211 "parser_cocci_menhir.mly"
                                                              ( _1 )
-# 4402 "parser_cocci_menhir.ml"
+# 4416 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4420,9 +4434,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_basic_expr_eexpr_nest_expressions_ = 
-# 1160 "parser_cocci_menhir.mly"
+# 1211 "parser_cocci_menhir.mly"
                                                              ( _1 )
-# 4426 "parser_cocci_menhir.ml"
+# 4440 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4444,9 +4458,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_basic_expr_expr_invalid_ = 
-# 1160 "parser_cocci_menhir.mly"
+# 1211 "parser_cocci_menhir.mly"
                                                              ( _1 )
-# 4450 "parser_cocci_menhir.ml"
+# 4464 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4478,19 +4492,19 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4482 "parser_cocci_menhir.ml"
+# 4496 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4487 "parser_cocci_menhir.ml"
+# 4501 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_case_line = 
-# 876 "parser_cocci_menhir.mly"
+# 927 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Default(P.clt2mcode "default" _1,P.clt2mcode ":" _2,_3)) )
-# 4494 "parser_cocci_menhir.ml"
+# 4508 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4527,20 +4541,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4531 "parser_cocci_menhir.ml"
+# 4545 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_eexpr = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4537 "parser_cocci_menhir.ml"
+# 4551 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_case_line = 
-# 878 "parser_cocci_menhir.mly"
+# 929 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Case(P.clt2mcode "case" _1,_2,P.clt2mcode ":" _3,_4)) )
-# 4544 "parser_cocci_menhir.ml"
+# 4558 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4562,9 +4576,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_cast_expr_eexpr_dot_expressions_ = 
-# 1220 "parser_cocci_menhir.mly"
+# 1271 "parser_cocci_menhir.mly"
                                           ( _1 )
-# 4568 "parser_cocci_menhir.ml"
+# 4582 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4601,21 +4615,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4605 "parser_cocci_menhir.ml"
+# 4619 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let t : 'tv_ctype = Obj.magic t in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4611 "parser_cocci_menhir.ml"
+# 4625 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let _startpos = _startpos_lp_ in
         let _endpos = _endpos_e_ in
         let _v : 'tv_cast_expr_eexpr_dot_expressions_ = 
-# 1222 "parser_cocci_menhir.mly"
+# 1273 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, t,
                             P.clt2mcode ")" rp, e)) )
-# 4619 "parser_cocci_menhir.ml"
+# 4633 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4637,9 +4651,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_cast_expr_eexpr_invalid_ = 
-# 1220 "parser_cocci_menhir.mly"
+# 1271 "parser_cocci_menhir.mly"
                                           ( _1 )
-# 4643 "parser_cocci_menhir.ml"
+# 4657 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4676,21 +4690,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4680 "parser_cocci_menhir.ml"
+# 4694 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let t : 'tv_ctype = Obj.magic t in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4686 "parser_cocci_menhir.ml"
+# 4700 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let _startpos = _startpos_lp_ in
         let _endpos = _endpos_e_ in
         let _v : 'tv_cast_expr_eexpr_invalid_ = 
-# 1222 "parser_cocci_menhir.mly"
+# 1273 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, t,
                             P.clt2mcode ")" rp, e)) )
-# 4694 "parser_cocci_menhir.ml"
+# 4708 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4712,9 +4726,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_cast_expr_eexpr_nest_expressions_ = 
-# 1220 "parser_cocci_menhir.mly"
+# 1271 "parser_cocci_menhir.mly"
                                           ( _1 )
-# 4718 "parser_cocci_menhir.ml"
+# 4732 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4751,21 +4765,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4755 "parser_cocci_menhir.ml"
+# 4769 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let t : 'tv_ctype = Obj.magic t in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4761 "parser_cocci_menhir.ml"
+# 4775 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let _startpos = _startpos_lp_ in
         let _endpos = _endpos_e_ in
         let _v : 'tv_cast_expr_eexpr_nest_expressions_ = 
-# 1222 "parser_cocci_menhir.mly"
+# 1273 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, t,
                             P.clt2mcode ")" rp, e)) )
-# 4769 "parser_cocci_menhir.ml"
+# 4783 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4787,9 +4801,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_cast_expr_expr_invalid_ = 
-# 1220 "parser_cocci_menhir.mly"
+# 1271 "parser_cocci_menhir.mly"
                                           ( _1 )
-# 4793 "parser_cocci_menhir.ml"
+# 4807 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4826,21 +4840,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4830 "parser_cocci_menhir.ml"
+# 4844 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let t : 'tv_ctype = Obj.magic t in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4836 "parser_cocci_menhir.ml"
+# 4850 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let _startpos = _startpos_lp_ in
         let _endpos = _endpos_e_ in
         let _v : 'tv_cast_expr_expr_invalid_ = 
-# 1222 "parser_cocci_menhir.mly"
+# 1273 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Cast (P.clt2mcode "(" lp, t,
                             P.clt2mcode ")" rp, e)) )
-# 4844 "parser_cocci_menhir.ml"
+# 4858 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4866,9 +4880,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_choose_iso = 
-# 227 "parser_cocci_menhir.mly"
+# 232 "parser_cocci_menhir.mly"
                                                  ( List.map P.id2name _2 )
-# 4872 "parser_cocci_menhir.ml"
+# 4886 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4894,21 +4908,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4898 "parser_cocci_menhir.ml"
+# 4912 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4903 "parser_cocci_menhir.ml"
+# 4917 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_comma_decls_TEllipsis_decl_ = 
-# 1471 "parser_cocci_menhir.mly"
+# 1541 "parser_cocci_menhir.mly"
     ( function dot_builder ->
       [Ast0.wrap(Ast0.PComma(P.clt2mcode "," _1));
        dot_builder _2] )
-# 4912 "parser_cocci_menhir.ml"
+# 4926 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4935,15 +4949,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4939 "parser_cocci_menhir.ml"
+# 4953 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_comma_decls_TEllipsis_decl_ = 
-# 1475 "parser_cocci_menhir.mly"
+# 1545 "parser_cocci_menhir.mly"
     ( function dot_builder ->
       [Ast0.wrap(Ast0.PComma(P.clt2mcode "," _1)); _2] )
-# 4947 "parser_cocci_menhir.ml"
+# 4961 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -4969,21 +4983,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4973 "parser_cocci_menhir.ml"
+# 4987 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 4978 "parser_cocci_menhir.ml"
+# 4992 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_comma_decls_TEllipsis_name_opt_decl_ = 
-# 1471 "parser_cocci_menhir.mly"
+# 1541 "parser_cocci_menhir.mly"
     ( function dot_builder ->
       [Ast0.wrap(Ast0.PComma(P.clt2mcode "," _1));
        dot_builder _2] )
-# 4987 "parser_cocci_menhir.ml"
+# 5001 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5010,15 +5024,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 5014 "parser_cocci_menhir.ml"
+# 5028 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_comma_decls_TEllipsis_name_opt_decl_ = 
-# 1475 "parser_cocci_menhir.mly"
+# 1545 "parser_cocci_menhir.mly"
     ( function dot_builder ->
       [Ast0.wrap(Ast0.PComma(P.clt2mcode "," _1)); _2] )
-# 5022 "parser_cocci_menhir.ml"
+# 5036 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5033,9 +5047,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_comma_initializers_edots_when_TEllipsis_initialize__ = 
-# 1051 "parser_cocci_menhir.mly"
+# 1102 "parser_cocci_menhir.mly"
               ( [] )
-# 5039 "parser_cocci_menhir.ml"
+# 5053 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5063,9 +5077,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_d_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_comma_initializers_edots_when_TEllipsis_initialize__ = 
-# 1053 "parser_cocci_menhir.mly"
+# 1104 "parser_cocci_menhir.mly"
       ( (function dot_builder -> [dot_builder d])::r )
-# 5069 "parser_cocci_menhir.ml"
+# 5083 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5097,16 +5111,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let c : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 5101 "parser_cocci_menhir.ml"
+# 5115 "parser_cocci_menhir.ml"
         ) = Obj.magic c in
         let i : 'tv_initialize2 = Obj.magic i in
         let _startpos = _startpos_i_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_comma_initializers_edots_when_TEllipsis_initialize__ = 
-# 1055 "parser_cocci_menhir.mly"
+# 1106 "parser_cocci_menhir.mly"
     ( (function dot_builder -> [i; Ast0.wrap(Ast0.IComma(P.clt2mcode "," c))])::
       r )
-# 5110 "parser_cocci_menhir.ml"
+# 5124 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5121,9 +5135,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_comma_initializers2_edots_when_TEllipsis_initialize__ = 
-# 1059 "parser_cocci_menhir.mly"
+# 1110 "parser_cocci_menhir.mly"
               ( [] )
-# 5127 "parser_cocci_menhir.ml"
+# 5141 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5155,16 +5169,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let c : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 5159 "parser_cocci_menhir.ml"
+# 5173 "parser_cocci_menhir.ml"
         ) = Obj.magic c in
         let i : 'tv_initialize2 = Obj.magic i in
         let _startpos = _startpos_i_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_comma_initializers2_edots_when_TEllipsis_initialize__ = 
-# 1061 "parser_cocci_menhir.mly"
+# 1112 "parser_cocci_menhir.mly"
     ( (function dot_builder -> [i; Ast0.wrap(Ast0.IComma(P.clt2mcode "," c))])::
       r )
-# 5168 "parser_cocci_menhir.ml"
+# 5182 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5186,9 +5200,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_any_strict_ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5192 "parser_cocci_menhir.ml"
+# 5206 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5210,9 +5224,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_ctype_ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5216 "parser_cocci_menhir.ml"
+# 5230 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5234,9 +5248,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_d_ident_ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5240 "parser_cocci_menhir.ml"
+# 5254 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5258,9 +5272,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_dexpr_ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5264 "parser_cocci_menhir.ml"
+# 5278 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5282,9 +5296,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_ident_or_const_ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5288 "parser_cocci_menhir.ml"
+# 5302 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5306,9 +5320,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_meta_ident_ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5312 "parser_cocci_menhir.ml"
+# 5326 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5330,9 +5344,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_pure_ident_ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5336 "parser_cocci_menhir.ml"
+# 5350 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5354,9 +5368,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_pure_ident_or_meta_ident_ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5360 "parser_cocci_menhir.ml"
+# 5374 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5378,9 +5392,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_pure_ident_or_meta_ident_with_not_eq_not_ceq__ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5384 "parser_cocci_menhir.ml"
+# 5398 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5402,9 +5416,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_pure_ident_or_meta_ident_with_not_eq_not_eq__ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5408 "parser_cocci_menhir.ml"
+# 5422 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5426,9 +5440,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_pure_ident_or_meta_ident_with_not_eq_not_eqe__ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5432 "parser_cocci_menhir.ml"
+# 5446 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5450,9 +5464,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_comma_list_pure_ident_or_meta_ident_with_not_eq_not_pos__ = 
-# 1695 "parser_cocci_menhir.mly"
+# 1772 "parser_cocci_menhir.mly"
                                        ( _1 )
-# 5456 "parser_cocci_menhir.ml"
+# 5470 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5474,9 +5488,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_cond_expr_eexpr_dot_expressions_ = 
-# 1185 "parser_cocci_menhir.mly"
+# 1236 "parser_cocci_menhir.mly"
                                              ( _1 )
-# 5480 "parser_cocci_menhir.ml"
+# 5494 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5518,22 +5532,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let dd : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 5522 "parser_cocci_menhir.ml"
+# 5536 "parser_cocci_menhir.ml"
         ) = Obj.magic dd in
         let t : 'tv_option_eexpr_ = Obj.magic t in
         let w : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 5528 "parser_cocci_menhir.ml"
+# 5542 "parser_cocci_menhir.ml"
         ) = Obj.magic w in
         let l : 'tv_arith_expr_eexpr_dot_expressions_ = Obj.magic l in
         let _startpos = _startpos_l_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_cond_expr_eexpr_dot_expressions_ = 
-# 1187 "parser_cocci_menhir.mly"
+# 1238 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.CondExpr (l, P.clt2mcode "?" w, t,
                                 P.clt2mcode ":" dd, r)) )
-# 5537 "parser_cocci_menhir.ml"
+# 5551 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5555,9 +5569,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_cond_expr_eexpr_nest_expressions_ = 
-# 1185 "parser_cocci_menhir.mly"
+# 1236 "parser_cocci_menhir.mly"
                                              ( _1 )
-# 5561 "parser_cocci_menhir.ml"
+# 5575 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5599,22 +5613,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let dd : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 5603 "parser_cocci_menhir.ml"
+# 5617 "parser_cocci_menhir.ml"
         ) = Obj.magic dd in
         let t : 'tv_option_eexpr_ = Obj.magic t in
         let w : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 5609 "parser_cocci_menhir.ml"
+# 5623 "parser_cocci_menhir.ml"
         ) = Obj.magic w in
         let l : 'tv_arith_expr_eexpr_nest_expressions_ = Obj.magic l in
         let _startpos = _startpos_l_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_cond_expr_eexpr_nest_expressions_ = 
-# 1187 "parser_cocci_menhir.mly"
+# 1238 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.CondExpr (l, P.clt2mcode "?" w, t,
                                 P.clt2mcode ":" dd, r)) )
-# 5618 "parser_cocci_menhir.ml"
+# 5632 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5636,9 +5650,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_cond_expr_expr_invalid_ = 
-# 1185 "parser_cocci_menhir.mly"
+# 1236 "parser_cocci_menhir.mly"
                                              ( _1 )
-# 5642 "parser_cocci_menhir.ml"
+# 5656 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5680,22 +5694,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let dd : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 5684 "parser_cocci_menhir.ml"
+# 5698 "parser_cocci_menhir.ml"
         ) = Obj.magic dd in
         let t : 'tv_option_eexpr_ = Obj.magic t in
         let w : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 5690 "parser_cocci_menhir.ml"
+# 5704 "parser_cocci_menhir.ml"
         ) = Obj.magic w in
         let l : 'tv_arith_expr_expr_invalid_ = Obj.magic l in
         let _startpos = _startpos_l_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_cond_expr_expr_invalid_ = 
-# 1187 "parser_cocci_menhir.mly"
+# 1238 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.CondExpr (l, P.clt2mcode "?" w, t,
                                 P.clt2mcode ":" dd, r)) )
-# 5699 "parser_cocci_menhir.ml"
+# 5713 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5716,14 +5730,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 54 "parser_cocci_menhir.mly"
       (Data.clt)
-# 5720 "parser_cocci_menhir.ml"
+# 5734 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_const_vol = 
-# 797 "parser_cocci_menhir.mly"
+# 836 "parser_cocci_menhir.mly"
                    ( P.clt2mcode Ast.Const _1 )
-# 5727 "parser_cocci_menhir.ml"
+# 5741 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5744,14 +5758,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 54 "parser_cocci_menhir.mly"
       (Data.clt)
-# 5748 "parser_cocci_menhir.ml"
+# 5762 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_const_vol = 
-# 798 "parser_cocci_menhir.mly"
+# 837 "parser_cocci_menhir.mly"
                    ( P.clt2mcode Ast.Volatile _1 )
-# 5755 "parser_cocci_menhir.ml"
+# 5769 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5766,9 +5780,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_continue_struct_decl_list = 
-# 516 "parser_cocci_menhir.mly"
+# 535 "parser_cocci_menhir.mly"
                                      ( [] )
-# 5772 "parser_cocci_menhir.ml"
+# 5786 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5796,9 +5810,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_continue_struct_decl_list = 
-# 517 "parser_cocci_menhir.mly"
+# 536 "parser_cocci_menhir.mly"
                                      ( _1@_2 )
-# 5802 "parser_cocci_menhir.ml"
+# 5816 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5820,9 +5834,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_continue_struct_decl_list = 
-# 518 "parser_cocci_menhir.mly"
+# 537 "parser_cocci_menhir.mly"
                                      ( _1 )
-# 5826 "parser_cocci_menhir.ml"
+# 5840 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5853,13 +5867,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 5857 "parser_cocci_menhir.ml"
+# 5871 "parser_cocci_menhir.ml"
           
         in
         
-# 522 "parser_cocci_menhir.mly"
+# 541 "parser_cocci_menhir.mly"
   ( P.pointerify (P.make_cv cv ty) m )
-# 5863 "parser_cocci_menhir.ml"
+# 5877 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5897,13 +5911,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 5901 "parser_cocci_menhir.ml"
+# 5915 "parser_cocci_menhir.ml"
           
         in
         
-# 522 "parser_cocci_menhir.mly"
+# 541 "parser_cocci_menhir.mly"
   ( P.pointerify (P.make_cv cv ty) m )
-# 5907 "parser_cocci_menhir.ml"
+# 5921 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5930,7 +5944,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let t : (
 # 50 "parser_cocci_menhir.mly"
       (Data.clt)
-# 5934 "parser_cocci_menhir.ml"
+# 5948 "parser_cocci_menhir.ml"
         ) = Obj.magic t in
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_m_ in
@@ -5938,15 +5952,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 5942 "parser_cocci_menhir.ml"
+# 5956 "parser_cocci_menhir.ml"
           
         in
         
-# 524 "parser_cocci_menhir.mly"
+# 543 "parser_cocci_menhir.mly"
          ( let ty =
-            Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
+            Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
           P.pointerify (P.make_cv cv ty) m )
-# 5950 "parser_cocci_menhir.ml"
+# 5964 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -5978,7 +5992,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let t : (
 # 50 "parser_cocci_menhir.mly"
       (Data.clt)
-# 5982 "parser_cocci_menhir.ml"
+# 5996 "parser_cocci_menhir.ml"
         ) = Obj.magic t in
         let x0 : 'tv_const_vol = Obj.magic x0 in
         let _startpos = _startpos_x0_ in
@@ -5988,15 +6002,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 5992 "parser_cocci_menhir.ml"
+# 6006 "parser_cocci_menhir.ml"
           
         in
         
-# 524 "parser_cocci_menhir.mly"
+# 543 "parser_cocci_menhir.mly"
          ( let ty =
-            Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
+            Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
           P.pointerify (P.make_cv cv ty) m )
-# 6000 "parser_cocci_menhir.ml"
+# 6014 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6027,22 +6041,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6031 "parser_cocci_menhir.ml"
+# 6045 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let t : 'tv_midzero_list_ctype_ctype_ = Obj.magic t in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6037 "parser_cocci_menhir.ml"
+# 6051 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let _startpos = _startpos_lp_ in
         let _endpos = _endpos_rp_ in
         let _v : 'tv_ctype = 
-# 529 "parser_cocci_menhir.mly"
+# 548 "parser_cocci_menhir.mly"
     ( let (mids,code) = t in
       Ast0.wrap
        (Ast0.DisjType(P.clt2mcode "(" lp,code,mids, P.clt2mcode ")" rp)) )
-# 6046 "parser_cocci_menhir.ml"
+# 6060 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6054,23 +6068,32 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
       (fun _menhir_env ->
         let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
         let {
-          MenhirLib.EngineTypes.state = _menhir_s;
-          MenhirLib.EngineTypes.semv = _1;
-          MenhirLib.EngineTypes.startp = _startpos__1_;
-          MenhirLib.EngineTypes.endp = _endpos__1_;
-          MenhirLib.EngineTypes.next = _menhir_stack;
+          MenhirLib.EngineTypes.semv = m;
+          MenhirLib.EngineTypes.startp = _startpos_m_;
+          MenhirLib.EngineTypes.endp = _endpos_m_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.state = _menhir_s;
+            MenhirLib.EngineTypes.semv = ty;
+            MenhirLib.EngineTypes.startp = _startpos_ty_;
+            MenhirLib.EngineTypes.endp = _endpos_ty_;
+            MenhirLib.EngineTypes.next = _menhir_stack;
+            };
           } = _menhir_stack in
-        let _1 : (
-# 51 "parser_cocci_menhir.mly"
-      (Data.clt)
-# 6067 "parser_cocci_menhir.ml"
-        ) = Obj.magic _1 in
-        let _startpos = _startpos__1_ in
-        let _endpos = _endpos__1_ in
-        let _v : 'tv_ctype_qualif = 
-# 542 "parser_cocci_menhir.mly"
-                   ( P.clt2mcode Ast.Unsigned _1 )
-# 6074 "parser_cocci_menhir.ml"
+        let m : 'tv_list_TMul_ = Obj.magic m in
+        let ty : 'tv_generic_ctype_full = Obj.magic ty in
+        let _startpos = _startpos_ty_ in
+        let _endpos = _endpos_m_ in
+        let _v : 'tv_ctype_full = let cv =
+          
+# 39 "standard.mly"
+    ( None )
+# 6091 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 554 "parser_cocci_menhir.mly"
+  ( P.pointerify (P.make_cv cv ty) m )
+# 6097 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6082,23 +6105,178 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
       (fun _menhir_env ->
         let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
         let {
+          MenhirLib.EngineTypes.semv = m;
+          MenhirLib.EngineTypes.startp = _startpos_m_;
+          MenhirLib.EngineTypes.endp = _endpos_m_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.semv = ty;
+            MenhirLib.EngineTypes.startp = _startpos_ty_;
+            MenhirLib.EngineTypes.endp = _endpos_ty_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.state = _menhir_s;
+              MenhirLib.EngineTypes.semv = x0;
+              MenhirLib.EngineTypes.startp = _startpos_x0_;
+              MenhirLib.EngineTypes.endp = _endpos_x0_;
+              MenhirLib.EngineTypes.next = _menhir_stack;
+              };
+            };
+          } = _menhir_stack in
+        let m : 'tv_list_TMul_ = Obj.magic m in
+        let ty : 'tv_generic_ctype_full = Obj.magic ty in
+        let x0 : 'tv_const_vol = Obj.magic x0 in
+        let _startpos = _startpos_x0_ in
+        let _endpos = _endpos_m_ in
+        let _v : 'tv_ctype_full = let cv =
+          let x = x0 in
+          
+# 41 "standard.mly"
+    ( Some x )
+# 6135 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 554 "parser_cocci_menhir.mly"
+  ( P.pointerify (P.make_cv cv ty) m )
+# 6141 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
-          MenhirLib.EngineTypes.semv = _1;
-          MenhirLib.EngineTypes.startp = _startpos__1_;
-          MenhirLib.EngineTypes.endp = _endpos__1_;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = m;
+          MenhirLib.EngineTypes.startp = _startpos_m_;
+          MenhirLib.EngineTypes.endp = _endpos_m_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.state = _menhir_s;
+            MenhirLib.EngineTypes.semv = t;
+            MenhirLib.EngineTypes.startp = _startpos_t_;
+            MenhirLib.EngineTypes.endp = _endpos_t_;
+            MenhirLib.EngineTypes.next = _menhir_stack;
+            };
+          } = _menhir_stack in
+        let m : 'tv_nonempty_list_TMul_ = Obj.magic m in
+        let t : (
+# 50 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 6168 "parser_cocci_menhir.ml"
+        ) = Obj.magic t in
+        let _startpos = _startpos_t_ in
+        let _endpos = _endpos_m_ in
+        let _v : 'tv_ctype_full = let cv =
+          
+# 39 "standard.mly"
+    ( None )
+# 6176 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 556 "parser_cocci_menhir.mly"
+         ( let ty =
+            Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
+          P.pointerify (P.make_cv cv ty) m )
+# 6184 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
           MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = m;
+          MenhirLib.EngineTypes.startp = _startpos_m_;
+          MenhirLib.EngineTypes.endp = _endpos_m_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.semv = t;
+            MenhirLib.EngineTypes.startp = _startpos_t_;
+            MenhirLib.EngineTypes.endp = _endpos_t_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.state = _menhir_s;
+              MenhirLib.EngineTypes.semv = x0;
+              MenhirLib.EngineTypes.startp = _startpos_x0_;
+              MenhirLib.EngineTypes.endp = _endpos_x0_;
+              MenhirLib.EngineTypes.next = _menhir_stack;
+              };
+            };
           } = _menhir_stack in
-        let _1 : (
-# 51 "parser_cocci_menhir.mly"
+        let m : 'tv_nonempty_list_TMul_ = Obj.magic m in
+        let t : (
+# 50 "parser_cocci_menhir.mly"
       (Data.clt)
-# 6095 "parser_cocci_menhir.ml"
-        ) = Obj.magic _1 in
-        let _startpos = _startpos__1_ in
-        let _endpos = _endpos__1_ in
-        let _v : 'tv_ctype_qualif = 
-# 543 "parser_cocci_menhir.mly"
-                   ( P.clt2mcode Ast.Signed _1 )
-# 6102 "parser_cocci_menhir.ml"
+# 6216 "parser_cocci_menhir.ml"
+        ) = Obj.magic t in
+        let x0 : 'tv_const_vol = Obj.magic x0 in
+        let _startpos = _startpos_x0_ in
+        let _endpos = _endpos_m_ in
+        let _v : 'tv_ctype_full = let cv =
+          let x = x0 in
+          
+# 41 "standard.mly"
+    ( Some x )
+# 6226 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 556 "parser_cocci_menhir.mly"
+         ( let ty =
+            Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
+          P.pointerify (P.make_cv cv ty) m )
+# 6234 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = rp;
+          MenhirLib.EngineTypes.startp = _startpos_rp_;
+          MenhirLib.EngineTypes.endp = _endpos_rp_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.semv = t;
+            MenhirLib.EngineTypes.startp = _startpos_t_;
+            MenhirLib.EngineTypes.endp = _endpos_t_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.state = _menhir_s;
+              MenhirLib.EngineTypes.semv = lp;
+              MenhirLib.EngineTypes.startp = _startpos_lp_;
+              MenhirLib.EngineTypes.endp = _endpos_lp_;
+              MenhirLib.EngineTypes.next = _menhir_stack;
+              };
+            };
+          } = _menhir_stack in
+        let rp : (
+# 76 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 6265 "parser_cocci_menhir.ml"
+        ) = Obj.magic rp in
+        let t : 'tv_midzero_list_ctype_ctype_ = Obj.magic t in
+        let lp : (
+# 75 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 6271 "parser_cocci_menhir.ml"
+        ) = Obj.magic lp in
+        let _startpos = _startpos_lp_ in
+        let _endpos = _endpos_rp_ in
+        let _v : 'tv_ctype_full = 
+# 561 "parser_cocci_menhir.mly"
+    ( let (mids,code) = t in
+      Ast0.wrap
+       (Ast0.DisjType(P.clt2mcode "(" lp,code,mids, P.clt2mcode ")" rp)) )
+# 6280 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6126,7 +6304,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_d_ident = 
-# 995 "parser_cocci_menhir.mly"
+# 1046 "parser_cocci_menhir.mly"
       ( (_1,
         function t ->
           List.fold_right
@@ -6135,7 +6313,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
                 Ast0.wrap
                   (Ast0.Array(rest,P.clt2mcode "[" l,i,P.clt2mcode "]" r)))
             _2 t) )
-# 6139 "parser_cocci_menhir.ml"
+# 6317 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6163,9 +6341,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_i_ in
         let _v : 'tv_decl = 
-# 768 "parser_cocci_menhir.mly"
+# 806 "parser_cocci_menhir.mly"
  ( Ast0.wrap(Ast0.Param(t, Some i)) )
-# 6169 "parser_cocci_menhir.ml"
+# 6347 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6221,42 +6399,42 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6225 "parser_cocci_menhir.ml"
+# 6403 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_decl_list_name_opt_decl_ = Obj.magic d in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6231 "parser_cocci_menhir.ml"
+# 6409 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6236 "parser_cocci_menhir.ml"
+# 6414 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let i : 'tv_ident = Obj.magic i in
         let s : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6242 "parser_cocci_menhir.ml"
+# 6420 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6247 "parser_cocci_menhir.ml"
+# 6425 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let t : 'tv_fn_ctype = Obj.magic t in
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_rp1_ in
         let _v : 'tv_decl = 
-# 771 "parser_cocci_menhir.mly"
+# 809 "parser_cocci_menhir.mly"
         ( let fnptr =
          Ast0.wrap
            (Ast0.FunctionPointer
               (t,P.clt2mcode "(" lp,P.clt2mcode "*" s,P.clt2mcode ")" rp,
                P.clt2mcode "(" lp1,d,P.clt2mcode ")" rp1)) in
        Ast0.wrap(Ast0.Param(fnptr, Some i)) )
-# 6260 "parser_cocci_menhir.ml"
+# 6438 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6277,15 +6455,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let t : (
 # 50 "parser_cocci_menhir.mly"
       (Data.clt)
-# 6281 "parser_cocci_menhir.ml"
+# 6459 "parser_cocci_menhir.ml"
         ) = Obj.magic t in
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_decl = 
-# 778 "parser_cocci_menhir.mly"
- ( let ty = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
+# 816 "parser_cocci_menhir.mly"
+ ( let ty =
+         Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
           Ast0.wrap(Ast0.VoidParam(ty)) )
-# 6289 "parser_cocci_menhir.ml"
+# 6468 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6306,15 +6485,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 6310 "parser_cocci_menhir.ml"
+# 6489 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl = 
-# 781 "parser_cocci_menhir.mly"
+# 820 "parser_cocci_menhir.mly"
  ( let (nm,pure,clt) = _1 in
        Ast0.wrap(Ast0.MetaParam(P.clt2mcode nm clt,pure)) )
-# 6318 "parser_cocci_menhir.ml"
+# 6497 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6335,14 +6514,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 59 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 6339 "parser_cocci_menhir.ml"
+# 6518 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_ident = 
-# 1421 "parser_cocci_menhir.mly"
+# 1491 "parser_cocci_menhir.mly"
          ( Ast0.wrap(Ast0.Id(P.id2mcode _1)) )
-# 6346 "parser_cocci_menhir.ml"
+# 6525 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6363,15 +6542,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 62 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 6367 "parser_cocci_menhir.ml"
+# 6546 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_ident = 
-# 1423 "parser_cocci_menhir.mly"
+# 1493 "parser_cocci_menhir.mly"
          ( let (nm,constraints,pure,clt) = _1 in
          Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) )
-# 6375 "parser_cocci_menhir.ml"
+# 6554 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6393,13 +6572,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_list_decl_ = 
-# 1444 "parser_cocci_menhir.mly"
+# 1514 "parser_cocci_menhir.mly"
      (let circle x =
        match Ast0.unwrap x with Ast0.Pcircles(_) -> true | _ -> false in
      if List.exists circle _1
      then Ast0.wrap(Ast0.CIRCLES(_1))
      else Ast0.wrap(Ast0.DOTS(_1)) )
-# 6403 "parser_cocci_menhir.ml"
+# 6582 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6421,13 +6600,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_list_name_opt_decl_ = 
-# 1444 "parser_cocci_menhir.mly"
+# 1514 "parser_cocci_menhir.mly"
      (let circle x =
        match Ast0.unwrap x with Ast0.Pcircles(_) -> true | _ -> false in
      if List.exists circle _1
      then Ast0.wrap(Ast0.CIRCLES(_1))
      else Ast0.wrap(Ast0.DOTS(_1)) )
-# 6431 "parser_cocci_menhir.ml"
+# 6610 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6449,9 +6628,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_list_start_decl_ = 
-# 1451 "parser_cocci_menhir.mly"
+# 1521 "parser_cocci_menhir.mly"
                  ( [_1] )
-# 6455 "parser_cocci_menhir.ml"
+# 6634 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6483,15 +6662,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6487 "parser_cocci_menhir.ml"
+# 6666 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_one_dec_decl_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_decl_list_start_decl_ = 
-# 1453 "parser_cocci_menhir.mly"
+# 1523 "parser_cocci_menhir.mly"
     ( _1::Ast0.wrap(Ast0.PComma(P.clt2mcode "," _2))::_3 )
-# 6495 "parser_cocci_menhir.ml"
+# 6674 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6518,15 +6697,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6522 "parser_cocci_menhir.ml"
+# 6701 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_decl_list_start_decl_ = 
-# 1455 "parser_cocci_menhir.mly"
+# 1525 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.Pdots(P.clt2mcode "..." _1))::
       (List.concat(List.map (function x -> x (P.mkpdots "...")) _2)) )
-# 6530 "parser_cocci_menhir.ml"
+# 6709 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6548,9 +6727,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_list_start_name_opt_decl_ = 
-# 1451 "parser_cocci_menhir.mly"
+# 1521 "parser_cocci_menhir.mly"
                  ( [_1] )
-# 6554 "parser_cocci_menhir.ml"
+# 6733 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6582,15 +6761,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6586 "parser_cocci_menhir.ml"
+# 6765 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_one_dec_name_opt_decl_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_decl_list_start_name_opt_decl_ = 
-# 1453 "parser_cocci_menhir.mly"
+# 1523 "parser_cocci_menhir.mly"
     ( _1::Ast0.wrap(Ast0.PComma(P.clt2mcode "," _2))::_3 )
-# 6594 "parser_cocci_menhir.ml"
+# 6773 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6617,15 +6796,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6621 "parser_cocci_menhir.ml"
+# 6800 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_decl_list_start_name_opt_decl_ = 
-# 1455 "parser_cocci_menhir.mly"
+# 1525 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.Pdots(P.clt2mcode "..." _1))::
       (List.concat(List.map (function x -> x (P.mkpdots "...")) _2)) )
-# 6629 "parser_cocci_menhir.ml"
+# 6808 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6646,15 +6825,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 6650 "parser_cocci_menhir.ml"
+# 6829 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_statement = 
-# 1067 "parser_cocci_menhir.mly"
+# 1118 "parser_cocci_menhir.mly"
       ( let (nm,pure,clt) = _1 in
       [Ast0.wrap(Ast0.MetaStmt(P.clt2mcode nm clt,pure))] )
-# 6658 "parser_cocci_menhir.ml"
+# 6837 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6676,13 +6855,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_statement = 
-# 1070 "parser_cocci_menhir.mly"
+# 1121 "parser_cocci_menhir.mly"
       ( List.map
          (function x ->
            Ast0.wrap
              (Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),x)))
          _1 )
-# 6686 "parser_cocci_menhir.ml"
+# 6865 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6704,9 +6883,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_statement = 
-# 1075 "parser_cocci_menhir.mly"
+# 1126 "parser_cocci_menhir.mly"
               ( [_1] )
-# 6710 "parser_cocci_menhir.ml"
+# 6889 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6737,18 +6916,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6741 "parser_cocci_menhir.ml"
+# 6920 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let t : 'tv_midzero_list_fun_start_fun_start_ = Obj.magic t in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6747 "parser_cocci_menhir.ml"
+# 6926 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_decl_statement = 
-# 1084 "parser_cocci_menhir.mly"
+# 1135 "parser_cocci_menhir.mly"
       ( let (mids,code) = t in
        if List.for_all
            (function x ->
@@ -6758,7 +6937,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
       else
          [Ast0.wrap(Ast0.Disj(P.clt2mcode "(" _1, code, mids,
                               P.clt2mcode ")" _3))] )
-# 6762 "parser_cocci_menhir.ml"
+# 6941 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6779,15 +6958,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 6783 "parser_cocci_menhir.ml"
+# 6962 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_statement_expr = 
-# 1097 "parser_cocci_menhir.mly"
+# 1148 "parser_cocci_menhir.mly"
       ( let (nm,pure,clt) = _1 in
       [Ast0.wrap(Ast0.MetaStmt(P.clt2mcode nm clt,pure))] )
-# 6791 "parser_cocci_menhir.ml"
+# 6970 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6809,13 +6988,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_statement_expr = 
-# 1100 "parser_cocci_menhir.mly"
+# 1151 "parser_cocci_menhir.mly"
       ( List.map
          (function x ->
            Ast0.wrap
              (Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),x)))
          _1 )
-# 6819 "parser_cocci_menhir.ml"
+# 6998 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6837,9 +7016,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_decl_statement_expr = 
-# 1105 "parser_cocci_menhir.mly"
+# 1156 "parser_cocci_menhir.mly"
               ( [_1] )
-# 6843 "parser_cocci_menhir.ml"
+# 7022 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6870,18 +7049,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6874 "parser_cocci_menhir.ml"
+# 7053 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let t : 'tv_midzero_list_fun_after_stm_fun_after_dots_or_ = Obj.magic t in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6880 "parser_cocci_menhir.ml"
+# 7059 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_decl_statement_expr = 
-# 1114 "parser_cocci_menhir.mly"
+# 1165 "parser_cocci_menhir.mly"
       ( let (mids,code) = t in
        if List.for_all (function [] -> true | _ -> false) code
       then []
@@ -6890,7 +7069,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
            List.map (function x -> Ast0.wrap(Ast0.DOTS x)) code in
          [Ast0.wrap(Ast0.Disj(P.clt2mcode "(" _1, dot_code, mids,
                               P.clt2mcode ")" _3))] )
-# 6894 "parser_cocci_menhir.ml"
+# 7073 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6916,15 +7095,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6920 "parser_cocci_menhir.ml"
+# 7099 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let t : 'tv_ctype = Obj.magic t in
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_pv_ in
         let _v : 'tv_decl_var = 
-# 886 "parser_cocci_menhir.mly"
+# 937 "parser_cocci_menhir.mly"
       ( [Ast0.wrap(Ast0.TyDecl(t,P.clt2mcode ";" pv))] )
-# 6928 "parser_cocci_menhir.ml"
+# 7107 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -6955,7 +7134,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 6959 "parser_cocci_menhir.ml"
+# 7138 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_comma_list_d_ident_ = Obj.magic d in
         let t : 'tv_ctype = Obj.magic t in
@@ -6965,16 +7144,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 6969 "parser_cocci_menhir.ml"
+# 7148 "parser_cocci_menhir.ml"
           
         in
         
-# 888 "parser_cocci_menhir.mly"
+# 939 "parser_cocci_menhir.mly"
       ( List.map
          (function (id,fn) ->
            Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)))
          d )
-# 6978 "parser_cocci_menhir.ml"
+# 7157 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7010,7 +7189,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7014 "parser_cocci_menhir.ml"
+# 7193 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_comma_list_d_ident_ = Obj.magic d in
         let t : 'tv_ctype = Obj.magic t in
@@ -7022,16 +7201,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7026 "parser_cocci_menhir.ml"
+# 7205 "parser_cocci_menhir.ml"
           
         in
         
-# 888 "parser_cocci_menhir.mly"
+# 939 "parser_cocci_menhir.mly"
       ( List.map
          (function (id,fn) ->
            Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)))
          d )
-# 7035 "parser_cocci_menhir.ml"
+# 7214 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7053,9 +7232,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_f_ in
         let _endpos = _endpos_f_ in
         let _v : 'tv_decl_var = 
-# 892 "parser_cocci_menhir.mly"
+# 943 "parser_cocci_menhir.mly"
                ( [f] )
-# 7059 "parser_cocci_menhir.ml"
+# 7238 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7096,13 +7275,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7100 "parser_cocci_menhir.ml"
+# 7279 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7106 "parser_cocci_menhir.ml"
+# 7285 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let t : 'tv_ctype = Obj.magic t in
@@ -7112,14 +7291,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 7116 "parser_cocci_menhir.ml"
+# 7295 "parser_cocci_menhir.ml"
           
         in
         
-# 894 "parser_cocci_menhir.mly"
+# 945 "parser_cocci_menhir.mly"
       (let (id,fn) = d in
       [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))])
-# 7123 "parser_cocci_menhir.ml"
+# 7302 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7165,13 +7344,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7169 "parser_cocci_menhir.ml"
+# 7348 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7175 "parser_cocci_menhir.ml"
+# 7354 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let t : 'tv_ctype = Obj.magic t in
@@ -7183,14 +7362,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7187 "parser_cocci_menhir.ml"
+# 7366 "parser_cocci_menhir.ml"
           
         in
         
-# 894 "parser_cocci_menhir.mly"
+# 945 "parser_cocci_menhir.mly"
       (let (id,fn) = d in
       [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))])
-# 7194 "parser_cocci_menhir.ml"
+# 7373 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7221,7 +7400,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7225 "parser_cocci_menhir.ml"
+# 7404 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_comma_list_d_ident_ = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -7231,25 +7410,25 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 7235 "parser_cocci_menhir.ml"
+# 7414 "parser_cocci_menhir.ml"
           
         in
         let s =
           
 # 39 "standard.mly"
     ( None )
-# 7242 "parser_cocci_menhir.ml"
+# 7421 "parser_cocci_menhir.ml"
           
         in
         
-# 899 "parser_cocci_menhir.mly"
+# 950 "parser_cocci_menhir.mly"
       ( List.map
          (function (id,fn) ->
            let idtype =
              P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
            Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)))
          d )
-# 7253 "parser_cocci_menhir.ml"
+# 7432 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7285,7 +7464,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7289 "parser_cocci_menhir.ml"
+# 7468 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_comma_list_d_ident_ = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -7297,25 +7476,25 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7301 "parser_cocci_menhir.ml"
+# 7480 "parser_cocci_menhir.ml"
           
         in
         let s =
           
 # 39 "standard.mly"
     ( None )
-# 7308 "parser_cocci_menhir.ml"
+# 7487 "parser_cocci_menhir.ml"
           
         in
         
-# 899 "parser_cocci_menhir.mly"
+# 950 "parser_cocci_menhir.mly"
       ( List.map
          (function (id,fn) ->
            let idtype =
              P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
            Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)))
          d )
-# 7319 "parser_cocci_menhir.ml"
+# 7498 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7351,7 +7530,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7355 "parser_cocci_menhir.ml"
+# 7534 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_comma_list_d_ident_ = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -7362,7 +7541,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 7366 "parser_cocci_menhir.ml"
+# 7545 "parser_cocci_menhir.ml"
           
         in
         let s =
@@ -7370,18 +7549,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7374 "parser_cocci_menhir.ml"
+# 7553 "parser_cocci_menhir.ml"
           
         in
         
-# 899 "parser_cocci_menhir.mly"
+# 950 "parser_cocci_menhir.mly"
       ( List.map
          (function (id,fn) ->
            let idtype =
              P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
            Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)))
          d )
-# 7385 "parser_cocci_menhir.ml"
+# 7564 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7422,7 +7601,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7426 "parser_cocci_menhir.ml"
+# 7605 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_comma_list_d_ident_ = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -7435,7 +7614,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7439 "parser_cocci_menhir.ml"
+# 7618 "parser_cocci_menhir.ml"
           
         in
         let s =
@@ -7443,18 +7622,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7447 "parser_cocci_menhir.ml"
+# 7626 "parser_cocci_menhir.ml"
           
         in
         
-# 899 "parser_cocci_menhir.mly"
+# 950 "parser_cocci_menhir.mly"
       ( List.map
          (function (id,fn) ->
            let idtype =
              P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
            Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)))
          d )
-# 7458 "parser_cocci_menhir.ml"
+# 7637 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7495,13 +7674,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7499 "parser_cocci_menhir.ml"
+# 7678 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7505 "parser_cocci_menhir.ml"
+# 7684 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -7511,24 +7690,24 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 7515 "parser_cocci_menhir.ml"
+# 7694 "parser_cocci_menhir.ml"
           
         in
         let s =
           
 # 39 "standard.mly"
     ( None )
-# 7522 "parser_cocci_menhir.ml"
+# 7701 "parser_cocci_menhir.ml"
           
         in
         
-# 907 "parser_cocci_menhir.mly"
+# 958 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
       !Data.add_type_name (P.id2name i);
       let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
       [Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
                           P.clt2mcode ";" pv))] )
-# 7532 "parser_cocci_menhir.ml"
+# 7711 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7574,13 +7753,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7578 "parser_cocci_menhir.ml"
+# 7757 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7584 "parser_cocci_menhir.ml"
+# 7763 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -7592,24 +7771,24 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7596 "parser_cocci_menhir.ml"
+# 7775 "parser_cocci_menhir.ml"
           
         in
         let s =
           
 # 39 "standard.mly"
     ( None )
-# 7603 "parser_cocci_menhir.ml"
+# 7782 "parser_cocci_menhir.ml"
           
         in
         
-# 907 "parser_cocci_menhir.mly"
+# 958 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
       !Data.add_type_name (P.id2name i);
       let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
       [Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
                           P.clt2mcode ";" pv))] )
-# 7613 "parser_cocci_menhir.ml"
+# 7792 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7655,13 +7834,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7659 "parser_cocci_menhir.ml"
+# 7838 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7665 "parser_cocci_menhir.ml"
+# 7844 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -7672,7 +7851,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 7676 "parser_cocci_menhir.ml"
+# 7855 "parser_cocci_menhir.ml"
           
         in
         let s =
@@ -7680,17 +7859,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7684 "parser_cocci_menhir.ml"
+# 7863 "parser_cocci_menhir.ml"
           
         in
         
-# 907 "parser_cocci_menhir.mly"
+# 958 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
       !Data.add_type_name (P.id2name i);
       let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
       [Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
                           P.clt2mcode ";" pv))] )
-# 7694 "parser_cocci_menhir.ml"
+# 7873 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7741,13 +7920,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7745 "parser_cocci_menhir.ml"
+# 7924 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7751 "parser_cocci_menhir.ml"
+# 7930 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -7760,7 +7939,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7764 "parser_cocci_menhir.ml"
+# 7943 "parser_cocci_menhir.ml"
           
         in
         let s =
@@ -7768,17 +7947,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7772 "parser_cocci_menhir.ml"
+# 7951 "parser_cocci_menhir.ml"
           
         in
         
-# 907 "parser_cocci_menhir.mly"
+# 958 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
       !Data.add_type_name (P.id2name i);
       let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
       [Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
                           P.clt2mcode ";" pv))] )
-# 7782 "parser_cocci_menhir.ml"
+# 7961 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7839,34 +8018,34 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7843 "parser_cocci_menhir.ml"
+# 8022 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let rp2 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7848 "parser_cocci_menhir.ml"
+# 8027 "parser_cocci_menhir.ml"
         ) = Obj.magic rp2 in
         let p : 'tv_decl_list_name_opt_decl_ = Obj.magic p in
         let lp2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7854 "parser_cocci_menhir.ml"
+# 8033 "parser_cocci_menhir.ml"
         ) = Obj.magic lp2 in
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7859 "parser_cocci_menhir.ml"
+# 8038 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_d_ident = Obj.magic d in
         let st : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7865 "parser_cocci_menhir.ml"
+# 8044 "parser_cocci_menhir.ml"
         ) = Obj.magic st in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7870 "parser_cocci_menhir.ml"
+# 8049 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let t : 'tv_fn_ctype = Obj.magic t in
         let _startpos = _startpos_t_ in
@@ -7875,11 +8054,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 7879 "parser_cocci_menhir.ml"
+# 8058 "parser_cocci_menhir.ml"
           
         in
         
-# 917 "parser_cocci_menhir.mly"
+# 968 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let t =
          Ast0.wrap
@@ -7887,7 +8066,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
               (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
                P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
         [Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv))] )
-# 7891 "parser_cocci_menhir.ml"
+# 8070 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -7953,34 +8132,34 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7957 "parser_cocci_menhir.ml"
+# 8136 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let rp2 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7962 "parser_cocci_menhir.ml"
+# 8141 "parser_cocci_menhir.ml"
         ) = Obj.magic rp2 in
         let p : 'tv_decl_list_name_opt_decl_ = Obj.magic p in
         let lp2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7968 "parser_cocci_menhir.ml"
+# 8147 "parser_cocci_menhir.ml"
         ) = Obj.magic lp2 in
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7973 "parser_cocci_menhir.ml"
+# 8152 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_d_ident = Obj.magic d in
         let st : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7979 "parser_cocci_menhir.ml"
+# 8158 "parser_cocci_menhir.ml"
         ) = Obj.magic st in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 7984 "parser_cocci_menhir.ml"
+# 8163 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let t : 'tv_fn_ctype = Obj.magic t in
         let x0 : 'tv_storage = Obj.magic x0 in
@@ -7991,11 +8170,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 7995 "parser_cocci_menhir.ml"
+# 8174 "parser_cocci_menhir.ml"
           
         in
         
-# 917 "parser_cocci_menhir.mly"
+# 968 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let t =
          Ast0.wrap
@@ -8003,7 +8182,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
               (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
                P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
         [Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv))] )
-# 8007 "parser_cocci_menhir.ml"
+# 8186 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8044,27 +8223,27 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _5 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8048 "parser_cocci_menhir.ml"
+# 8227 "parser_cocci_menhir.ml"
         ) = Obj.magic _5 in
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8053 "parser_cocci_menhir.ml"
+# 8232 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr_list_option = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8059 "parser_cocci_menhir.ml"
+# 8238 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_decl_ident = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__5_ in
         let _v : 'tv_decl_var = 
-# 925 "parser_cocci_menhir.mly"
+# 976 "parser_cocci_menhir.mly"
       ( [Ast0.wrap(Ast0.MacroDecl(_1,P.clt2mcode "(" _2,_3,
                                  P.clt2mcode ")" _4,P.clt2mcode ";" _5))] )
-# 8068 "parser_cocci_menhir.ml"
+# 8247 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8135,40 +8314,40 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8139 "parser_cocci_menhir.ml"
+# 8318 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8145 "parser_cocci_menhir.ml"
+# 8324 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let rp2 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8150 "parser_cocci_menhir.ml"
+# 8329 "parser_cocci_menhir.ml"
         ) = Obj.magic rp2 in
         let p : 'tv_decl_list_name_opt_decl_ = Obj.magic p in
         let lp2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8156 "parser_cocci_menhir.ml"
+# 8335 "parser_cocci_menhir.ml"
         ) = Obj.magic lp2 in
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8161 "parser_cocci_menhir.ml"
+# 8340 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_d_ident = Obj.magic d in
         let st : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8167 "parser_cocci_menhir.ml"
+# 8346 "parser_cocci_menhir.ml"
         ) = Obj.magic st in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8172 "parser_cocci_menhir.ml"
+# 8351 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let t : 'tv_fn_ctype = Obj.magic t in
         let _startpos = _startpos_t_ in
@@ -8177,11 +8356,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 8181 "parser_cocci_menhir.ml"
+# 8360 "parser_cocci_menhir.ml"
           
         in
         
-# 931 "parser_cocci_menhir.mly"
+# 982 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let t =
          Ast0.wrap
@@ -8189,7 +8368,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
               (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
                P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
       [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))])
-# 8193 "parser_cocci_menhir.ml"
+# 8372 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8265,40 +8444,40 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8269 "parser_cocci_menhir.ml"
+# 8448 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8275 "parser_cocci_menhir.ml"
+# 8454 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let rp2 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8280 "parser_cocci_menhir.ml"
+# 8459 "parser_cocci_menhir.ml"
         ) = Obj.magic rp2 in
         let p : 'tv_decl_list_name_opt_decl_ = Obj.magic p in
         let lp2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8286 "parser_cocci_menhir.ml"
+# 8465 "parser_cocci_menhir.ml"
         ) = Obj.magic lp2 in
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8291 "parser_cocci_menhir.ml"
+# 8470 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_d_ident = Obj.magic d in
         let st : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8297 "parser_cocci_menhir.ml"
+# 8476 "parser_cocci_menhir.ml"
         ) = Obj.magic st in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8302 "parser_cocci_menhir.ml"
+# 8481 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let t : 'tv_fn_ctype = Obj.magic t in
         let x0 : 'tv_storage = Obj.magic x0 in
@@ -8309,11 +8488,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 8313 "parser_cocci_menhir.ml"
+# 8492 "parser_cocci_menhir.ml"
           
         in
         
-# 931 "parser_cocci_menhir.mly"
+# 982 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let t =
          Ast0.wrap
@@ -8321,7 +8500,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
               (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
                P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
       [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))])
-# 8325 "parser_cocci_menhir.ml"
+# 8504 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8357,22 +8536,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8361 "parser_cocci_menhir.ml"
+# 8540 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let id : 'tv_typedef_ident = Obj.magic id in
-        let t : 'tv_ctype = Obj.magic t in
+        let t : 'tv_ctype_full = Obj.magic t in
         let s : (
 # 53 "parser_cocci_menhir.mly"
       (Data.clt)
-# 8368 "parser_cocci_menhir.ml"
+# 8547 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_pv_ in
         let _v : 'tv_decl_var = 
-# 939 "parser_cocci_menhir.mly"
+# 990 "parser_cocci_menhir.mly"
       ( let s = P.clt2mcode "typedef" s in
         [Ast0.wrap(Ast0.Typedef(s,t,id,P.clt2mcode ";" pv))] )
-# 8376 "parser_cocci_menhir.ml"
+# 8555 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8394,13 +8573,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_define_param_list = 
-# 660 "parser_cocci_menhir.mly"
+# 698 "parser_cocci_menhir.mly"
      (let circle x =
        match Ast0.unwrap x with Ast0.DPcircles(_) -> true | _ -> false in
      if List.exists circle _1
      then Ast0.wrap(Ast0.CIRCLES(_1))
      else Ast0.wrap(Ast0.DOTS(_1)) )
-# 8404 "parser_cocci_menhir.ml"
+# 8583 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8422,9 +8601,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_define_param_list_option = 
-# 684 "parser_cocci_menhir.mly"
+# 722 "parser_cocci_menhir.mly"
                                             ( _1 )
-# 8428 "parser_cocci_menhir.ml"
+# 8607 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8439,9 +8618,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_define_param_list_option = 
-# 685 "parser_cocci_menhir.mly"
+# 723 "parser_cocci_menhir.mly"
                            ( Ast0.wrap(Ast0.DOTS([])) )
-# 8445 "parser_cocci_menhir.ml"
+# 8624 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8463,9 +8642,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_define_param_list_start = 
-# 667 "parser_cocci_menhir.mly"
+# 705 "parser_cocci_menhir.mly"
           ( [Ast0.wrap(Ast0.DParam _1)] )
-# 8469 "parser_cocci_menhir.ml"
+# 8648 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8497,16 +8676,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8501 "parser_cocci_menhir.ml"
+# 8680 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_ident = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_define_param_list_start = 
-# 669 "parser_cocci_menhir.mly"
+# 707 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.DParam _1)::
        Ast0.wrap(Ast0.DPComma(P.clt2mcode "," _2))::_3 )
-# 8510 "parser_cocci_menhir.ml"
+# 8689 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8533,15 +8712,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let d : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8537 "parser_cocci_menhir.ml"
+# 8716 "parser_cocci_menhir.ml"
         ) = Obj.magic d in
         let _startpos = _startpos_d_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_define_param_list_start = 
-# 672 "parser_cocci_menhir.mly"
+# 710 "parser_cocci_menhir.mly"
       ( (P.mkdpdots "..." d)::
        (List.concat (List.map (function x -> x (P.mkdpdots "...")) r)) )
-# 8545 "parser_cocci_menhir.ml"
+# 8724 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8562,12 +8741,12 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 80 "parser_cocci_menhir.mly"
        (Data.clt * token)
-# 8566 "parser_cocci_menhir.ml"
+# 8745 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_defineop = 
-# 621 "parser_cocci_menhir.mly"
+# 659 "parser_cocci_menhir.mly"
     ( let (clt,ident) = _1 in
       function body ->
        Ast0.wrap
@@ -8584,7 +8763,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
                       "unexpected name for a #define")),
              Ast0.wrap Ast0.NoParams,
              body)) )
-# 8588 "parser_cocci_menhir.ml"
+# 8767 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8615,18 +8794,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8619 "parser_cocci_menhir.ml"
+# 8798 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_define_param_list_option = Obj.magic _2 in
         let _1 : (
 # 81 "parser_cocci_menhir.mly"
        (Data.clt * token * int)
-# 8625 "parser_cocci_menhir.ml"
+# 8804 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_defineop = 
-# 638 "parser_cocci_menhir.mly"
+# 676 "parser_cocci_menhir.mly"
     ( let (clt,ident,parenoff) = _1 in
       let (arity,line,lline,offset,col,strbef,straft,pos) = clt in
       let lp =
@@ -8645,7 +8824,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
                    (Semantic_cocci.Semantic
                       "unexpected name for a #define")),
              Ast0.wrap (Ast0.DParams (lp,_2,P.clt2mcode ")" _3)),body)) )
-# 8649 "parser_cocci_menhir.ml"
+# 8828 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8667,9 +8846,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_dep = 
-# 215 "parser_cocci_menhir.mly"
+# 220 "parser_cocci_menhir.mly"
                    ( _1 )
-# 8673 "parser_cocci_menhir.ml"
+# 8852 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8701,9 +8880,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_dep = 
-# 216 "parser_cocci_menhir.mly"
+# 221 "parser_cocci_menhir.mly"
                    ( Ast.AndDep(_1, _3) )
-# 8707 "parser_cocci_menhir.ml"
+# 8886 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8735,9 +8914,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_dep = 
-# 217 "parser_cocci_menhir.mly"
+# 222 "parser_cocci_menhir.mly"
                    ( Ast.OrDep (_1, _3) )
-# 8741 "parser_cocci_menhir.ml"
+# 8920 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8752,9 +8931,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_depends = 
-# 211 "parser_cocci_menhir.mly"
+# 216 "parser_cocci_menhir.mly"
                            ( Ast.NoDep )
-# 8758 "parser_cocci_menhir.ml"
+# 8937 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8784,9 +8963,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_parents_ in
         let _v : 'tv_depends = 
-# 212 "parser_cocci_menhir.mly"
+# 217 "parser_cocci_menhir.mly"
                            ( parents )
-# 8790 "parser_cocci_menhir.ml"
+# 8969 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8808,9 +8987,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_dexpr = 
-# 1134 "parser_cocci_menhir.mly"
+# 1185 "parser_cocci_menhir.mly"
                                           ( _1 )
-# 8814 "parser_cocci_menhir.ml"
+# 8993 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8836,9 +9015,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_disable = 
-# 230 "parser_cocci_menhir.mly"
+# 235 "parser_cocci_menhir.mly"
                                                       ( List.map P.id2name _2 )
-# 8842 "parser_cocci_menhir.ml"
+# 9021 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8859,14 +9038,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8863 "parser_cocci_menhir.ml"
+# 9042 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_dot_expressions = 
-# 1143 "parser_cocci_menhir.mly"
+# 1194 "parser_cocci_menhir.mly"
             ( Ast0.wrap(Ast0.Edots(P.clt2mcode "..." _1,None)) )
-# 8870 "parser_cocci_menhir.ml"
+# 9049 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8888,9 +9067,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_dot_expressions = 
-# 1144 "parser_cocci_menhir.mly"
+# 1195 "parser_cocci_menhir.mly"
                    ( _1 )
-# 8894 "parser_cocci_menhir.ml"
+# 9073 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8916,20 +9095,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let d : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8920 "parser_cocci_menhir.ml"
+# 9099 "parser_cocci_menhir.ml"
         ) = Obj.magic d in
         let c : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8925 "parser_cocci_menhir.ml"
+# 9104 "parser_cocci_menhir.ml"
         ) = Obj.magic c in
         let _startpos = _startpos_c_ in
         let _endpos = _endpos_d_ in
         let _v : 'tv_dp_comma_args_TEllipsis_ = 
-# 677 "parser_cocci_menhir.mly"
+# 715 "parser_cocci_menhir.mly"
     ( function dot_builder ->
       [Ast0.wrap(Ast0.DPComma(P.clt2mcode "," c)); dot_builder d] )
-# 8933 "parser_cocci_menhir.ml"
+# 9112 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8956,16 +9135,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8960 "parser_cocci_menhir.ml"
+# 9139 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_dp_comma_args_TEllipsis_ = 
-# 680 "parser_cocci_menhir.mly"
+# 718 "parser_cocci_menhir.mly"
     ( function dot_builder ->
       [Ast0.wrap(Ast0.DPComma(P.clt2mcode "," _1));
        Ast0.wrap(Ast0.DParam _2)] )
-# 8969 "parser_cocci_menhir.ml"
+# 9148 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -8986,14 +9165,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let d : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 8990 "parser_cocci_menhir.ml"
+# 9169 "parser_cocci_menhir.ml"
         ) = Obj.magic d in
         let _startpos = _startpos_d_ in
         let _endpos = _endpos_d_ in
         let _v : 'tv_edots_when_TEllipsis_eexpr_ = 
-# 1705 "parser_cocci_menhir.mly"
+# 1782 "parser_cocci_menhir.mly"
                                                   ( (d,None) )
-# 8997 "parser_cocci_menhir.ml"
+# 9176 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9032,14 +9211,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let d : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 9036 "parser_cocci_menhir.ml"
+# 9215 "parser_cocci_menhir.ml"
         ) = Obj.magic d in
         let _startpos = _startpos_d_ in
         let _endpos = _endpos__5_ in
         let _v : 'tv_edots_when_TEllipsis_eexpr_ = 
-# 1706 "parser_cocci_menhir.mly"
+# 1783 "parser_cocci_menhir.mly"
                                                   ( (d,Some w) )
-# 9043 "parser_cocci_menhir.ml"
+# 9222 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9060,14 +9239,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let d : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 9064 "parser_cocci_menhir.ml"
+# 9243 "parser_cocci_menhir.ml"
         ) = Obj.magic d in
         let _startpos = _startpos_d_ in
         let _endpos = _endpos_d_ in
         let _v : 'tv_edots_when_TEllipsis_initialize_ = 
-# 1705 "parser_cocci_menhir.mly"
+# 1782 "parser_cocci_menhir.mly"
                                                   ( (d,None) )
-# 9071 "parser_cocci_menhir.ml"
+# 9250 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9106,14 +9285,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let d : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 9110 "parser_cocci_menhir.ml"
+# 9289 "parser_cocci_menhir.ml"
         ) = Obj.magic d in
         let _startpos = _startpos_d_ in
         let _endpos = _endpos__5_ in
         let _v : 'tv_edots_when_TEllipsis_initialize_ = 
-# 1706 "parser_cocci_menhir.mly"
+# 1783 "parser_cocci_menhir.mly"
                                                   ( (d,Some w) )
-# 9117 "parser_cocci_menhir.ml"
+# 9296 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9134,14 +9313,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let d : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 9138 "parser_cocci_menhir.ml"
+# 9317 "parser_cocci_menhir.ml"
         ) = Obj.magic d in
         let _startpos = _startpos_d_ in
         let _endpos = _endpos_d_ in
         let _v : 'tv_edots_when_TEllipsis_struct_decl_ = 
-# 1705 "parser_cocci_menhir.mly"
+# 1782 "parser_cocci_menhir.mly"
                                                   ( (d,None) )
-# 9145 "parser_cocci_menhir.ml"
+# 9324 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9180,14 +9359,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let d : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 9184 "parser_cocci_menhir.ml"
+# 9363 "parser_cocci_menhir.ml"
         ) = Obj.magic d in
         let _startpos = _startpos_d_ in
         let _endpos = _endpos__5_ in
         let _v : 'tv_edots_when_TEllipsis_struct_decl_ = 
-# 1706 "parser_cocci_menhir.mly"
+# 1783 "parser_cocci_menhir.mly"
                                                   ( (d,Some w) )
-# 9191 "parser_cocci_menhir.ml"
+# 9370 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9209,9 +9388,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_eexpr = 
-# 1132 "parser_cocci_menhir.mly"
+# 1183 "parser_cocci_menhir.mly"
                                          ( _1 )
-# 9215 "parser_cocci_menhir.ml"
+# 9394 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9233,7 +9412,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_eexpr_list = 
-# 1649 "parser_cocci_menhir.mly"
+# 1726 "parser_cocci_menhir.mly"
      (let circle x =
        match Ast0.unwrap x with Ast0.Ecircles(_) -> true | _ -> false in
      let star x =
@@ -9244,7 +9423,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
        if List.exists star _1
        then Ast0.wrap(Ast0.STARS(_1))
        else Ast0.wrap(Ast0.DOTS(_1)) )
-# 9248 "parser_cocci_menhir.ml"
+# 9427 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9266,9 +9445,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_eexpr_list_option = 
-# 1688 "parser_cocci_menhir.mly"
+# 1765 "parser_cocci_menhir.mly"
                               ( _1 )
-# 9272 "parser_cocci_menhir.ml"
+# 9451 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9283,9 +9462,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_eexpr_list_option = 
-# 1689 "parser_cocci_menhir.mly"
+# 1766 "parser_cocci_menhir.mly"
                            ( Ast0.wrap(Ast0.DOTS([])) )
-# 9289 "parser_cocci_menhir.ml"
+# 9468 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9307,9 +9486,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_eexpr_list_start = 
-# 1676 "parser_cocci_menhir.mly"
+# 1753 "parser_cocci_menhir.mly"
           ( [_1] )
-# 9313 "parser_cocci_menhir.ml"
+# 9492 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9341,15 +9520,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 9345 "parser_cocci_menhir.ml"
+# 9524 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_aexpr = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_eexpr_list_start = 
-# 1678 "parser_cocci_menhir.mly"
+# 1755 "parser_cocci_menhir.mly"
       ( _1::Ast0.wrap(Ast0.EComma(P.clt2mcode "," _2))::_3 )
-# 9353 "parser_cocci_menhir.ml"
+# 9532 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9391,9 +9570,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__6_ in
         let _v : 'tv_error_words = 
-# 1482 "parser_cocci_menhir.mly"
+# 1552 "parser_cocci_menhir.mly"
       ( [Ast0.wrap(Ast0.ERRORWORDS(cl))] )
-# 9397 "parser_cocci_menhir.ml"
+# 9576 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9413,9 +9592,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_exists = 
-# 233 "parser_cocci_menhir.mly"
+# 238 "parser_cocci_menhir.mly"
           ( Ast.Exists )
-# 9419 "parser_cocci_menhir.ml"
+# 9598 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9435,9 +9614,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_exists = 
-# 234 "parser_cocci_menhir.mly"
+# 239 "parser_cocci_menhir.mly"
           ( Ast.Forall )
-# 9441 "parser_cocci_menhir.ml"
+# 9620 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9461,9 +9640,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_exists = 
-# 235 "parser_cocci_menhir.mly"
+# 240 "parser_cocci_menhir.mly"
                    ( Ast.ReverseForall )
-# 9467 "parser_cocci_menhir.ml"
+# 9646 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9478,9 +9657,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_exists = 
-# 236 "parser_cocci_menhir.mly"
+# 241 "parser_cocci_menhir.mly"
           ( Ast.Undetermined )
-# 9484 "parser_cocci_menhir.ml"
+# 9663 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9502,9 +9681,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_expr = 
-# 1130 "parser_cocci_menhir.mly"
+# 1181 "parser_cocci_menhir.mly"
                                 ( _1 )
-# 9508 "parser_cocci_menhir.ml"
+# 9687 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9526,9 +9705,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_r_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_expr_dots_TEllipsis_ = 
-# 1312 "parser_cocci_menhir.mly"
+# 1363 "parser_cocci_menhir.mly"
                                                        ( r )
-# 9532 "parser_cocci_menhir.ml"
+# 9711 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9543,9 +9722,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_extends = 
-# 206 "parser_cocci_menhir.mly"
+# 211 "parser_cocci_menhir.mly"
                                                   ( () )
-# 9549 "parser_cocci_menhir.ml"
+# 9728 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9570,14 +9749,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let parent : (
 # 47 "parser_cocci_menhir.mly"
       (string)
-# 9574 "parser_cocci_menhir.ml"
+# 9753 "parser_cocci_menhir.ml"
         ) = Obj.magic parent in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_parent_ in
         let _v : 'tv_extends = 
-# 208 "parser_cocci_menhir.mly"
+# 213 "parser_cocci_menhir.mly"
     ( !Data.install_bindings (parent) )
-# 9581 "parser_cocci_menhir.ml"
+# 9760 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9603,21 +9782,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 82 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 9607 "parser_cocci_menhir.ml"
+# 9786 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 82 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 9612 "parser_cocci_menhir.ml"
+# 9791 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_filespec = 
-# 580 "parser_cocci_menhir.mly"
+# 618 "parser_cocci_menhir.mly"
     ( [Ast0.wrap
          (Ast0.FILEINFO(P.id2mcode _1,
                         P.id2mcode _2))] )
-# 9621 "parser_cocci_menhir.ml"
+# 9800 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9645,9 +9824,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_ty_ in
         let _endpos = _endpos_m_ in
         let _v : 'tv_fn_ctype = 
-# 535 "parser_cocci_menhir.mly"
+# 567 "parser_cocci_menhir.mly"
                                      ( P.pointerify ty m )
-# 9651 "parser_cocci_menhir.ml"
+# 9830 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9674,16 +9853,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let t : (
 # 50 "parser_cocci_menhir.mly"
       (Data.clt)
-# 9678 "parser_cocci_menhir.ml"
+# 9857 "parser_cocci_menhir.ml"
         ) = Obj.magic t in
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_m_ in
         let _v : 'tv_fn_ctype = 
-# 537 "parser_cocci_menhir.mly"
+# 569 "parser_cocci_menhir.mly"
          ( P.pointerify
-            (Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)))
+            (Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])))
             m )
-# 9687 "parser_cocci_menhir.ml"
+# 9866 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9698,9 +9877,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_fninfo = 
-# 723 "parser_cocci_menhir.mly"
+# 761 "parser_cocci_menhir.mly"
                 ( [] )
-# 9704 "parser_cocci_menhir.ml"
+# 9883 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9728,13 +9907,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fninfo = 
-# 725 "parser_cocci_menhir.mly"
+# 763 "parser_cocci_menhir.mly"
       ( try
        let _ =
          List.find (function Ast0.FStorage(_) -> true | _ -> false) _2 in
        raise (Semantic_cocci.Semantic "duplicate storage")
       with Not_found -> (Ast0.FStorage(_1))::_2 )
-# 9738 "parser_cocci_menhir.ml"
+# 9917 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9762,9 +9941,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_fninfo = 
-# 730 "parser_cocci_menhir.mly"
+# 768 "parser_cocci_menhir.mly"
                            ( (Ast0.FType(t))::r )
-# 9768 "parser_cocci_menhir.ml"
+# 9947 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9791,17 +9970,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 53 "parser_cocci_menhir.mly"
       (Data.clt)
-# 9795 "parser_cocci_menhir.ml"
+# 9974 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fninfo = 
-# 732 "parser_cocci_menhir.mly"
+# 770 "parser_cocci_menhir.mly"
       ( try
        let _ = List.find (function Ast0.FInline(_) -> true | _ -> false) _2 in
        raise (Semantic_cocci.Semantic "duplicate inline")
       with Not_found -> (Ast0.FInline(P.clt2mcode "inline" _1))::_2 )
-# 9805 "parser_cocci_menhir.ml"
+# 9984 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9828,17 +10007,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 55 "parser_cocci_menhir.mly"
       (string * Data.clt)
-# 9832 "parser_cocci_menhir.ml"
+# 10011 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fninfo = 
-# 737 "parser_cocci_menhir.mly"
+# 775 "parser_cocci_menhir.mly"
       ( try
        let _ = List.find (function Ast0.FAttr(_) -> true | _ -> false) _2 in
        raise (Semantic_cocci.Semantic "multiple attributes")
       with Not_found -> (Ast0.FAttr(P.id2mcode _1))::_2 )
-# 9842 "parser_cocci_menhir.ml"
+# 10021 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9853,9 +10032,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_fninfo_nt = 
-# 743 "parser_cocci_menhir.mly"
+# 781 "parser_cocci_menhir.mly"
                 ( [] )
-# 9859 "parser_cocci_menhir.ml"
+# 10038 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9883,13 +10062,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fninfo_nt = 
-# 745 "parser_cocci_menhir.mly"
+# 783 "parser_cocci_menhir.mly"
       ( try
        let _ =
          List.find (function Ast0.FStorage(_) -> true | _ -> false) _2 in
        raise (Semantic_cocci.Semantic "duplicate storage")
       with Not_found -> (Ast0.FStorage(_1))::_2 )
-# 9893 "parser_cocci_menhir.ml"
+# 10072 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9916,17 +10095,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 53 "parser_cocci_menhir.mly"
       (Data.clt)
-# 9920 "parser_cocci_menhir.ml"
+# 10099 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fninfo_nt = 
-# 751 "parser_cocci_menhir.mly"
+# 789 "parser_cocci_menhir.mly"
       ( try
        let _ = List.find (function Ast0.FInline(_) -> true | _ -> false) _2 in
        raise (Semantic_cocci.Semantic "duplicate inline")
       with Not_found -> (Ast0.FInline(P.clt2mcode "inline" _1))::_2 )
-# 9930 "parser_cocci_menhir.ml"
+# 10109 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9953,17 +10132,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 55 "parser_cocci_menhir.mly"
       (string * Data.clt)
-# 9957 "parser_cocci_menhir.ml"
+# 10136 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fninfo_nt = 
-# 756 "parser_cocci_menhir.mly"
+# 794 "parser_cocci_menhir.mly"
       ( try
        let _ = List.find (function Ast0.FAttr(_) -> true | _ -> false) _2 in
        raise (Semantic_cocci.Semantic "duplicate init")
       with Not_found -> (Ast0.FAttr(P.id2mcode _1))::_2 )
-# 9967 "parser_cocci_menhir.ml"
+# 10146 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -9978,9 +10157,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_fun_after_dots = 
-# 1597 "parser_cocci_menhir.mly"
+# 1674 "parser_cocci_menhir.mly"
                                ([])
-# 9984 "parser_cocci_menhir.ml"
+# 10163 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10006,9 +10185,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fun_after_dots = 
-# 1598 "parser_cocci_menhir.mly"
+# 1675 "parser_cocci_menhir.mly"
                                (_2)
-# 10012 "parser_cocci_menhir.ml"
+# 10191 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10036,9 +10215,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fun_after_dots = 
-# 1599 "parser_cocci_menhir.mly"
+# 1676 "parser_cocci_menhir.mly"
                                (Ast0.wrap(Ast0.Exp(_1))::_2)
-# 10042 "parser_cocci_menhir.ml"
+# 10221 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10066,9 +10245,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fun_after_dots = 
-# 1600 "parser_cocci_menhir.mly"
+# 1677 "parser_cocci_menhir.mly"
                                     (_1@_2)
-# 10072 "parser_cocci_menhir.ml"
+# 10251 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10083,9 +10262,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_fun_after_dots_or = 
-# 1607 "parser_cocci_menhir.mly"
+# 1684 "parser_cocci_menhir.mly"
                                ([])
-# 10089 "parser_cocci_menhir.ml"
+# 10268 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10111,9 +10290,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fun_after_dots_or = 
-# 1608 "parser_cocci_menhir.mly"
+# 1685 "parser_cocci_menhir.mly"
                                (_2)
-# 10117 "parser_cocci_menhir.ml"
+# 10296 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10141,9 +10320,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fun_after_dots_or = 
-# 1609 "parser_cocci_menhir.mly"
+# 1686 "parser_cocci_menhir.mly"
                                (Ast0.wrap(Ast0.Exp(_1))::_2)
-# 10147 "parser_cocci_menhir.ml"
+# 10326 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10171,9 +10350,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fun_after_dots_or = 
-# 1610 "parser_cocci_menhir.mly"
+# 1687 "parser_cocci_menhir.mly"
                                     (_1@_2)
-# 10177 "parser_cocci_menhir.ml"
+# 10356 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10201,9 +10380,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fun_after_exp = 
-# 1603 "parser_cocci_menhir.mly"
+# 1680 "parser_cocci_menhir.mly"
                                (_1::_2)
-# 10207 "parser_cocci_menhir.ml"
+# 10386 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10218,9 +10397,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_fun_after_exp_or = 
-# 1613 "parser_cocci_menhir.mly"
+# 1690 "parser_cocci_menhir.mly"
                                ([])
-# 10224 "parser_cocci_menhir.ml"
+# 10403 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10248,9 +10427,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fun_after_exp_or = 
-# 1614 "parser_cocci_menhir.mly"
+# 1691 "parser_cocci_menhir.mly"
                                (_1::_2)
-# 10254 "parser_cocci_menhir.ml"
+# 10433 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10265,9 +10444,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_fun_after_stm = 
-# 1592 "parser_cocci_menhir.mly"
+# 1669 "parser_cocci_menhir.mly"
                                ([])
-# 10271 "parser_cocci_menhir.ml"
+# 10450 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10295,9 +10474,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fun_after_stm = 
-# 1593 "parser_cocci_menhir.mly"
+# 1670 "parser_cocci_menhir.mly"
                                (_1::_2)
-# 10301 "parser_cocci_menhir.ml"
+# 10480 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10325,9 +10504,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_fun_after_stm = 
-# 1594 "parser_cocci_menhir.mly"
+# 1671 "parser_cocci_menhir.mly"
                                (_1@_2)
-# 10331 "parser_cocci_menhir.ml"
+# 10510 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10349,9 +10528,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_fun_start = 
-# 1589 "parser_cocci_menhir.mly"
+# 1666 "parser_cocci_menhir.mly"
                  ( Ast0.wrap(Ast0.DOTS(_1)) )
-# 10355 "parser_cocci_menhir.ml"
+# 10534 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10373,9 +10552,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_func_ident = 
-# 1401 "parser_cocci_menhir.mly"
+# 1471 "parser_cocci_menhir.mly"
          ( Ast0.wrap(Ast0.Id(P.id2mcode _1)) )
-# 10379 "parser_cocci_menhir.ml"
+# 10558 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10396,15 +10575,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 61 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 10400 "parser_cocci_menhir.ml"
+# 10579 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_func_ident = 
-# 1403 "parser_cocci_menhir.mly"
+# 1473 "parser_cocci_menhir.mly"
          ( let (nm,constraints,pure,clt) = _1 in
         Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) )
-# 10408 "parser_cocci_menhir.ml"
+# 10587 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10425,15 +10604,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 61 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 10429 "parser_cocci_menhir.ml"
+# 10608 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_func_ident = 
-# 1406 "parser_cocci_menhir.mly"
+# 1476 "parser_cocci_menhir.mly"
          ( let (nm,constraints,pure,clt) = _1 in
         Ast0.wrap(Ast0.MetaFunc(P.clt2mcode nm clt,constraints,pure)) )
-# 10437 "parser_cocci_menhir.ml"
+# 10616 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10454,16 +10633,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 61 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 10458 "parser_cocci_menhir.ml"
+# 10637 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_func_ident = 
-# 1409 "parser_cocci_menhir.mly"
+# 1479 "parser_cocci_menhir.mly"
   ( let (nm,constraints,pure,clt) = _1 in
         Ast0.wrap
           (Ast0.MetaLocalFunc(P.clt2mcode nm clt,constraints,pure)) )
-# 10467 "parser_cocci_menhir.ml"
+# 10646 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10523,38 +10702,38 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rb : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10527 "parser_cocci_menhir.ml"
+# 10706 "parser_cocci_menhir.ml"
         ) = Obj.magic rb in
         let b : 'tv_fun_start = Obj.magic b in
         let lb : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10533 "parser_cocci_menhir.ml"
+# 10712 "parser_cocci_menhir.ml"
         ) = Obj.magic lb in
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10538 "parser_cocci_menhir.ml"
+# 10717 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let d : 'tv_decl_list_decl_ = Obj.magic d in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10544 "parser_cocci_menhir.ml"
+# 10723 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let i : 'tv_func_ident = Obj.magic i in
         let f : 'tv_fninfo = Obj.magic f in
         let _startpos = _startpos_f_ in
         let _endpos = _endpos_rb_ in
         let _v : 'tv_fundecl = 
-# 715 "parser_cocci_menhir.mly"
+# 753 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.FunDecl((Ast0.default_info(),Ast0.context_befaft()),
                               f, i,
                               P.clt2mcode "(" lp, d,
                               P.clt2mcode ")" rp,
                               P.clt2mcode "{" lb, b,
                               P.clt2mcode "}" rb)) )
-# 10558 "parser_cocci_menhir.ml"
+# 10737 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10600,18 +10779,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pt : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10604 "parser_cocci_menhir.ml"
+# 10783 "parser_cocci_menhir.ml"
         ) = Obj.magic pt in
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10609 "parser_cocci_menhir.ml"
+# 10788 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let d : 'tv_decl_list_name_opt_decl_ = Obj.magic d in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10615 "parser_cocci_menhir.ml"
+# 10794 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let id : 'tv_func_ident = Obj.magic id in
         let t : 'tv_ctype = Obj.magic t in
@@ -10621,11 +10800,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 10625 "parser_cocci_menhir.ml"
+# 10804 "parser_cocci_menhir.ml"
           
         in
         
-# 692 "parser_cocci_menhir.mly"
+# 730 "parser_cocci_menhir.mly"
       ( Ast0.wrap
          (Ast0.UnInit
             (s,
@@ -10633,7 +10812,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
                (Ast0.FunctionType(Some t,
                                   P.clt2mcode "(" lp, d, P.clt2mcode ")" rp)),
              id, P.clt2mcode ";" pt)) )
-# 10637 "parser_cocci_menhir.ml"
+# 10816 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10684,18 +10863,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pt : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10688 "parser_cocci_menhir.ml"
+# 10867 "parser_cocci_menhir.ml"
         ) = Obj.magic pt in
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10693 "parser_cocci_menhir.ml"
+# 10872 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let d : 'tv_decl_list_name_opt_decl_ = Obj.magic d in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10699 "parser_cocci_menhir.ml"
+# 10878 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let id : 'tv_func_ident = Obj.magic id in
         let t : 'tv_ctype = Obj.magic t in
@@ -10707,11 +10886,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 10711 "parser_cocci_menhir.ml"
+# 10890 "parser_cocci_menhir.ml"
           
         in
         
-# 692 "parser_cocci_menhir.mly"
+# 730 "parser_cocci_menhir.mly"
       ( Ast0.wrap
          (Ast0.UnInit
             (s,
@@ -10719,7 +10898,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
                (Ast0.FunctionType(Some t,
                                   P.clt2mcode "(" lp, d, P.clt2mcode ")" rp)),
              id, P.clt2mcode ";" pt)) )
-# 10723 "parser_cocci_menhir.ml"
+# 10902 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10765,24 +10944,24 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pt : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10769 "parser_cocci_menhir.ml"
+# 10948 "parser_cocci_menhir.ml"
         ) = Obj.magic pt in
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10774 "parser_cocci_menhir.ml"
+# 10953 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let d : 'tv_decl_list_name_opt_decl_ = Obj.magic d in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10780 "parser_cocci_menhir.ml"
+# 10959 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let id : 'tv_func_ident = Obj.magic id in
         let t : (
 # 50 "parser_cocci_menhir.mly"
       (Data.clt)
-# 10786 "parser_cocci_menhir.ml"
+# 10965 "parser_cocci_menhir.ml"
         ) = Obj.magic t in
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_pt_ in
@@ -10790,12 +10969,12 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 10794 "parser_cocci_menhir.ml"
+# 10973 "parser_cocci_menhir.ml"
           
         in
         
-# 701 "parser_cocci_menhir.mly"
-    ( let t = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
+# 739 "parser_cocci_menhir.mly"
+    ( let t = Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
       Ast0.wrap
         (Ast0.UnInit
           (s,
@@ -10803,7 +10982,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
              (Ast0.FunctionType(Some t,
                                 P.clt2mcode "(" lp, d, P.clt2mcode ")" rp)),
            id, P.clt2mcode ";" pt)) )
-# 10807 "parser_cocci_menhir.ml"
+# 10986 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10854,24 +11033,24 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pt : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10858 "parser_cocci_menhir.ml"
+# 11037 "parser_cocci_menhir.ml"
         ) = Obj.magic pt in
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10863 "parser_cocci_menhir.ml"
+# 11042 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let d : 'tv_decl_list_name_opt_decl_ = Obj.magic d in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 10869 "parser_cocci_menhir.ml"
+# 11048 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let id : 'tv_func_ident = Obj.magic id in
         let t : (
 # 50 "parser_cocci_menhir.mly"
       (Data.clt)
-# 10875 "parser_cocci_menhir.ml"
+# 11054 "parser_cocci_menhir.ml"
         ) = Obj.magic t in
         let x0 : 'tv_storage = Obj.magic x0 in
         let _startpos = _startpos_x0_ in
@@ -10881,12 +11060,12 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 10885 "parser_cocci_menhir.ml"
+# 11064 "parser_cocci_menhir.ml"
           
         in
         
-# 701 "parser_cocci_menhir.mly"
-    ( let t = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
+# 739 "parser_cocci_menhir.mly"
+    ( let t = Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
       Ast0.wrap
         (Ast0.UnInit
           (s,
@@ -10894,7 +11073,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
              (Ast0.FunctionType(Some t,
                                 P.clt2mcode "(" lp, d, P.clt2mcode ")" rp)),
            id, P.clt2mcode ";" pt)) )
-# 10898 "parser_cocci_menhir.ml"
+# 11077 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10907,18 +11086,66 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
         let {
           MenhirLib.EngineTypes.state = _menhir_s;
-          MenhirLib.EngineTypes.semv = q;
-          MenhirLib.EngineTypes.startp = _startpos_q_;
-          MenhirLib.EngineTypes.endp = _endpos_q_;
+          MenhirLib.EngineTypes.semv = r0;
+          MenhirLib.EngineTypes.startp = _startpos_r0_;
+          MenhirLib.EngineTypes.endp = _endpos_r0_;
           MenhirLib.EngineTypes.next = _menhir_stack;
           } = _menhir_stack in
-        let q : 'tv_ctype_qualif = Obj.magic q in
-        let _startpos = _startpos_q_ in
-        let _endpos = _endpos_q_ in
-        let _v : 'tv_generic_ctype = 
-# 442 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.ImplicitInt(q)) )
-# 10922 "parser_cocci_menhir.ml"
+        let r0 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11098 "parser_cocci_menhir.ml"
+        ) = Obj.magic r0 in
+        let _startpos = _startpos_r0_ in
+        let _endpos = _endpos_r0_ in
+        let _v : 'tv_generic_ctype = let q =
+          let r = r0 in
+          
+# 575 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Unsigned r,x)) )
+# 11107 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 499 "parser_cocci_menhir.mly"
+                          ( q None )
+# 11113 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = r0;
+          MenhirLib.EngineTypes.startp = _startpos_r0_;
+          MenhirLib.EngineTypes.endp = _endpos_r0_;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          } = _menhir_stack in
+        let r0 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11134 "parser_cocci_menhir.ml"
+        ) = Obj.magic r0 in
+        let _startpos = _startpos_r0_ in
+        let _endpos = _endpos_r0_ in
+        let _v : 'tv_generic_ctype = let q =
+          let r = r0 in
+          
+# 577 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Signed r,x)) )
+# 11143 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 499 "parser_cocci_menhir.mly"
+                          ( q None )
+# 11149 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10931,29 +11158,72 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
         let {
           MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = _1;
+          MenhirLib.EngineTypes.startp = _startpos__1_;
+          MenhirLib.EngineTypes.endp = _endpos__1_;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          } = _menhir_stack in
+        let _1 : 'tv_generic_ctype_full = Obj.magic _1 in
+        let _startpos = _startpos__1_ in
+        let _endpos = _endpos__1_ in
+        let _v : 'tv_generic_ctype = 
+# 500 "parser_cocci_menhir.mly"
+                          ( _1 )
+# 11173 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
           MenhirLib.EngineTypes.semv = ty;
           MenhirLib.EngineTypes.startp = _startpos_ty_;
           MenhirLib.EngineTypes.endp = _endpos_ty_;
-          MenhirLib.EngineTypes.next = _menhir_stack;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.state = _menhir_s;
+            MenhirLib.EngineTypes.semv = r00;
+            MenhirLib.EngineTypes.startp = _startpos_r00_;
+            MenhirLib.EngineTypes.endp = _endpos_r00_;
+            MenhirLib.EngineTypes.next = _menhir_stack;
+            };
           } = _menhir_stack in
         let ty : (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 10943 "parser_cocci_menhir.ml"
+# 11199 "parser_cocci_menhir.ml"
         ) = Obj.magic ty in
-        let _startpos = _startpos_ty_ in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11204 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
         let _endpos = _endpos_ty_ in
-        let _v : 'tv_generic_ctype = let q =
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 575 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Unsigned r,x)) )
+# 11215 "parser_cocci_menhir.ml"
+            
+          in
           
-# 39 "standard.mly"
-    ( None )
-# 10951 "parser_cocci_menhir.ml"
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 11221 "parser_cocci_menhir.ml"
           
         in
         
-# 444 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.CharType ty, q)) )
-# 10957 "parser_cocci_menhir.ml"
+# 452 "parser_cocci_menhir.mly"
+        ( q (Ast0.wrap(Ast0.BaseType(Ast.CharType,[P.clt2mcode "char" ty]))) )
+# 11227 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -10970,32 +11240,44 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           MenhirLib.EngineTypes.endp = _endpos_ty_;
           MenhirLib.EngineTypes.next = {
             MenhirLib.EngineTypes.state = _menhir_s;
-            MenhirLib.EngineTypes.semv = x0;
-            MenhirLib.EngineTypes.startp = _startpos_x0_;
-            MenhirLib.EngineTypes.endp = _endpos_x0_;
+            MenhirLib.EngineTypes.semv = r00;
+            MenhirLib.EngineTypes.startp = _startpos_r00_;
+            MenhirLib.EngineTypes.endp = _endpos_r00_;
             MenhirLib.EngineTypes.next = _menhir_stack;
             };
           } = _menhir_stack in
         let ty : (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 10983 "parser_cocci_menhir.ml"
+# 11253 "parser_cocci_menhir.ml"
         ) = Obj.magic ty in
-        let x0 : 'tv_ctype_qualif = Obj.magic x0 in
-        let _startpos = _startpos_x0_ in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11258 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
         let _endpos = _endpos_ty_ in
-        let _v : 'tv_generic_ctype = let q =
-          let x = x0 in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 577 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Signed r,x)) )
+# 11269 "parser_cocci_menhir.ml"
+            
+          in
           
-# 41 "standard.mly"
-    ( Some x )
-# 10993 "parser_cocci_menhir.ml"
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 11275 "parser_cocci_menhir.ml"
           
         in
         
-# 444 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.CharType ty, q)) )
-# 10999 "parser_cocci_menhir.ml"
+# 452 "parser_cocci_menhir.mly"
+        ( q (Ast0.wrap(Ast0.BaseType(Ast.CharType,[P.clt2mcode "char" ty]))) )
+# 11281 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11016,21 +11298,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let ty : (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 11020 "parser_cocci_menhir.ml"
+# 11302 "parser_cocci_menhir.ml"
         ) = Obj.magic ty in
         let _startpos = _startpos_ty_ in
         let _endpos = _endpos_ty_ in
-        let _v : 'tv_generic_ctype = let q =
+        let _v : 'tv_generic_ctype_full = let q =
           
-# 39 "standard.mly"
-    ( None )
-# 11028 "parser_cocci_menhir.ml"
+# 581 "parser_cocci_menhir.mly"
+                ( function x -> x )
+# 11310 "parser_cocci_menhir.ml"
           
         in
         
-# 446 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.ShortType ty, q)) )
-# 11034 "parser_cocci_menhir.ml"
+# 452 "parser_cocci_menhir.mly"
+        ( q (Ast0.wrap(Ast0.BaseType(Ast.CharType,[P.clt2mcode "char" ty]))) )
+# 11316 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11047,32 +11329,98 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           MenhirLib.EngineTypes.endp = _endpos_ty_;
           MenhirLib.EngineTypes.next = {
             MenhirLib.EngineTypes.state = _menhir_s;
-            MenhirLib.EngineTypes.semv = x0;
-            MenhirLib.EngineTypes.startp = _startpos_x0_;
-            MenhirLib.EngineTypes.endp = _endpos_x0_;
+            MenhirLib.EngineTypes.semv = r00;
+            MenhirLib.EngineTypes.startp = _startpos_r00_;
+            MenhirLib.EngineTypes.endp = _endpos_r00_;
             MenhirLib.EngineTypes.next = _menhir_stack;
             };
           } = _menhir_stack in
         let ty : (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 11060 "parser_cocci_menhir.ml"
+# 11342 "parser_cocci_menhir.ml"
         ) = Obj.magic ty in
-        let x0 : 'tv_ctype_qualif = Obj.magic x0 in
-        let _startpos = _startpos_x0_ in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11347 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
         let _endpos = _endpos_ty_ in
-        let _v : 'tv_generic_ctype = let q =
-          let x = x0 in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 575 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Unsigned r,x)) )
+# 11358 "parser_cocci_menhir.ml"
+            
+          in
           
-# 41 "standard.mly"
-    ( Some x )
-# 11070 "parser_cocci_menhir.ml"
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 11364 "parser_cocci_menhir.ml"
           
         in
         
-# 446 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.ShortType ty, q)) )
-# 11076 "parser_cocci_menhir.ml"
+# 454 "parser_cocci_menhir.mly"
+        ( q (Ast0.wrap(Ast0.BaseType(Ast.ShortType,[P.clt2mcode "short" ty]))))
+# 11370 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = ty;
+          MenhirLib.EngineTypes.startp = _startpos_ty_;
+          MenhirLib.EngineTypes.endp = _endpos_ty_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.state = _menhir_s;
+            MenhirLib.EngineTypes.semv = r00;
+            MenhirLib.EngineTypes.startp = _startpos_r00_;
+            MenhirLib.EngineTypes.endp = _endpos_r00_;
+            MenhirLib.EngineTypes.next = _menhir_stack;
+            };
+          } = _menhir_stack in
+        let ty : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11396 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11401 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
+        let _endpos = _endpos_ty_ in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 577 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Signed r,x)) )
+# 11412 "parser_cocci_menhir.ml"
+            
+          in
+          
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 11418 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 454 "parser_cocci_menhir.mly"
+        ( q (Ast0.wrap(Ast0.BaseType(Ast.ShortType,[P.clt2mcode "short" ty]))))
+# 11424 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11093,21 +11441,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let ty : (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 11097 "parser_cocci_menhir.ml"
+# 11445 "parser_cocci_menhir.ml"
         ) = Obj.magic ty in
         let _startpos = _startpos_ty_ in
         let _endpos = _endpos_ty_ in
-        let _v : 'tv_generic_ctype = let q =
+        let _v : 'tv_generic_ctype_full = let q =
           
-# 39 "standard.mly"
-    ( None )
-# 11105 "parser_cocci_menhir.ml"
+# 581 "parser_cocci_menhir.mly"
+                ( function x -> x )
+# 11453 "parser_cocci_menhir.ml"
           
         in
         
-# 448 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.IntType ty, q)) )
-# 11111 "parser_cocci_menhir.ml"
+# 454 "parser_cocci_menhir.mly"
+        ( q (Ast0.wrap(Ast0.BaseType(Ast.ShortType,[P.clt2mcode "short" ty]))))
+# 11459 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11124,32 +11472,133 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           MenhirLib.EngineTypes.endp = _endpos_ty_;
           MenhirLib.EngineTypes.next = {
             MenhirLib.EngineTypes.state = _menhir_s;
-            MenhirLib.EngineTypes.semv = x0;
-            MenhirLib.EngineTypes.startp = _startpos_x0_;
-            MenhirLib.EngineTypes.endp = _endpos_x0_;
+            MenhirLib.EngineTypes.semv = r00;
+            MenhirLib.EngineTypes.startp = _startpos_r00_;
+            MenhirLib.EngineTypes.endp = _endpos_r00_;
             MenhirLib.EngineTypes.next = _menhir_stack;
             };
           } = _menhir_stack in
         let ty : (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 11137 "parser_cocci_menhir.ml"
+# 11485 "parser_cocci_menhir.ml"
         ) = Obj.magic ty in
-        let x0 : 'tv_ctype_qualif = Obj.magic x0 in
-        let _startpos = _startpos_x0_ in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11490 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
         let _endpos = _endpos_ty_ in
-        let _v : 'tv_generic_ctype = let q =
-          let x = x0 in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 575 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Unsigned r,x)) )
+# 11501 "parser_cocci_menhir.ml"
+            
+          in
           
-# 41 "standard.mly"
-    ( Some x )
-# 11147 "parser_cocci_menhir.ml"
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 11507 "parser_cocci_menhir.ml"
           
         in
         
-# 448 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.IntType ty, q)) )
-# 11153 "parser_cocci_menhir.ml"
+# 456 "parser_cocci_menhir.mly"
+         ( q (Ast0.wrap(Ast0.BaseType(Ast.IntType,[P.clt2mcode "int" ty]))) )
+# 11513 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = ty;
+          MenhirLib.EngineTypes.startp = _startpos_ty_;
+          MenhirLib.EngineTypes.endp = _endpos_ty_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.state = _menhir_s;
+            MenhirLib.EngineTypes.semv = r00;
+            MenhirLib.EngineTypes.startp = _startpos_r00_;
+            MenhirLib.EngineTypes.endp = _endpos_r00_;
+            MenhirLib.EngineTypes.next = _menhir_stack;
+            };
+          } = _menhir_stack in
+        let ty : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11539 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11544 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
+        let _endpos = _endpos_ty_ in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 577 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Signed r,x)) )
+# 11555 "parser_cocci_menhir.ml"
+            
+          in
+          
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 11561 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 456 "parser_cocci_menhir.mly"
+         ( q (Ast0.wrap(Ast0.BaseType(Ast.IntType,[P.clt2mcode "int" ty]))) )
+# 11567 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = ty;
+          MenhirLib.EngineTypes.startp = _startpos_ty_;
+          MenhirLib.EngineTypes.endp = _endpos_ty_;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          } = _menhir_stack in
+        let ty : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11588 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty in
+        let _startpos = _startpos_ty_ in
+        let _endpos = _endpos_ty_ in
+        let _v : 'tv_generic_ctype_full = let q =
+          
+# 581 "parser_cocci_menhir.mly"
+                ( function x -> x )
+# 11596 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 456 "parser_cocci_menhir.mly"
+         ( q (Ast0.wrap(Ast0.BaseType(Ast.IntType,[P.clt2mcode "int" ty]))) )
+# 11602 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11170,14 +11619,252 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let t : (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 11174 "parser_cocci_menhir.ml"
-        ) = Obj.magic t in
-        let _startpos = _startpos_t_ in
-        let _endpos = _endpos_t_ in
-        let _v : 'tv_generic_ctype = 
-# 450 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.DoubleType t, None)) )
-# 11181 "parser_cocci_menhir.ml"
+# 11623 "parser_cocci_menhir.ml"
+        ) = Obj.magic t in
+        let _startpos = _startpos_t_ in
+        let _endpos = _endpos_t_ in
+        let _v : 'tv_generic_ctype_full = 
+# 458 "parser_cocci_menhir.mly"
+         ( Ast0.wrap(Ast0.BaseType(Ast.DoubleType,[P.clt2mcode "double" t])) )
+# 11630 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = t;
+          MenhirLib.EngineTypes.startp = _startpos_t_;
+          MenhirLib.EngineTypes.endp = _endpos_t_;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          } = _menhir_stack in
+        let t : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11651 "parser_cocci_menhir.ml"
+        ) = Obj.magic t in
+        let _startpos = _startpos_t_ in
+        let _endpos = _endpos_t_ in
+        let _v : 'tv_generic_ctype_full = 
+# 460 "parser_cocci_menhir.mly"
+         ( Ast0.wrap(Ast0.BaseType(Ast.FloatType,[P.clt2mcode "float" t])) )
+# 11658 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = ty;
+          MenhirLib.EngineTypes.startp = _startpos_ty_;
+          MenhirLib.EngineTypes.endp = _endpos_ty_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.state = _menhir_s;
+            MenhirLib.EngineTypes.semv = r00;
+            MenhirLib.EngineTypes.startp = _startpos_r00_;
+            MenhirLib.EngineTypes.endp = _endpos_r00_;
+            MenhirLib.EngineTypes.next = _menhir_stack;
+            };
+          } = _menhir_stack in
+        let ty : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11684 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11689 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
+        let _endpos = _endpos_ty_ in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 575 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Unsigned r,x)) )
+# 11700 "parser_cocci_menhir.ml"
+            
+          in
+          
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 11706 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 462 "parser_cocci_menhir.mly"
+         ( q (Ast0.wrap(Ast0.BaseType(Ast.LongType,[P.clt2mcode "long" ty]))) )
+# 11712 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = ty;
+          MenhirLib.EngineTypes.startp = _startpos_ty_;
+          MenhirLib.EngineTypes.endp = _endpos_ty_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.state = _menhir_s;
+            MenhirLib.EngineTypes.semv = r00;
+            MenhirLib.EngineTypes.startp = _startpos_r00_;
+            MenhirLib.EngineTypes.endp = _endpos_r00_;
+            MenhirLib.EngineTypes.next = _menhir_stack;
+            };
+          } = _menhir_stack in
+        let ty : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11738 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11743 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
+        let _endpos = _endpos_ty_ in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 577 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Signed r,x)) )
+# 11754 "parser_cocci_menhir.ml"
+            
+          in
+          
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 11760 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 462 "parser_cocci_menhir.mly"
+         ( q (Ast0.wrap(Ast0.BaseType(Ast.LongType,[P.clt2mcode "long" ty]))) )
+# 11766 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = ty;
+          MenhirLib.EngineTypes.startp = _startpos_ty_;
+          MenhirLib.EngineTypes.endp = _endpos_ty_;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          } = _menhir_stack in
+        let ty : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11787 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty in
+        let _startpos = _startpos_ty_ in
+        let _endpos = _endpos_ty_ in
+        let _v : 'tv_generic_ctype_full = let q =
+          
+# 581 "parser_cocci_menhir.mly"
+                ( function x -> x )
+# 11795 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 462 "parser_cocci_menhir.mly"
+         ( q (Ast0.wrap(Ast0.BaseType(Ast.LongType,[P.clt2mcode "long" ty]))) )
+# 11801 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = ty1;
+          MenhirLib.EngineTypes.startp = _startpos_ty1_;
+          MenhirLib.EngineTypes.endp = _endpos_ty1_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.semv = ty;
+            MenhirLib.EngineTypes.startp = _startpos_ty_;
+            MenhirLib.EngineTypes.endp = _endpos_ty_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.state = _menhir_s;
+              MenhirLib.EngineTypes.semv = r00;
+              MenhirLib.EngineTypes.startp = _startpos_r00_;
+              MenhirLib.EngineTypes.endp = _endpos_r00_;
+              MenhirLib.EngineTypes.next = _menhir_stack;
+              };
+            };
+          } = _menhir_stack in
+        let ty1 : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11832 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty1 in
+        let ty : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11837 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11842 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
+        let _endpos = _endpos_ty1_ in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 575 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Unsigned r,x)) )
+# 11853 "parser_cocci_menhir.ml"
+            
+          in
+          
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 11859 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 464 "parser_cocci_menhir.mly"
+         ( q (Ast0.wrap
+               (Ast0.BaseType
+                  (Ast.LongLongType,
+                     [P.clt2mcode "long" ty;P.clt2mcode "long" ty1]))) )
+# 11868 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11189,23 +11876,62 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
       (fun _menhir_env ->
         let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
         let {
-          MenhirLib.EngineTypes.state = _menhir_s;
-          MenhirLib.EngineTypes.semv = t;
-          MenhirLib.EngineTypes.startp = _startpos_t_;
-          MenhirLib.EngineTypes.endp = _endpos_t_;
-          MenhirLib.EngineTypes.next = _menhir_stack;
+          MenhirLib.EngineTypes.semv = ty1;
+          MenhirLib.EngineTypes.startp = _startpos_ty1_;
+          MenhirLib.EngineTypes.endp = _endpos_ty1_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.semv = ty;
+            MenhirLib.EngineTypes.startp = _startpos_ty_;
+            MenhirLib.EngineTypes.endp = _endpos_ty_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.state = _menhir_s;
+              MenhirLib.EngineTypes.semv = r00;
+              MenhirLib.EngineTypes.startp = _startpos_r00_;
+              MenhirLib.EngineTypes.endp = _endpos_r00_;
+              MenhirLib.EngineTypes.next = _menhir_stack;
+              };
+            };
           } = _menhir_stack in
-        let t : (
+        let ty1 : (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 11202 "parser_cocci_menhir.ml"
-        ) = Obj.magic t in
-        let _startpos = _startpos_t_ in
-        let _endpos = _endpos_t_ in
-        let _v : 'tv_generic_ctype = 
-# 452 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.FloatType t, None)) )
-# 11209 "parser_cocci_menhir.ml"
+# 11899 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty1 in
+        let ty : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11904 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11909 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
+        let _endpos = _endpos_ty1_ in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 577 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Signed r,x)) )
+# 11920 "parser_cocci_menhir.ml"
+            
+          in
+          
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 11926 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 464 "parser_cocci_menhir.mly"
+         ( q (Ast0.wrap
+               (Ast0.BaseType
+                  (Ast.LongLongType,
+                     [P.clt2mcode "long" ty;P.clt2mcode "long" ty1]))) )
+# 11935 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11217,30 +11943,43 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
       (fun _menhir_env ->
         let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
         let {
-          MenhirLib.EngineTypes.state = _menhir_s;
-          MenhirLib.EngineTypes.semv = ty;
-          MenhirLib.EngineTypes.startp = _startpos_ty_;
-          MenhirLib.EngineTypes.endp = _endpos_ty_;
-          MenhirLib.EngineTypes.next = _menhir_stack;
+          MenhirLib.EngineTypes.semv = ty1;
+          MenhirLib.EngineTypes.startp = _startpos_ty1_;
+          MenhirLib.EngineTypes.endp = _endpos_ty1_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.state = _menhir_s;
+            MenhirLib.EngineTypes.semv = ty;
+            MenhirLib.EngineTypes.startp = _startpos_ty_;
+            MenhirLib.EngineTypes.endp = _endpos_ty_;
+            MenhirLib.EngineTypes.next = _menhir_stack;
+            };
           } = _menhir_stack in
+        let ty1 : (
+# 49 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 11961 "parser_cocci_menhir.ml"
+        ) = Obj.magic ty1 in
         let ty : (
 # 49 "parser_cocci_menhir.mly"
       (Data.clt)
-# 11230 "parser_cocci_menhir.ml"
+# 11966 "parser_cocci_menhir.ml"
         ) = Obj.magic ty in
         let _startpos = _startpos_ty_ in
-        let _endpos = _endpos_ty_ in
-        let _v : 'tv_generic_ctype = let q =
+        let _endpos = _endpos_ty1_ in
+        let _v : 'tv_generic_ctype_full = let q =
           
-# 39 "standard.mly"
-    ( None )
-# 11238 "parser_cocci_menhir.ml"
+# 581 "parser_cocci_menhir.mly"
+                ( function x -> x )
+# 11974 "parser_cocci_menhir.ml"
           
         in
         
-# 454 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.LongType ty, q)) )
-# 11244 "parser_cocci_menhir.ml"
+# 464 "parser_cocci_menhir.mly"
+         ( q (Ast0.wrap
+               (Ast0.BaseType
+                  (Ast.LongLongType,
+                     [P.clt2mcode "long" ty;P.clt2mcode "long" ty1]))) )
+# 11983 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11252,37 +11991,29 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
       (fun _menhir_env ->
         let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
         let {
-          MenhirLib.EngineTypes.semv = ty;
-          MenhirLib.EngineTypes.startp = _startpos_ty_;
-          MenhirLib.EngineTypes.endp = _endpos_ty_;
+          MenhirLib.EngineTypes.semv = i;
+          MenhirLib.EngineTypes.startp = _startpos_i_;
+          MenhirLib.EngineTypes.endp = _endpos_i_;
           MenhirLib.EngineTypes.next = {
             MenhirLib.EngineTypes.state = _menhir_s;
-            MenhirLib.EngineTypes.semv = x0;
-            MenhirLib.EngineTypes.startp = _startpos_x0_;
-            MenhirLib.EngineTypes.endp = _endpos_x0_;
+            MenhirLib.EngineTypes.semv = s;
+            MenhirLib.EngineTypes.startp = _startpos_s_;
+            MenhirLib.EngineTypes.endp = _endpos_s_;
             MenhirLib.EngineTypes.next = _menhir_stack;
             };
           } = _menhir_stack in
-        let ty : (
-# 49 "parser_cocci_menhir.mly"
+        let i : 'tv_ident = Obj.magic i in
+        let s : (
+# 50 "parser_cocci_menhir.mly"
       (Data.clt)
-# 11270 "parser_cocci_menhir.ml"
-        ) = Obj.magic ty in
-        let x0 : 'tv_ctype_qualif = Obj.magic x0 in
-        let _startpos = _startpos_x0_ in
-        let _endpos = _endpos_ty_ in
-        let _v : 'tv_generic_ctype = let q =
-          let x = x0 in
-          
-# 41 "standard.mly"
-    ( Some x )
-# 11280 "parser_cocci_menhir.ml"
-          
-        in
-        
-# 454 "parser_cocci_menhir.mly"
-         ( Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.LongType ty, q)) )
-# 11286 "parser_cocci_menhir.ml"
+# 12010 "parser_cocci_menhir.ml"
+        ) = Obj.magic s in
+        let _startpos = _startpos_s_ in
+        let _endpos = _endpos_i_ in
+        let _v : 'tv_generic_ctype_full = 
+# 469 "parser_cocci_menhir.mly"
+  ( Ast0.wrap(Ast0.EnumName(P.clt2mcode "enum" s, i)) )
+# 12017 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11309,10 +12040,10 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let s : 'tv_struct_or_union = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_i_ in
-        let _v : 'tv_generic_ctype = 
-# 456 "parser_cocci_menhir.mly"
+        let _v : 'tv_generic_ctype_full = 
+# 471 "parser_cocci_menhir.mly"
   ( Ast0.wrap(Ast0.StructUnionName(s, Some i)) )
-# 11316 "parser_cocci_menhir.ml"
+# 12047 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11348,32 +12079,32 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let r : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 11352 "parser_cocci_menhir.ml"
+# 12083 "parser_cocci_menhir.ml"
         ) = Obj.magic r in
         let d : 'tv_struct_decl_list = Obj.magic d in
         let l : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 11358 "parser_cocci_menhir.ml"
+# 12089 "parser_cocci_menhir.ml"
         ) = Obj.magic l in
         let s : 'tv_struct_or_union = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_r_ in
-        let _v : 'tv_generic_ctype = let i =
+        let _v : 'tv_generic_ctype_full = let i =
           
 # 39 "standard.mly"
     ( None )
-# 11367 "parser_cocci_menhir.ml"
+# 12098 "parser_cocci_menhir.ml"
           
         in
         
-# 459 "parser_cocci_menhir.mly"
+# 474 "parser_cocci_menhir.mly"
   ( (if i = None && !Data.in_iso
           then failwith "structures must be named in the iso file");
            Ast0.wrap(Ast0.StructUnionDef(Ast0.wrap(Ast0.StructUnionName(s, i)),
                                         P.clt2mcode "{" l,
                                         d, P.clt2mcode "}" r)) )
-# 11377 "parser_cocci_menhir.ml"
+# 12108 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11414,34 +12145,34 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let r : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 11418 "parser_cocci_menhir.ml"
+# 12149 "parser_cocci_menhir.ml"
         ) = Obj.magic r in
         let d : 'tv_struct_decl_list = Obj.magic d in
         let l : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 11424 "parser_cocci_menhir.ml"
+# 12155 "parser_cocci_menhir.ml"
         ) = Obj.magic l in
         let x0 : 'tv_ident = Obj.magic x0 in
         let s : 'tv_struct_or_union = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_r_ in
-        let _v : 'tv_generic_ctype = let i =
+        let _v : 'tv_generic_ctype_full = let i =
           let x = x0 in
           
 # 41 "standard.mly"
     ( Some x )
-# 11435 "parser_cocci_menhir.ml"
+# 12166 "parser_cocci_menhir.ml"
           
         in
         
-# 459 "parser_cocci_menhir.mly"
+# 474 "parser_cocci_menhir.mly"
   ( (if i = None && !Data.in_iso
           then failwith "structures must be named in the iso file");
            Ast0.wrap(Ast0.StructUnionDef(Ast0.wrap(Ast0.StructUnionName(s, i)),
                                         P.clt2mcode "{" l,
                                         d, P.clt2mcode "}" r)) )
-# 11445 "parser_cocci_menhir.ml"
+# 12176 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11477,29 +12208,29 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let r : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 11481 "parser_cocci_menhir.ml"
+# 12212 "parser_cocci_menhir.ml"
         ) = Obj.magic r in
         let d : 'tv_struct_decl_list = Obj.magic d in
         let l : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 11487 "parser_cocci_menhir.ml"
+# 12218 "parser_cocci_menhir.ml"
         ) = Obj.magic l in
         let s : (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 11492 "parser_cocci_menhir.ml"
+# 12223 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_r_ in
-        let _v : 'tv_generic_ctype = 
-# 465 "parser_cocci_menhir.mly"
+        let _v : 'tv_generic_ctype_full = 
+# 480 "parser_cocci_menhir.mly"
   ( let (nm,pure,clt) = s in
         let ty =
           Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) in
         Ast0.wrap
           (Ast0.StructUnionDef(ty,P.clt2mcode "{" l,d,P.clt2mcode "}" r)) )
-# 11503 "parser_cocci_menhir.ml"
+# 12234 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11529,24 +12260,24 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let p : (
 # 59 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 11533 "parser_cocci_menhir.ml"
+# 12264 "parser_cocci_menhir.ml"
         ) = Obj.magic p in
         let r : (
 # 47 "parser_cocci_menhir.mly"
       (string)
-# 11538 "parser_cocci_menhir.ml"
+# 12269 "parser_cocci_menhir.ml"
         ) = Obj.magic r in
         let _startpos = _startpos_r_ in
         let _endpos = _endpos_p_ in
-        let _v : 'tv_generic_ctype = 
-# 471 "parser_cocci_menhir.mly"
+        let _v : 'tv_generic_ctype_full = 
+# 486 "parser_cocci_menhir.mly"
   ( let nm = (r,P.id2name p) in
         (* this is only possible when we are in a metavar decl.  Otherwise,
            it will be represented already as a MetaType *)
         let _ = P.check_meta(Ast.MetaTypeDecl(Ast.NONE,nm)) in
         Ast0.wrap(Ast0.MetaType(P.clt2mcode nm (P.id2clt p),
                                 Ast0.Impure (*will be ignored*))) )
-# 11550 "parser_cocci_menhir.ml"
+# 12281 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11567,14 +12298,124 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let p : (
 # 59 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 11571 "parser_cocci_menhir.ml"
+# 12302 "parser_cocci_menhir.ml"
         ) = Obj.magic p in
         let _startpos = _startpos_p_ in
         let _endpos = _endpos_p_ in
-        let _v : 'tv_generic_ctype = 
-# 478 "parser_cocci_menhir.mly"
+        let _v : 'tv_generic_ctype_full = 
+# 493 "parser_cocci_menhir.mly"
   ( Ast0.wrap(Ast0.TypeName(P.id2mcode p)) )
-# 11578 "parser_cocci_menhir.ml"
+# 12309 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = p;
+          MenhirLib.EngineTypes.startp = _startpos_p_;
+          MenhirLib.EngineTypes.endp = _endpos_p_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.state = _menhir_s;
+            MenhirLib.EngineTypes.semv = r00;
+            MenhirLib.EngineTypes.startp = _startpos_r00_;
+            MenhirLib.EngineTypes.endp = _endpos_r00_;
+            MenhirLib.EngineTypes.next = _menhir_stack;
+            };
+          } = _menhir_stack in
+        let p : (
+# 64 "parser_cocci_menhir.mly"
+       (Parse_aux.info)
+# 12335 "parser_cocci_menhir.ml"
+        ) = Obj.magic p in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 12340 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
+        let _endpos = _endpos_p_ in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 575 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Unsigned r,x)) )
+# 12351 "parser_cocci_menhir.ml"
+            
+          in
+          
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 12357 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 495 "parser_cocci_menhir.mly"
+  ( let (nm,pure,clt) = p in
+        q (Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure))) )
+# 12364 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = p;
+          MenhirLib.EngineTypes.startp = _startpos_p_;
+          MenhirLib.EngineTypes.endp = _endpos_p_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.state = _menhir_s;
+            MenhirLib.EngineTypes.semv = r00;
+            MenhirLib.EngineTypes.startp = _startpos_r00_;
+            MenhirLib.EngineTypes.endp = _endpos_r00_;
+            MenhirLib.EngineTypes.next = _menhir_stack;
+            };
+          } = _menhir_stack in
+        let p : (
+# 64 "parser_cocci_menhir.mly"
+       (Parse_aux.info)
+# 12390 "parser_cocci_menhir.ml"
+        ) = Obj.magic p in
+        let r00 : (
+# 51 "parser_cocci_menhir.mly"
+      (Data.clt)
+# 12395 "parser_cocci_menhir.ml"
+        ) = Obj.magic r00 in
+        let _startpos = _startpos_r00_ in
+        let _endpos = _endpos_p_ in
+        let _v : 'tv_generic_ctype_full = let q =
+          let r0 = r00 in
+          let s =
+            let r = r0 in
+            
+# 577 "parser_cocci_menhir.mly"
+   ( function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Signed r,x)) )
+# 12406 "parser_cocci_menhir.ml"
+            
+          in
+          
+# 580 "parser_cocci_menhir.mly"
+                  ( function x -> s (Some x) )
+# 12412 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 495 "parser_cocci_menhir.mly"
+  ( let (nm,pure,clt) = p in
+        q (Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure))) )
+# 12419 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11595,15 +12436,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let p : (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 11599 "parser_cocci_menhir.ml"
+# 12440 "parser_cocci_menhir.ml"
         ) = Obj.magic p in
         let _startpos = _startpos_p_ in
         let _endpos = _endpos_p_ in
-        let _v : 'tv_generic_ctype = 
-# 480 "parser_cocci_menhir.mly"
+        let _v : 'tv_generic_ctype_full = let q =
+          
+# 581 "parser_cocci_menhir.mly"
+                ( function x -> x )
+# 12448 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 495 "parser_cocci_menhir.mly"
   ( let (nm,pure,clt) = p in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) )
-# 11607 "parser_cocci_menhir.ml"
+        q (Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure))) )
+# 12455 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11625,9 +12473,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_ident = 
-# 1414 "parser_cocci_menhir.mly"
+# 1484 "parser_cocci_menhir.mly"
          ( Ast0.wrap(Ast0.Id(P.id2mcode _1)) )
-# 11631 "parser_cocci_menhir.ml"
+# 12479 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11648,15 +12496,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 61 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 11652 "parser_cocci_menhir.ml"
+# 12500 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_ident = 
-# 1416 "parser_cocci_menhir.mly"
+# 1486 "parser_cocci_menhir.mly"
          ( let (nm,constraints,pure,clt) = _1 in
          Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) )
-# 11660 "parser_cocci_menhir.ml"
+# 12508 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11678,9 +12526,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_i_ in
         let _endpos = _endpos_i_ in
         let _v : 'tv_ident_or_const = 
-# 1372 "parser_cocci_menhir.mly"
+# 1438 "parser_cocci_menhir.mly"
                     ( Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i)))) )
-# 11684 "parser_cocci_menhir.ml"
+# 12532 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11701,15 +12549,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 11705 "parser_cocci_menhir.ml"
+# 12553 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_ident_or_const = 
-# 1374 "parser_cocci_menhir.mly"
+# 1440 "parser_cocci_menhir.mly"
   ( let (x,clt) = _1 in
         Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) )
-# 11713 "parser_cocci_menhir.ml"
+# 12561 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11734,14 +12582,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 11738 "parser_cocci_menhir.ml"
+# 12586 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_incl = 
-# 247 "parser_cocci_menhir.mly"
+# 252 "parser_cocci_menhir.mly"
                       ( Common.Left(P.id2name _2) )
-# 11745 "parser_cocci_menhir.ml"
+# 12593 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11766,14 +12614,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 78 "parser_cocci_menhir.mly"
        (string)
-# 11770 "parser_cocci_menhir.ml"
+# 12618 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_incl = 
-# 248 "parser_cocci_menhir.mly"
+# 253 "parser_cocci_menhir.mly"
                       ( Common.Right _2 )
-# 11777 "parser_cocci_menhir.ml"
+# 12625 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11801,11 +12649,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 145 "parser_cocci_menhir.mly"
       ((string,string) Common.either list)
-# 11805 "parser_cocci_menhir.ml"
+# 12653 "parser_cocci_menhir.ml"
         ) = 
-# 243 "parser_cocci_menhir.mly"
+# 248 "parser_cocci_menhir.mly"
                        ( _1 )
-# 11809 "parser_cocci_menhir.ml"
+# 12657 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11833,11 +12681,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 145 "parser_cocci_menhir.mly"
       ((string,string) Common.either list)
-# 11837 "parser_cocci_menhir.ml"
+# 12685 "parser_cocci_menhir.ml"
         ) = 
-# 244 "parser_cocci_menhir.mly"
+# 249 "parser_cocci_menhir.mly"
                        ( _1 )
-# 11841 "parser_cocci_menhir.ml"
+# 12689 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11858,12 +12706,12 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 79 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 11862 "parser_cocci_menhir.ml"
+# 12710 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_includes = 
-# 586 "parser_cocci_menhir.mly"
+# 624 "parser_cocci_menhir.mly"
     ( Ast0.wrap
              (Ast0.Include(P.clt2mcode "#include" (P.drop_aft (P.id2clt _1)),
                            let (arity,ln,lln,offset,col,strbef,straft,pos) =
@@ -11873,7 +12721,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
                            P.clt2mcode
                              (Ast.Local (Parse_aux.str2inc (P.id2name _1)))
                              (P.drop_bef clt))) )
-# 11877 "parser_cocci_menhir.ml"
+# 12725 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11894,12 +12742,12 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 79 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 11898 "parser_cocci_menhir.ml"
+# 12746 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_includes = 
-# 596 "parser_cocci_menhir.mly"
+# 634 "parser_cocci_menhir.mly"
     ( Ast0.wrap
              (Ast0.Include(P.clt2mcode "#include" (P.drop_aft (P.id2clt _1)),
                            let (arity,ln,lln,offset,col,strbef,straft,pos) =
@@ -11909,7 +12757,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
                            P.clt2mcode
                              (Ast.NonLocal (Parse_aux.str2inc (P.id2name _1)))
                              (P.drop_bef clt))) )
-# 11913 "parser_cocci_menhir.ml"
+# 12761 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11941,10 +12789,10 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_d_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_includes = 
-# 606 "parser_cocci_menhir.mly"
+# 644 "parser_cocci_menhir.mly"
     ( let ty = Ast0.wrap(Ast0.TopExp(Ast0.wrap(Ast0.TypeExp(t)))) in
       d (Ast0.wrap(Ast0.DOTS([ty]))) )
-# 11948 "parser_cocci_menhir.ml"
+# 12796 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -11976,7 +12824,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_includes = 
-# 609 "parser_cocci_menhir.mly"
+# 647 "parser_cocci_menhir.mly"
     ( let body =
        match b with
          [e] ->
@@ -11986,7 +12834,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
            | _ -> b)
        | _ -> b in
       _1 (Ast0.wrap(Ast0.DOTS(body))) )
-# 11990 "parser_cocci_menhir.ml"
+# 12838 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12008,9 +12856,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_initialize = 
-# 1008 "parser_cocci_menhir.mly"
+# 1059 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.InitExpr(_1)) )
-# 12014 "parser_cocci_menhir.ml"
+# 12862 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12041,20 +12889,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12045 "parser_cocci_menhir.ml"
+# 12893 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_initialize_list = Obj.magic _2 in
         let _1 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12051 "parser_cocci_menhir.ml"
+# 12899 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_initialize = 
-# 1010 "parser_cocci_menhir.mly"
+# 1061 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.InitList(P.clt2mcode "{" _1,_2,P.clt2mcode "}" _3)) )
-# 12058 "parser_cocci_menhir.ml"
+# 12906 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12080,21 +12928,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12084 "parser_cocci_menhir.ml"
+# 12932 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12089 "parser_cocci_menhir.ml"
+# 12937 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_initialize = 
-# 1012 "parser_cocci_menhir.mly"
+# 1063 "parser_cocci_menhir.mly"
       ( Ast0.wrap
          (Ast0.InitList(P.clt2mcode "{" _1,Ast0.wrap(Ast0.DOTS []),
                         P.clt2mcode "}" _2)) )
-# 12098 "parser_cocci_menhir.ml"
+# 12946 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12116,9 +12964,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_initialize2 = 
-# 1019 "parser_cocci_menhir.mly"
+# 1070 "parser_cocci_menhir.mly"
                             ( Ast0.wrap(Ast0.InitExpr(_1)) )
-# 12122 "parser_cocci_menhir.ml"
+# 12970 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12149,20 +12997,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12153 "parser_cocci_menhir.ml"
+# 13001 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_initialize_list = Obj.magic _2 in
         let _1 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12159 "parser_cocci_menhir.ml"
+# 13007 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_initialize2 = 
-# 1021 "parser_cocci_menhir.mly"
+# 1072 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.InitList(P.clt2mcode "{" _1,_2,P.clt2mcode "}" _3)) )
-# 12166 "parser_cocci_menhir.ml"
+# 13014 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12188,21 +13036,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12192 "parser_cocci_menhir.ml"
+# 13040 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12197 "parser_cocci_menhir.ml"
+# 13045 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_initialize2 = 
-# 1023 "parser_cocci_menhir.mly"
+# 1074 "parser_cocci_menhir.mly"
     ( Ast0.wrap
        (Ast0.InitList(P.clt2mcode "{" _1,Ast0.wrap(Ast0.DOTS []),
                       P.clt2mcode "}" _2)) )
-# 12206 "parser_cocci_menhir.ml"
+# 13054 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12239,20 +13087,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12243 "parser_cocci_menhir.ml"
+# 13091 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_ident = Obj.magic _2 in
         let _1 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12249 "parser_cocci_menhir.ml"
+# 13097 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_initialize2 = 
-# 1028 "parser_cocci_menhir.mly"
+# 1079 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.InitGccDotName(P.clt2mcode "." _1,_2,P.clt2mcode "=" _3,_4)) )
-# 12256 "parser_cocci_menhir.ml"
+# 13104 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12284,15 +13132,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12288 "parser_cocci_menhir.ml"
+# 13136 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_ident = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_initialize2 = 
-# 1030 "parser_cocci_menhir.mly"
+# 1081 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.InitGccName(_1,P.clt2mcode ":" _2,_3)) )
-# 12296 "parser_cocci_menhir.ml"
+# 13144 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12334,26 +13182,26 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12338 "parser_cocci_menhir.ml"
+# 13186 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12343 "parser_cocci_menhir.ml"
+# 13191 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_eexpr = Obj.magic _2 in
         let _1 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12349 "parser_cocci_menhir.ml"
+# 13197 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__5_ in
         let _v : 'tv_initialize2 = 
-# 1032 "parser_cocci_menhir.mly"
+# 1083 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.InitGccIndex(P.clt2mcode "[" _1,_2,P.clt2mcode "]" _3,
                                  P.clt2mcode "=" _4,_5)) )
-# 12357 "parser_cocci_menhir.ml"
+# 13205 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12405,32 +13253,32 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _6 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12409 "parser_cocci_menhir.ml"
+# 13257 "parser_cocci_menhir.ml"
         ) = Obj.magic _6 in
         let _5 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12414 "parser_cocci_menhir.ml"
+# 13262 "parser_cocci_menhir.ml"
         ) = Obj.magic _5 in
         let _4 : 'tv_eexpr = Obj.magic _4 in
         let _3 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12420 "parser_cocci_menhir.ml"
+# 13268 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_eexpr = Obj.magic _2 in
         let _1 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12426 "parser_cocci_menhir.ml"
+# 13274 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__7_ in
         let _v : 'tv_initialize2 = 
-# 1035 "parser_cocci_menhir.mly"
+# 1086 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.InitGccRange(P.clt2mcode "[" _1,_2,P.clt2mcode "..." _3,
                                  _4,P.clt2mcode "]" _5,P.clt2mcode "=" _6,_7)) )
-# 12434 "parser_cocci_menhir.ml"
+# 13282 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12452,9 +13300,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_initialize_list = 
-# 1039 "parser_cocci_menhir.mly"
+# 1090 "parser_cocci_menhir.mly"
                          ( Ast0.wrap(Ast0.DOTS(_1)) )
-# 12458 "parser_cocci_menhir.ml"
+# 13306 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12480,15 +13328,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12484 "parser_cocci_menhir.ml"
+# 13332 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_initialize2 = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_initialize_list_start = 
-# 1042 "parser_cocci_menhir.mly"
+# 1093 "parser_cocci_menhir.mly"
                      ( [_1;Ast0.wrap(Ast0.IComma(P.clt2mcode "," _2))] )
-# 12492 "parser_cocci_menhir.ml"
+# 13340 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12520,15 +13368,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 12524 "parser_cocci_menhir.ml"
+# 13372 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_initialize2 = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_initialize_list_start = 
-# 1044 "parser_cocci_menhir.mly"
+# 1095 "parser_cocci_menhir.mly"
     ( _1::Ast0.wrap(Ast0.IComma(P.clt2mcode "," _2))::_3 )
-# 12532 "parser_cocci_menhir.ml"
+# 13380 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12556,10 +13404,10 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_d_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_initialize_list_start = 
-# 1047 "parser_cocci_menhir.mly"
+# 1098 "parser_cocci_menhir.mly"
     ( (P.mkidots "..." d)::
       (List.concat(List.map (function x -> x (P.mkidots "...")) r)) )
-# 12563 "parser_cocci_menhir.ml"
+# 13411 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12579,9 +13427,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_invalid = 
-# 1140 "parser_cocci_menhir.mly"
+# 1191 "parser_cocci_menhir.mly"
            ( raise (Semantic_cocci.Semantic "not matchable") )
-# 12585 "parser_cocci_menhir.ml"
+# 13433 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12596,9 +13444,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_is_expression = 
-# 239 "parser_cocci_menhir.mly"
+# 244 "parser_cocci_menhir.mly"
               ( false )
-# 12602 "parser_cocci_menhir.ml"
+# 13450 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12618,9 +13466,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_is_expression = 
-# 240 "parser_cocci_menhir.mly"
+# 245 "parser_cocci_menhir.mly"
               ( true )
-# 12624 "parser_cocci_menhir.ml"
+# 13472 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12646,9 +13494,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_iso_ctype_ = 
-# 1757 "parser_cocci_menhir.mly"
+# 1834 "parser_cocci_menhir.mly"
                 ( Common.Left t )
-# 12652 "parser_cocci_menhir.ml"
+# 13500 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12674,9 +13522,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_iso_ctype_ = 
-# 1758 "parser_cocci_menhir.mly"
+# 1835 "parser_cocci_menhir.mly"
                      ( Common.Right t )
-# 12680 "parser_cocci_menhir.ml"
+# 13528 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12702,9 +13550,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_iso_decl_var_ = 
-# 1757 "parser_cocci_menhir.mly"
+# 1834 "parser_cocci_menhir.mly"
                 ( Common.Left t )
-# 12708 "parser_cocci_menhir.ml"
+# 13556 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12730,9 +13578,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_iso_decl_var_ = 
-# 1758 "parser_cocci_menhir.mly"
+# 1835 "parser_cocci_menhir.mly"
                      ( Common.Right t )
-# 12736 "parser_cocci_menhir.ml"
+# 13584 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12758,9 +13606,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_iso_dexpr_ = 
-# 1757 "parser_cocci_menhir.mly"
+# 1834 "parser_cocci_menhir.mly"
                 ( Common.Left t )
-# 12764 "parser_cocci_menhir.ml"
+# 13612 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12786,9 +13634,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_iso_dexpr_ = 
-# 1758 "parser_cocci_menhir.mly"
+# 1835 "parser_cocci_menhir.mly"
                      ( Common.Right t )
-# 12792 "parser_cocci_menhir.ml"
+# 13640 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12814,9 +13662,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_iso_nest_start_ = 
-# 1757 "parser_cocci_menhir.mly"
+# 1834 "parser_cocci_menhir.mly"
                 ( Common.Left t )
-# 12820 "parser_cocci_menhir.ml"
+# 13668 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12842,9 +13690,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_iso_nest_start_ = 
-# 1758 "parser_cocci_menhir.mly"
+# 1835 "parser_cocci_menhir.mly"
                      ( Common.Right t )
-# 12848 "parser_cocci_menhir.ml"
+# 13696 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12870,9 +13718,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_iso_single_statement_ = 
-# 1757 "parser_cocci_menhir.mly"
+# 1834 "parser_cocci_menhir.mly"
                 ( Common.Left t )
-# 12876 "parser_cocci_menhir.ml"
+# 13724 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12898,9 +13746,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_iso_single_statement_ = 
-# 1758 "parser_cocci_menhir.mly"
+# 1835 "parser_cocci_menhir.mly"
                      ( Common.Right t )
-# 12904 "parser_cocci_menhir.ml"
+# 13752 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12938,11 +13786,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 161 "parser_cocci_menhir.mly"
       (Ast0_cocci.anything list list)
-# 12942 "parser_cocci_menhir.ml"
+# 13790 "parser_cocci_menhir.ml"
         ) = 
-# 1729 "parser_cocci_menhir.mly"
+# 1806 "parser_cocci_menhir.mly"
     ( P.iso_adjust (function x -> Ast0.ExprTag x) e1 el )
-# 12946 "parser_cocci_menhir.ml"
+# 13794 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -12980,11 +13828,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 161 "parser_cocci_menhir.mly"
       (Ast0_cocci.anything list list)
-# 12984 "parser_cocci_menhir.ml"
+# 13832 "parser_cocci_menhir.ml"
         ) = 
-# 1731 "parser_cocci_menhir.mly"
+# 1808 "parser_cocci_menhir.mly"
     ( P.iso_adjust (function x -> Ast0.ArgExprTag x) e1 el )
-# 12988 "parser_cocci_menhir.ml"
+# 13836 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13022,11 +13870,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 161 "parser_cocci_menhir.mly"
       (Ast0_cocci.anything list list)
-# 13026 "parser_cocci_menhir.ml"
+# 13874 "parser_cocci_menhir.ml"
         ) = 
-# 1733 "parser_cocci_menhir.mly"
+# 1810 "parser_cocci_menhir.mly"
     ( P.iso_adjust (function x -> Ast0.TestExprTag x) e1 el )
-# 13030 "parser_cocci_menhir.ml"
+# 13878 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13064,11 +13912,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 161 "parser_cocci_menhir.mly"
       (Ast0_cocci.anything list list)
-# 13068 "parser_cocci_menhir.ml"
+# 13916 "parser_cocci_menhir.ml"
         ) = 
-# 1735 "parser_cocci_menhir.mly"
+# 1812 "parser_cocci_menhir.mly"
     ( P.iso_adjust (function x -> Ast0.StmtTag x) s1 sl )
-# 13072 "parser_cocci_menhir.ml"
+# 13920 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13106,11 +13954,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 161 "parser_cocci_menhir.mly"
       (Ast0_cocci.anything list list)
-# 13110 "parser_cocci_menhir.ml"
+# 13958 "parser_cocci_menhir.ml"
         ) = 
-# 1737 "parser_cocci_menhir.mly"
+# 1814 "parser_cocci_menhir.mly"
     ( P.iso_adjust (function x -> Ast0.TypeCTag x) t1 tl )
-# 13114 "parser_cocci_menhir.ml"
+# 13962 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13148,11 +13996,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 161 "parser_cocci_menhir.mly"
       (Ast0_cocci.anything list list)
-# 13152 "parser_cocci_menhir.ml"
+# 14000 "parser_cocci_menhir.ml"
         ) = 
-# 1739 "parser_cocci_menhir.mly"
+# 1816 "parser_cocci_menhir.mly"
     ( P.iso_adjust (function x -> Ast0.DotsStmtTag x) e1 el )
-# 13156 "parser_cocci_menhir.ml"
+# 14004 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13190,9 +14038,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 161 "parser_cocci_menhir.mly"
       (Ast0_cocci.anything list list)
-# 13194 "parser_cocci_menhir.ml"
+# 14042 "parser_cocci_menhir.ml"
         ) = 
-# 1741 "parser_cocci_menhir.mly"
+# 1818 "parser_cocci_menhir.mly"
     ( let check_one = function
        [x] -> x
       | _ ->
@@ -13207,7 +14055,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
          | Common.Right x -> Common.Right(check_one x))
        dl in
     P.iso_adjust (function x -> Ast0.DeclTag x) d1 dl )
-# 13211 "parser_cocci_menhir.ml"
+# 14059 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13231,11 +14079,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 164 "parser_cocci_menhir.mly"
       ((Ast_cocci.metavar,Ast_cocci.metavar) Common.either list)
-# 13235 "parser_cocci_menhir.ml"
+# 14083 "parser_cocci_menhir.ml"
         ) = 
 # 181 "parser_cocci_menhir.mly"
                          ( m "" )
-# 13239 "parser_cocci_menhir.ml"
+# 14087 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13263,11 +14111,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 148 "parser_cocci_menhir.mly"
       (Ast_cocci.rulename)
-# 13267 "parser_cocci_menhir.ml"
+# 14115 "parser_cocci_menhir.ml"
         ) = 
 # 196 "parser_cocci_menhir.mly"
                       ( P.make_iso_rule_name_result (P.id2name nm) )
-# 13271 "parser_cocci_menhir.ml"
+# 14119 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13288,14 +14136,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 59 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 13292 "parser_cocci_menhir.ml"
+# 14140 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_iter_ident = 
-# 1428 "parser_cocci_menhir.mly"
+# 1498 "parser_cocci_menhir.mly"
          ( Ast0.wrap(Ast0.Id(P.id2mcode _1)) )
-# 13299 "parser_cocci_menhir.ml"
+# 14147 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13316,15 +14164,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 62 "parser_cocci_menhir.mly"
        (Parse_aux.idinfo)
-# 13320 "parser_cocci_menhir.ml"
+# 14168 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_iter_ident = 
-# 1430 "parser_cocci_menhir.mly"
+# 1500 "parser_cocci_menhir.mly"
          ( let (nm,constraints,pure,clt) = _1 in
          Ast0.wrap(Ast0.MetaId(P.clt2mcode nm clt,constraints,pure)) )
-# 13328 "parser_cocci_menhir.ml"
+# 14176 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13341,7 +14189,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_TMul_ = 
 # 114 "standard.mly"
     ( [] )
-# 13345 "parser_cocci_menhir.ml"
+# 14193 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13368,14 +14216,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let x : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 13372 "parser_cocci_menhir.ml"
+# 14220 "parser_cocci_menhir.ml"
         ) = Obj.magic x in
         let _startpos = _startpos_x_ in
         let _endpos = _endpos_xs_ in
         let _v : 'tv_list_TMul_ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13379 "parser_cocci_menhir.ml"
+# 14227 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13392,7 +14240,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_array_dec_ = 
 # 114 "standard.mly"
     ( [] )
-# 13396 "parser_cocci_menhir.ml"
+# 14244 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13422,7 +14270,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_array_dec_ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13426 "parser_cocci_menhir.ml"
+# 14274 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13439,7 +14287,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_case_line_ = 
 # 114 "standard.mly"
     ( [] )
-# 13443 "parser_cocci_menhir.ml"
+# 14291 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13469,7 +14317,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_case_line_ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13473 "parser_cocci_menhir.ml"
+# 14321 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13486,7 +14334,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_comma_decls_TEllipsis_decl__ = 
 # 114 "standard.mly"
     ( [] )
-# 13490 "parser_cocci_menhir.ml"
+# 14338 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13516,7 +14364,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_comma_decls_TEllipsis_decl__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13520 "parser_cocci_menhir.ml"
+# 14368 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13533,7 +14381,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_comma_decls_TEllipsis_name_opt_decl__ = 
 # 114 "standard.mly"
     ( [] )
-# 13537 "parser_cocci_menhir.ml"
+# 14385 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13563,7 +14411,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_comma_decls_TEllipsis_name_opt_decl__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13567 "parser_cocci_menhir.ml"
+# 14415 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13580,7 +14428,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_dp_comma_args_TEllipsis__ = 
 # 114 "standard.mly"
     ( [] )
-# 13584 "parser_cocci_menhir.ml"
+# 14432 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13610,7 +14458,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_dp_comma_args_TEllipsis__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13614 "parser_cocci_menhir.ml"
+# 14462 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13627,7 +14475,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_incl_ = 
 # 114 "standard.mly"
     ( [] )
-# 13631 "parser_cocci_menhir.ml"
+# 14479 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13657,7 +14505,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_incl_ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13661 "parser_cocci_menhir.ml"
+# 14509 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13674,7 +14522,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_iso_ctype__ = 
 # 114 "standard.mly"
     ( [] )
-# 13678 "parser_cocci_menhir.ml"
+# 14526 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13704,7 +14552,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_iso_ctype__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13708 "parser_cocci_menhir.ml"
+# 14556 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13721,7 +14569,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_iso_decl_var__ = 
 # 114 "standard.mly"
     ( [] )
-# 13725 "parser_cocci_menhir.ml"
+# 14573 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13751,7 +14599,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_iso_decl_var__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13755 "parser_cocci_menhir.ml"
+# 14603 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13768,7 +14616,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_iso_dexpr__ = 
 # 114 "standard.mly"
     ( [] )
-# 13772 "parser_cocci_menhir.ml"
+# 14620 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13798,7 +14646,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_iso_dexpr__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13802 "parser_cocci_menhir.ml"
+# 14650 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13815,7 +14663,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_iso_nest_start__ = 
 # 114 "standard.mly"
     ( [] )
-# 13819 "parser_cocci_menhir.ml"
+# 14667 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13845,7 +14693,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_iso_nest_start__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13849 "parser_cocci_menhir.ml"
+# 14697 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13862,7 +14710,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_iso_single_statement__ = 
 # 114 "standard.mly"
     ( [] )
-# 13866 "parser_cocci_menhir.ml"
+# 14714 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13892,7 +14740,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_iso_single_statement__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13896 "parser_cocci_menhir.ml"
+# 14744 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13909,7 +14757,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_ctype__ = 
 # 114 "standard.mly"
     ( [] )
-# 13913 "parser_cocci_menhir.ml"
+# 14761 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13939,7 +14787,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_ctype__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13943 "parser_cocci_menhir.ml"
+# 14791 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13956,7 +14804,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_eexpr__ = 
 # 114 "standard.mly"
     ( [] )
-# 13960 "parser_cocci_menhir.ml"
+# 14808 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -13986,7 +14834,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_eexpr__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 13990 "parser_cocci_menhir.ml"
+# 14838 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14003,7 +14851,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_fun_after_dots_or__ = 
 # 114 "standard.mly"
     ( [] )
-# 14007 "parser_cocci_menhir.ml"
+# 14855 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14033,7 +14881,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_fun_after_dots_or__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 14037 "parser_cocci_menhir.ml"
+# 14885 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14050,7 +14898,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_fun_start__ = 
 # 114 "standard.mly"
     ( [] )
-# 14054 "parser_cocci_menhir.ml"
+# 14902 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14080,7 +14928,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_fun_start__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 14084 "parser_cocci_menhir.ml"
+# 14932 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14097,7 +14945,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_rule_elem_statement__ = 
 # 114 "standard.mly"
     ( [] )
-# 14101 "parser_cocci_menhir.ml"
+# 14949 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14127,7 +14975,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_rule_elem_statement__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 14131 "parser_cocci_menhir.ml"
+# 14979 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14144,7 +14992,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_statement__ = 
 # 114 "standard.mly"
     ( [] )
-# 14148 "parser_cocci_menhir.ml"
+# 14996 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14174,7 +15022,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_mzl_statement__ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 14178 "parser_cocci_menhir.ml"
+# 15026 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14191,7 +15039,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_pair_edots_when_TEllipsis_eexpr__dexpr__ = 
 # 114 "standard.mly"
     ( [] )
-# 14195 "parser_cocci_menhir.ml"
+# 15043 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14230,13 +15078,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 70 "standard.mly"
     ( (x, y) )
-# 14234 "parser_cocci_menhir.ml"
+# 15082 "parser_cocci_menhir.ml"
           
         in
         
 # 116 "standard.mly"
     ( x :: xs )
-# 14240 "parser_cocci_menhir.ml"
+# 15088 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14253,7 +15101,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_whenppdecs_ = 
 # 114 "standard.mly"
     ( [] )
-# 14257 "parser_cocci_menhir.ml"
+# 15105 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14283,7 +15131,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_list_whenppdecs_ = 
 # 116 "standard.mly"
     ( x :: xs )
-# 14287 "parser_cocci_menhir.ml"
+# 15135 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14300,7 +15148,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_choose_iso_ = 
 # 57 "standard.mly"
     ( [] )
-# 14304 "parser_cocci_menhir.ml"
+# 15152 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14324,7 +15172,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_choose_iso_ = 
 # 59 "standard.mly"
     ( x )
-# 14328 "parser_cocci_menhir.ml"
+# 15176 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14341,7 +15189,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_disable_ = 
 # 57 "standard.mly"
     ( [] )
-# 14345 "parser_cocci_menhir.ml"
+# 15193 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14365,7 +15213,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_disable_ = 
 # 59 "standard.mly"
     ( x )
-# 14369 "parser_cocci_menhir.ml"
+# 15217 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14382,7 +15230,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_error_words_ = 
 # 57 "standard.mly"
     ( [] )
-# 14386 "parser_cocci_menhir.ml"
+# 15234 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14406,7 +15254,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_error_words_ = 
 # 59 "standard.mly"
     ( x )
-# 14410 "parser_cocci_menhir.ml"
+# 15258 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14423,7 +15271,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_filespec_ = 
 # 57 "standard.mly"
     ( [] )
-# 14427 "parser_cocci_menhir.ml"
+# 15275 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14447,7 +15295,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_filespec_ = 
 # 59 "standard.mly"
     ( x )
-# 14451 "parser_cocci_menhir.ml"
+# 15299 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14464,7 +15312,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_minus_start_ = 
 # 57 "standard.mly"
     ( [] )
-# 14468 "parser_cocci_menhir.ml"
+# 15316 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14488,7 +15336,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_minus_start_ = 
 # 59 "standard.mly"
     ( x )
-# 14492 "parser_cocci_menhir.ml"
+# 15340 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14505,7 +15353,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_not_ceq_ = 
 # 57 "standard.mly"
     ( [] )
-# 14509 "parser_cocci_menhir.ml"
+# 15357 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14529,7 +15377,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_not_ceq_ = 
 # 59 "standard.mly"
     ( x )
-# 14533 "parser_cocci_menhir.ml"
+# 15381 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14546,7 +15394,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_not_eq_ = 
 # 57 "standard.mly"
     ( [] )
-# 14550 "parser_cocci_menhir.ml"
+# 15398 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14570,7 +15418,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_not_eq_ = 
 # 59 "standard.mly"
     ( x )
-# 14574 "parser_cocci_menhir.ml"
+# 15422 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14587,7 +15435,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_not_eqe_ = 
 # 57 "standard.mly"
     ( [] )
-# 14591 "parser_cocci_menhir.ml"
+# 15439 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14611,7 +15459,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_not_eqe_ = 
 # 59 "standard.mly"
     ( x )
-# 14615 "parser_cocci_menhir.ml"
+# 15463 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14628,7 +15476,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_not_pos_ = 
 # 57 "standard.mly"
     ( [] )
-# 14632 "parser_cocci_menhir.ml"
+# 15480 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14652,7 +15500,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_not_pos_ = 
 # 59 "standard.mly"
     ( x )
-# 14656 "parser_cocci_menhir.ml"
+# 15504 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14669,7 +15517,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_plus_start_ = 
 # 57 "standard.mly"
     ( [] )
-# 14673 "parser_cocci_menhir.ml"
+# 15521 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14693,7 +15541,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_loption_plus_start_ = 
 # 59 "standard.mly"
     ( x )
-# 14697 "parser_cocci_menhir.ml"
+# 15545 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14715,9 +15563,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_meta_exp_type = 
-# 429 "parser_cocci_menhir.mly"
+# 439 "parser_cocci_menhir.mly"
     ( [Ast0_cocci.ast0_type_to_type t] )
-# 14721 "parser_cocci_menhir.ml"
+# 15569 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14753,11 +15601,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_m_ in
         let _v : 'tv_meta_exp_type = 
-# 431 "parser_cocci_menhir.mly"
+# 441 "parser_cocci_menhir.mly"
     ( List.map
        (function x -> P.ty_pointerify (Ast0_cocci.ast0_type_to_type x) m)
        t )
-# 14761 "parser_cocci_menhir.ml"
+# 15609 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14788,14 +15636,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 47 "parser_cocci_menhir.mly"
       (string)
-# 14792 "parser_cocci_menhir.ml"
+# 15640 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_meta_ident = 
-# 1326 "parser_cocci_menhir.mly"
+# 1377 "parser_cocci_menhir.mly"
                                  ( (Some _1,P.id2name _3) )
-# 14799 "parser_cocci_menhir.ml"
+# 15647 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14819,11 +15667,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 156 "parser_cocci_menhir.mly"
       ((Ast_cocci.metavar,Ast_cocci.metavar) Common.either list)
-# 14823 "parser_cocci_menhir.ml"
+# 15671 "parser_cocci_menhir.ml"
         ) = 
 # 180 "parser_cocci_menhir.mly"
                        ( m (!Ast0.rule_name) )
-# 14827 "parser_cocci_menhir.ml"
+# 15675 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14870,17 +15718,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__6_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 294 "parser_cocci_menhir.mly"
+# 304 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta ->
       let tok = check_meta(Ast.MetaFreshIdDecl(arity,name)) in
       !Data.add_id_meta name [] pure; tok) )
-# 14878 "parser_cocci_menhir.ml"
+# 15726 "parser_cocci_menhir.ml"
           
         in
         
-# 253 "parser_cocci_menhir.mly"
+# 258 "parser_cocci_menhir.mly"
     ( P.create_metadec ar ispure kindfn ids )
-# 14884 "parser_cocci_menhir.ml"
+# 15732 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14923,17 +15771,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 298 "parser_cocci_menhir.mly"
+# 308 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta ->
       let tok = check_meta(Ast.MetaParamDecl(arity,name)) in
       !Data.add_param_meta name pure; tok) )
-# 14931 "parser_cocci_menhir.ml"
+# 15779 "parser_cocci_menhir.ml"
           
         in
         
-# 253 "parser_cocci_menhir.mly"
+# 258 "parser_cocci_menhir.mly"
     ( P.create_metadec ar ispure kindfn ids )
-# 14937 "parser_cocci_menhir.ml"
+# 15785 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -14980,17 +15828,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__6_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 302 "parser_cocci_menhir.mly"
+# 312 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta ->
       let tok = check_meta(Ast.MetaParamListDecl(arity,name,None)) in
       !Data.add_paramlist_meta name None pure; tok) )
-# 14988 "parser_cocci_menhir.ml"
+# 15836 "parser_cocci_menhir.ml"
           
         in
         
-# 253 "parser_cocci_menhir.mly"
+# 258 "parser_cocci_menhir.mly"
     ( P.create_metadec ar ispure kindfn ids )
-# 14994 "parser_cocci_menhir.ml"
+# 15842 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15037,17 +15885,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__6_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 306 "parser_cocci_menhir.mly"
+# 316 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta ->
       let tok = check_meta(Ast.MetaExpListDecl(arity,name,None)) in
       !Data.add_explist_meta name None pure; tok) )
-# 15045 "parser_cocci_menhir.ml"
+# 15893 "parser_cocci_menhir.ml"
           
         in
         
-# 253 "parser_cocci_menhir.mly"
+# 258 "parser_cocci_menhir.mly"
     ( P.create_metadec ar ispure kindfn ids )
-# 15051 "parser_cocci_menhir.ml"
+# 15899 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15090,17 +15938,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 310 "parser_cocci_menhir.mly"
+# 320 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta ->
       let tok = check_meta(Ast.MetaTypeDecl(arity,name)) in
       !Data.add_type_meta name pure; tok) )
-# 15098 "parser_cocci_menhir.ml"
+# 15946 "parser_cocci_menhir.ml"
           
         in
         
-# 253 "parser_cocci_menhir.mly"
+# 258 "parser_cocci_menhir.mly"
     ( P.create_metadec ar ispure kindfn ids )
-# 15104 "parser_cocci_menhir.ml"
+# 15952 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15143,17 +15991,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 314 "parser_cocci_menhir.mly"
+# 324 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta ->
       let tok = check_meta(Ast.MetaStmDecl(arity,name)) in
       !Data.add_stm_meta name pure; tok) )
-# 15151 "parser_cocci_menhir.ml"
+# 15999 "parser_cocci_menhir.ml"
           
         in
         
-# 253 "parser_cocci_menhir.mly"
+# 258 "parser_cocci_menhir.mly"
     ( P.create_metadec ar ispure kindfn ids )
-# 15157 "parser_cocci_menhir.ml"
+# 16005 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15200,17 +16048,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__6_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 318 "parser_cocci_menhir.mly"
+# 328 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta ->
       let tok = check_meta(Ast.MetaStmListDecl(arity,name)) in
       !Data.add_stmlist_meta name pure; tok) )
-# 15208 "parser_cocci_menhir.ml"
+# 16056 "parser_cocci_menhir.ml"
           
         in
         
-# 253 "parser_cocci_menhir.mly"
+# 258 "parser_cocci_menhir.mly"
     ( P.create_metadec ar ispure kindfn ids )
-# 15214 "parser_cocci_menhir.ml"
+# 16062 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15253,18 +16101,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 322 "parser_cocci_menhir.mly"
+# 332 "parser_cocci_menhir.mly"
     ( (fun arity (_,name) pure check_meta ->
       if arity = Ast.NONE && pure = Ast0.Impure
       then (!Data.add_type_name name; [])
       else raise (Semantic_cocci.Semantic "bad typedef")) )
-# 15262 "parser_cocci_menhir.ml"
+# 16110 "parser_cocci_menhir.ml"
           
         in
         
-# 253 "parser_cocci_menhir.mly"
+# 258 "parser_cocci_menhir.mly"
     ( P.create_metadec ar ispure kindfn ids )
-# 15268 "parser_cocci_menhir.ml"
+# 16116 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15311,18 +16159,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__6_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 327 "parser_cocci_menhir.mly"
+# 337 "parser_cocci_menhir.mly"
     ( (fun arity (_,name) pure check_meta ->
       if arity = Ast.NONE && pure = Ast0.Impure
       then (!Data.add_declarer_name name; [])
       else raise (Semantic_cocci.Semantic "bad declarer")) )
-# 15320 "parser_cocci_menhir.ml"
+# 16168 "parser_cocci_menhir.ml"
           
         in
         
-# 253 "parser_cocci_menhir.mly"
+# 258 "parser_cocci_menhir.mly"
     ( P.create_metadec ar ispure kindfn ids )
-# 15326 "parser_cocci_menhir.ml"
+# 16174 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15369,18 +16217,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__6_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 332 "parser_cocci_menhir.mly"
+# 342 "parser_cocci_menhir.mly"
     ( (fun arity (_,name) pure check_meta ->
       if arity = Ast.NONE && pure = Ast0.Impure
       then (!Data.add_iterator_name name; [])
       else raise (Semantic_cocci.Semantic "bad iterator")) )
-# 15378 "parser_cocci_menhir.ml"
+# 16226 "parser_cocci_menhir.ml"
           
         in
         
-# 253 "parser_cocci_menhir.mly"
+# 258 "parser_cocci_menhir.mly"
     ( P.create_metadec ar ispure kindfn ids )
-# 15384 "parser_cocci_menhir.ml"
+# 16232 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15423,17 +16271,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 340 "parser_cocci_menhir.mly"
+# 350 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let tok = check_meta(Ast.MetaIdDecl(arity,name)) in
       !Data.add_id_meta name constraints pure; tok) )
-# 15431 "parser_cocci_menhir.ml"
+# 16279 "parser_cocci_menhir.ml"
           
         in
         
-# 257 "parser_cocci_menhir.mly"
+# 262 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 15437 "parser_cocci_menhir.ml"
+# 16285 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15476,17 +16324,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 344 "parser_cocci_menhir.mly"
+# 354 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let tok = check_meta(Ast.MetaFuncDecl(arity,name)) in
       !Data.add_func_meta name constraints pure; tok) )
-# 15484 "parser_cocci_menhir.ml"
+# 16332 "parser_cocci_menhir.ml"
           
         in
         
-# 257 "parser_cocci_menhir.mly"
+# 262 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 15490 "parser_cocci_menhir.ml"
+# 16338 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15533,18 +16381,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__6_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 348 "parser_cocci_menhir.mly"
+# 358 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let tok = check_meta(Ast.MetaLocalFuncDecl(arity,name)) in
       !Data.add_local_func_meta name constraints pure;
       tok) )
-# 15542 "parser_cocci_menhir.ml"
+# 16390 "parser_cocci_menhir.ml"
           
         in
         
-# 257 "parser_cocci_menhir.mly"
+# 262 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 15548 "parser_cocci_menhir.ml"
+# 16396 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15587,17 +16435,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 353 "parser_cocci_menhir.mly"
+# 363 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let tok = check_meta(Ast.MetaDeclarerDecl(arity,name)) in
       !Data.add_declarer_meta name constraints pure; tok) )
-# 15595 "parser_cocci_menhir.ml"
+# 16443 "parser_cocci_menhir.ml"
           
         in
         
-# 257 "parser_cocci_menhir.mly"
+# 262 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 15601 "parser_cocci_menhir.ml"
+# 16449 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15640,17 +16488,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 357 "parser_cocci_menhir.mly"
+# 367 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let tok = check_meta(Ast.MetaIteratorDecl(arity,name)) in
       !Data.add_iterator_meta name constraints pure; tok) )
-# 15648 "parser_cocci_menhir.ml"
+# 16496 "parser_cocci_menhir.ml"
           
         in
         
-# 257 "parser_cocci_menhir.mly"
+# 262 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 15654 "parser_cocci_menhir.ml"
+# 16502 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15693,17 +16541,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 363 "parser_cocci_menhir.mly"
+# 373 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let tok = check_meta(Ast.MetaErrDecl(arity,name)) in
       !Data.add_err_meta name constraints pure; tok) )
-# 15701 "parser_cocci_menhir.ml"
+# 16549 "parser_cocci_menhir.ml"
           
         in
         
-# 261 "parser_cocci_menhir.mly"
+# 266 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 15707 "parser_cocci_menhir.ml"
+# 16555 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15756,11 +16604,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
             
 # 39 "standard.mly"
     ( None )
-# 15760 "parser_cocci_menhir.ml"
+# 16608 "parser_cocci_menhir.ml"
             
           in
           
-# 367 "parser_cocci_menhir.mly"
+# 377 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       match l with
        None ->
@@ -15769,13 +16617,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
       | Some _ ->
          !Data.add_local_idexp_meta ty name constraints pure;
          check_meta(Ast.MetaLocalIdExpDecl(arity,name,ty))) )
-# 15773 "parser_cocci_menhir.ml"
+# 16621 "parser_cocci_menhir.ml"
           
         in
         
-# 261 "parser_cocci_menhir.mly"
+# 266 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 15779 "parser_cocci_menhir.ml"
+# 16627 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15836,11 +16684,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
             
 # 41 "standard.mly"
     ( Some x )
-# 15840 "parser_cocci_menhir.ml"
+# 16688 "parser_cocci_menhir.ml"
             
           in
           
-# 367 "parser_cocci_menhir.mly"
+# 377 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       match l with
        None ->
@@ -15849,13 +16697,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
       | Some _ ->
          !Data.add_local_idexp_meta ty name constraints pure;
          check_meta(Ast.MetaLocalIdExpDecl(arity,name,ty))) )
-# 15853 "parser_cocci_menhir.ml"
+# 16701 "parser_cocci_menhir.ml"
           
         in
         
-# 261 "parser_cocci_menhir.mly"
+# 266 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 15859 "parser_cocci_menhir.ml"
+# 16707 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15912,7 +16760,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           let m = m0 in
           let l = l0 in
           
-# 376 "parser_cocci_menhir.mly"
+# 386 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let ty = Some [P.ty_pointerify Type_cocci.Unknown m] in
       match l with
@@ -15922,13 +16770,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
       | Some _ ->
          !Data.add_local_idexp_meta ty name constraints pure;
          check_meta(Ast.MetaLocalIdExpDecl(arity,name,ty))) )
-# 15926 "parser_cocci_menhir.ml"
+# 16774 "parser_cocci_menhir.ml"
           
         in
         
-# 261 "parser_cocci_menhir.mly"
+# 266 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 15932 "parser_cocci_menhir.ml"
+# 16780 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -15978,18 +16826,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_metadec = let kindfn =
           let m = m0 in
           
-# 386 "parser_cocci_menhir.mly"
+# 396 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let ty = Some [P.ty_pointerify Type_cocci.Unknown m] in
       let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
       !Data.add_exp_meta ty name constraints pure; tok) )
-# 15987 "parser_cocci_menhir.ml"
+# 16835 "parser_cocci_menhir.ml"
           
         in
         
-# 261 "parser_cocci_menhir.mly"
+# 266 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 15993 "parser_cocci_menhir.ml"
+# 16841 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16043,18 +16891,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_metadec = let kindfn =
           let vl = vl0 in
           
-# 391 "parser_cocci_menhir.mly"
+# 401 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let ty = Some (List.map (function x -> Type_cocci.Array x) vl) in
       let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
       !Data.add_exp_meta ty name constraints pure; tok) )
-# 16052 "parser_cocci_menhir.ml"
+# 16900 "parser_cocci_menhir.ml"
           
         in
         
-# 261 "parser_cocci_menhir.mly"
+# 266 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 16058 "parser_cocci_menhir.ml"
+# 16906 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16100,21 +16948,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
             
 # 39 "standard.mly"
     ( None )
-# 16104 "parser_cocci_menhir.ml"
+# 16952 "parser_cocci_menhir.ml"
             
           in
           
-# 396 "parser_cocci_menhir.mly"
+# 406 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let tok = check_meta(Ast.MetaConstDecl(arity,name,ty)) in
       !Data.add_const_meta ty name constraints pure; tok) )
-# 16112 "parser_cocci_menhir.ml"
+# 16960 "parser_cocci_menhir.ml"
           
         in
         
-# 261 "parser_cocci_menhir.mly"
+# 266 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 16118 "parser_cocci_menhir.ml"
+# 16966 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16168,21 +17016,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
             
 # 41 "standard.mly"
     ( Some x )
-# 16172 "parser_cocci_menhir.ml"
+# 17020 "parser_cocci_menhir.ml"
             
           in
           
-# 396 "parser_cocci_menhir.mly"
+# 406 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let tok = check_meta(Ast.MetaConstDecl(arity,name,ty)) in
       !Data.add_const_meta ty name constraints pure; tok) )
-# 16180 "parser_cocci_menhir.ml"
+# 17028 "parser_cocci_menhir.ml"
           
         in
         
-# 261 "parser_cocci_menhir.mly"
+# 266 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 16186 "parser_cocci_menhir.ml"
+# 17034 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16225,17 +17073,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = let kindfn =
           
-# 402 "parser_cocci_menhir.mly"
+# 412 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let tok = check_meta(Ast.MetaExpDecl(arity,name,None)) in
       !Data.add_exp_meta None name constraints pure; tok) )
-# 16233 "parser_cocci_menhir.ml"
+# 17081 "parser_cocci_menhir.ml"
           
         in
         
-# 265 "parser_cocci_menhir.mly"
+# 270 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 16239 "parser_cocci_menhir.ml"
+# 17087 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16281,7 +17129,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_metadec = let kindfn =
           let vl = vl0 in
           
-# 406 "parser_cocci_menhir.mly"
+# 416 "parser_cocci_menhir.mly"
     ( (fun arity name pure check_meta constraints ->
       let ty = Some vl in
       List.iter
@@ -16291,9 +17139,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
              if not
                  (List.exists
                     (function
-                        Type_cocci.BaseType(Type_cocci.IntType,_) -> true
-                      | Type_cocci.BaseType(Type_cocci.ShortType,_) -> true
-                      | Type_cocci.BaseType(Type_cocci.LongType,_) -> true
+                        Type_cocci.BaseType(Type_cocci.IntType) -> true
+                      | Type_cocci.BaseType(Type_cocci.ShortType) -> true
+                      | Type_cocci.BaseType(Type_cocci.LongType) -> true
                       | _ -> false)
                     vl)
              then failwith "metavariable with int constraint must be an int"
@@ -16301,13 +17149,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
        constraints;
       let tok = check_meta(Ast.MetaExpDecl(arity,name,ty)) in
       !Data.add_exp_meta ty name constraints pure; tok) )
-# 16305 "parser_cocci_menhir.ml"
+# 17153 "parser_cocci_menhir.ml"
           
         in
         
-# 265 "parser_cocci_menhir.mly"
+# 270 "parser_cocci_menhir.mly"
     ( P.create_metadec_ne ar ispure kindfn ids )
-# 16311 "parser_cocci_menhir.ml"
+# 17159 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16349,13 +17197,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_ar_ in
         let _endpos = _endpos__5_ in
         let _v : 'tv_metadec = 
-# 268 "parser_cocci_menhir.mly"
-    ( let kindfn arity name pure check_meta constraints =
+# 276 "parser_cocci_menhir.mly"
+    ( (if !Data.in_generating
+      then failwith "position variables not allowed in a generated rule file");
+      let kindfn arity name pure check_meta constraints =
       let tok = check_meta(Ast.MetaPosDecl(arity,name)) in
       let any = match a with None -> Ast.PER | Some _ -> Ast.ALL in
       !Data.add_pos_meta name constraints any; tok in
     P.create_metadec_ne ar false kindfn ids )
-# 16359 "parser_cocci_menhir.ml"
+# 17209 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16415,14 +17265,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_ar_ in
         let _endpos = _endpos__9_ in
         let _v : 'tv_metadec = 
-# 276 "parser_cocci_menhir.mly"
+# 286 "parser_cocci_menhir.mly"
     ( P.create_len_metadec ar ispure
        (fun lenname arity name pure check_meta ->
          let tok =
            check_meta(Ast.MetaParamListDecl(arity,name,Some lenname)) in
          !Data.add_paramlist_meta name (Some lenname) pure; tok)
        id ids )
-# 16426 "parser_cocci_menhir.ml"
+# 17276 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16482,14 +17332,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_ar_ in
         let _endpos = _endpos__9_ in
         let _v : 'tv_metadec = 
-# 285 "parser_cocci_menhir.mly"
+# 295 "parser_cocci_menhir.mly"
     ( P.create_len_metadec ar ispure
        (fun lenname arity name pure check_meta ->
          let tok =
            check_meta(Ast.MetaExpListDecl(arity,name,Some lenname)) in
          !Data.add_explist_meta name (Some lenname) pure; tok)
        id ids )
-# 16493 "parser_cocci_menhir.ml"
+# 17343 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16517,9 +17367,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_midzero_list_ctype_ctype_ = 
-# 1699 "parser_cocci_menhir.mly"
+# 1776 "parser_cocci_menhir.mly"
      ( let (mids,code) = List.split b in (mids,(a::code)) )
-# 16523 "parser_cocci_menhir.ml"
+# 17373 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16547,9 +17397,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_midzero_list_eexpr_eexpr_ = 
-# 1699 "parser_cocci_menhir.mly"
+# 1776 "parser_cocci_menhir.mly"
      ( let (mids,code) = List.split b in (mids,(a::code)) )
-# 16553 "parser_cocci_menhir.ml"
+# 17403 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16577,9 +17427,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_midzero_list_expr_eexpr_ = 
-# 1699 "parser_cocci_menhir.mly"
+# 1776 "parser_cocci_menhir.mly"
      ( let (mids,code) = List.split b in (mids,(a::code)) )
-# 16583 "parser_cocci_menhir.ml"
+# 17433 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16607,9 +17457,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_midzero_list_fun_after_stm_fun_after_dots_or_ = 
-# 1699 "parser_cocci_menhir.mly"
+# 1776 "parser_cocci_menhir.mly"
      ( let (mids,code) = List.split b in (mids,(a::code)) )
-# 16613 "parser_cocci_menhir.ml"
+# 17463 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16637,9 +17487,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_midzero_list_fun_start_fun_start_ = 
-# 1699 "parser_cocci_menhir.mly"
+# 1776 "parser_cocci_menhir.mly"
      ( let (mids,code) = List.split b in (mids,(a::code)) )
-# 16643 "parser_cocci_menhir.ml"
+# 17493 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16667,9 +17517,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_midzero_list_rule_elem_statement_rule_elem_statement_ = 
-# 1699 "parser_cocci_menhir.mly"
+# 1776 "parser_cocci_menhir.mly"
      ( let (mids,code) = List.split b in (mids,(a::code)) )
-# 16673 "parser_cocci_menhir.ml"
+# 17523 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16697,9 +17547,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_midzero_list_statement_statement_ = 
-# 1699 "parser_cocci_menhir.mly"
+# 1776 "parser_cocci_menhir.mly"
      ( let (mids,code) = List.split b in (mids,(a::code)) )
-# 16703 "parser_cocci_menhir.ml"
+# 17553 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16733,11 +17583,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_f_ in
         let _endpos = _endpos_ew_ in
         let _v : 'tv_minus_body = 
-# 554 "parser_cocci_menhir.mly"
+# 592 "parser_cocci_menhir.mly"
     ( match f@b@ew with
       [] -> raise (Semantic_cocci.Semantic "minus slice can't be empty")
     | code -> Top_level.top_level code )
-# 16741 "parser_cocci_menhir.ml"
+# 17591 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16771,11 +17621,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_f_ in
         let _endpos = _endpos_ew_ in
         let _v : 'tv_minus_exp_body = 
-# 568 "parser_cocci_menhir.mly"
+# 606 "parser_cocci_menhir.mly"
     ( match f@[b]@ew with
       [] -> raise (Semantic_cocci.Semantic "minus slice can't be empty")
     | code -> Top_level.top_level code )
-# 16779 "parser_cocci_menhir.ml"
+# 17629 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16803,11 +17653,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 136 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 16807 "parser_cocci_menhir.ml"
+# 17657 "parser_cocci_menhir.ml"
         ) = 
 # 176 "parser_cocci_menhir.mly"
                                    ( _1 )
-# 16811 "parser_cocci_menhir.ml"
+# 17661 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16835,11 +17685,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 136 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 16839 "parser_cocci_menhir.ml"
+# 17689 "parser_cocci_menhir.ml"
         ) = 
 # 176 "parser_cocci_menhir.mly"
                                                                        ( m )
-# 16843 "parser_cocci_menhir.ml"
+# 17693 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16867,11 +17717,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 136 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 16871 "parser_cocci_menhir.ml"
+# 17721 "parser_cocci_menhir.ml"
         ) = 
 # 177 "parser_cocci_menhir.mly"
                          ( m )
-# 16875 "parser_cocci_menhir.ml"
+# 17725 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16899,11 +17749,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 133 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 16903 "parser_cocci_menhir.ml"
+# 17753 "parser_cocci_menhir.ml"
         ) = 
 # 172 "parser_cocci_menhir.mly"
                            ( _1 )
-# 16907 "parser_cocci_menhir.ml"
+# 17757 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16931,11 +17781,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 133 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 16935 "parser_cocci_menhir.ml"
+# 17785 "parser_cocci_menhir.ml"
         ) = 
 # 172 "parser_cocci_menhir.mly"
                                                            ( m )
-# 16939 "parser_cocci_menhir.ml"
+# 17789 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16963,11 +17813,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 133 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 16967 "parser_cocci_menhir.ml"
+# 17817 "parser_cocci_menhir.ml"
         ) = 
 # 173 "parser_cocci_menhir.mly"
                      ( m )
-# 16971 "parser_cocci_menhir.ml"
+# 17821 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -16989,9 +17839,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_minus_start = 
-# 1515 "parser_cocci_menhir.mly"
+# 1585 "parser_cocci_menhir.mly"
                          ( [Ast0.wrap(Ast0.DECL(_1))] )
-# 16995 "parser_cocci_menhir.ml"
+# 17845 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17013,9 +17863,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_minus_start = 
-# 1516 "parser_cocci_menhir.mly"
+# 1586 "parser_cocci_menhir.mly"
                          ( [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Ty(_1))))] )
-# 17019 "parser_cocci_menhir.ml"
+# 17869 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17037,9 +17887,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_minus_start = 
-# 1517 "parser_cocci_menhir.mly"
+# 1587 "parser_cocci_menhir.mly"
                     ( [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.TopInit(_1))))] )
-# 17043 "parser_cocci_menhir.ml"
+# 17893 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17057,13 +17907,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           MenhirLib.EngineTypes.endp = _endpos__1_;
           MenhirLib.EngineTypes.next = _menhir_stack;
           } = _menhir_stack in
-        let _1 : 'tv_toplevel_seq_start_toplevel_after_dots_init_ = Obj.magic _1 in
+        let _1 : 'tv_toplevel_seq_startne_toplevel_after_dots_init_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_minus_start = 
-# 1519 "parser_cocci_menhir.mly"
+# 1589 "parser_cocci_menhir.mly"
     ( List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) _1 )
-# 17067 "parser_cocci_menhir.ml"
+# 17917 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17090,14 +17940,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let a : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17094 "parser_cocci_menhir.ml"
+# 17944 "parser_cocci_menhir.ml"
         ) = Obj.magic a in
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_mzl_ctype_ = 
-# 1702 "parser_cocci_menhir.mly"
+# 1779 "parser_cocci_menhir.mly"
                  ( (P.clt2mcode "|" a, b) )
-# 17101 "parser_cocci_menhir.ml"
+# 17951 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17124,14 +17974,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let a : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17128 "parser_cocci_menhir.ml"
+# 17978 "parser_cocci_menhir.ml"
         ) = Obj.magic a in
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_mzl_eexpr_ = 
-# 1702 "parser_cocci_menhir.mly"
+# 1779 "parser_cocci_menhir.mly"
                  ( (P.clt2mcode "|" a, b) )
-# 17135 "parser_cocci_menhir.ml"
+# 17985 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17158,14 +18008,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let a : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17162 "parser_cocci_menhir.ml"
+# 18012 "parser_cocci_menhir.ml"
         ) = Obj.magic a in
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_mzl_fun_after_dots_or_ = 
-# 1702 "parser_cocci_menhir.mly"
+# 1779 "parser_cocci_menhir.mly"
                  ( (P.clt2mcode "|" a, b) )
-# 17169 "parser_cocci_menhir.ml"
+# 18019 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17192,14 +18042,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let a : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17196 "parser_cocci_menhir.ml"
+# 18046 "parser_cocci_menhir.ml"
         ) = Obj.magic a in
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_mzl_fun_start_ = 
-# 1702 "parser_cocci_menhir.mly"
+# 1779 "parser_cocci_menhir.mly"
                  ( (P.clt2mcode "|" a, b) )
-# 17203 "parser_cocci_menhir.ml"
+# 18053 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17226,14 +18076,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let a : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17230 "parser_cocci_menhir.ml"
+# 18080 "parser_cocci_menhir.ml"
         ) = Obj.magic a in
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_mzl_rule_elem_statement_ = 
-# 1702 "parser_cocci_menhir.mly"
+# 1779 "parser_cocci_menhir.mly"
                  ( (P.clt2mcode "|" a, b) )
-# 17237 "parser_cocci_menhir.ml"
+# 18087 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17260,14 +18110,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let a : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17264 "parser_cocci_menhir.ml"
+# 18114 "parser_cocci_menhir.ml"
         ) = Obj.magic a in
         let _startpos = _startpos_a_ in
         let _endpos = _endpos_b_ in
         let _v : 'tv_mzl_statement_ = 
-# 1702 "parser_cocci_menhir.mly"
+# 1779 "parser_cocci_menhir.mly"
                  ( (P.clt2mcode "|" a, b) )
-# 17271 "parser_cocci_menhir.ml"
+# 18121 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17289,9 +18139,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_name_opt_decl = 
-# 785 "parser_cocci_menhir.mly"
+# 824 "parser_cocci_menhir.mly"
             ( _1 )
-# 17295 "parser_cocci_menhir.ml"
+# 18145 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17313,9 +18163,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_t_ in
         let _v : 'tv_name_opt_decl = 
-# 786 "parser_cocci_menhir.mly"
+# 825 "parser_cocci_menhir.mly"
               ( Ast0.wrap(Ast0.Param(t, None)) )
-# 17319 "parser_cocci_menhir.ml"
+# 18169 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17366,41 +18216,41 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17370 "parser_cocci_menhir.ml"
+# 18220 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_decl_list_name_opt_decl_ = Obj.magic d in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17376 "parser_cocci_menhir.ml"
+# 18226 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17381 "parser_cocci_menhir.ml"
+# 18231 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let s : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17386 "parser_cocci_menhir.ml"
+# 18236 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17391 "parser_cocci_menhir.ml"
+# 18241 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let t : 'tv_fn_ctype = Obj.magic t in
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_rp1_ in
         let _v : 'tv_name_opt_decl = 
-# 789 "parser_cocci_menhir.mly"
+# 828 "parser_cocci_menhir.mly"
         ( let fnptr =
          Ast0.wrap
            (Ast0.FunctionPointer
               (t,P.clt2mcode "(" lp,P.clt2mcode "*" s,P.clt2mcode ")" rp,
                P.clt2mcode "(" lp1,d,P.clt2mcode ")" rp1)) in
        Ast0.wrap(Ast0.Param(fnptr, None)) )
-# 17404 "parser_cocci_menhir.ml"
+# 18254 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17428,9 +18278,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_nest_after_dots = 
-# 1623 "parser_cocci_menhir.mly"
+# 1700 "parser_cocci_menhir.mly"
                                      (_1@_2)
-# 17434 "parser_cocci_menhir.ml"
+# 18284 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17456,9 +18306,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_nest_after_dots = 
-# 1624 "parser_cocci_menhir.mly"
+# 1701 "parser_cocci_menhir.mly"
                                 (_2)
-# 17462 "parser_cocci_menhir.ml"
+# 18312 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17486,9 +18336,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_nest_after_dots = 
-# 1625 "parser_cocci_menhir.mly"
+# 1702 "parser_cocci_menhir.mly"
                                 ((Ast0.wrap(Ast0.Exp(_1)))::_2)
-# 17492 "parser_cocci_menhir.ml"
+# 18342 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17503,9 +18353,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_nest_after_exp = 
-# 1633 "parser_cocci_menhir.mly"
+# 1710 "parser_cocci_menhir.mly"
                                 ([])
-# 17509 "parser_cocci_menhir.ml"
+# 18359 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17533,9 +18383,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_nest_after_exp = 
-# 1634 "parser_cocci_menhir.mly"
+# 1711 "parser_cocci_menhir.mly"
                                 (_1::_2)
-# 17539 "parser_cocci_menhir.ml"
+# 18389 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17550,9 +18400,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_nest_after_stm = 
-# 1628 "parser_cocci_menhir.mly"
+# 1705 "parser_cocci_menhir.mly"
                                 ([])
-# 17556 "parser_cocci_menhir.ml"
+# 18406 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17580,9 +18430,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_nest_after_stm = 
-# 1629 "parser_cocci_menhir.mly"
+# 1706 "parser_cocci_menhir.mly"
                                 (_1::_2)
-# 17586 "parser_cocci_menhir.ml"
+# 18436 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17610,9 +18460,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_nest_after_stm = 
-# 1630 "parser_cocci_menhir.mly"
+# 1707 "parser_cocci_menhir.mly"
                                 (_1@_2)
-# 17616 "parser_cocci_menhir.ml"
+# 18466 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17643,22 +18493,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let c : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17647 "parser_cocci_menhir.ml"
+# 18497 "parser_cocci_menhir.ml"
         ) = Obj.magic c in
         let e : 'tv_expr_dots_TEllipsis_ = Obj.magic e in
         let _1 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17653 "parser_cocci_menhir.ml"
+# 18503 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_c_ in
         let _v : 'tv_nest_expressions = 
-# 1149 "parser_cocci_menhir.mly"
+# 1200 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.NestExpr(P.clt2mcode "<..." _1,
                              Ast0.wrap(Ast0.DOTS(e (P.mkedots "..."))),
                              P.clt2mcode "...>" c, None, false)) )
-# 17662 "parser_cocci_menhir.ml"
+# 18512 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17689,22 +18539,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let c : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17693 "parser_cocci_menhir.ml"
+# 18543 "parser_cocci_menhir.ml"
         ) = Obj.magic c in
         let e : 'tv_expr_dots_TEllipsis_ = Obj.magic e in
         let _1 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17699 "parser_cocci_menhir.ml"
+# 18549 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_c_ in
         let _v : 'tv_nest_expressions = 
-# 1153 "parser_cocci_menhir.mly"
+# 1204 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.NestExpr(P.clt2mcode "<+..." _1,
                              Ast0.wrap(Ast0.DOTS(e (P.mkedots "..."))),
                              P.clt2mcode "...+>" c, None, true)) )
-# 17708 "parser_cocci_menhir.ml"
+# 18558 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17726,9 +18576,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_nest_start = 
-# 1620 "parser_cocci_menhir.mly"
+# 1697 "parser_cocci_menhir.mly"
                    ( Ast0.wrap(Ast0.DOTS(_1)) )
-# 17732 "parser_cocci_menhir.ml"
+# 18582 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17750,11 +18600,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 167 "parser_cocci_menhir.mly"
       (unit)
-# 17754 "parser_cocci_menhir.ml"
+# 18604 "parser_cocci_menhir.ml"
         ) = 
-# 1765 "parser_cocci_menhir.mly"
+# 1842 "parser_cocci_menhir.mly"
                     ( () )
-# 17758 "parser_cocci_menhir.ml"
+# 18608 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17780,11 +18630,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 167 "parser_cocci_menhir.mly"
       (unit)
-# 17784 "parser_cocci_menhir.ml"
+# 18634 "parser_cocci_menhir.ml"
         ) = 
-# 1766 "parser_cocci_menhir.mly"
+# 1843 "parser_cocci_menhir.mly"
                     ( () )
-# 17788 "parser_cocci_menhir.ml"
+# 18638 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17806,11 +18656,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 167 "parser_cocci_menhir.mly"
       (unit)
-# 17810 "parser_cocci_menhir.ml"
+# 18660 "parser_cocci_menhir.ml"
         ) = 
-# 1767 "parser_cocci_menhir.mly"
+# 1844 "parser_cocci_menhir.mly"
                     ( () )
-# 17814 "parser_cocci_menhir.ml"
+# 18664 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17838,10 +18688,10 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_g_ in
         let _endpos = _endpos_dg_ in
         let _v : 'tv_no_dot_start_end_dexpr_edots_when_TEllipsis_eexpr__ = 
-# 1317 "parser_cocci_menhir.mly"
+# 1368 "parser_cocci_menhir.mly"
   ( function dot_builder ->
       g :: (List.concat(List.map (function (d,g) -> [dot_builder d;g]) dg)) )
-# 17845 "parser_cocci_menhir.ml"
+# 18695 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17862,14 +18712,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let x : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17866 "parser_cocci_menhir.ml"
+# 18716 "parser_cocci_menhir.ml"
         ) = Obj.magic x in
         let _startpos = _startpos_x_ in
         let _endpos = _endpos_x_ in
         let _v : 'tv_nonempty_list_TMul_ = 
 # 124 "standard.mly"
     ( [ x ] )
-# 17873 "parser_cocci_menhir.ml"
+# 18723 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17896,14 +18746,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let x : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 17900 "parser_cocci_menhir.ml"
+# 18750 "parser_cocci_menhir.ml"
         ) = Obj.magic x in
         let _startpos = _startpos_x_ in
         let _endpos = _endpos_xs_ in
         let _v : 'tv_nonempty_list_TMul_ = 
 # 126 "standard.mly"
     ( x :: xs )
-# 17907 "parser_cocci_menhir.ml"
+# 18757 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17929,11 +18779,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_i_ in
         let _v : 'tv_not_ceq = 
-# 1363 "parser_cocci_menhir.mly"
+# 1425 "parser_cocci_menhir.mly"
          ( (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           [i] )
-# 17937 "parser_cocci_menhir.ml"
+# 18789 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17967,11 +18819,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_not_ceq = 
-# 1367 "parser_cocci_menhir.mly"
+# 1431 "parser_cocci_menhir.mly"
   ( (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           l )
-# 17975 "parser_cocci_menhir.ml"
+# 18829 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -17997,11 +18851,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_i_ in
         let _v : 'tv_not_eq = 
-# 1340 "parser_cocci_menhir.mly"
+# 1392 "parser_cocci_menhir.mly"
          ( (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+           (* pb: constraints not stored with metavars; too lazy to search for
+             them in the pattern *)
+          then failwith "constraints not allowed in a generated rule file");
           [Ast0.wrap(Ast0.Id(P.id2mcode i))] )
-# 18005 "parser_cocci_menhir.ml"
+# 18863 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18035,11 +18893,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_not_eq = 
-# 1344 "parser_cocci_menhir.mly"
+# 1400 "parser_cocci_menhir.mly"
   ( (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           List.map (function i -> Ast0.wrap(Ast0.Id(P.id2mcode i))) l )
-# 18043 "parser_cocci_menhir.ml"
+# 18903 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18065,11 +18925,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_i_ in
         let _v : 'tv_not_eqe = 
-# 1350 "parser_cocci_menhir.mly"
+# 1408 "parser_cocci_menhir.mly"
          ( (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           [Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i))))] )
-# 18073 "parser_cocci_menhir.ml"
+# 18935 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18103,14 +18965,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_not_eqe = 
-# 1354 "parser_cocci_menhir.mly"
+# 1414 "parser_cocci_menhir.mly"
   ( (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           List.map
             (function i ->
               Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i)))))
             l )
-# 18114 "parser_cocci_menhir.ml"
+# 18978 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18136,16 +19000,18 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_i_ in
         let _v : 'tv_not_pos = 
-# 1379 "parser_cocci_menhir.mly"
+# 1445 "parser_cocci_menhir.mly"
          ( (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           match i with
             (None,_) -> failwith "constraint must be an inherited variable"
           | (Some rule,name) ->
               let i = (rule,name) in
               P.check_meta(Ast.MetaPosDecl(Ast.NONE,i));
               [i] )
-# 18149 "parser_cocci_menhir.ml"
+# 19015 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18179,9 +19045,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_not_pos = 
-# 1388 "parser_cocci_menhir.mly"
+# 1456 "parser_cocci_menhir.mly"
   ( (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           List.map
             (function
                 (None,_) ->
@@ -18191,7 +19059,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
                   P.check_meta(Ast.MetaPosDecl(Ast.NONE,i));
                   i)
             l )
-# 18195 "parser_cocci_menhir.ml"
+# 19063 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18213,9 +19081,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_one_dec_decl_ = 
-# 1459 "parser_cocci_menhir.mly"
+# 1529 "parser_cocci_menhir.mly"
         ( _1 )
-# 18219 "parser_cocci_menhir.ml"
+# 19087 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18236,12 +19104,12 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 65 "parser_cocci_menhir.mly"
        (Parse_aux.list_info)
-# 18240 "parser_cocci_menhir.ml"
+# 19108 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_one_dec_decl_ = 
-# 1461 "parser_cocci_menhir.mly"
+# 1531 "parser_cocci_menhir.mly"
     ( let (nm,lenname,pure,clt) = _1 in
     let nm = P.clt2mcode nm clt in
     let lenname =
@@ -18249,7 +19117,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
        Some nm -> Some(P.clt2mcode nm clt)
       | None -> None in
     Ast0.wrap(Ast0.MetaParamList(nm,lenname,pure)) )
-# 18253 "parser_cocci_menhir.ml"
+# 19121 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18271,9 +19139,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_one_dec_name_opt_decl_ = 
-# 1459 "parser_cocci_menhir.mly"
+# 1529 "parser_cocci_menhir.mly"
         ( _1 )
-# 18277 "parser_cocci_menhir.ml"
+# 19145 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18294,12 +19162,12 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 65 "parser_cocci_menhir.mly"
        (Parse_aux.list_info)
-# 18298 "parser_cocci_menhir.ml"
+# 19166 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_one_dec_name_opt_decl_ = 
-# 1461 "parser_cocci_menhir.mly"
+# 1531 "parser_cocci_menhir.mly"
     ( let (nm,lenname,pure,clt) = _1 in
     let nm = P.clt2mcode nm clt in
     let lenname =
@@ -18307,7 +19175,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
        Some nm -> Some(P.clt2mcode nm clt)
       | None -> None in
     Ast0.wrap(Ast0.MetaParamList(nm,lenname,pure)) )
-# 18311 "parser_cocci_menhir.ml"
+# 19179 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18333,15 +19201,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18337 "parser_cocci_menhir.ml"
+# 19205 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let t : 'tv_ctype = Obj.magic t in
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_pv_ in
         let _v : 'tv_one_decl_var = 
-# 944 "parser_cocci_menhir.mly"
+# 995 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.TyDecl(t,P.clt2mcode ";" pv)) )
-# 18345 "parser_cocci_menhir.ml"
+# 19213 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18372,7 +19240,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18376 "parser_cocci_menhir.ml"
+# 19244 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_d_ident = Obj.magic d in
         let t : 'tv_ctype = Obj.magic t in
@@ -18382,14 +19250,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 18386 "parser_cocci_menhir.ml"
+# 19254 "parser_cocci_menhir.ml"
           
         in
         
-# 946 "parser_cocci_menhir.mly"
+# 997 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) )
-# 18393 "parser_cocci_menhir.ml"
+# 19261 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18425,7 +19293,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18429 "parser_cocci_menhir.ml"
+# 19297 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_d_ident = Obj.magic d in
         let t : 'tv_ctype = Obj.magic t in
@@ -18437,14 +19305,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 18441 "parser_cocci_menhir.ml"
+# 19309 "parser_cocci_menhir.ml"
           
         in
         
-# 946 "parser_cocci_menhir.mly"
+# 997 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) )
-# 18448 "parser_cocci_menhir.ml"
+# 19316 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18466,9 +19334,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_f_ in
         let _endpos = _endpos_f_ in
         let _v : 'tv_one_decl_var = 
-# 948 "parser_cocci_menhir.mly"
+# 999 "parser_cocci_menhir.mly"
                ( f )
-# 18472 "parser_cocci_menhir.ml"
+# 19340 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18509,13 +19377,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18513 "parser_cocci_menhir.ml"
+# 19381 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18519 "parser_cocci_menhir.ml"
+# 19387 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let t : 'tv_ctype = Obj.magic t in
@@ -18525,14 +19393,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 18529 "parser_cocci_menhir.ml"
+# 19397 "parser_cocci_menhir.ml"
           
         in
         
-# 950 "parser_cocci_menhir.mly"
+# 1001 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
       Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv)) )
-# 18536 "parser_cocci_menhir.ml"
+# 19404 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18578,13 +19446,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18582 "parser_cocci_menhir.ml"
+# 19450 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18588 "parser_cocci_menhir.ml"
+# 19456 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let t : 'tv_ctype = Obj.magic t in
@@ -18596,14 +19464,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 18600 "parser_cocci_menhir.ml"
+# 19468 "parser_cocci_menhir.ml"
           
         in
         
-# 950 "parser_cocci_menhir.mly"
+# 1001 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
       Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv)) )
-# 18607 "parser_cocci_menhir.ml"
+# 19475 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18634,7 +19502,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18638 "parser_cocci_menhir.ml"
+# 19506 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -18644,22 +19512,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 18648 "parser_cocci_menhir.ml"
+# 19516 "parser_cocci_menhir.ml"
           
         in
         let s =
           
 # 39 "standard.mly"
     ( None )
-# 18655 "parser_cocci_menhir.ml"
+# 19523 "parser_cocci_menhir.ml"
           
         in
         
-# 955 "parser_cocci_menhir.mly"
+# 1006 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
        Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)) )
-# 18663 "parser_cocci_menhir.ml"
+# 19531 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18695,7 +19563,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18699 "parser_cocci_menhir.ml"
+# 19567 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -18707,22 +19575,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 18711 "parser_cocci_menhir.ml"
+# 19579 "parser_cocci_menhir.ml"
           
         in
         let s =
           
 # 39 "standard.mly"
     ( None )
-# 18718 "parser_cocci_menhir.ml"
+# 19586 "parser_cocci_menhir.ml"
           
         in
         
-# 955 "parser_cocci_menhir.mly"
+# 1006 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
        Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)) )
-# 18726 "parser_cocci_menhir.ml"
+# 19594 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18758,7 +19626,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18762 "parser_cocci_menhir.ml"
+# 19630 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -18769,7 +19637,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 18773 "parser_cocci_menhir.ml"
+# 19641 "parser_cocci_menhir.ml"
           
         in
         let s =
@@ -18777,15 +19645,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 18781 "parser_cocci_menhir.ml"
+# 19649 "parser_cocci_menhir.ml"
           
         in
         
-# 955 "parser_cocci_menhir.mly"
+# 1006 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
        Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)) )
-# 18789 "parser_cocci_menhir.ml"
+# 19657 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18826,7 +19694,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18830 "parser_cocci_menhir.ml"
+# 19698 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -18839,7 +19707,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 18843 "parser_cocci_menhir.ml"
+# 19711 "parser_cocci_menhir.ml"
           
         in
         let s =
@@ -18847,15 +19715,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 18851 "parser_cocci_menhir.ml"
+# 19719 "parser_cocci_menhir.ml"
           
         in
         
-# 955 "parser_cocci_menhir.mly"
+# 1006 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
        Ast0.wrap(Ast0.UnInit(s,fn idtype,id,P.clt2mcode ";" pv)) )
-# 18859 "parser_cocci_menhir.ml"
+# 19727 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18896,13 +19764,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18900 "parser_cocci_menhir.ml"
+# 19768 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18906 "parser_cocci_menhir.ml"
+# 19774 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -18912,24 +19780,24 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 18916 "parser_cocci_menhir.ml"
+# 19784 "parser_cocci_menhir.ml"
           
         in
         let s =
           
 # 39 "standard.mly"
     ( None )
-# 18923 "parser_cocci_menhir.ml"
+# 19791 "parser_cocci_menhir.ml"
           
         in
         
-# 960 "parser_cocci_menhir.mly"
+# 1011 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
       !Data.add_type_name (P.id2name i);
       let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
       Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
                           P.clt2mcode ";" pv)) )
-# 18933 "parser_cocci_menhir.ml"
+# 19801 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -18975,13 +19843,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18979 "parser_cocci_menhir.ml"
+# 19847 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 18985 "parser_cocci_menhir.ml"
+# 19853 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -18993,24 +19861,24 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 18997 "parser_cocci_menhir.ml"
+# 19865 "parser_cocci_menhir.ml"
           
         in
         let s =
           
 # 39 "standard.mly"
     ( None )
-# 19004 "parser_cocci_menhir.ml"
+# 19872 "parser_cocci_menhir.ml"
           
         in
         
-# 960 "parser_cocci_menhir.mly"
+# 1011 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
       !Data.add_type_name (P.id2name i);
       let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
       Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
                           P.clt2mcode ";" pv)) )
-# 19014 "parser_cocci_menhir.ml"
+# 19882 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19056,13 +19924,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19060 "parser_cocci_menhir.ml"
+# 19928 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19066 "parser_cocci_menhir.ml"
+# 19934 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -19073,7 +19941,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 19077 "parser_cocci_menhir.ml"
+# 19945 "parser_cocci_menhir.ml"
           
         in
         let s =
@@ -19081,17 +19949,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 19085 "parser_cocci_menhir.ml"
+# 19953 "parser_cocci_menhir.ml"
           
         in
         
-# 960 "parser_cocci_menhir.mly"
+# 1011 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
       !Data.add_type_name (P.id2name i);
       let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
       Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
                           P.clt2mcode ";" pv)) )
-# 19095 "parser_cocci_menhir.ml"
+# 19963 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19142,13 +20010,13 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19146 "parser_cocci_menhir.ml"
+# 20014 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19152 "parser_cocci_menhir.ml"
+# 20020 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -19161,7 +20029,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 19165 "parser_cocci_menhir.ml"
+# 20033 "parser_cocci_menhir.ml"
           
         in
         let s =
@@ -19169,17 +20037,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 19173 "parser_cocci_menhir.ml"
+# 20041 "parser_cocci_menhir.ml"
           
         in
         
-# 960 "parser_cocci_menhir.mly"
+# 1011 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
       !Data.add_type_name (P.id2name i);
       let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
       Ast0.wrap(Ast0.Init(s,fn idtype,id,P.clt2mcode "=" q,e,
                           P.clt2mcode ";" pv)) )
-# 19183 "parser_cocci_menhir.ml"
+# 20051 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19240,34 +20108,34 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19244 "parser_cocci_menhir.ml"
+# 20112 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let rp2 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19249 "parser_cocci_menhir.ml"
+# 20117 "parser_cocci_menhir.ml"
         ) = Obj.magic rp2 in
         let p : 'tv_decl_list_name_opt_decl_ = Obj.magic p in
         let lp2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19255 "parser_cocci_menhir.ml"
+# 20123 "parser_cocci_menhir.ml"
         ) = Obj.magic lp2 in
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19260 "parser_cocci_menhir.ml"
+# 20128 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_d_ident = Obj.magic d in
         let st : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19266 "parser_cocci_menhir.ml"
+# 20134 "parser_cocci_menhir.ml"
         ) = Obj.magic st in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19271 "parser_cocci_menhir.ml"
+# 20139 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let t : 'tv_fn_ctype = Obj.magic t in
         let _startpos = _startpos_t_ in
@@ -19276,11 +20144,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 19280 "parser_cocci_menhir.ml"
+# 20148 "parser_cocci_menhir.ml"
           
         in
         
-# 970 "parser_cocci_menhir.mly"
+# 1021 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let t =
          Ast0.wrap
@@ -19288,7 +20156,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
               (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
                P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
         Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) )
-# 19292 "parser_cocci_menhir.ml"
+# 20160 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19354,34 +20222,34 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19358 "parser_cocci_menhir.ml"
+# 20226 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let rp2 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19363 "parser_cocci_menhir.ml"
+# 20231 "parser_cocci_menhir.ml"
         ) = Obj.magic rp2 in
         let p : 'tv_decl_list_name_opt_decl_ = Obj.magic p in
         let lp2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19369 "parser_cocci_menhir.ml"
+# 20237 "parser_cocci_menhir.ml"
         ) = Obj.magic lp2 in
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19374 "parser_cocci_menhir.ml"
+# 20242 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_d_ident = Obj.magic d in
         let st : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19380 "parser_cocci_menhir.ml"
+# 20248 "parser_cocci_menhir.ml"
         ) = Obj.magic st in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19385 "parser_cocci_menhir.ml"
+# 20253 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let t : 'tv_fn_ctype = Obj.magic t in
         let x0 : 'tv_storage = Obj.magic x0 in
@@ -19392,11 +20260,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 19396 "parser_cocci_menhir.ml"
+# 20264 "parser_cocci_menhir.ml"
           
         in
         
-# 970 "parser_cocci_menhir.mly"
+# 1021 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let t =
          Ast0.wrap
@@ -19404,7 +20272,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
               (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
                P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
         Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) )
-# 19408 "parser_cocci_menhir.ml"
+# 20276 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19445,27 +20313,27 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _5 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19449 "parser_cocci_menhir.ml"
+# 20317 "parser_cocci_menhir.ml"
         ) = Obj.magic _5 in
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19454 "parser_cocci_menhir.ml"
+# 20322 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr_list_option = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19460 "parser_cocci_menhir.ml"
+# 20328 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_decl_ident = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__5_ in
         let _v : 'tv_one_decl_var = 
-# 978 "parser_cocci_menhir.mly"
+# 1029 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.MacroDecl(_1,P.clt2mcode "(" _2,_3,
                                  P.clt2mcode ")" _4,P.clt2mcode ";" _5)) )
-# 19469 "parser_cocci_menhir.ml"
+# 20337 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19536,40 +20404,40 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19540 "parser_cocci_menhir.ml"
+# 20408 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19546 "parser_cocci_menhir.ml"
+# 20414 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let rp2 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19551 "parser_cocci_menhir.ml"
+# 20419 "parser_cocci_menhir.ml"
         ) = Obj.magic rp2 in
         let p : 'tv_decl_list_name_opt_decl_ = Obj.magic p in
         let lp2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19557 "parser_cocci_menhir.ml"
+# 20425 "parser_cocci_menhir.ml"
         ) = Obj.magic lp2 in
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19562 "parser_cocci_menhir.ml"
+# 20430 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_d_ident = Obj.magic d in
         let st : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19568 "parser_cocci_menhir.ml"
+# 20436 "parser_cocci_menhir.ml"
         ) = Obj.magic st in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19573 "parser_cocci_menhir.ml"
+# 20441 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let t : 'tv_fn_ctype = Obj.magic t in
         let _startpos = _startpos_t_ in
@@ -19578,11 +20446,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 19582 "parser_cocci_menhir.ml"
+# 20450 "parser_cocci_menhir.ml"
           
         in
         
-# 984 "parser_cocci_menhir.mly"
+# 1035 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let t =
          Ast0.wrap
@@ -19590,7 +20458,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
               (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
                P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
       Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv)))
-# 19594 "parser_cocci_menhir.ml"
+# 20462 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19666,40 +20534,40 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19670 "parser_cocci_menhir.ml"
+# 20538 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let e : 'tv_initialize = Obj.magic e in
         let q : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19676 "parser_cocci_menhir.ml"
+# 20544 "parser_cocci_menhir.ml"
         ) = Obj.magic q in
         let rp2 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19681 "parser_cocci_menhir.ml"
+# 20549 "parser_cocci_menhir.ml"
         ) = Obj.magic rp2 in
         let p : 'tv_decl_list_name_opt_decl_ = Obj.magic p in
         let lp2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19687 "parser_cocci_menhir.ml"
+# 20555 "parser_cocci_menhir.ml"
         ) = Obj.magic lp2 in
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19692 "parser_cocci_menhir.ml"
+# 20560 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_d_ident = Obj.magic d in
         let st : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19698 "parser_cocci_menhir.ml"
+# 20566 "parser_cocci_menhir.ml"
         ) = Obj.magic st in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 19703 "parser_cocci_menhir.ml"
+# 20571 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let t : 'tv_fn_ctype = Obj.magic t in
         let x0 : 'tv_storage = Obj.magic x0 in
@@ -19710,11 +20578,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 19714 "parser_cocci_menhir.ml"
+# 20582 "parser_cocci_menhir.ml"
           
         in
         
-# 984 "parser_cocci_menhir.mly"
+# 1035 "parser_cocci_menhir.mly"
       ( let (id,fn) = d in
         let t =
          Ast0.wrap
@@ -19722,7 +20590,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
               (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
                P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
       Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv)))
-# 19726 "parser_cocci_menhir.ml"
+# 20594 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19739,7 +20607,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_option_TLocal_ = 
 # 29 "standard.mly"
     ( None )
-# 19743 "parser_cocci_menhir.ml"
+# 20611 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19763,7 +20631,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_option_TLocal_ = 
 # 31 "standard.mly"
     ( Some x )
-# 19767 "parser_cocci_menhir.ml"
+# 20635 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19780,7 +20648,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_option_TPosAny_ = 
 # 29 "standard.mly"
     ( None )
-# 19784 "parser_cocci_menhir.ml"
+# 20652 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19804,7 +20672,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_option_TPosAny_ = 
 # 31 "standard.mly"
     ( Some x )
-# 19808 "parser_cocci_menhir.ml"
+# 20676 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19821,7 +20689,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_option_eexpr_ = 
 # 29 "standard.mly"
     ( None )
-# 19825 "parser_cocci_menhir.ml"
+# 20693 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19845,7 +20713,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_option_eexpr_ = 
 # 31 "standard.mly"
     ( Some x )
-# 19849 "parser_cocci_menhir.ml"
+# 20717 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19860,9 +20728,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_plus_after_dots = 
-# 1570 "parser_cocci_menhir.mly"
+# 1647 "parser_cocci_menhir.mly"
                                                                          ([])
-# 19866 "parser_cocci_menhir.ml"
+# 20734 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19888,9 +20756,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_after_dots = 
-# 1571 "parser_cocci_menhir.mly"
+# 1648 "parser_cocci_menhir.mly"
                                                                          (_2)
-# 19894 "parser_cocci_menhir.ml"
+# 20762 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19918,9 +20786,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_after_dots = 
-# 1573 "parser_cocci_menhir.mly"
+# 1650 "parser_cocci_menhir.mly"
                      ( (Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp(_1)))))::_2 )
-# 19924 "parser_cocci_menhir.ml"
+# 20792 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19948,9 +20816,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_after_dots = 
-# 1574 "parser_cocci_menhir.mly"
+# 1651 "parser_cocci_menhir.mly"
                                              ( Ast0.wrap(Ast0.DECL(_1))::_2 )
-# 19954 "parser_cocci_menhir.ml"
+# 20822 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19978,9 +20846,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_after_dots = 
-# 1576 "parser_cocci_menhir.mly"
+# 1653 "parser_cocci_menhir.mly"
                 ( (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) _1)@_2 )
-# 19984 "parser_cocci_menhir.ml"
+# 20852 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -19995,9 +20863,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_plus_after_exp = 
-# 1566 "parser_cocci_menhir.mly"
+# 1643 "parser_cocci_menhir.mly"
                                                                          ([])
-# 20001 "parser_cocci_menhir.ml"
+# 20869 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20025,9 +20893,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_after_exp = 
-# 1567 "parser_cocci_menhir.mly"
+# 1644 "parser_cocci_menhir.mly"
                                           ( (Ast0.wrap(Ast0.OTHER(_1)))::_2 )
-# 20031 "parser_cocci_menhir.ml"
+# 20899 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20042,9 +20910,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_plus_after_stm = 
-# 1579 "parser_cocci_menhir.mly"
+# 1656 "parser_cocci_menhir.mly"
                                                                          ([])
-# 20048 "parser_cocci_menhir.ml"
+# 20916 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20072,9 +20940,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_after_stm = 
-# 1580 "parser_cocci_menhir.mly"
+# 1657 "parser_cocci_menhir.mly"
                                           ( (Ast0.wrap(Ast0.OTHER(_1)))::_2 )
-# 20078 "parser_cocci_menhir.ml"
+# 20946 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20102,9 +20970,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_after_stm = 
-# 1581 "parser_cocci_menhir.mly"
+# 1658 "parser_cocci_menhir.mly"
                                              ( Ast0.wrap(Ast0.DECL(_1))::_2 )
-# 20108 "parser_cocci_menhir.ml"
+# 20976 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20132,9 +21000,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_after_stm = 
-# 1583 "parser_cocci_menhir.mly"
+# 1660 "parser_cocci_menhir.mly"
                 ( (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) _1)@_2 )
-# 20138 "parser_cocci_menhir.ml"
+# 21006 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20168,9 +21036,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_f_ in
         let _endpos = _endpos_ew_ in
         let _v : 'tv_plus_body = 
-# 562 "parser_cocci_menhir.mly"
+# 600 "parser_cocci_menhir.mly"
     ( Top_level.top_level (f@b@ew) )
-# 20174 "parser_cocci_menhir.ml"
+# 21042 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20204,9 +21072,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_f_ in
         let _endpos = _endpos_ew_ in
         let _v : 'tv_plus_exp_body = 
-# 576 "parser_cocci_menhir.mly"
+# 614 "parser_cocci_menhir.mly"
     ( Top_level.top_level (f@[b]@ew) )
-# 20210 "parser_cocci_menhir.ml"
+# 21078 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20234,11 +21102,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 142 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 20238 "parser_cocci_menhir.ml"
+# 21106 "parser_cocci_menhir.ml"
         ) = 
 # 178 "parser_cocci_menhir.mly"
                                  ( _1 )
-# 20242 "parser_cocci_menhir.ml"
+# 21110 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20266,11 +21134,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 142 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 20270 "parser_cocci_menhir.ml"
+# 21138 "parser_cocci_menhir.ml"
         ) = 
 # 178 "parser_cocci_menhir.mly"
                                                                     ( p )
-# 20274 "parser_cocci_menhir.ml"
+# 21142 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20298,11 +21166,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 142 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 20302 "parser_cocci_menhir.ml"
+# 21170 "parser_cocci_menhir.ml"
         ) = 
 # 179 "parser_cocci_menhir.mly"
                         ( p )
-# 20306 "parser_cocci_menhir.ml"
+# 21174 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20330,11 +21198,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 139 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 20334 "parser_cocci_menhir.ml"
+# 21202 "parser_cocci_menhir.ml"
         ) = 
 # 174 "parser_cocci_menhir.mly"
                          ( _1 )
-# 20338 "parser_cocci_menhir.ml"
+# 21206 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20362,11 +21230,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 139 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 20366 "parser_cocci_menhir.ml"
+# 21234 "parser_cocci_menhir.ml"
         ) = 
 # 174 "parser_cocci_menhir.mly"
                                                         ( p )
-# 20370 "parser_cocci_menhir.ml"
+# 21238 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20394,11 +21262,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 139 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 20398 "parser_cocci_menhir.ml"
+# 21266 "parser_cocci_menhir.ml"
         ) = 
 # 175 "parser_cocci_menhir.mly"
                     ( p )
-# 20402 "parser_cocci_menhir.ml"
+# 21270 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20420,9 +21288,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_plus_start = 
-# 1555 "parser_cocci_menhir.mly"
+# 1632 "parser_cocci_menhir.mly"
                           ( [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Ty(_1))))] )
-# 20426 "parser_cocci_menhir.ml"
+# 21294 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20444,9 +21312,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_plus_start = 
-# 1556 "parser_cocci_menhir.mly"
+# 1633 "parser_cocci_menhir.mly"
                      ( [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.TopInit(_1))))] )
-# 20450 "parser_cocci_menhir.ml"
+# 21318 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20474,9 +21342,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_start = 
-# 1558 "parser_cocci_menhir.mly"
+# 1635 "parser_cocci_menhir.mly"
                                           ( (Ast0.wrap(Ast0.OTHER(_1)))::_2 )
-# 20480 "parser_cocci_menhir.ml"
+# 21348 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20504,9 +21372,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_start = 
-# 1560 "parser_cocci_menhir.mly"
+# 1637 "parser_cocci_menhir.mly"
                      ( (Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp(_1)))))::_2 )
-# 20510 "parser_cocci_menhir.ml"
+# 21378 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20534,9 +21402,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_start = 
-# 1561 "parser_cocci_menhir.mly"
+# 1638 "parser_cocci_menhir.mly"
                                              ( Ast0.wrap(Ast0.DECL(_1))::_2 )
-# 20540 "parser_cocci_menhir.ml"
+# 21408 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20564,9 +21432,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_plus_start = 
-# 1563 "parser_cocci_menhir.mly"
+# 1640 "parser_cocci_menhir.mly"
                 ( (List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) _1)@_2 )
-# 20570 "parser_cocci_menhir.ml"
+# 21438 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20587,14 +21455,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 47 "parser_cocci_menhir.mly"
       (string)
-# 20591 "parser_cocci_menhir.ml"
+# 21459 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_pnrule = 
-# 220 "parser_cocci_menhir.mly"
+# 225 "parser_cocci_menhir.mly"
                    ( Ast.Dep      _1 )
-# 20598 "parser_cocci_menhir.ml"
+# 21466 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20619,14 +21487,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 47 "parser_cocci_menhir.mly"
       (string)
-# 20623 "parser_cocci_menhir.ml"
+# 21491 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_pnrule = 
-# 221 "parser_cocci_menhir.mly"
+# 226 "parser_cocci_menhir.mly"
                    ( Ast.AntiDep  _2 )
-# 20630 "parser_cocci_menhir.ml"
+# 21498 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20651,14 +21519,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 47 "parser_cocci_menhir.mly"
       (string)
-# 20655 "parser_cocci_menhir.ml"
+# 21523 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_pnrule = 
-# 222 "parser_cocci_menhir.mly"
+# 227 "parser_cocci_menhir.mly"
                    ( Ast.EverDep  _2 )
-# 20662 "parser_cocci_menhir.ml"
+# 21530 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20683,14 +21551,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 47 "parser_cocci_menhir.mly"
       (string)
-# 20687 "parser_cocci_menhir.ml"
+# 21555 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_pnrule = 
-# 223 "parser_cocci_menhir.mly"
+# 228 "parser_cocci_menhir.mly"
                    ( Ast.NeverDep _2 )
-# 20694 "parser_cocci_menhir.ml"
+# 21562 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20720,9 +21588,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_pnrule = 
-# 224 "parser_cocci_menhir.mly"
+# 229 "parser_cocci_menhir.mly"
                    ( _2 )
-# 20726 "parser_cocci_menhir.ml"
+# 21594 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20744,9 +21612,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_postfix_expr_eexpr_dot_expressions_ = 
-# 1250 "parser_cocci_menhir.mly"
+# 1301 "parser_cocci_menhir.mly"
                                                  ( _1 )
-# 20750 "parser_cocci_menhir.ml"
+# 21618 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20782,22 +21650,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 20786 "parser_cocci_menhir.ml"
+# 21654 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr = Obj.magic _3 in
         let _2 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 20792 "parser_cocci_menhir.ml"
+# 21660 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_postfix_expr_eexpr_dot_expressions_ = 
-# 1252 "parser_cocci_menhir.mly"
+# 1303 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.ArrayAccess (_1,P.clt2mcode "[" _2,_3,
                                       P.clt2mcode "]" _4)) )
-# 20801 "parser_cocci_menhir.ml"
+# 21669 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20829,15 +21697,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 20833 "parser_cocci_menhir.ml"
+# 21701 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_postfix_expr_eexpr_dot_expressions_ = 
-# 1255 "parser_cocci_menhir.mly"
+# 1306 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.RecordAccess(_1, P.clt2mcode "." _2, _3)) )
-# 20841 "parser_cocci_menhir.ml"
+# 21709 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20869,16 +21737,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 103 "parser_cocci_menhir.mly"
        (Data.clt)
-# 20873 "parser_cocci_menhir.ml"
+# 21741 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_postfix_expr_eexpr_dot_expressions_ = 
-# 1257 "parser_cocci_menhir.mly"
+# 1308 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.RecordPtAccess(_1, P.clt2mcode "->" _2,
                                     _3)) )
-# 20882 "parser_cocci_menhir.ml"
+# 21750 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20904,15 +21772,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 20908 "parser_cocci_menhir.ml"
+# 21776 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_postfix_expr_eexpr_dot_expressions_ = 
-# 1260 "parser_cocci_menhir.mly"
+# 1311 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Postfix (_1, P.clt2mcode Ast.Inc _2)) )
-# 20916 "parser_cocci_menhir.ml"
+# 21784 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20938,15 +21806,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 20942 "parser_cocci_menhir.ml"
+# 21810 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_postfix_expr_eexpr_dot_expressions_ = 
-# 1262 "parser_cocci_menhir.mly"
+# 1313 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Postfix (_1, P.clt2mcode Ast.Dec _2)) )
-# 20950 "parser_cocci_menhir.ml"
+# 21818 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -20982,23 +21850,23 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 20986 "parser_cocci_menhir.ml"
+# 21854 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr_list_option = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 20992 "parser_cocci_menhir.ml"
+# 21860 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_dot_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_postfix_expr_eexpr_dot_expressions_ = 
-# 1264 "parser_cocci_menhir.mly"
+# 1315 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.FunCall(_1,P.clt2mcode "(" _2,
                              _3,
                              P.clt2mcode ")" _4)) )
-# 21002 "parser_cocci_menhir.ml"
+# 21870 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21020,9 +21888,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_postfix_expr_eexpr_invalid_ = 
-# 1250 "parser_cocci_menhir.mly"
+# 1301 "parser_cocci_menhir.mly"
                                                  ( _1 )
-# 21026 "parser_cocci_menhir.ml"
+# 21894 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21058,22 +21926,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21062 "parser_cocci_menhir.ml"
+# 21930 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr = Obj.magic _3 in
         let _2 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21068 "parser_cocci_menhir.ml"
+# 21936 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_postfix_expr_eexpr_invalid_ = 
-# 1252 "parser_cocci_menhir.mly"
+# 1303 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.ArrayAccess (_1,P.clt2mcode "[" _2,_3,
                                       P.clt2mcode "]" _4)) )
-# 21077 "parser_cocci_menhir.ml"
+# 21945 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21105,15 +21973,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21109 "parser_cocci_menhir.ml"
+# 21977 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_postfix_expr_eexpr_invalid_ = 
-# 1255 "parser_cocci_menhir.mly"
+# 1306 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.RecordAccess(_1, P.clt2mcode "." _2, _3)) )
-# 21117 "parser_cocci_menhir.ml"
+# 21985 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21145,16 +22013,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 103 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21149 "parser_cocci_menhir.ml"
+# 22017 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_postfix_expr_eexpr_invalid_ = 
-# 1257 "parser_cocci_menhir.mly"
+# 1308 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.RecordPtAccess(_1, P.clt2mcode "->" _2,
                                     _3)) )
-# 21158 "parser_cocci_menhir.ml"
+# 22026 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21180,15 +22048,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21184 "parser_cocci_menhir.ml"
+# 22052 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_postfix_expr_eexpr_invalid_ = 
-# 1260 "parser_cocci_menhir.mly"
+# 1311 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Postfix (_1, P.clt2mcode Ast.Inc _2)) )
-# 21192 "parser_cocci_menhir.ml"
+# 22060 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21214,15 +22082,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21218 "parser_cocci_menhir.ml"
+# 22086 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_postfix_expr_eexpr_invalid_ = 
-# 1262 "parser_cocci_menhir.mly"
+# 1313 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Postfix (_1, P.clt2mcode Ast.Dec _2)) )
-# 21226 "parser_cocci_menhir.ml"
+# 22094 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21258,23 +22126,23 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21262 "parser_cocci_menhir.ml"
+# 22130 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr_list_option = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21268 "parser_cocci_menhir.ml"
+# 22136 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_postfix_expr_eexpr_invalid_ = 
-# 1264 "parser_cocci_menhir.mly"
+# 1315 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.FunCall(_1,P.clt2mcode "(" _2,
                              _3,
                              P.clt2mcode ")" _4)) )
-# 21278 "parser_cocci_menhir.ml"
+# 22146 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21296,9 +22164,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_postfix_expr_eexpr_nest_expressions_ = 
-# 1250 "parser_cocci_menhir.mly"
+# 1301 "parser_cocci_menhir.mly"
                                                  ( _1 )
-# 21302 "parser_cocci_menhir.ml"
+# 22170 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21334,22 +22202,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21338 "parser_cocci_menhir.ml"
+# 22206 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr = Obj.magic _3 in
         let _2 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21344 "parser_cocci_menhir.ml"
+# 22212 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_postfix_expr_eexpr_nest_expressions_ = 
-# 1252 "parser_cocci_menhir.mly"
+# 1303 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.ArrayAccess (_1,P.clt2mcode "[" _2,_3,
                                       P.clt2mcode "]" _4)) )
-# 21353 "parser_cocci_menhir.ml"
+# 22221 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21381,15 +22249,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21385 "parser_cocci_menhir.ml"
+# 22253 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_postfix_expr_eexpr_nest_expressions_ = 
-# 1255 "parser_cocci_menhir.mly"
+# 1306 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.RecordAccess(_1, P.clt2mcode "." _2, _3)) )
-# 21393 "parser_cocci_menhir.ml"
+# 22261 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21421,16 +22289,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 103 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21425 "parser_cocci_menhir.ml"
+# 22293 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_postfix_expr_eexpr_nest_expressions_ = 
-# 1257 "parser_cocci_menhir.mly"
+# 1308 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.RecordPtAccess(_1, P.clt2mcode "->" _2,
                                     _3)) )
-# 21434 "parser_cocci_menhir.ml"
+# 22302 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21456,15 +22324,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21460 "parser_cocci_menhir.ml"
+# 22328 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_postfix_expr_eexpr_nest_expressions_ = 
-# 1260 "parser_cocci_menhir.mly"
+# 1311 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Postfix (_1, P.clt2mcode Ast.Inc _2)) )
-# 21468 "parser_cocci_menhir.ml"
+# 22336 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21490,15 +22358,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21494 "parser_cocci_menhir.ml"
+# 22362 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_postfix_expr_eexpr_nest_expressions_ = 
-# 1262 "parser_cocci_menhir.mly"
+# 1313 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Postfix (_1, P.clt2mcode Ast.Dec _2)) )
-# 21502 "parser_cocci_menhir.ml"
+# 22370 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21534,23 +22402,23 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21538 "parser_cocci_menhir.ml"
+# 22406 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr_list_option = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21544 "parser_cocci_menhir.ml"
+# 22412 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_eexpr_nest_expressions_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_postfix_expr_eexpr_nest_expressions_ = 
-# 1264 "parser_cocci_menhir.mly"
+# 1315 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.FunCall(_1,P.clt2mcode "(" _2,
                              _3,
                              P.clt2mcode ")" _4)) )
-# 21554 "parser_cocci_menhir.ml"
+# 22422 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21572,9 +22440,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_postfix_expr_expr_invalid_ = 
-# 1250 "parser_cocci_menhir.mly"
+# 1301 "parser_cocci_menhir.mly"
                                                  ( _1 )
-# 21578 "parser_cocci_menhir.ml"
+# 22446 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21610,22 +22478,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21614 "parser_cocci_menhir.ml"
+# 22482 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr = Obj.magic _3 in
         let _2 : (
 # 101 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21620 "parser_cocci_menhir.ml"
+# 22488 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_postfix_expr_expr_invalid_ = 
-# 1252 "parser_cocci_menhir.mly"
+# 1303 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.ArrayAccess (_1,P.clt2mcode "[" _2,_3,
                                       P.clt2mcode "]" _4)) )
-# 21629 "parser_cocci_menhir.ml"
+# 22497 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21657,15 +22525,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21661 "parser_cocci_menhir.ml"
+# 22529 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_postfix_expr_expr_invalid_ = 
-# 1255 "parser_cocci_menhir.mly"
+# 1306 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.RecordAccess(_1, P.clt2mcode "." _2, _3)) )
-# 21669 "parser_cocci_menhir.ml"
+# 22537 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21697,16 +22565,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 103 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21701 "parser_cocci_menhir.ml"
+# 22569 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_postfix_expr_expr_invalid_ = 
-# 1257 "parser_cocci_menhir.mly"
+# 1308 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.RecordPtAccess(_1, P.clt2mcode "->" _2,
                                     _3)) )
-# 21710 "parser_cocci_menhir.ml"
+# 22578 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21732,15 +22600,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21736 "parser_cocci_menhir.ml"
+# 22604 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_postfix_expr_expr_invalid_ = 
-# 1260 "parser_cocci_menhir.mly"
+# 1311 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Postfix (_1, P.clt2mcode Ast.Inc _2)) )
-# 21744 "parser_cocci_menhir.ml"
+# 22612 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21766,15 +22634,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21770 "parser_cocci_menhir.ml"
+# 22638 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_postfix_expr_expr_invalid_ = 
-# 1262 "parser_cocci_menhir.mly"
+# 1313 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Postfix (_1, P.clt2mcode Ast.Dec _2)) )
-# 21778 "parser_cocci_menhir.ml"
+# 22646 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21810,23 +22678,23 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21814 "parser_cocci_menhir.ml"
+# 22682 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr_list_option = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 21820 "parser_cocci_menhir.ml"
+# 22688 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_postfix_expr_expr_invalid_ = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_postfix_expr_expr_invalid_ = 
-# 1264 "parser_cocci_menhir.mly"
+# 1315 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.FunCall(_1,P.clt2mcode "(" _2,
                              _3,
                              P.clt2mcode ")" _4)) )
-# 21830 "parser_cocci_menhir.ml"
+# 22698 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21848,9 +22716,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1269 "parser_cocci_menhir.mly"
+# 1320 "parser_cocci_menhir.mly"
                 ( Ast0.wrap(Ast0.Ident(_1)) )
-# 21854 "parser_cocci_menhir.ml"
+# 22722 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21871,15 +22739,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 21875 "parser_cocci_menhir.ml"
+# 22743 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1271 "parser_cocci_menhir.mly"
+# 1322 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) )
-# 21883 "parser_cocci_menhir.ml"
+# 22751 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21900,15 +22768,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 21904 "parser_cocci_menhir.ml"
+# 22772 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1274 "parser_cocci_menhir.mly"
+# 1325 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Float x) clt)) )
-# 21912 "parser_cocci_menhir.ml"
+# 22780 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21929,15 +22797,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 21933 "parser_cocci_menhir.ml"
+# 22801 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1277 "parser_cocci_menhir.mly"
+# 1328 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.String x) clt)) )
-# 21941 "parser_cocci_menhir.ml"
+# 22809 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21958,15 +22826,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 21962 "parser_cocci_menhir.ml"
+# 22830 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1280 "parser_cocci_menhir.mly"
+# 1331 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Char x) clt)) )
-# 21970 "parser_cocci_menhir.ml"
+# 22838 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -21987,16 +22855,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 21991 "parser_cocci_menhir.ml"
+# 22859 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1283 "parser_cocci_menhir.mly"
+# 1334 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.CONST,pure)) )
-# 22000 "parser_cocci_menhir.ml"
+# 22868 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22017,15 +22885,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 63 "parser_cocci_menhir.mly"
        (Parse_aux.expinfo)
-# 22021 "parser_cocci_menhir.ml"
+# 22889 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1287 "parser_cocci_menhir.mly"
+# 1338 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,clt) = _1 in
      Ast0.wrap(Ast0.MetaErr(P.clt2mcode nm clt,constraints,pure)) )
-# 22029 "parser_cocci_menhir.ml"
+# 22897 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22046,16 +22914,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22050 "parser_cocci_menhir.ml"
+# 22918 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1290 "parser_cocci_menhir.mly"
+# 1341 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ANY,pure)) )
-# 22059 "parser_cocci_menhir.ml"
+# 22927 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22076,16 +22944,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22080 "parser_cocci_menhir.ml"
+# 22948 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1294 "parser_cocci_menhir.mly"
+# 1345 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ID,pure)) )
-# 22089 "parser_cocci_menhir.ml"
+# 22957 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22106,16 +22974,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22110 "parser_cocci_menhir.ml"
+# 22978 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1298 "parser_cocci_menhir.mly"
+# 1349 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.LocalID,pure)) )
-# 22119 "parser_cocci_menhir.ml"
+# 22987 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22146,21 +23014,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 22150 "parser_cocci_menhir.ml"
+# 23018 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_eexpr = Obj.magic _2 in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 22156 "parser_cocci_menhir.ml"
+# 23024 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1302 "parser_cocci_menhir.mly"
+# 1353 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Paren(P.clt2mcode "(" _1,_2,
                            P.clt2mcode ")" _3)) )
-# 22164 "parser_cocci_menhir.ml"
+# 23032 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22191,23 +23059,23 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 22195 "parser_cocci_menhir.ml"
+# 23063 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_midzero_list_eexpr_eexpr_ = Obj.magic _2 in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 22201 "parser_cocci_menhir.ml"
+# 23069 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1305 "parser_cocci_menhir.mly"
+# 1356 "parser_cocci_menhir.mly"
      ( let (mids,code) = _2 in
        Ast0.wrap(Ast0.DisjExpr(P.clt2mcode "(" _1,
                               code, mids,
                               P.clt2mcode ")" _3)) )
-# 22211 "parser_cocci_menhir.ml"
+# 23079 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22229,9 +23097,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_dot_expressions_ = 
-# 1309 "parser_cocci_menhir.mly"
+# 1360 "parser_cocci_menhir.mly"
                  ( _1 )
-# 22235 "parser_cocci_menhir.ml"
+# 23103 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22253,9 +23121,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1269 "parser_cocci_menhir.mly"
+# 1320 "parser_cocci_menhir.mly"
                 ( Ast0.wrap(Ast0.Ident(_1)) )
-# 22259 "parser_cocci_menhir.ml"
+# 23127 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22276,15 +23144,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 22280 "parser_cocci_menhir.ml"
+# 23148 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1271 "parser_cocci_menhir.mly"
+# 1322 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) )
-# 22288 "parser_cocci_menhir.ml"
+# 23156 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22305,15 +23173,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 22309 "parser_cocci_menhir.ml"
+# 23177 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1274 "parser_cocci_menhir.mly"
+# 1325 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Float x) clt)) )
-# 22317 "parser_cocci_menhir.ml"
+# 23185 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22334,15 +23202,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 22338 "parser_cocci_menhir.ml"
+# 23206 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1277 "parser_cocci_menhir.mly"
+# 1328 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.String x) clt)) )
-# 22346 "parser_cocci_menhir.ml"
+# 23214 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22363,15 +23231,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 22367 "parser_cocci_menhir.ml"
+# 23235 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1280 "parser_cocci_menhir.mly"
+# 1331 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Char x) clt)) )
-# 22375 "parser_cocci_menhir.ml"
+# 23243 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22392,16 +23260,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22396 "parser_cocci_menhir.ml"
+# 23264 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1283 "parser_cocci_menhir.mly"
+# 1334 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.CONST,pure)) )
-# 22405 "parser_cocci_menhir.ml"
+# 23273 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22422,15 +23290,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 63 "parser_cocci_menhir.mly"
        (Parse_aux.expinfo)
-# 22426 "parser_cocci_menhir.ml"
+# 23294 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1287 "parser_cocci_menhir.mly"
+# 1338 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,clt) = _1 in
      Ast0.wrap(Ast0.MetaErr(P.clt2mcode nm clt,constraints,pure)) )
-# 22434 "parser_cocci_menhir.ml"
+# 23302 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22451,16 +23319,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22455 "parser_cocci_menhir.ml"
+# 23323 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1290 "parser_cocci_menhir.mly"
+# 1341 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ANY,pure)) )
-# 22464 "parser_cocci_menhir.ml"
+# 23332 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22481,16 +23349,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22485 "parser_cocci_menhir.ml"
+# 23353 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1294 "parser_cocci_menhir.mly"
+# 1345 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ID,pure)) )
-# 22494 "parser_cocci_menhir.ml"
+# 23362 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22511,16 +23379,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22515 "parser_cocci_menhir.ml"
+# 23383 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1298 "parser_cocci_menhir.mly"
+# 1349 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.LocalID,pure)) )
-# 22524 "parser_cocci_menhir.ml"
+# 23392 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22551,21 +23419,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 22555 "parser_cocci_menhir.ml"
+# 23423 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_eexpr = Obj.magic _2 in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 22561 "parser_cocci_menhir.ml"
+# 23429 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1302 "parser_cocci_menhir.mly"
+# 1353 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Paren(P.clt2mcode "(" _1,_2,
                            P.clt2mcode ")" _3)) )
-# 22569 "parser_cocci_menhir.ml"
+# 23437 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22596,23 +23464,23 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 22600 "parser_cocci_menhir.ml"
+# 23468 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_midzero_list_eexpr_eexpr_ = Obj.magic _2 in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 22606 "parser_cocci_menhir.ml"
+# 23474 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1305 "parser_cocci_menhir.mly"
+# 1356 "parser_cocci_menhir.mly"
      ( let (mids,code) = _2 in
        Ast0.wrap(Ast0.DisjExpr(P.clt2mcode "(" _1,
                               code, mids,
                               P.clt2mcode ")" _3)) )
-# 22616 "parser_cocci_menhir.ml"
+# 23484 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22634,9 +23502,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_invalid_ = 
-# 1309 "parser_cocci_menhir.mly"
+# 1360 "parser_cocci_menhir.mly"
                  ( _1 )
-# 22640 "parser_cocci_menhir.ml"
+# 23508 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22658,9 +23526,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1269 "parser_cocci_menhir.mly"
+# 1320 "parser_cocci_menhir.mly"
                 ( Ast0.wrap(Ast0.Ident(_1)) )
-# 22664 "parser_cocci_menhir.ml"
+# 23532 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22681,15 +23549,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 22685 "parser_cocci_menhir.ml"
+# 23553 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1271 "parser_cocci_menhir.mly"
+# 1322 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) )
-# 22693 "parser_cocci_menhir.ml"
+# 23561 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22710,15 +23578,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 22714 "parser_cocci_menhir.ml"
+# 23582 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1274 "parser_cocci_menhir.mly"
+# 1325 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Float x) clt)) )
-# 22722 "parser_cocci_menhir.ml"
+# 23590 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22739,15 +23607,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 22743 "parser_cocci_menhir.ml"
+# 23611 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1277 "parser_cocci_menhir.mly"
+# 1328 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.String x) clt)) )
-# 22751 "parser_cocci_menhir.ml"
+# 23619 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22768,15 +23636,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 22772 "parser_cocci_menhir.ml"
+# 23640 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1280 "parser_cocci_menhir.mly"
+# 1331 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Char x) clt)) )
-# 22780 "parser_cocci_menhir.ml"
+# 23648 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22797,16 +23665,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22801 "parser_cocci_menhir.ml"
+# 23669 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1283 "parser_cocci_menhir.mly"
+# 1334 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.CONST,pure)) )
-# 22810 "parser_cocci_menhir.ml"
+# 23678 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22827,15 +23695,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 63 "parser_cocci_menhir.mly"
        (Parse_aux.expinfo)
-# 22831 "parser_cocci_menhir.ml"
+# 23699 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1287 "parser_cocci_menhir.mly"
+# 1338 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,clt) = _1 in
      Ast0.wrap(Ast0.MetaErr(P.clt2mcode nm clt,constraints,pure)) )
-# 22839 "parser_cocci_menhir.ml"
+# 23707 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22856,16 +23724,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22860 "parser_cocci_menhir.ml"
+# 23728 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1290 "parser_cocci_menhir.mly"
+# 1341 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ANY,pure)) )
-# 22869 "parser_cocci_menhir.ml"
+# 23737 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22886,16 +23754,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22890 "parser_cocci_menhir.ml"
+# 23758 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1294 "parser_cocci_menhir.mly"
+# 1345 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ID,pure)) )
-# 22899 "parser_cocci_menhir.ml"
+# 23767 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22916,16 +23784,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 22920 "parser_cocci_menhir.ml"
+# 23788 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1298 "parser_cocci_menhir.mly"
+# 1349 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.LocalID,pure)) )
-# 22929 "parser_cocci_menhir.ml"
+# 23797 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -22956,21 +23824,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 22960 "parser_cocci_menhir.ml"
+# 23828 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_eexpr = Obj.magic _2 in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 22966 "parser_cocci_menhir.ml"
+# 23834 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1302 "parser_cocci_menhir.mly"
+# 1353 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Paren(P.clt2mcode "(" _1,_2,
                            P.clt2mcode ")" _3)) )
-# 22974 "parser_cocci_menhir.ml"
+# 23842 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23001,23 +23869,23 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23005 "parser_cocci_menhir.ml"
+# 23873 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_midzero_list_eexpr_eexpr_ = Obj.magic _2 in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23011 "parser_cocci_menhir.ml"
+# 23879 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1305 "parser_cocci_menhir.mly"
+# 1356 "parser_cocci_menhir.mly"
      ( let (mids,code) = _2 in
        Ast0.wrap(Ast0.DisjExpr(P.clt2mcode "(" _1,
                               code, mids,
                               P.clt2mcode ")" _3)) )
-# 23021 "parser_cocci_menhir.ml"
+# 23889 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23039,9 +23907,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_eexpr_nest_expressions_ = 
-# 1309 "parser_cocci_menhir.mly"
+# 1360 "parser_cocci_menhir.mly"
                  ( _1 )
-# 23045 "parser_cocci_menhir.ml"
+# 23913 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23063,9 +23931,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1269 "parser_cocci_menhir.mly"
+# 1320 "parser_cocci_menhir.mly"
                 ( Ast0.wrap(Ast0.Ident(_1)) )
-# 23069 "parser_cocci_menhir.ml"
+# 23937 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23086,15 +23954,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 23090 "parser_cocci_menhir.ml"
+# 23958 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1271 "parser_cocci_menhir.mly"
+# 1322 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Int x) clt)) )
-# 23098 "parser_cocci_menhir.ml"
+# 23966 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23115,15 +23983,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 23119 "parser_cocci_menhir.ml"
+# 23987 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1274 "parser_cocci_menhir.mly"
+# 1325 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Float x) clt)) )
-# 23127 "parser_cocci_menhir.ml"
+# 23995 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23144,15 +24012,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 23148 "parser_cocci_menhir.ml"
+# 24016 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1277 "parser_cocci_menhir.mly"
+# 1328 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.String x) clt)) )
-# 23156 "parser_cocci_menhir.ml"
+# 24024 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23173,15 +24041,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 23177 "parser_cocci_menhir.ml"
+# 24045 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1280 "parser_cocci_menhir.mly"
+# 1331 "parser_cocci_menhir.mly"
      ( let (x,clt) = _1 in
      Ast0.wrap(Ast0.Constant (P.clt2mcode (Ast.Char x) clt)) )
-# 23185 "parser_cocci_menhir.ml"
+# 24053 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23202,16 +24070,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 23206 "parser_cocci_menhir.ml"
+# 24074 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1283 "parser_cocci_menhir.mly"
+# 1334 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.CONST,pure)) )
-# 23215 "parser_cocci_menhir.ml"
+# 24083 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23232,15 +24100,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 63 "parser_cocci_menhir.mly"
        (Parse_aux.expinfo)
-# 23236 "parser_cocci_menhir.ml"
+# 24104 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1287 "parser_cocci_menhir.mly"
+# 1338 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,clt) = _1 in
      Ast0.wrap(Ast0.MetaErr(P.clt2mcode nm clt,constraints,pure)) )
-# 23244 "parser_cocci_menhir.ml"
+# 24112 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23261,16 +24129,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 23265 "parser_cocci_menhir.ml"
+# 24133 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1290 "parser_cocci_menhir.mly"
+# 1341 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ANY,pure)) )
-# 23274 "parser_cocci_menhir.ml"
+# 24142 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23291,16 +24159,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 23295 "parser_cocci_menhir.ml"
+# 24163 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1294 "parser_cocci_menhir.mly"
+# 1345 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.ID,pure)) )
-# 23304 "parser_cocci_menhir.ml"
+# 24172 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23321,16 +24189,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 66 "parser_cocci_menhir.mly"
        (Parse_aux.typed_info)
-# 23325 "parser_cocci_menhir.ml"
+# 24193 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1298 "parser_cocci_menhir.mly"
+# 1349 "parser_cocci_menhir.mly"
      ( let (nm,constraints,pure,ty,clt) = _1 in
      Ast0.wrap
        (Ast0.MetaExpr(P.clt2mcode nm clt,constraints,ty,Ast.LocalID,pure)) )
-# 23334 "parser_cocci_menhir.ml"
+# 24202 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23361,21 +24229,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23365 "parser_cocci_menhir.ml"
+# 24233 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_eexpr = Obj.magic _2 in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23371 "parser_cocci_menhir.ml"
+# 24239 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1302 "parser_cocci_menhir.mly"
+# 1353 "parser_cocci_menhir.mly"
      ( Ast0.wrap(Ast0.Paren(P.clt2mcode "(" _1,_2,
                            P.clt2mcode ")" _3)) )
-# 23379 "parser_cocci_menhir.ml"
+# 24247 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23406,23 +24274,23 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23410 "parser_cocci_menhir.ml"
+# 24278 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_midzero_list_expr_eexpr_ = Obj.magic _2 in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23416 "parser_cocci_menhir.ml"
+# 24284 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1305 "parser_cocci_menhir.mly"
+# 1356 "parser_cocci_menhir.mly"
      ( let (mids,code) = _2 in
        Ast0.wrap(Ast0.DisjExpr(P.clt2mcode "(" _1,
                               code, mids,
                               P.clt2mcode ")" _3)) )
-# 23426 "parser_cocci_menhir.ml"
+# 24294 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23444,9 +24312,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_primary_expr_expr_invalid_ = 
-# 1309 "parser_cocci_menhir.mly"
+# 1360 "parser_cocci_menhir.mly"
                  ( _1 )
-# 23450 "parser_cocci_menhir.ml"
+# 24318 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23468,7 +24336,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_pure = 
 # 189 "parser_cocci_menhir.mly"
                  ( Ast0.Pure )
-# 23472 "parser_cocci_menhir.ml"
+# 24340 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23490,7 +24358,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_pure = 
 # 190 "parser_cocci_menhir.mly"
                  ( Ast0.Context )
-# 23494 "parser_cocci_menhir.ml"
+# 24362 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23516,7 +24384,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_pure = 
 # 191 "parser_cocci_menhir.mly"
                  ( Ast0.PureContext )
-# 23520 "parser_cocci_menhir.ml"
+# 24388 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23542,7 +24410,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_pure = 
 # 192 "parser_cocci_menhir.mly"
                  ( Ast0.PureContext )
-# 23546 "parser_cocci_menhir.ml"
+# 24414 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23559,7 +24427,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_pure = 
 # 193 "parser_cocci_menhir.mly"
                  ( Ast0.Impure )
-# 23563 "parser_cocci_menhir.ml"
+# 24431 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23580,14 +24448,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 59 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 23584 "parser_cocci_menhir.ml"
+# 24452 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_pure_ident = 
-# 1323 "parser_cocci_menhir.mly"
+# 1374 "parser_cocci_menhir.mly"
             ( _1 )
-# 23591 "parser_cocci_menhir.ml"
+# 24459 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23609,9 +24477,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_pure_ident_or_meta_ident = 
-# 1329 "parser_cocci_menhir.mly"
+# 1380 "parser_cocci_menhir.mly"
                                  ( (None,P.id2name _1) )
-# 23615 "parser_cocci_menhir.ml"
+# 24483 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23633,9 +24501,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_pure_ident_or_meta_ident = 
-# 1330 "parser_cocci_menhir.mly"
+# 1381 "parser_cocci_menhir.mly"
                                  ( _1 )
-# 23639 "parser_cocci_menhir.ml"
+# 24507 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23655,9 +24523,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_pure_ident_or_meta_ident = 
-# 1331 "parser_cocci_menhir.mly"
+# 1382 "parser_cocci_menhir.mly"
                                  ( (None,"list") )
-# 23661 "parser_cocci_menhir.ml"
+# 24529 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23677,9 +24545,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_pure_ident_or_meta_ident = 
-# 1332 "parser_cocci_menhir.mly"
+# 1383 "parser_cocci_menhir.mly"
                                  ( (None,"error") )
-# 23683 "parser_cocci_menhir.ml"
+# 24551 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23699,9 +24567,31 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_pure_ident_or_meta_ident = 
-# 1333 "parser_cocci_menhir.mly"
+# 1384 "parser_cocci_menhir.mly"
                                  ( (None,"type") )
-# 23705 "parser_cocci_menhir.ml"
+# 24573 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.startp = _startpos__1_;
+          MenhirLib.EngineTypes.endp = _endpos__1_;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          } = _menhir_stack in
+        let _startpos = _startpos__1_ in
+        let _endpos = _endpos__1_ in
+        let _v : 'tv_pure_ident_or_meta_ident = 
+# 1385 "parser_cocci_menhir.mly"
+                                 ( (None,"name") )
+# 24595 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23729,9 +24619,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_i_ in
         let _endpos = _endpos_l_ in
         let _v : 'tv_pure_ident_or_meta_ident_with_not_eq_not_ceq_ = 
-# 1336 "parser_cocci_menhir.mly"
+# 1388 "parser_cocci_menhir.mly"
                                                     ( (i,l) )
-# 23735 "parser_cocci_menhir.ml"
+# 24625 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23759,9 +24649,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_i_ in
         let _endpos = _endpos_l_ in
         let _v : 'tv_pure_ident_or_meta_ident_with_not_eq_not_eq_ = 
-# 1336 "parser_cocci_menhir.mly"
+# 1388 "parser_cocci_menhir.mly"
                                                     ( (i,l) )
-# 23765 "parser_cocci_menhir.ml"
+# 24655 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23789,9 +24679,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_i_ in
         let _endpos = _endpos_l_ in
         let _v : 'tv_pure_ident_or_meta_ident_with_not_eq_not_eqe_ = 
-# 1336 "parser_cocci_menhir.mly"
+# 1388 "parser_cocci_menhir.mly"
                                                     ( (i,l) )
-# 23795 "parser_cocci_menhir.ml"
+# 24685 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23819,9 +24709,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_i_ in
         let _endpos = _endpos_l_ in
         let _v : 'tv_pure_ident_or_meta_ident_with_not_eq_not_pos_ = 
-# 1336 "parser_cocci_menhir.mly"
+# 1388 "parser_cocci_menhir.mly"
                                                     ( (i,l) )
-# 23825 "parser_cocci_menhir.ml"
+# 24715 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23838,11 +24728,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 130 "parser_cocci_menhir.mly"
       (unit)
-# 23842 "parser_cocci_menhir.ml"
+# 24732 "parser_cocci_menhir.ml"
         ) = 
 # 171 "parser_cocci_menhir.mly"
         ( )
-# 23846 "parser_cocci_menhir.ml"
+# 24736 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23864,9 +24754,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_rule_elem_statement = 
-# 849 "parser_cocci_menhir.mly"
+# 900 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.Decl((Ast0.default_info(),Ast0.context_befaft()),_1)) )
-# 23870 "parser_cocci_menhir.ml"
+# 24760 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23892,15 +24782,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23896 "parser_cocci_menhir.ml"
+# 24786 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_expr = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_rule_elem_statement = 
-# 850 "parser_cocci_menhir.mly"
+# 901 "parser_cocci_menhir.mly"
                ( P.exp_stm _1 _2 )
-# 23904 "parser_cocci_menhir.ml"
+# 24794 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23931,20 +24821,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23935 "parser_cocci_menhir.ml"
+# 24825 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_eexpr = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23941 "parser_cocci_menhir.ml"
+# 24831 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_rule_elem_statement = 
-# 851 "parser_cocci_menhir.mly"
+# 902 "parser_cocci_menhir.mly"
                         ( P.ret_exp _1 _2 _3 )
-# 23948 "parser_cocci_menhir.ml"
+# 24838 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -23970,19 +24860,19 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23974 "parser_cocci_menhir.ml"
+# 24864 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 23979 "parser_cocci_menhir.ml"
+# 24869 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_rule_elem_statement = 
-# 852 "parser_cocci_menhir.mly"
+# 903 "parser_cocci_menhir.mly"
                   ( P.ret _1 _2 )
-# 23986 "parser_cocci_menhir.ml"
+# 24876 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24008,19 +24898,19 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 24012 "parser_cocci_menhir.ml"
+# 24902 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 24017 "parser_cocci_menhir.ml"
+# 24907 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_rule_elem_statement = 
-# 853 "parser_cocci_menhir.mly"
+# 904 "parser_cocci_menhir.mly"
                  ( P.break _1 _2 )
-# 24024 "parser_cocci_menhir.ml"
+# 24914 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24046,19 +24936,19 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 24050 "parser_cocci_menhir.ml"
+# 24940 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 24055 "parser_cocci_menhir.ml"
+# 24945 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_rule_elem_statement = 
-# 854 "parser_cocci_menhir.mly"
+# 905 "parser_cocci_menhir.mly"
                     ( P.cont _1 _2 )
-# 24062 "parser_cocci_menhir.ml"
+# 24952 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24089,24 +24979,24 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 24093 "parser_cocci_menhir.ml"
+# 24983 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_midzero_list_rule_elem_statement_rule_elem_statement_ = Obj.magic _2 in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 24099 "parser_cocci_menhir.ml"
+# 24989 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_rule_elem_statement = 
-# 856 "parser_cocci_menhir.mly"
+# 907 "parser_cocci_menhir.mly"
     ( let (mids,code) = _2 in
     Ast0.wrap
       (Ast0.Disj(P.clt2mcode "(" _1,
                 List.map (function x -> Ast0.wrap(Ast0.DOTS([x]))) code,
                 mids, P.clt2mcode ")" _3)) )
-# 24110 "parser_cocci_menhir.ml"
+# 25000 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24162,18 +25052,92 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 152 "parser_cocci_menhir.mly"
       (Ast_cocci.rulename)
-# 24166 "parser_cocci_menhir.ml"
+# 25056 "parser_cocci_menhir.ml"
+        ) = let nm =
+          
+# 39 "standard.mly"
+    ( None )
+# 25061 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 201 "parser_cocci_menhir.mly"
+      ( P.make_cocci_rule_name_result nm d i a e ee )
+# 25067 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.startp = _startpos__8_;
+          MenhirLib.EngineTypes.endp = _endpos__8_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.semv = ee;
+            MenhirLib.EngineTypes.startp = _startpos_ee_;
+            MenhirLib.EngineTypes.endp = _endpos_ee_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.semv = e;
+              MenhirLib.EngineTypes.startp = _startpos_e_;
+              MenhirLib.EngineTypes.endp = _endpos_e_;
+              MenhirLib.EngineTypes.next = {
+                MenhirLib.EngineTypes.semv = a;
+                MenhirLib.EngineTypes.startp = _startpos_a_;
+                MenhirLib.EngineTypes.endp = _endpos_a_;
+                MenhirLib.EngineTypes.next = {
+                  MenhirLib.EngineTypes.semv = i;
+                  MenhirLib.EngineTypes.startp = _startpos_i_;
+                  MenhirLib.EngineTypes.endp = _endpos_i_;
+                  MenhirLib.EngineTypes.next = {
+                    MenhirLib.EngineTypes.semv = d;
+                    MenhirLib.EngineTypes.startp = _startpos_d_;
+                    MenhirLib.EngineTypes.endp = _endpos_d_;
+                    MenhirLib.EngineTypes.next = {
+                      MenhirLib.EngineTypes.startp = _startpos__2_;
+                      MenhirLib.EngineTypes.endp = _endpos__2_;
+                      MenhirLib.EngineTypes.next = {
+                        MenhirLib.EngineTypes.state = _menhir_s;
+                        MenhirLib.EngineTypes.semv = x0;
+                        MenhirLib.EngineTypes.startp = _startpos_x0_;
+                        MenhirLib.EngineTypes.endp = _endpos_x0_;
+                        MenhirLib.EngineTypes.next = _menhir_stack;
+                        };
+                      };
+                    };
+                  };
+                };
+              };
+            };
+          } = _menhir_stack in
+        let ee : 'tv_is_expression = Obj.magic ee in
+        let e : 'tv_exists = Obj.magic e in
+        let a : 'tv_loption_disable_ = Obj.magic a in
+        let i : 'tv_loption_choose_iso_ = Obj.magic i in
+        let d : 'tv_depends = Obj.magic d in
+        let x0 : 'tv_pure_ident = Obj.magic x0 in
+        let _startpos = _startpos_x0_ in
+        let _endpos = _endpos__8_ in
+        let _v : (
+# 152 "parser_cocci_menhir.mly"
+      (Ast_cocci.rulename)
+# 25129 "parser_cocci_menhir.ml"
         ) = let nm =
+          let x = x0 in
           
-# 39 "standard.mly"
-    ( None )
-# 24171 "parser_cocci_menhir.ml"
+# 41 "standard.mly"
+    ( Some x )
+# 25135 "parser_cocci_menhir.ml"
           
         in
         
 # 201 "parser_cocci_menhir.mly"
       ( P.make_cocci_rule_name_result nm d i a e ee )
-# 24177 "parser_cocci_menhir.ml"
+# 25141 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24212,9 +25176,8 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
                       MenhirLib.EngineTypes.endp = _endpos__2_;
                       MenhirLib.EngineTypes.next = {
                         MenhirLib.EngineTypes.state = _menhir_s;
-                        MenhirLib.EngineTypes.semv = x0;
-                        MenhirLib.EngineTypes.startp = _startpos_x0_;
-                        MenhirLib.EngineTypes.endp = _endpos_x0_;
+                        MenhirLib.EngineTypes.startp = _startpos__1_;
+                        MenhirLib.EngineTypes.endp = _endpos__1_;
                         MenhirLib.EngineTypes.next = _menhir_stack;
                         };
                       };
@@ -24229,25 +25192,16 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let a : 'tv_loption_disable_ = Obj.magic a in
         let i : 'tv_loption_choose_iso_ = Obj.magic i in
         let d : 'tv_depends = Obj.magic d in
-        let x0 : 'tv_pure_ident = Obj.magic x0 in
-        let _startpos = _startpos_x0_ in
+        let _startpos = _startpos__1_ in
         let _endpos = _endpos__8_ in
         let _v : (
 # 152 "parser_cocci_menhir.mly"
       (Ast_cocci.rulename)
-# 24239 "parser_cocci_menhir.ml"
-        ) = let nm =
-          let x = x0 in
-          
-# 41 "standard.mly"
-    ( Some x )
-# 24245 "parser_cocci_menhir.ml"
-          
-        in
-        
-# 201 "parser_cocci_menhir.mly"
-      ( P.make_cocci_rule_name_result nm d i a e ee )
-# 24251 "parser_cocci_menhir.ml"
+# 25201 "parser_cocci_menhir.ml"
+        ) = 
+# 206 "parser_cocci_menhir.mly"
+      ( P.make_generated_rule_name_result None d i a e ee )
+# 25205 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24289,11 +25243,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 152 "parser_cocci_menhir.mly"
       (Ast_cocci.rulename)
-# 24293 "parser_cocci_menhir.ml"
+# 25247 "parser_cocci_menhir.ml"
         ) = 
-# 203 "parser_cocci_menhir.mly"
+# 208 "parser_cocci_menhir.mly"
       ( P.make_script_rule_name_result lang d )
-# 24297 "parser_cocci_menhir.ml"
+# 25251 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24337,7 +25291,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 47 "parser_cocci_menhir.mly"
       (string)
-# 24341 "parser_cocci_menhir.ml"
+# 25295 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let py : 'tv_pure_ident = Obj.magic py in
         let _startpos = _startpos_py_ in
@@ -24345,11 +25299,11 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : (
 # 158 "parser_cocci_menhir.mly"
        (string * (string * string))
-# 24349 "parser_cocci_menhir.ml"
+# 25303 "parser_cocci_menhir.ml"
         ) = 
-# 1770 "parser_cocci_menhir.mly"
+# 1847 "parser_cocci_menhir.mly"
   ( (P.id2name py, (_3, P.id2name cocci)) )
-# 24353 "parser_cocci_menhir.ml"
+# 25307 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24370,14 +25324,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let x : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 24374 "parser_cocci_menhir.ml"
+# 25328 "parser_cocci_menhir.ml"
         ) = Obj.magic x in
         let _startpos = _startpos_x_ in
         let _endpos = _endpos_x_ in
         let _v : 'tv_separated_nonempty_list_TComma_TString_ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24381 "parser_cocci_menhir.ml"
+# 25335 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24408,14 +25362,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let x : (
 # 86 "parser_cocci_menhir.mly"
        (string * Data.clt)
-# 24412 "parser_cocci_menhir.ml"
+# 25366 "parser_cocci_menhir.ml"
         ) = Obj.magic x in
         let _startpos = _startpos_x_ in
         let _endpos = _endpos_xs_ in
         let _v : 'tv_separated_nonempty_list_TComma_TString_ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24419 "parser_cocci_menhir.ml"
+# 25373 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24439,7 +25393,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_any_strict_ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24443 "parser_cocci_menhir.ml"
+# 25397 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24473,7 +25427,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_any_strict_ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24477 "parser_cocci_menhir.ml"
+# 25431 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24497,7 +25451,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_ctype_ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24501 "parser_cocci_menhir.ml"
+# 25455 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24531,7 +25485,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_ctype_ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24535 "parser_cocci_menhir.ml"
+# 25489 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24555,7 +25509,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_d_ident_ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24559 "parser_cocci_menhir.ml"
+# 25513 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24589,7 +25543,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_d_ident_ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24593 "parser_cocci_menhir.ml"
+# 25547 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24613,7 +25567,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_dexpr_ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24617 "parser_cocci_menhir.ml"
+# 25571 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24647,7 +25601,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_dexpr_ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24651 "parser_cocci_menhir.ml"
+# 25605 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24671,7 +25625,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_ident_or_const_ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24675 "parser_cocci_menhir.ml"
+# 25629 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24705,7 +25659,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_ident_or_const_ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24709 "parser_cocci_menhir.ml"
+# 25663 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24729,7 +25683,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_meta_ident_ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24733 "parser_cocci_menhir.ml"
+# 25687 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24763,7 +25717,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_meta_ident_ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24767 "parser_cocci_menhir.ml"
+# 25721 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24787,7 +25741,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24791 "parser_cocci_menhir.ml"
+# 25745 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24821,7 +25775,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24825 "parser_cocci_menhir.ml"
+# 25779 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24845,7 +25799,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_or_meta_ident_ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24849 "parser_cocci_menhir.ml"
+# 25803 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24879,7 +25833,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_or_meta_ident_ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24883 "parser_cocci_menhir.ml"
+# 25837 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24903,7 +25857,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_or_meta_ident_with_not_eq_not_ceq__ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24907 "parser_cocci_menhir.ml"
+# 25861 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24937,7 +25891,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_or_meta_ident_with_not_eq_not_ceq__ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24941 "parser_cocci_menhir.ml"
+# 25895 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24961,7 +25915,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_or_meta_ident_with_not_eq_not_eq__ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 24965 "parser_cocci_menhir.ml"
+# 25919 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -24995,7 +25949,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_or_meta_ident_with_not_eq_not_eq__ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 24999 "parser_cocci_menhir.ml"
+# 25953 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25019,7 +25973,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_or_meta_ident_with_not_eq_not_eqe__ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 25023 "parser_cocci_menhir.ml"
+# 25977 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25053,7 +26007,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_or_meta_ident_with_not_eq_not_eqe__ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 25057 "parser_cocci_menhir.ml"
+# 26011 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25077,7 +26031,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_or_meta_ident_with_not_eq_not_pos__ = 
 # 144 "standard.mly"
     ( [ x ] )
-# 25081 "parser_cocci_menhir.ml"
+# 26035 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25111,7 +26065,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _v : 'tv_separated_nonempty_list_TComma_pure_ident_or_meta_ident_with_not_eq_not_pos__ = 
 # 146 "standard.mly"
     ( x :: xs )
-# 25115 "parser_cocci_menhir.ml"
+# 26069 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25133,9 +26087,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_single_statement = 
-# 864 "parser_cocci_menhir.mly"
+# 915 "parser_cocci_menhir.mly"
                                       ( _1 )
-# 25139 "parser_cocci_menhir.ml"
+# 26093 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25166,24 +26120,24 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25170 "parser_cocci_menhir.ml"
+# 26124 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_midzero_list_statement_statement_ = Obj.magic _2 in
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25176 "parser_cocci_menhir.ml"
+# 26130 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_single_statement = 
-# 868 "parser_cocci_menhir.mly"
+# 919 "parser_cocci_menhir.mly"
       ( let (mids,code) = _2 in
         Ast0.wrap
          (Ast0.Disj(P.clt2mcode "(" _1,
                     List.map (function x -> Ast0.wrap(Ast0.DOTS([x]))) code,
                     mids, P.clt2mcode ")" _3)) )
-# 25187 "parser_cocci_menhir.ml"
+# 26141 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25205,9 +26159,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_statement = 
-# 803 "parser_cocci_menhir.mly"
+# 842 "parser_cocci_menhir.mly"
            ( _1 )
-# 25211 "parser_cocci_menhir.ml"
+# 26165 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25228,14 +26182,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 25232 "parser_cocci_menhir.ml"
+# 26186 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_statement = 
-# 805 "parser_cocci_menhir.mly"
+# 844 "parser_cocci_menhir.mly"
     ( P.meta_stm _1 )
-# 25239 "parser_cocci_menhir.ml"
+# 26193 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25261,15 +26215,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25265 "parser_cocci_menhir.ml"
+# 26219 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_expr = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_statement = 
-# 807 "parser_cocci_menhir.mly"
+# 846 "parser_cocci_menhir.mly"
     ( P.exp_stm _1 _2 )
-# 25273 "parser_cocci_menhir.ml"
+# 26227 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25311,25 +26265,25 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25315 "parser_cocci_menhir.ml"
+# 26269 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25321 "parser_cocci_menhir.ml"
+# 26275 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25326 "parser_cocci_menhir.ml"
+# 26280 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__5_ in
         let _v : 'tv_statement = 
-# 809 "parser_cocci_menhir.mly"
+# 848 "parser_cocci_menhir.mly"
     ( P.ifthen _1 _2 _3 _4 _5 )
-# 25333 "parser_cocci_menhir.ml"
+# 26287 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25381,31 +26335,31 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _6 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25385 "parser_cocci_menhir.ml"
+# 26339 "parser_cocci_menhir.ml"
         ) = Obj.magic _6 in
         let _5 : 'tv_single_statement = Obj.magic _5 in
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25391 "parser_cocci_menhir.ml"
+# 26345 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25397 "parser_cocci_menhir.ml"
+# 26351 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25402 "parser_cocci_menhir.ml"
+# 26356 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__7_ in
         let _v : 'tv_statement = 
-# 811 "parser_cocci_menhir.mly"
+# 850 "parser_cocci_menhir.mly"
     ( P.ifthenelse _1 _2 _3 _4 _5 _6 _7 )
-# 25409 "parser_cocci_menhir.ml"
+# 26363 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25467,37 +26421,37 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _8 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25471 "parser_cocci_menhir.ml"
+# 26425 "parser_cocci_menhir.ml"
         ) = Obj.magic _8 in
         let _7 : 'tv_option_eexpr_ = Obj.magic _7 in
         let _6 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25477 "parser_cocci_menhir.ml"
+# 26431 "parser_cocci_menhir.ml"
         ) = Obj.magic _6 in
         let _5 : 'tv_option_eexpr_ = Obj.magic _5 in
         let _4 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25483 "parser_cocci_menhir.ml"
+# 26437 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_option_eexpr_ = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25489 "parser_cocci_menhir.ml"
+# 26443 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25494 "parser_cocci_menhir.ml"
+# 26448 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__9_ in
         let _v : 'tv_statement = 
-# 814 "parser_cocci_menhir.mly"
+# 853 "parser_cocci_menhir.mly"
     ( P.forloop _1 _2 _3 _4 _5 _6 _7 _8 _9 )
-# 25501 "parser_cocci_menhir.ml"
+# 26455 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25539,25 +26493,25 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25543 "parser_cocci_menhir.ml"
+# 26497 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25549 "parser_cocci_menhir.ml"
+# 26503 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25554 "parser_cocci_menhir.ml"
+# 26508 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__5_ in
         let _v : 'tv_statement = 
-# 816 "parser_cocci_menhir.mly"
+# 855 "parser_cocci_menhir.mly"
     ( P.whileloop _1 _2 _3 _4 _5 )
-# 25561 "parser_cocci_menhir.ml"
+# 26515 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25608,36 +26562,36 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _7 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25612 "parser_cocci_menhir.ml"
+# 26566 "parser_cocci_menhir.ml"
         ) = Obj.magic _7 in
         let _6 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25617 "parser_cocci_menhir.ml"
+# 26571 "parser_cocci_menhir.ml"
         ) = Obj.magic _6 in
         let _5 : 'tv_eexpr = Obj.magic _5 in
         let _4 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25623 "parser_cocci_menhir.ml"
+# 26577 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25628 "parser_cocci_menhir.ml"
+# 26582 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_single_statement = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25634 "parser_cocci_menhir.ml"
+# 26588 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__7_ in
         let _v : 'tv_statement = 
-# 818 "parser_cocci_menhir.mly"
+# 857 "parser_cocci_menhir.mly"
     ( P.doloop _1 _2 _3 _4 _5 _6 _7 )
-# 25641 "parser_cocci_menhir.ml"
+# 26595 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25679,21 +26633,21 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25683 "parser_cocci_menhir.ml"
+# 26637 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr_list_option = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25689 "parser_cocci_menhir.ml"
+# 26643 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_iter_ident = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__5_ in
         let _v : 'tv_statement = 
-# 820 "parser_cocci_menhir.mly"
+# 859 "parser_cocci_menhir.mly"
     ( P.iterator _1 _2 _3 _4 _5 )
-# 25697 "parser_cocci_menhir.ml"
+# 26651 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25744,36 +26698,36 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _7 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25748 "parser_cocci_menhir.ml"
+# 26702 "parser_cocci_menhir.ml"
         ) = Obj.magic _7 in
         let _6 : 'tv_list_case_line_ = Obj.magic _6 in
         let _5 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25754 "parser_cocci_menhir.ml"
+# 26708 "parser_cocci_menhir.ml"
         ) = Obj.magic _5 in
         let _4 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25759 "parser_cocci_menhir.ml"
+# 26713 "parser_cocci_menhir.ml"
         ) = Obj.magic _4 in
         let _3 : 'tv_eexpr = Obj.magic _3 in
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25765 "parser_cocci_menhir.ml"
+# 26719 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25770 "parser_cocci_menhir.ml"
+# 26724 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__7_ in
         let _v : 'tv_statement = 
-# 822 "parser_cocci_menhir.mly"
+# 861 "parser_cocci_menhir.mly"
     ( P.switch _1 _2 _3 _4 _5 _6 _7 )
-# 25777 "parser_cocci_menhir.ml"
+# 26731 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25804,20 +26758,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25808 "parser_cocci_menhir.ml"
+# 26762 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_eexpr = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25814 "parser_cocci_menhir.ml"
+# 26768 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_statement = 
-# 823 "parser_cocci_menhir.mly"
+# 862 "parser_cocci_menhir.mly"
                         ( P.ret_exp _1 _2 _3 )
-# 25821 "parser_cocci_menhir.ml"
+# 26775 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25843,19 +26797,19 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25847 "parser_cocci_menhir.ml"
+# 26801 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 57 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25852 "parser_cocci_menhir.ml"
+# 26806 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_statement = 
-# 824 "parser_cocci_menhir.mly"
+# 863 "parser_cocci_menhir.mly"
                   ( P.ret _1 _2 )
-# 25859 "parser_cocci_menhir.ml"
+# 26813 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25881,19 +26835,19 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25885 "parser_cocci_menhir.ml"
+# 26839 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25890 "parser_cocci_menhir.ml"
+# 26844 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_statement = 
-# 825 "parser_cocci_menhir.mly"
+# 864 "parser_cocci_menhir.mly"
                  ( P.break _1 _2 )
-# 25897 "parser_cocci_menhir.ml"
+# 26851 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25919,19 +26873,19 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25923 "parser_cocci_menhir.ml"
+# 26877 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25928 "parser_cocci_menhir.ml"
+# 26882 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_statement = 
-# 826 "parser_cocci_menhir.mly"
+# 865 "parser_cocci_menhir.mly"
                     ( P.cont _1 _2 )
-# 25935 "parser_cocci_menhir.ml"
+# 26889 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25957,15 +26911,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 25961 "parser_cocci_menhir.ml"
+# 26915 "parser_cocci_menhir.ml"
         ) = Obj.magic _2 in
         let _1 : 'tv_ident = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_statement = 
-# 827 "parser_cocci_menhir.mly"
+# 866 "parser_cocci_menhir.mly"
                 ( P.label _1 _2 )
-# 25969 "parser_cocci_menhir.ml"
+# 26923 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -25996,20 +26950,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26000 "parser_cocci_menhir.ml"
+# 26954 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_ident = Obj.magic _2 in
         let _1 : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26006 "parser_cocci_menhir.ml"
+# 26960 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_statement = 
-# 828 "parser_cocci_menhir.mly"
+# 867 "parser_cocci_menhir.mly"
                       ( P.goto _1 _2 _3 )
-# 26013 "parser_cocci_menhir.ml"
+# 26967 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26040,20 +26994,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26044 "parser_cocci_menhir.ml"
+# 26998 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_fun_start = Obj.magic _2 in
         let _1 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26050 "parser_cocci_menhir.ml"
+# 27004 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_statement = 
-# 830 "parser_cocci_menhir.mly"
+# 869 "parser_cocci_menhir.mly"
     ( P.seq _1 _2 _3 )
-# 26057 "parser_cocci_menhir.ml"
+# 27011 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26080,14 +27034,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26084 "parser_cocci_menhir.ml"
+# 27038 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_w_ in
         let _v : 'tv_stm_dots = 
-# 834 "parser_cocci_menhir.mly"
+# 873 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.Dots(P.clt2mcode "..." _1, List.concat w)) )
-# 26091 "parser_cocci_menhir.ml"
+# 27045 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26123,22 +27077,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let c : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26127 "parser_cocci_menhir.ml"
+# 27081 "parser_cocci_menhir.ml"
         ) = Obj.magic c in
         let b : 'tv_nest_start = Obj.magic b in
         let w : 'tv_list_whenppdecs_ = Obj.magic w in
         let _1 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26134 "parser_cocci_menhir.ml"
+# 27088 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_c_ in
         let _v : 'tv_stm_dots = 
-# 836 "parser_cocci_menhir.mly"
+# 875 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.Nest(P.clt2mcode "<..." _1, b,
                          P.clt2mcode "...>" c, List.concat w, false)) )
-# 26142 "parser_cocci_menhir.ml"
+# 27096 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26174,22 +27128,22 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let c : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26178 "parser_cocci_menhir.ml"
+# 27132 "parser_cocci_menhir.ml"
         ) = Obj.magic c in
         let b : 'tv_nest_start = Obj.magic b in
         let w : 'tv_list_whenppdecs_ = Obj.magic w in
         let _1 : (
 # 72 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26185 "parser_cocci_menhir.ml"
+# 27139 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos_c_ in
         let _v : 'tv_stm_dots = 
-# 839 "parser_cocci_menhir.mly"
+# 878 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.Nest(P.clt2mcode "<+..." _1, b,
                          P.clt2mcode "...+>" c, List.concat w, true)) )
-# 26193 "parser_cocci_menhir.ml"
+# 27147 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26210,14 +27164,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let s : (
 # 53 "parser_cocci_menhir.mly"
       (Data.clt)
-# 26214 "parser_cocci_menhir.ml"
+# 27168 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_s_ in
         let _v : 'tv_storage = 
-# 762 "parser_cocci_menhir.mly"
+# 800 "parser_cocci_menhir.mly"
                         ( P.clt2mcode Ast.Static s )
-# 26221 "parser_cocci_menhir.ml"
+# 27175 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26238,14 +27192,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let s : (
 # 53 "parser_cocci_menhir.mly"
       (Data.clt)
-# 26242 "parser_cocci_menhir.ml"
+# 27196 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_s_ in
         let _v : 'tv_storage = 
-# 763 "parser_cocci_menhir.mly"
+# 801 "parser_cocci_menhir.mly"
                         ( P.clt2mcode Ast.Auto s )
-# 26249 "parser_cocci_menhir.ml"
+# 27203 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26266,14 +27220,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let s : (
 # 53 "parser_cocci_menhir.mly"
       (Data.clt)
-# 26270 "parser_cocci_menhir.ml"
+# 27224 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_s_ in
         let _v : 'tv_storage = 
-# 764 "parser_cocci_menhir.mly"
+# 802 "parser_cocci_menhir.mly"
                         ( P.clt2mcode Ast.Register s )
-# 26277 "parser_cocci_menhir.ml"
+# 27231 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26294,14 +27248,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let s : (
 # 53 "parser_cocci_menhir.mly"
       (Data.clt)
-# 26298 "parser_cocci_menhir.ml"
+# 27252 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_s_ in
         let _v : 'tv_storage = 
-# 765 "parser_cocci_menhir.mly"
+# 803 "parser_cocci_menhir.mly"
                         ( P.clt2mcode Ast.Extern s )
-# 26305 "parser_cocci_menhir.ml"
+# 27259 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26321,9 +27275,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_struct_decl = 
-# 488 "parser_cocci_menhir.mly"
+# 507 "parser_cocci_menhir.mly"
                ( [] )
-# 26327 "parser_cocci_menhir.ml"
+# 27281 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26354,17 +27308,17 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26358 "parser_cocci_menhir.ml"
+# 27312 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_d_ident = Obj.magic d in
         let t : 'tv_ctype = Obj.magic t in
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_pv_ in
         let _v : 'tv_struct_decl = 
-# 490 "parser_cocci_menhir.mly"
+# 509 "parser_cocci_menhir.mly"
   ( let (id,fn) = d in
         [Ast0.wrap(Ast0.UnInit(None,fn t,id,P.clt2mcode ";" pv))] )
-# 26368 "parser_cocci_menhir.ml"
+# 27322 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26425,40 +27379,40 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26429 "parser_cocci_menhir.ml"
+# 27383 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let rp2 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26434 "parser_cocci_menhir.ml"
+# 27388 "parser_cocci_menhir.ml"
         ) = Obj.magic rp2 in
         let p : 'tv_decl_list_name_opt_decl_ = Obj.magic p in
         let lp2 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26440 "parser_cocci_menhir.ml"
+# 27394 "parser_cocci_menhir.ml"
         ) = Obj.magic lp2 in
         let rp1 : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26445 "parser_cocci_menhir.ml"
+# 27399 "parser_cocci_menhir.ml"
         ) = Obj.magic rp1 in
         let d : 'tv_d_ident = Obj.magic d in
         let st : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26451 "parser_cocci_menhir.ml"
+# 27405 "parser_cocci_menhir.ml"
         ) = Obj.magic st in
         let lp1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26456 "parser_cocci_menhir.ml"
+# 27410 "parser_cocci_menhir.ml"
         ) = Obj.magic lp1 in
         let t : 'tv_fn_ctype = Obj.magic t in
         let _startpos = _startpos_t_ in
         let _endpos = _endpos_pv_ in
         let _v : 'tv_struct_decl = 
-# 494 "parser_cocci_menhir.mly"
+# 513 "parser_cocci_menhir.mly"
         ( let (id,fn) = d in
         let t =
          Ast0.wrap
@@ -26466,7 +27420,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
               (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
                P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
         [Ast0.wrap(Ast0.UnInit(None,fn t,id,P.clt2mcode ";" pv))] )
-# 26470 "parser_cocci_menhir.ml"
+# 27424 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26497,7 +27451,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26501 "parser_cocci_menhir.ml"
+# 27455 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -26507,15 +27461,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 39 "standard.mly"
     ( None )
-# 26511 "parser_cocci_menhir.ml"
+# 27465 "parser_cocci_menhir.ml"
           
         in
         
-# 502 "parser_cocci_menhir.mly"
+# 521 "parser_cocci_menhir.mly"
   ( let (id,fn) = d in
         let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
         [Ast0.wrap(Ast0.UnInit(None,fn idtype,id,P.clt2mcode ";" pv))] )
-# 26519 "parser_cocci_menhir.ml"
+# 27473 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26551,7 +27505,7 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let pv : (
 # 106 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26555 "parser_cocci_menhir.ml"
+# 27509 "parser_cocci_menhir.ml"
         ) = Obj.magic pv in
         let d : 'tv_d_ident = Obj.magic d in
         let i : 'tv_pure_ident = Obj.magic i in
@@ -26563,15 +27517,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
           
 # 41 "standard.mly"
     ( Some x )
-# 26567 "parser_cocci_menhir.ml"
+# 27521 "parser_cocci_menhir.ml"
           
         in
         
-# 502 "parser_cocci_menhir.mly"
+# 521 "parser_cocci_menhir.mly"
   ( let (id,fn) = d in
         let idtype = P.make_cv cv (Ast0.wrap (Ast0.TypeName(P.id2mcode i))) in
         [Ast0.wrap(Ast0.UnInit(None,fn idtype,id,P.clt2mcode ";" pv))] )
-# 26575 "parser_cocci_menhir.ml"
+# 27529 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26593,9 +27547,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_struct_decl_list = 
-# 507 "parser_cocci_menhir.mly"
+# 526 "parser_cocci_menhir.mly"
                           ( Ast0.wrap(Ast0.DOTS(_1)) )
-# 26599 "parser_cocci_menhir.ml"
+# 27553 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26617,9 +27571,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_struct_decl_list_start = 
-# 510 "parser_cocci_menhir.mly"
+# 529 "parser_cocci_menhir.mly"
                                      ( _1 )
-# 26623 "parser_cocci_menhir.ml"
+# 27577 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26647,9 +27601,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_struct_decl_list_start = 
-# 511 "parser_cocci_menhir.mly"
+# 530 "parser_cocci_menhir.mly"
                                      ( _1@_2 )
-# 26653 "parser_cocci_menhir.ml"
+# 27607 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26677,9 +27631,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_d_ in
         let _endpos = _endpos_r_ in
         let _v : 'tv_struct_decl_list_start = 
-# 513 "parser_cocci_menhir.mly"
+# 532 "parser_cocci_menhir.mly"
     ( (P.mkddots "..." d)::r )
-# 26683 "parser_cocci_menhir.ml"
+# 27637 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26700,14 +27654,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let s : (
 # 50 "parser_cocci_menhir.mly"
       (Data.clt)
-# 26704 "parser_cocci_menhir.ml"
+# 27658 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_s_ in
         let _v : 'tv_struct_or_union = 
-# 484 "parser_cocci_menhir.mly"
+# 503 "parser_cocci_menhir.mly"
                  ( P.clt2mcode Ast.Struct s )
-# 26711 "parser_cocci_menhir.ml"
+# 27665 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26728,14 +27682,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let u : (
 # 50 "parser_cocci_menhir.mly"
       (Data.clt)
-# 26732 "parser_cocci_menhir.ml"
+# 27686 "parser_cocci_menhir.ml"
         ) = Obj.magic u in
         let _startpos = _startpos_u_ in
         let _endpos = _endpos_u_ in
         let _v : 'tv_struct_or_union = 
-# 485 "parser_cocci_menhir.mly"
+# 504 "parser_cocci_menhir.mly"
                  ( P.clt2mcode Ast.Union u )
-# 26739 "parser_cocci_menhir.ml"
+# 27693 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26757,9 +27711,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_top_eexpr = 
-# 1137 "parser_cocci_menhir.mly"
+# 1188 "parser_cocci_menhir.mly"
         ( Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Exp(_1)))) )
-# 26763 "parser_cocci_menhir.ml"
+# 27717 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26790,20 +27744,20 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _3 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26794 "parser_cocci_menhir.ml"
+# 27748 "parser_cocci_menhir.ml"
         ) = Obj.magic _3 in
         let _2 : 'tv_initialize_list = Obj.magic _2 in
         let _1 : (
 # 100 "parser_cocci_menhir.mly"
        (Data.clt)
-# 26800 "parser_cocci_menhir.ml"
+# 27754 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_top_init = 
-# 1548 "parser_cocci_menhir.mly"
+# 1625 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.InitList(P.clt2mcode "{" _1,_2,P.clt2mcode "}" _3)) )
-# 26807 "parser_cocci_menhir.ml"
+# 27761 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26818,9 +27772,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_toplevel_after_dots = 
-# 1536 "parser_cocci_menhir.mly"
+# 1613 "parser_cocci_menhir.mly"
                                      ([])
-# 26824 "parser_cocci_menhir.ml"
+# 27778 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26846,9 +27800,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_after_dots = 
-# 1537 "parser_cocci_menhir.mly"
+# 1614 "parser_cocci_menhir.mly"
                                      (_2)
-# 26852 "parser_cocci_menhir.ml"
+# 27806 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26876,9 +27830,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_after_dots = 
-# 1538 "parser_cocci_menhir.mly"
+# 1615 "parser_cocci_menhir.mly"
                                      ((Ast0.wrap(Ast0.Exp(_1)))::_2)
-# 26882 "parser_cocci_menhir.ml"
+# 27836 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26906,9 +27860,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_after_dots = 
-# 1539 "parser_cocci_menhir.mly"
+# 1616 "parser_cocci_menhir.mly"
                                           (_1@_2)
-# 26912 "parser_cocci_menhir.ml"
+# 27866 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26934,9 +27888,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_after_dots_init = 
-# 1527 "parser_cocci_menhir.mly"
+# 1604 "parser_cocci_menhir.mly"
                                      (_2)
-# 26940 "parser_cocci_menhir.ml"
+# 27894 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26964,9 +27918,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_after_dots_init = 
-# 1528 "parser_cocci_menhir.mly"
+# 1605 "parser_cocci_menhir.mly"
                                      ((Ast0.wrap(Ast0.Exp(_1)))::_2)
-# 26970 "parser_cocci_menhir.ml"
+# 27924 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -26994,9 +27948,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_after_dots_init = 
-# 1529 "parser_cocci_menhir.mly"
+# 1606 "parser_cocci_menhir.mly"
                                           (_1@_2)
-# 27000 "parser_cocci_menhir.ml"
+# 27954 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27011,9 +27965,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_toplevel_after_exp = 
-# 1532 "parser_cocci_menhir.mly"
+# 1609 "parser_cocci_menhir.mly"
                                      ([])
-# 27017 "parser_cocci_menhir.ml"
+# 27971 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27041,9 +27995,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_after_exp = 
-# 1533 "parser_cocci_menhir.mly"
+# 1610 "parser_cocci_menhir.mly"
                                      (_1::_2)
-# 27047 "parser_cocci_menhir.ml"
+# 28001 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27058,9 +28012,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _menhir_env.MenhirLib.EngineTypes.lexbuf.Lexing.lex_start_p in
         let _endpos = _startpos in
         let _v : 'tv_toplevel_after_stm = 
-# 1542 "parser_cocci_menhir.mly"
+# 1619 "parser_cocci_menhir.mly"
                                      ([])
-# 27064 "parser_cocci_menhir.ml"
+# 28018 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27088,9 +28042,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_after_stm = 
-# 1543 "parser_cocci_menhir.mly"
+# 1620 "parser_cocci_menhir.mly"
                                      (_1::_2)
-# 27094 "parser_cocci_menhir.ml"
+# 28048 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27118,9 +28072,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_after_stm = 
-# 1544 "parser_cocci_menhir.mly"
+# 1621 "parser_cocci_menhir.mly"
                                      (_1@_2)
-# 27124 "parser_cocci_menhir.ml"
+# 28078 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27148,9 +28102,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_seq_start_toplevel_after_dots_ = 
-# 1522 "parser_cocci_menhir.mly"
+# 1599 "parser_cocci_menhir.mly"
                                      ( _1::_2 )
-# 27154 "parser_cocci_menhir.ml"
+# 28108 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27178,9 +28132,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_seq_start_toplevel_after_dots_ = 
-# 1523 "parser_cocci_menhir.mly"
+# 1600 "parser_cocci_menhir.mly"
                                      ( (Ast0.wrap(Ast0.Exp(_1)))::_2 )
-# 27184 "parser_cocci_menhir.ml"
+# 28138 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27208,9 +28162,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_toplevel_seq_start_toplevel_after_dots_ = 
-# 1524 "parser_cocci_menhir.mly"
+# 1601 "parser_cocci_menhir.mly"
                                           ( _1@_2 )
-# 27214 "parser_cocci_menhir.ml"
+# 28168 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27222,25 +28176,304 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
       (fun _menhir_env ->
         let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
         let {
-          MenhirLib.EngineTypes.semv = _2;
-          MenhirLib.EngineTypes.startp = _startpos__2_;
-          MenhirLib.EngineTypes.endp = _endpos__2_;
+          MenhirLib.EngineTypes.semv = b;
+          MenhirLib.EngineTypes.startp = _startpos_b_;
+          MenhirLib.EngineTypes.endp = _endpos_b_;
           MenhirLib.EngineTypes.next = {
-            MenhirLib.EngineTypes.state = _menhir_s;
-            MenhirLib.EngineTypes.semv = _1;
-            MenhirLib.EngineTypes.startp = _startpos__1_;
-            MenhirLib.EngineTypes.endp = _endpos__1_;
-            MenhirLib.EngineTypes.next = _menhir_stack;
+            MenhirLib.EngineTypes.semv = w0;
+            MenhirLib.EngineTypes.startp = _startpos_w0_;
+            MenhirLib.EngineTypes.endp = _endpos_w0_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.state = _menhir_s;
+              MenhirLib.EngineTypes.semv = a0;
+              MenhirLib.EngineTypes.startp = _startpos_a0_;
+              MenhirLib.EngineTypes.endp = _endpos_a0_;
+              MenhirLib.EngineTypes.next = _menhir_stack;
+              };
             };
           } = _menhir_stack in
-        let _2 : 'tv_toplevel_after_dots_init = Obj.magic _2 in
-        let _1 : 'tv_stm_dots = Obj.magic _1 in
-        let _startpos = _startpos__1_ in
-        let _endpos = _endpos__2_ in
-        let _v : 'tv_toplevel_seq_start_toplevel_after_dots_init_ = 
-# 1522 "parser_cocci_menhir.mly"
-                                     ( _1::_2 )
-# 27244 "parser_cocci_menhir.ml"
+        let b : 'tv_toplevel_after_dots_init = Obj.magic b in
+        let w0 : 'tv_list_whenppdecs_ = Obj.magic w0 in
+        let a0 : (
+# 72 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 28201 "parser_cocci_menhir.ml"
+        ) = Obj.magic a0 in
+        let _startpos = _startpos_a0_ in
+        let _endpos = _endpos_b_ in
+        let _v : 'tv_toplevel_seq_startne_toplevel_after_dots_init_ = let a =
+          let w = w0 in
+          let a = a0 in
+          
+# 883 "parser_cocci_menhir.mly"
+    ( Ast0.wrap(Ast0.Dots(P.clt2mcode "..." a, List.concat w)) )
+# 28211 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 1592 "parser_cocci_menhir.mly"
+                                             ( a::b )
+# 28217 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = b;
+          MenhirLib.EngineTypes.startp = _startpos_b_;
+          MenhirLib.EngineTypes.endp = _endpos_b_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.semv = c0;
+            MenhirLib.EngineTypes.startp = _startpos_c0_;
+            MenhirLib.EngineTypes.endp = _endpos_c0_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.semv = b0;
+              MenhirLib.EngineTypes.startp = _startpos_b0_;
+              MenhirLib.EngineTypes.endp = _endpos_b0_;
+              MenhirLib.EngineTypes.next = {
+                MenhirLib.EngineTypes.semv = w0;
+                MenhirLib.EngineTypes.startp = _startpos_w0_;
+                MenhirLib.EngineTypes.endp = _endpos_w0_;
+                MenhirLib.EngineTypes.next = {
+                  MenhirLib.EngineTypes.state = _menhir_s;
+                  MenhirLib.EngineTypes.semv = a0;
+                  MenhirLib.EngineTypes.startp = _startpos_a0_;
+                  MenhirLib.EngineTypes.endp = _endpos_a0_;
+                  MenhirLib.EngineTypes.next = _menhir_stack;
+                  };
+                };
+              };
+            };
+          } = _menhir_stack in
+        let b : 'tv_toplevel_after_dots_init = Obj.magic b in
+        let c0 : (
+# 72 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 28259 "parser_cocci_menhir.ml"
+        ) = Obj.magic c0 in
+        let b0 : 'tv_nest_start = Obj.magic b0 in
+        let w0 : 'tv_list_whenppdecs_ = Obj.magic w0 in
+        let a0 : (
+# 72 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 28266 "parser_cocci_menhir.ml"
+        ) = Obj.magic a0 in
+        let _startpos = _startpos_a0_ in
+        let _endpos = _endpos_b_ in
+        let _v : 'tv_toplevel_seq_startne_toplevel_after_dots_init_ = let a =
+          let c = c0 in
+          let b = b0 in
+          let w = w0 in
+          let a = a0 in
+          
+# 887 "parser_cocci_menhir.mly"
+    ( Ast0.wrap(Ast0.Nest(P.clt2mcode "<..." a, b,
+                         P.clt2mcode "...>" c, List.concat w, false)) )
+# 28279 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 1593 "parser_cocci_menhir.mly"
+                                              ( a::b )
+# 28285 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = b;
+          MenhirLib.EngineTypes.startp = _startpos_b_;
+          MenhirLib.EngineTypes.endp = _endpos_b_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.semv = c0;
+            MenhirLib.EngineTypes.startp = _startpos_c0_;
+            MenhirLib.EngineTypes.endp = _endpos_c0_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.semv = b0;
+              MenhirLib.EngineTypes.startp = _startpos_b0_;
+              MenhirLib.EngineTypes.endp = _endpos_b0_;
+              MenhirLib.EngineTypes.next = {
+                MenhirLib.EngineTypes.semv = w0;
+                MenhirLib.EngineTypes.startp = _startpos_w0_;
+                MenhirLib.EngineTypes.endp = _endpos_w0_;
+                MenhirLib.EngineTypes.next = {
+                  MenhirLib.EngineTypes.state = _menhir_s;
+                  MenhirLib.EngineTypes.semv = a0;
+                  MenhirLib.EngineTypes.startp = _startpos_a0_;
+                  MenhirLib.EngineTypes.endp = _endpos_a0_;
+                  MenhirLib.EngineTypes.next = _menhir_stack;
+                  };
+                };
+              };
+            };
+          } = _menhir_stack in
+        let b : 'tv_toplevel_after_dots_init = Obj.magic b in
+        let c0 : (
+# 72 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 28327 "parser_cocci_menhir.ml"
+        ) = Obj.magic c0 in
+        let b0 : 'tv_nest_start = Obj.magic b0 in
+        let w0 : 'tv_list_whenppdecs_ = Obj.magic w0 in
+        let a0 : (
+# 72 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 28334 "parser_cocci_menhir.ml"
+        ) = Obj.magic a0 in
+        let _startpos = _startpos_a0_ in
+        let _endpos = _endpos_b_ in
+        let _v : 'tv_toplevel_seq_startne_toplevel_after_dots_init_ = let a =
+          let c = c0 in
+          let b = b0 in
+          let w = w0 in
+          let a = a0 in
+          
+# 890 "parser_cocci_menhir.mly"
+    ( Ast0.wrap(Ast0.Nest(P.clt2mcode "<+..." a, b,
+                         P.clt2mcode "...+>" c, List.concat w, true)) )
+# 28347 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 1593 "parser_cocci_menhir.mly"
+                                              ( a::b )
+# 28353 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = c0;
+          MenhirLib.EngineTypes.startp = _startpos_c0_;
+          MenhirLib.EngineTypes.endp = _endpos_c0_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.semv = b0;
+            MenhirLib.EngineTypes.startp = _startpos_b0_;
+            MenhirLib.EngineTypes.endp = _endpos_b0_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.semv = w0;
+              MenhirLib.EngineTypes.startp = _startpos_w0_;
+              MenhirLib.EngineTypes.endp = _endpos_w0_;
+              MenhirLib.EngineTypes.next = {
+                MenhirLib.EngineTypes.state = _menhir_s;
+                MenhirLib.EngineTypes.semv = a0;
+                MenhirLib.EngineTypes.startp = _startpos_a0_;
+                MenhirLib.EngineTypes.endp = _endpos_a0_;
+                MenhirLib.EngineTypes.next = _menhir_stack;
+                };
+              };
+            };
+          } = _menhir_stack in
+        let c0 : (
+# 72 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 28389 "parser_cocci_menhir.ml"
+        ) = Obj.magic c0 in
+        let b0 : 'tv_nest_start = Obj.magic b0 in
+        let w0 : 'tv_list_whenppdecs_ = Obj.magic w0 in
+        let a0 : (
+# 72 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 28396 "parser_cocci_menhir.ml"
+        ) = Obj.magic a0 in
+        let _startpos = _startpos_a0_ in
+        let _endpos = _endpos_c0_ in
+        let _v : 'tv_toplevel_seq_startne_toplevel_after_dots_init_ = let a =
+          let c = c0 in
+          let b = b0 in
+          let w = w0 in
+          let a = a0 in
+          
+# 887 "parser_cocci_menhir.mly"
+    ( Ast0.wrap(Ast0.Nest(P.clt2mcode "<..." a, b,
+                         P.clt2mcode "...>" c, List.concat w, false)) )
+# 28409 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 1594 "parser_cocci_menhir.mly"
+                                       ( [a] )
+# 28415 "parser_cocci_menhir.ml"
+         in
+        _menhir_env.MenhirLib.EngineTypes.stack <- {
+          MenhirLib.EngineTypes.state = _menhir_s;
+          MenhirLib.EngineTypes.semv = Obj.repr _v;
+          MenhirLib.EngineTypes.startp = _startpos;
+          MenhirLib.EngineTypes.endp = _endpos;
+          MenhirLib.EngineTypes.next = _menhir_stack;
+          });
+      (fun _menhir_env ->
+        let _menhir_stack = _menhir_env.MenhirLib.EngineTypes.stack in
+        let {
+          MenhirLib.EngineTypes.semv = c0;
+          MenhirLib.EngineTypes.startp = _startpos_c0_;
+          MenhirLib.EngineTypes.endp = _endpos_c0_;
+          MenhirLib.EngineTypes.next = {
+            MenhirLib.EngineTypes.semv = b0;
+            MenhirLib.EngineTypes.startp = _startpos_b0_;
+            MenhirLib.EngineTypes.endp = _endpos_b0_;
+            MenhirLib.EngineTypes.next = {
+              MenhirLib.EngineTypes.semv = w0;
+              MenhirLib.EngineTypes.startp = _startpos_w0_;
+              MenhirLib.EngineTypes.endp = _endpos_w0_;
+              MenhirLib.EngineTypes.next = {
+                MenhirLib.EngineTypes.state = _menhir_s;
+                MenhirLib.EngineTypes.semv = a0;
+                MenhirLib.EngineTypes.startp = _startpos_a0_;
+                MenhirLib.EngineTypes.endp = _endpos_a0_;
+                MenhirLib.EngineTypes.next = _menhir_stack;
+                };
+              };
+            };
+          } = _menhir_stack in
+        let c0 : (
+# 72 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 28451 "parser_cocci_menhir.ml"
+        ) = Obj.magic c0 in
+        let b0 : 'tv_nest_start = Obj.magic b0 in
+        let w0 : 'tv_list_whenppdecs_ = Obj.magic w0 in
+        let a0 : (
+# 72 "parser_cocci_menhir.mly"
+       (Data.clt)
+# 28458 "parser_cocci_menhir.ml"
+        ) = Obj.magic a0 in
+        let _startpos = _startpos_a0_ in
+        let _endpos = _endpos_c0_ in
+        let _v : 'tv_toplevel_seq_startne_toplevel_after_dots_init_ = let a =
+          let c = c0 in
+          let b = b0 in
+          let w = w0 in
+          let a = a0 in
+          
+# 890 "parser_cocci_menhir.mly"
+    ( Ast0.wrap(Ast0.Nest(P.clt2mcode "<+..." a, b,
+                         P.clt2mcode "...+>" c, List.concat w, true)) )
+# 28471 "parser_cocci_menhir.ml"
+          
+        in
+        
+# 1594 "parser_cocci_menhir.mly"
+                                       ( [a] )
+# 28477 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27267,10 +28500,10 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : 'tv_expr = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
-        let _v : 'tv_toplevel_seq_start_toplevel_after_dots_init_ = 
-# 1523 "parser_cocci_menhir.mly"
+        let _v : 'tv_toplevel_seq_startne_toplevel_after_dots_init_ = 
+# 1595 "parser_cocci_menhir.mly"
                                      ( (Ast0.wrap(Ast0.Exp(_1)))::_2 )
-# 27274 "parser_cocci_menhir.ml"
+# 28507 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27297,10 +28530,10 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : 'tv_decl_statement_expr = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
-        let _v : 'tv_toplevel_seq_start_toplevel_after_dots_init_ = 
-# 1524 "parser_cocci_menhir.mly"
+        let _v : 'tv_toplevel_seq_startne_toplevel_after_dots_init_ = 
+# 1596 "parser_cocci_menhir.mly"
                                           ( _1@_2 )
-# 27304 "parser_cocci_menhir.ml"
+# 28537 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27322,9 +28555,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_typedef_ident = 
-# 1435 "parser_cocci_menhir.mly"
+# 1505 "parser_cocci_menhir.mly"
          ( Ast0.wrap(Ast0.TypeName(P.id2mcode _1)) )
-# 27328 "parser_cocci_menhir.ml"
+# 28561 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27345,15 +28578,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 64 "parser_cocci_menhir.mly"
        (Parse_aux.info)
-# 27349 "parser_cocci_menhir.ml"
+# 28582 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_typedef_ident = 
-# 1437 "parser_cocci_menhir.mly"
+# 1507 "parser_cocci_menhir.mly"
          ( let (nm,pure,clt) = _1 in
         Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) )
-# 27357 "parser_cocci_menhir.ml"
+# 28590 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27375,9 +28608,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_unary_expr_eexpr_dot_expressions_ = 
-# 1226 "parser_cocci_menhir.mly"
+# 1277 "parser_cocci_menhir.mly"
                                          ( _1 )
-# 27381 "parser_cocci_menhir.ml"
+# 28614 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27404,14 +28637,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27408 "parser_cocci_menhir.ml"
+# 28641 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_dot_expressions_ = 
-# 1228 "parser_cocci_menhir.mly"
+# 1279 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Infix (_2, P.clt2mcode Ast.Inc _1)) )
-# 27415 "parser_cocci_menhir.ml"
+# 28648 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27438,14 +28671,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27442 "parser_cocci_menhir.ml"
+# 28675 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_dot_expressions_ = 
-# 1230 "parser_cocci_menhir.mly"
+# 1281 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Infix (_2, P.clt2mcode Ast.Dec _1)) )
-# 27449 "parser_cocci_menhir.ml"
+# 28682 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27473,9 +28706,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_dot_expressions_ = 
-# 1232 "parser_cocci_menhir.mly"
+# 1283 "parser_cocci_menhir.mly"
       ( let mcode = _1 in Ast0.wrap(Ast0.Unary(_2, mcode)) )
-# 27479 "parser_cocci_menhir.ml"
+# 28712 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27502,15 +28735,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27506 "parser_cocci_menhir.ml"
+# 28739 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_dot_expressions_ = 
-# 1234 "parser_cocci_menhir.mly"
+# 1285 "parser_cocci_menhir.mly"
       ( let mcode = P.clt2mcode Ast.Not _1 in
       Ast0.wrap(Ast0.Unary(_2, mcode)) )
-# 27514 "parser_cocci_menhir.ml"
+# 28747 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27537,14 +28770,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27541 "parser_cocci_menhir.ml"
+# 28774 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_dot_expressions_ = 
-# 1237 "parser_cocci_menhir.mly"
+# 1288 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.SizeOfExpr (P.clt2mcode "sizeof" _1, _2)) )
-# 27548 "parser_cocci_menhir.ml"
+# 28781 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27580,27 +28813,27 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27584 "parser_cocci_menhir.ml"
+# 28817 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let t : 'tv_ctype = Obj.magic t in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27590 "parser_cocci_menhir.ml"
+# 28823 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let s : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27595 "parser_cocci_menhir.ml"
+# 28828 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_rp_ in
         let _v : 'tv_unary_expr_eexpr_dot_expressions_ = 
-# 1239 "parser_cocci_menhir.mly"
+# 1290 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.SizeOfType (P.clt2mcode "sizeof" s,
                                    P.clt2mcode "(" lp,t,
                                    P.clt2mcode ")" rp)) )
-# 27604 "parser_cocci_menhir.ml"
+# 28837 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27622,9 +28855,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_unary_expr_eexpr_invalid_ = 
-# 1226 "parser_cocci_menhir.mly"
+# 1277 "parser_cocci_menhir.mly"
                                          ( _1 )
-# 27628 "parser_cocci_menhir.ml"
+# 28861 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27651,14 +28884,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27655 "parser_cocci_menhir.ml"
+# 28888 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_invalid_ = 
-# 1228 "parser_cocci_menhir.mly"
+# 1279 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Infix (_2, P.clt2mcode Ast.Inc _1)) )
-# 27662 "parser_cocci_menhir.ml"
+# 28895 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27685,14 +28918,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27689 "parser_cocci_menhir.ml"
+# 28922 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_invalid_ = 
-# 1230 "parser_cocci_menhir.mly"
+# 1281 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Infix (_2, P.clt2mcode Ast.Dec _1)) )
-# 27696 "parser_cocci_menhir.ml"
+# 28929 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27720,9 +28953,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_invalid_ = 
-# 1232 "parser_cocci_menhir.mly"
+# 1283 "parser_cocci_menhir.mly"
       ( let mcode = _1 in Ast0.wrap(Ast0.Unary(_2, mcode)) )
-# 27726 "parser_cocci_menhir.ml"
+# 28959 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27749,15 +28982,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27753 "parser_cocci_menhir.ml"
+# 28986 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_invalid_ = 
-# 1234 "parser_cocci_menhir.mly"
+# 1285 "parser_cocci_menhir.mly"
       ( let mcode = P.clt2mcode Ast.Not _1 in
       Ast0.wrap(Ast0.Unary(_2, mcode)) )
-# 27761 "parser_cocci_menhir.ml"
+# 28994 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27784,14 +29017,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27788 "parser_cocci_menhir.ml"
+# 29021 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_invalid_ = 
-# 1237 "parser_cocci_menhir.mly"
+# 1288 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.SizeOfExpr (P.clt2mcode "sizeof" _1, _2)) )
-# 27795 "parser_cocci_menhir.ml"
+# 29028 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27827,27 +29060,27 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27831 "parser_cocci_menhir.ml"
+# 29064 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let t : 'tv_ctype = Obj.magic t in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27837 "parser_cocci_menhir.ml"
+# 29070 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let s : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27842 "parser_cocci_menhir.ml"
+# 29075 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_rp_ in
         let _v : 'tv_unary_expr_eexpr_invalid_ = 
-# 1239 "parser_cocci_menhir.mly"
+# 1290 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.SizeOfType (P.clt2mcode "sizeof" s,
                                    P.clt2mcode "(" lp,t,
                                    P.clt2mcode ")" rp)) )
-# 27851 "parser_cocci_menhir.ml"
+# 29084 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27869,9 +29102,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_unary_expr_eexpr_nest_expressions_ = 
-# 1226 "parser_cocci_menhir.mly"
+# 1277 "parser_cocci_menhir.mly"
                                          ( _1 )
-# 27875 "parser_cocci_menhir.ml"
+# 29108 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27898,14 +29131,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27902 "parser_cocci_menhir.ml"
+# 29135 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_nest_expressions_ = 
-# 1228 "parser_cocci_menhir.mly"
+# 1279 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Infix (_2, P.clt2mcode Ast.Inc _1)) )
-# 27909 "parser_cocci_menhir.ml"
+# 29142 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27932,14 +29165,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 27936 "parser_cocci_menhir.ml"
+# 29169 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_nest_expressions_ = 
-# 1230 "parser_cocci_menhir.mly"
+# 1281 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Infix (_2, P.clt2mcode Ast.Dec _1)) )
-# 27943 "parser_cocci_menhir.ml"
+# 29176 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27967,9 +29200,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_nest_expressions_ = 
-# 1232 "parser_cocci_menhir.mly"
+# 1283 "parser_cocci_menhir.mly"
       ( let mcode = _1 in Ast0.wrap(Ast0.Unary(_2, mcode)) )
-# 27973 "parser_cocci_menhir.ml"
+# 29206 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -27996,15 +29229,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28000 "parser_cocci_menhir.ml"
+# 29233 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_nest_expressions_ = 
-# 1234 "parser_cocci_menhir.mly"
+# 1285 "parser_cocci_menhir.mly"
       ( let mcode = P.clt2mcode Ast.Not _1 in
       Ast0.wrap(Ast0.Unary(_2, mcode)) )
-# 28008 "parser_cocci_menhir.ml"
+# 29241 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28031,14 +29264,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28035 "parser_cocci_menhir.ml"
+# 29268 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_eexpr_nest_expressions_ = 
-# 1237 "parser_cocci_menhir.mly"
+# 1288 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.SizeOfExpr (P.clt2mcode "sizeof" _1, _2)) )
-# 28042 "parser_cocci_menhir.ml"
+# 29275 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28074,27 +29307,27 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28078 "parser_cocci_menhir.ml"
+# 29311 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let t : 'tv_ctype = Obj.magic t in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28084 "parser_cocci_menhir.ml"
+# 29317 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let s : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28089 "parser_cocci_menhir.ml"
+# 29322 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_rp_ in
         let _v : 'tv_unary_expr_eexpr_nest_expressions_ = 
-# 1239 "parser_cocci_menhir.mly"
+# 1290 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.SizeOfType (P.clt2mcode "sizeof" s,
                                    P.clt2mcode "(" lp,t,
                                    P.clt2mcode ")" rp)) )
-# 28098 "parser_cocci_menhir.ml"
+# 29331 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28116,9 +29349,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_unary_expr_expr_invalid_ = 
-# 1226 "parser_cocci_menhir.mly"
+# 1277 "parser_cocci_menhir.mly"
                                          ( _1 )
-# 28122 "parser_cocci_menhir.ml"
+# 29355 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28145,14 +29378,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28149 "parser_cocci_menhir.ml"
+# 29382 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_expr_invalid_ = 
-# 1228 "parser_cocci_menhir.mly"
+# 1279 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Infix (_2, P.clt2mcode Ast.Inc _1)) )
-# 28156 "parser_cocci_menhir.ml"
+# 29389 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28179,14 +29412,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 84 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28183 "parser_cocci_menhir.ml"
+# 29416 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_expr_invalid_ = 
-# 1230 "parser_cocci_menhir.mly"
+# 1281 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.Infix (_2, P.clt2mcode Ast.Dec _1)) )
-# 28190 "parser_cocci_menhir.ml"
+# 29423 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28214,9 +29447,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_expr_invalid_ = 
-# 1232 "parser_cocci_menhir.mly"
+# 1283 "parser_cocci_menhir.mly"
       ( let mcode = _1 in Ast0.wrap(Ast0.Unary(_2, mcode)) )
-# 28220 "parser_cocci_menhir.ml"
+# 29453 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28243,15 +29476,15 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28247 "parser_cocci_menhir.ml"
+# 29480 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_expr_invalid_ = 
-# 1234 "parser_cocci_menhir.mly"
+# 1285 "parser_cocci_menhir.mly"
       ( let mcode = P.clt2mcode Ast.Not _1 in
       Ast0.wrap(Ast0.Unary(_2, mcode)) )
-# 28255 "parser_cocci_menhir.ml"
+# 29488 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28278,14 +29511,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28282 "parser_cocci_menhir.ml"
+# 29515 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_unary_expr_expr_invalid_ = 
-# 1237 "parser_cocci_menhir.mly"
+# 1288 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.SizeOfExpr (P.clt2mcode "sizeof" _1, _2)) )
-# 28289 "parser_cocci_menhir.ml"
+# 29522 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28321,27 +29554,27 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let rp : (
 # 76 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28325 "parser_cocci_menhir.ml"
+# 29558 "parser_cocci_menhir.ml"
         ) = Obj.magic rp in
         let t : 'tv_ctype = Obj.magic t in
         let lp : (
 # 75 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28331 "parser_cocci_menhir.ml"
+# 29564 "parser_cocci_menhir.ml"
         ) = Obj.magic lp in
         let s : (
 # 58 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28336 "parser_cocci_menhir.ml"
+# 29569 "parser_cocci_menhir.ml"
         ) = Obj.magic s in
         let _startpos = _startpos_s_ in
         let _endpos = _endpos_rp_ in
         let _v : 'tv_unary_expr_expr_invalid_ = 
-# 1239 "parser_cocci_menhir.mly"
+# 1290 "parser_cocci_menhir.mly"
       ( Ast0.wrap(Ast0.SizeOfType (P.clt2mcode "sizeof" s,
                                    P.clt2mcode "(" lp,t,
                                    P.clt2mcode ")" rp)) )
-# 28345 "parser_cocci_menhir.ml"
+# 29578 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28362,14 +29595,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 92 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28366 "parser_cocci_menhir.ml"
+# 29599 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_unary_op = 
-# 1243 "parser_cocci_menhir.mly"
+# 1294 "parser_cocci_menhir.mly"
                   ( P.clt2mcode Ast.GetRef _1 )
-# 28373 "parser_cocci_menhir.ml"
+# 29606 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28390,14 +29623,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28394 "parser_cocci_menhir.ml"
+# 29627 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_unary_op = 
-# 1244 "parser_cocci_menhir.mly"
+# 1295 "parser_cocci_menhir.mly"
            ( P.clt2mcode Ast.DeRef _1 )
-# 28401 "parser_cocci_menhir.ml"
+# 29634 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28418,14 +29651,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28422 "parser_cocci_menhir.ml"
+# 29655 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_unary_op = 
-# 1245 "parser_cocci_menhir.mly"
+# 1296 "parser_cocci_menhir.mly"
            ( P.clt2mcode Ast.UnPlus _1 )
-# 28429 "parser_cocci_menhir.ml"
+# 29662 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28446,14 +29679,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 97 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28450 "parser_cocci_menhir.ml"
+# 29683 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_unary_op = 
-# 1246 "parser_cocci_menhir.mly"
+# 1297 "parser_cocci_menhir.mly"
            ( P.clt2mcode Ast.UnMinus _1 )
-# 28457 "parser_cocci_menhir.ml"
+# 29690 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28474,14 +29707,14 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _1 : (
 # 98 "parser_cocci_menhir.mly"
        (Data.clt)
-# 28478 "parser_cocci_menhir.ml"
+# 29711 "parser_cocci_menhir.ml"
         ) = Obj.magic _1 in
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__1_ in
         let _v : 'tv_unary_op = 
-# 1247 "parser_cocci_menhir.mly"
+# 1298 "parser_cocci_menhir.mly"
            ( P.clt2mcode Ast.Tilde _1 )
-# 28485 "parser_cocci_menhir.ml"
+# 29718 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28509,9 +29742,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_when_start = 
-# 1641 "parser_cocci_menhir.mly"
+# 1718 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.DOTS((Ast0.wrap(Ast0.Exp(_1)))::_2)) )
-# 28515 "parser_cocci_menhir.ml"
+# 29748 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28539,9 +29772,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__2_ in
         let _v : 'tv_when_start = 
-# 1643 "parser_cocci_menhir.mly"
+# 1720 "parser_cocci_menhir.mly"
     ( Ast0.wrap(Ast0.DOTS(_1@_2)) )
-# 28545 "parser_cocci_menhir.ml"
+# 29778 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28563,9 +29796,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos_w_ in
         let _endpos = _endpos_w_ in
         let _v : 'tv_whenppdecs = 
-# 843 "parser_cocci_menhir.mly"
+# 894 "parser_cocci_menhir.mly"
     ( w )
-# 28569 "parser_cocci_menhir.ml"
+# 29802 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28599,9 +29832,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_whens_when_start_rule_elem_statement_ = 
-# 1709 "parser_cocci_menhir.mly"
+# 1786 "parser_cocci_menhir.mly"
                                          ( [Ast0.WhenNot w] )
-# 28605 "parser_cocci_menhir.ml"
+# 29838 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28635,9 +29868,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_whens_when_start_rule_elem_statement_ = 
-# 1710 "parser_cocci_menhir.mly"
+# 1787 "parser_cocci_menhir.mly"
                                              ( [Ast0.WhenAlways w] )
-# 28641 "parser_cocci_menhir.ml"
+# 29874 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28667,9 +29900,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__3_ in
         let _v : 'tv_whens_when_start_rule_elem_statement_ = 
-# 1712 "parser_cocci_menhir.mly"
+# 1789 "parser_cocci_menhir.mly"
       ( List.map (function x -> Ast0.WhenModifier(x)) _2 )
-# 28673 "parser_cocci_menhir.ml"
+# 29906 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28703,9 +29936,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_whens_when_start_rule_elem_statement_ = 
-# 1713 "parser_cocci_menhir.mly"
+# 1790 "parser_cocci_menhir.mly"
                                         ( [Ast0.WhenNotTrue e] )
-# 28709 "parser_cocci_menhir.ml"
+# 29942 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28739,9 +29972,9 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
         let _startpos = _startpos__1_ in
         let _endpos = _endpos__4_ in
         let _v : 'tv_whens_when_start_rule_elem_statement_ = 
-# 1714 "parser_cocci_menhir.mly"
+# 1791 "parser_cocci_menhir.mly"
                                          ( [Ast0.WhenNotFalse e] )
-# 28745 "parser_cocci_menhir.ml"
+# 29978 "parser_cocci_menhir.ml"
          in
         _menhir_env.MenhirLib.EngineTypes.stack <- {
           MenhirLib.EngineTypes.state = _menhir_s;
@@ -28762,90 +29995,90 @@ module MenhirInterpreter = MenhirLib.TableInterpreter.Make (struct
 
 let rec script_meta_main =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1486 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1531 lexer lexbuf) : (
 # 158 "parser_cocci_menhir.mly"
        (string * (string * string))
-# 28769 "parser_cocci_menhir.ml"
+# 30002 "parser_cocci_menhir.ml"
     ))
 
 and rule_name =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1430 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1467 lexer lexbuf) : (
 # 152 "parser_cocci_menhir.mly"
       (Ast_cocci.rulename)
-# 28777 "parser_cocci_menhir.ml"
+# 30010 "parser_cocci_menhir.ml"
     ))
 
 and reinit =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1428 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1465 lexer lexbuf) : (
 # 130 "parser_cocci_menhir.mly"
       (unit)
-# 28785 "parser_cocci_menhir.ml"
+# 30018 "parser_cocci_menhir.ml"
     ))
 
 and plus_main =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1392 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1429 lexer lexbuf) : (
 # 139 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 28793 "parser_cocci_menhir.ml"
+# 30026 "parser_cocci_menhir.ml"
     ))
 
 and plus_exp_main =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1383 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1420 lexer lexbuf) : (
 # 142 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 28801 "parser_cocci_menhir.ml"
+# 30034 "parser_cocci_menhir.ml"
     ))
 
 and never_used =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1377 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1414 lexer lexbuf) : (
 # 167 "parser_cocci_menhir.mly"
       (unit)
-# 28809 "parser_cocci_menhir.ml"
+# 30042 "parser_cocci_menhir.ml"
     ))
 
 and minus_main =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1302 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1328 lexer lexbuf) : (
 # 133 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 28817 "parser_cocci_menhir.ml"
+# 30050 "parser_cocci_menhir.ml"
     ))
 
 and minus_exp_main =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1278 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1304 lexer lexbuf) : (
 # 136 "parser_cocci_menhir.mly"
       (Ast0_cocci.rule)
-# 28825 "parser_cocci_menhir.ml"
+# 30058 "parser_cocci_menhir.ml"
     ))
 
 and meta_main =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1275 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1301 lexer lexbuf) : (
 # 156 "parser_cocci_menhir.mly"
       ((Ast_cocci.metavar,Ast_cocci.metavar) Common.either list)
-# 28833 "parser_cocci_menhir.ml"
+# 30066 "parser_cocci_menhir.ml"
     ))
 
 and iso_rule_name =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1271 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1297 lexer lexbuf) : (
 # 148 "parser_cocci_menhir.mly"
       (Ast_cocci.rulename)
-# 28841 "parser_cocci_menhir.ml"
+# 30074 "parser_cocci_menhir.ml"
     ))
 
 and iso_meta_main =
   fun lexer lexbuf ->
-    (Obj.magic (MenhirInterpreter.entry 1079 lexer lexbuf) : (
+    (Obj.magic (MenhirInterpreter.entry 1104 lexer lexbuf) : (
 # 164 "parser_cocci_menhir.mly"
       ((Ast_cocci.metavar,Ast_cocci.metavar) Common.either list)
-# 28849 "parser_cocci_menhir.ml"
+# 30082 "parser_cocci_menhir.ml"
     ))
 
 and iso_main =
@@ -28853,7 +30086,7 @@ and iso_main =
     (Obj.magic (MenhirInterpreter.entry 10 lexer lexbuf) : (
 # 161 "parser_cocci_menhir.mly"
       (Ast0_cocci.anything list list)
-# 28857 "parser_cocci_menhir.ml"
+# 30090 "parser_cocci_menhir.ml"
     ))
 
 and include_main =
@@ -28861,7 +30094,7 @@ and include_main =
     (Obj.magic (MenhirInterpreter.entry 0 lexer lexbuf) : (
 # 145 "parser_cocci_menhir.mly"
       ((string,string) Common.either list)
-# 28865 "parser_cocci_menhir.ml"
+# 30098 "parser_cocci_menhir.ml"
     ))
 
 
index d0c52e8..1021ed9 100644 (file)
@@ -17,6 +17,7 @@ type token =
   | Tinline of (Data.clt)
   | Tfloat of (Data.clt)
   | Textern of (Data.clt)
+  | Tenum of (Data.clt)
   | Tdouble of (Data.clt)
   | Tconst of (Data.clt)
   | Tchar of (Data.clt)
@@ -119,6 +120,7 @@ type token =
   | TIdent of (string * Data.clt)
   | TIdExpression
   | TGoto of (Data.clt)
+  | TGenerated
   | TFunction
   | TFunDecl of (Data.clt)
   | TFresh
index 76942f4..8172b30 100644 (file)
@@ -1,5 +1,5 @@
 /*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -40,14 +40,14 @@ module P = Parse_aux
 %token TIdentifier TExpression TStatement TFunction TLocal TType TParameter
 %token TIdExpression
 %token Tlist TFresh TConstant TError TWords TWhy0 TPlus0 TBang0
-%token TPure TContext
+%token TPure TContext TGenerated
 %token TTypedef TDeclarer TIterator TName TPosition TPosAny
-%token TUsing TDisable TExtends TDepends TOn TEver TNever TExists TForall TScript
-%token TReverse TNothing
+%token TUsing TDisable TExtends TDepends TOn TEver TNever TExists TForall
+%token TScript TReverse TNothing
 %token<string> TRuleName
 
 %token<Data.clt> Tchar Tshort Tint Tdouble Tfloat Tlong
-%token<Data.clt> Tvoid Tstruct Tunion
+%token<Data.clt> Tvoid Tstruct Tunion Tenum
 %token<Data.clt> Tunsigned Tsigned
 
 %token<Data.clt> Tstatic Tauto Tregister Textern Tinline Ttypedef
@@ -60,7 +60,7 @@ module P = Parse_aux
 
 %token <Parse_aux.idinfo>     TMetaId TMetaFunc TMetaLocalFunc
 %token <Parse_aux.idinfo>     TMetaIterator TMetaDeclarer
-%token <Parse_aux.expinfo>    TMetaErr 
+%token <Parse_aux.expinfo>    TMetaErr
 %token <Parse_aux.info>       TMetaParam TMetaStm TMetaStmList TMetaType
 %token <Parse_aux.list_info>  TMetaParamList TMetaExpList
 %token <Parse_aux.typed_info> TMetaExp TMetaIdExp TMetaLocalIdExp TMetaConst
@@ -89,7 +89,7 @@ module P = Parse_aux
 %token <Data.clt> TAndLog
 %token <Data.clt> TOr
 %token <Data.clt> TXor
-%token <Data.clt> TAnd 
+%token <Data.clt> TAnd
 %token <Data.clt> TEqEq TNotEq
 %token <Ast_cocci.logicalOp * Data.clt> TLogOp /* TInf TSup TInfEq TSupEq */
 %token <Ast_cocci.arithOp * Data.clt>   TShOp  /* TShl TShr */
@@ -119,7 +119,7 @@ module P = Parse_aux
 %left TAndLog
 %left TOr
 %left TXor
-%left TAnd 
+%left TAnd
 %left TEqEq TNotEq
 %left TLogOp /* TInf TSup TInfEq TSupEq */
 %left TShOp /* TShl TShr */
@@ -199,6 +199,11 @@ rule_name:
   nm=ioption(pure_ident) extends d=depends i=loption(choose_iso)
     a=loption(disable) e=exists ee=is_expression TArob
       { P.make_cocci_rule_name_result nm d i a e ee }
+  | TGenerated extends d=depends i=loption(choose_iso)
+    a=loption(disable) e=exists ee=is_expression TArob
+      /* these rules have no name as a cheap way to ensure that no normal
+      rule inherits their metavariables or depends on them */
+      { P.make_generated_rule_name_result None d i a e ee }
   | TScript TDotDot lang=pure_ident d=depends TArob
       { P.make_script_rule_name_result lang d }
 
@@ -265,7 +270,12 @@ metadec:
     { P.create_metadec_ne ar ispure kindfn ids }
 | ar=arity TPosition a=option(TPosAny)
     ids=comma_list(pure_ident_or_meta_ident_with_not_eq(not_pos)) TMPtVirg
-    { let kindfn arity name pure check_meta constraints =
+    (* pb: position variables can't be inherited from normal rules, and then
+       there is no way to inherit from a generated rule, so there is no point
+       to have a position variable *)
+    { (if !Data.in_generating
+      then failwith "position variables not allowed in a generated rule file");
+      let kindfn arity name pure check_meta constraints =
       let tok = check_meta(Ast.MetaPosDecl(arity,name)) in
       let any = match a with None -> Ast.PER | Some _ -> Ast.ALL in
       !Data.add_pos_meta name constraints any; tok in
@@ -309,7 +319,7 @@ metadec:
 | TType
     { (fun arity name pure check_meta ->
       let tok = check_meta(Ast.MetaTypeDecl(arity,name)) in
-      !Data.add_type_meta name pure; tok) } 
+      !Data.add_type_meta name pure; tok) }
 | TStatement
     { (fun arity name pure check_meta ->
       let tok = check_meta(Ast.MetaStmDecl(arity,name)) in
@@ -412,9 +422,9 @@ metadec:
              if not
                  (List.exists
                     (function
-                        Type_cocci.BaseType(Type_cocci.IntType,_) -> true
-                      | Type_cocci.BaseType(Type_cocci.ShortType,_) -> true
-                      | Type_cocci.BaseType(Type_cocci.LongType,_) -> true
+                        Type_cocci.BaseType(Type_cocci.IntType) -> true
+                      | Type_cocci.BaseType(Type_cocci.ShortType) -> true
+                      | Type_cocci.BaseType(Type_cocci.LongType) -> true
                       | _ -> false)
                     vl)
              then failwith "metavariable with int constraint must be an int"
@@ -437,21 +447,26 @@ arity: TBang0 { Ast.UNIQUE }
      | TPlus0 { Ast.MULTI }
      | /* empty */ { Ast.NONE }
 
-generic_ctype:
-       q=ctype_qualif
-         { Ast0.wrap(Ast0.ImplicitInt(q)) }
-     | q=ioption(ctype_qualif) ty=Tchar
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.CharType ty, q)) }
-     | q=ioption(ctype_qualif) ty=Tshort
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.ShortType ty, q)) }
-     | q=ioption(ctype_qualif) ty=Tint
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.IntType ty, q)) }
+generic_ctype_full:
+       q=ctype_qualif_opt ty=Tchar
+        { q (Ast0.wrap(Ast0.BaseType(Ast.CharType,[P.clt2mcode "char" ty]))) }
+     | q=ctype_qualif_opt ty=Tshort
+        { q (Ast0.wrap(Ast0.BaseType(Ast.ShortType,[P.clt2mcode "short" ty])))}
+     | q=ctype_qualif_opt ty=Tint
+         { q (Ast0.wrap(Ast0.BaseType(Ast.IntType,[P.clt2mcode "int" ty]))) }
      | t=Tdouble
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.DoubleType t, None)) }
+         { Ast0.wrap(Ast0.BaseType(Ast.DoubleType,[P.clt2mcode "double" t])) }
      | t=Tfloat
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.FloatType t, None)) }
-     | q=ioption(ctype_qualif) ty=Tlong
-         { Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.LongType ty, q)) }
+         { Ast0.wrap(Ast0.BaseType(Ast.FloatType,[P.clt2mcode "float" t])) }
+     | q=ctype_qualif_opt ty=Tlong
+         { q (Ast0.wrap(Ast0.BaseType(Ast.LongType,[P.clt2mcode "long" ty]))) }
+     | q=ctype_qualif_opt ty=Tlong ty1=Tlong
+         { q (Ast0.wrap
+               (Ast0.BaseType
+                  (Ast.LongLongType,
+                     [P.clt2mcode "long" ty;P.clt2mcode "long" ty1]))) }
+     | s=Tenum i=ident
+        { Ast0.wrap(Ast0.EnumName(P.clt2mcode "enum" s, i)) }
      | s=struct_or_union i=ident
         { Ast0.wrap(Ast0.StructUnionName(s, Some i)) }
      | s=struct_or_union i=ioption(ident)
@@ -476,9 +491,13 @@ generic_ctype:
                                 Ast0.Impure (*will be ignored*))) }
      | p=TTypeId
         { Ast0.wrap(Ast0.TypeName(P.id2mcode p)) }
-     | p=TMetaType
+     | q=ctype_qualif_opt p=TMetaType
         { let (nm,pure,clt) = p in
-        Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure)) }
+        q (Ast0.wrap(Ast0.MetaType(P.clt2mcode nm clt,pure))) }
+
+generic_ctype:
+       q=ctype_qualif     { q None }
+     | generic_ctype_full { $1 }
 
 struct_or_union:
        s=Tstruct { P.clt2mcode Ast.Struct s }
@@ -522,7 +541,20 @@ ctype:
         { P.pointerify (P.make_cv cv ty) m }
      | cv=ioption(const_vol) t=Tvoid m=nonempty_list(TMul)
          { let ty =
-            Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
+            Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
+          P.pointerify (P.make_cv cv ty) m }
+   | lp=TOPar0 t=midzero_list(ctype,ctype) rp=TCPar0
+      /* more hacks */
+    { let (mids,code) = t in
+      Ast0.wrap
+       (Ast0.DisjType(P.clt2mcode "(" lp,code,mids, P.clt2mcode ")" rp)) }
+
+ctype_full:
+       cv=ioption(const_vol) ty=generic_ctype_full m=list(TMul)
+        { P.pointerify (P.make_cv cv ty) m }
+     | cv=ioption(const_vol) t=Tvoid m=nonempty_list(TMul)
+         { let ty =
+            Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
           P.pointerify (P.make_cv cv ty) m }
    | lp=TOPar0 t=midzero_list(ctype,ctype) rp=TCPar0
       /* more hacks */
@@ -535,19 +567,25 @@ fn_ctype: // allows metavariables
        ty=generic_ctype m=list(TMul) { P.pointerify ty m }
      | t=Tvoid m=list(TMul)
          { P.pointerify
-            (Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)))
+            (Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])))
             m }
 
-ctype_qualif:
-       Tunsigned   { P.clt2mcode Ast.Unsigned $1 }
-     | Tsigned     { P.clt2mcode Ast.Signed $1 }
+%inline ctype_qualif:
+  r=Tunsigned
+   { function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Unsigned r,x)) }
+| r=Tsigned
+   { function x -> Ast0.wrap(Ast0.Signed(P.clt2mcode Ast.Signed r,x)) }
+
+%inline ctype_qualif_opt:
+  s=ctype_qualif  { function x -> s (Some x) }
+| /* empty */   { function x -> x }
 
 /*****************************************************************************/
 
 /* have to inline everything to avoid conflicts? switch to proper
 declarations, statements, and expressions for the subterms */
 
-minus_body: 
+minus_body:
     f=loption(filespec)
     b=loption(minus_start)
     ew=loption(error_words)
@@ -555,7 +593,7 @@ minus_body:
       [] -> raise (Semantic_cocci.Semantic "minus slice can't be empty")
     | code -> Top_level.top_level code }
 
-plus_body: 
+plus_body:
     f=loption(filespec)
     b=loption(plus_start)
     ew=loption(error_words)
@@ -698,7 +736,7 @@ funproto:
              id, P.clt2mcode ";" pt)) }
 | s=ioption(storage) t=Tvoid
   id=func_ident lp=TOPar d=decl_list(name_opt_decl) rp=TCPar pt=TPtVirg
-    { let t = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
+    { let t = Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
       Ast0.wrap
         (Ast0.UnInit
           (s,
@@ -775,7 +813,8 @@ decl: t=ctype i=ident
                P.clt2mcode "(" lp1,d,P.clt2mcode ")" rp1)) in
        Ast0.wrap(Ast0.Param(fnptr, Some i)) }
     | t=Tvoid
-       { let ty = Ast0.wrap(Ast0.BaseType(P.clt2mcode Ast.VoidType t, None)) in
+       { let ty =
+         Ast0.wrap(Ast0.BaseType(Ast.VoidType,[P.clt2mcode "void" t])) in
           Ast0.wrap(Ast0.VoidParam(ty)) }
     | TMetaParam
        { let (nm,pure,clt) = $1 in
@@ -839,6 +878,18 @@ stm_dots:
     { Ast0.wrap(Ast0.Nest(P.clt2mcode "<+..." $1, b,
                          P.clt2mcode "...+>" c, List.concat w, true)) }
 
+%inline stm_dots_ell:
+  a=TEllipsis w=list(whenppdecs)
+    { Ast0.wrap(Ast0.Dots(P.clt2mcode "..." a, List.concat w)) }
+
+%inline stm_dots_nest:
+  a=TOEllipsis w=list(whenppdecs) b=nest_start c=TCEllipsis
+    { Ast0.wrap(Ast0.Nest(P.clt2mcode "<..." a, b,
+                         P.clt2mcode "...>" c, List.concat w, false)) }
+| a=TPOEllipsis w=list(whenppdecs) b=nest_start c=TPCEllipsis
+    { Ast0.wrap(Ast0.Nest(P.clt2mcode "<+..." a, b,
+                         P.clt2mcode "...+>" c, List.concat w, true)) }
+
 whenppdecs: w=whens(when_start,rule_elem_statement)
     { w }
 
@@ -923,7 +974,7 @@ decl_var:
         [Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv))] }
   | decl_ident TOPar eexpr_list_option TCPar TPtVirg
       { [Ast0.wrap(Ast0.MacroDecl($1,P.clt2mcode "(" $2,$3,
-                                 P.clt2mcode ")" $4,P.clt2mcode ";" $5))] } 
+                                 P.clt2mcode ")" $4,P.clt2mcode ";" $5))] }
   | s=ioption(storage)
     t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
     lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
@@ -935,7 +986,7 @@ decl_var:
               (t,P.clt2mcode "(" lp1,P.clt2mcode "*" st,P.clt2mcode ")" rp1,
                P.clt2mcode "(" lp2,p,P.clt2mcode ")" rp2)) in
       [Ast0.wrap(Ast0.Init(s,fn t,id,P.clt2mcode "=" q,e,P.clt2mcode ";" pv))]}
-  | s=Ttypedef t=ctype id=typedef_ident pv=TPtVirg
+  | s=Ttypedef t=ctype_full id=typedef_ident pv=TPtVirg
       { let s = P.clt2mcode "typedef" s in
         [Ast0.wrap(Ast0.Typedef(s,t,id,P.clt2mcode ";" pv))] }
 
@@ -976,7 +1027,7 @@ one_decl_var:
         Ast0.wrap(Ast0.UnInit(s,fn t,id,P.clt2mcode ";" pv)) }
   | decl_ident TOPar eexpr_list_option TCPar TPtVirg
       { Ast0.wrap(Ast0.MacroDecl($1,P.clt2mcode "(" $2,$3,
-                                 P.clt2mcode ")" $4,P.clt2mcode ";" $5)) } 
+                                 P.clt2mcode ")" $4,P.clt2mcode ";" $5)) }
   | s=ioption(storage)
     t=fn_ctype lp1=TOPar st=TMul d=d_ident rp1=TCPar
     lp2=TOPar p=decl_list(name_opt_decl) rp2=TCPar
@@ -1331,6 +1382,7 @@ pure_ident_or_meta_ident:
      | Tlist                     { (None,"list") }
      | TError                    { (None,"error") }
      | TType                     { (None,"type") }
+     | TName                     { (None,"name") }
 
 pure_ident_or_meta_ident_with_not_eq(not_eq):
        i=pure_ident_or_meta_ident l=loption(not_eq) { (i,l) }
@@ -1339,20 +1391,30 @@ not_eq:
        TNotEq i=pure_ident
          { (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+           (* pb: constraints not stored with metavars; too lazy to search for
+             them in the pattern *)
+          then failwith "constraints not allowed in a generated rule file");
           [Ast0.wrap(Ast0.Id(P.id2mcode i))] }
      | TNotEq TOBrace l=comma_list(pure_ident) TCBrace
         { (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           List.map (function i -> Ast0.wrap(Ast0.Id(P.id2mcode i))) l }
 
 not_eqe:
        TNotEq i=pure_ident
          { (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           [Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i))))] }
      | TNotEq TOBrace l=comma_list(pure_ident) TCBrace
         { (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           List.map
             (function i ->
               Ast0.wrap(Ast0.Ident(Ast0.wrap(Ast0.Id(P.id2mcode i)))))
@@ -1362,10 +1424,14 @@ not_ceq:
        TNotEq i=ident_or_const
          { (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           [i] }
      | TNotEq TOBrace l=comma_list(ident_or_const) TCBrace
         { (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           l }
 
 ident_or_const:
@@ -1378,6 +1444,8 @@ not_pos:
        TNotEq i=meta_ident
          { (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           match i with
             (None,_) -> failwith "constraint must be an inherited variable"
           | (Some rule,name) ->
@@ -1387,6 +1455,8 @@ not_pos:
      | TNotEq TOBrace l=comma_list(meta_ident) TCBrace
         { (if !Data.in_iso
           then failwith "constraints not allowed in iso file");
+          (if !Data.in_generating
+          then failwith "constraints not allowed in a generated rule file");
           List.map
             (function
                 (None,_) ->
@@ -1465,7 +1535,7 @@ one_dec(decl):
        Some nm -> Some(P.clt2mcode nm clt)
       | None -> None in
     Ast0.wrap(Ast0.MetaParamList(nm,lenname,pure)) }
+
 comma_decls(dotter,decl):
   TComma dotter
     { function dot_builder ->
@@ -1515,9 +1585,16 @@ minus_start:
   fundecl                { [Ast0.wrap(Ast0.DECL($1))] }
 | ctype                  { [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.Ty($1))))] }
 | top_init          { [Ast0.wrap(Ast0.OTHER(Ast0.wrap(Ast0.TopInit($1))))] }
-| toplevel_seq_start(toplevel_after_dots_init)
+| toplevel_seq_startne(toplevel_after_dots_init)
     { List.map (function x -> Ast0.wrap(Ast0.OTHER(x))) $1 }
 
+toplevel_seq_startne(after_dots_init):
+  a=stm_dots_ell b=after_dots_init           { a::b }
+| a=stm_dots_nest b=after_dots_init           { a::b }
+| a=stm_dots_nest                      { [a] }
+| expr toplevel_after_exp            { (Ast0.wrap(Ast0.Exp($1)))::$2 }
+| decl_statement_expr toplevel_after_stm  { $1@$2 }
+
 toplevel_seq_start(after_dots_init):
   stm_dots after_dots_init           { $1::$2 }
 | expr toplevel_after_exp            { (Ast0.wrap(Ast0.Exp($1)))::$2 }
index 0474afa..d7d3bf8 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -202,7 +202,7 @@ let rec find_neighbors = function
           rest_inner)::rest_middle)::rest_outer)
          as rest ->
            if finish1 = start2
-           then 
+           then
              ((((x1,real_start1,real_finish1,start1,finish1)::
                 (x2,real_start2,real_finish2,start2,finish2)::rest_inner)::
                rest_middle)::
@@ -216,7 +216,7 @@ let rec find_neighbors = function
            else [[(x1,real_start1,real_finish1,start1,finish1)]]::rest
       |        _ -> [[[(x1,real_start1,real_finish1,start1,finish1)]]])
       (* rest must be [] *)
-      
+
 (* --------------------------------------------------------------------- *)
 (* --------------------------------------------------------------------- *)
 (* Entry point *)
index ede9f3f..0928872 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -99,9 +99,9 @@ let mcode fn = function
       if !print_minus_flag
       then print_string (if !Flag.sgrep_mode2 then "*" else "-");
       fn x; print_pos pos;
-      if !print_plus_flag 
+      if !print_plus_flag
       then print_anything ">>> " plus_stream
-  | (x, _, Ast.CONTEXT(_,plus_streams), pos) -> 
+  | (x, _, Ast.CONTEXT(_,plus_streams), pos) ->
       if !print_plus_flag
       then
        let fn x = fn x; print_pos pos in
@@ -111,7 +111,7 @@ let mcode fn = function
       let fn x = fn x; print_pos pos in
       print_string_befaft fn x info
 
-let print_mcodekind = function 
+let print_mcodekind = function
     Ast.MINUS(_,plus_stream) ->
       print_string "MINUS";
       print_anything ">>> " plus_stream
@@ -349,8 +349,9 @@ and print_fninfo = function
 
 and typeC ty =
   match Ast.unwrap ty with
-    Ast.BaseType(ty,sgn) -> print_option (mcode sign) sgn; mcode baseType ty
-  | Ast.ImplicitInt(sgn) -> mcode sign sgn
+    Ast.BaseType(ty,strings) ->
+      List.iter (function s -> mcode print_string s; print_string " ") strings
+  | Ast.SignedT(sgn,ty) -> mcode sign sgn; print_option typeC ty
   | Ast.Pointer(ty,star) -> fullType ty; mcode print_string star
   | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
       print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
@@ -360,6 +361,8 @@ and typeC ty =
   | Ast.Array(ty,lb,size,rb) ->
       fullType ty; mcode print_string lb; print_option expression size;
       mcode print_string rb
+  | Ast.EnumName(kind,name) -> mcode print_string kind; print_string " ";
+      ident name
   | Ast.StructUnionName(kind,name) ->
       mcode structUnion kind;
       print_option (function x -> ident x; print_string " ") name
@@ -379,6 +382,7 @@ and baseType = function
   | Ast.DoubleType -> print_string "double "
   | Ast.FloatType -> print_string "float "
   | Ast.LongType -> print_string "long "
+  | Ast.LongLongType -> print_string "long long "
 
 and structUnion = function
     Ast.Struct -> print_string "struct "
@@ -443,7 +447,7 @@ and declaration d =
       mcode print_string stg; print_string " "; fullType ty; typeC id;
       mcode print_string sem
   | Ast.DisjDecl(decls) -> print_disj_list declaration decls
-  | Ast.Ddots(dots,Some whencode) -> 
+  | Ast.Ddots(dots,Some whencode) ->
       mcode print_string dots; print_string "   when != "; declaration whencode
   | Ast.Ddots(dots,None) -> mcode print_string dots
   | Ast.MetaDecl(name,_,_) -> mcode print_meta name
@@ -821,7 +825,7 @@ let unparse z =
     force_newline();
     print_string code;
     force_newline()
-  | Ast.CocciRule (nm, (deps, drops, exists), x, _) ->
+  | Ast.CocciRule (nm, (deps, drops, exists), x, _, _) ->
     print_string "@@";
     force_newline();
     print_string nm;
index f02f041..4e56730 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 01eda01..20a9939 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -112,7 +112,6 @@ let simple_assignments l =
   let fn =
     V0.rebuilder
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing
       donothing donothing donothing donothing donothing donothing statement
       donothing donothing in
index 847a83c..d768632 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -103,7 +103,7 @@ let modif_after x =
       (match !mc with
        (Ast.AFTER _,_,_) -> true
       |        (Ast.BEFOREAFTER _,_,_) -> true
-      |        _ -> false)    
+      |        _ -> false)
 
 (* Identifier *)
 let rec left_ident i =
@@ -158,14 +158,14 @@ and left_typeC t =
   modif_before t or
   match Ast0.unwrap t with
     Ast0.ConstVol(cv,ty) -> modif_before_mcode cv
-  | Ast0.BaseType(ty,Some sgn) -> modif_before_mcode sgn
-  | Ast0.BaseType(ty,None) -> modif_before_mcode ty
-  | Ast0.ImplicitInt(sgn) -> modif_before_mcode sgn
+  | Ast0.BaseType(ty,strings) -> modif_before_mcode (List.hd strings)
+  | Ast0.Signed(sgn,ty) -> modif_before_mcode sgn
   | Ast0.Pointer(ty,star) -> left_typeC ty
   | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) -> left_typeC ty
   | Ast0.FunctionType(Some ty,lp1,params,rp1) -> left_typeC ty
   | Ast0.FunctionType(None,lp1,params,rp1) -> modif_before_mcode lp1
   | Ast0.Array(ty,lb,size,rb) -> left_typeC ty
+  | Ast0.EnumName(kind,name) -> modif_before_mcode kind
   | Ast0.StructUnionName(kind,name) -> modif_before_mcode kind
   | Ast0.StructUnionDef(ty,lb,decls,rb) -> left_typeC ty
   | Ast0.TypeName(name) -> modif_before_mcode name
@@ -365,7 +365,6 @@ and contains_only_minus =
 
   V0.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     dots dots dots dots dots dots
     donothing expression typeC donothing donothing declaration
     statement donothing donothing
@@ -550,7 +549,7 @@ let rec statement dots_before dots_after s =
   | Ast0.Dots(d,whn) | Ast0.Circles(d,whn) | Ast0.Stars(d,whn) -> s
   | Ast0.Include(inc,string) -> s (* doesn't affect the need for braces *)
   | Ast0.Define(def,id,params,body) -> s (* same as include *)
-  | Ast0.OptStm(re) -> 
+  | Ast0.OptStm(re) ->
       Ast0.rewrap s
        (Ast0.OptStm(statement dots_before dots_after re))
   | Ast0.UniqueStm(re) ->
@@ -565,7 +564,7 @@ and case_line c =
     | Ast0.Case(case,exp,colon,code) ->
        Ast0.Case(case,exp,colon,statement_dots false false code)
     | Ast0.OptCase(case) -> Ast0.OptCase(case_line c))
-  
+
 and do_statement_dots dots_before dots_after = function
     [] -> []
   | [x] -> [statement dots_before dots_after x]
@@ -577,7 +576,7 @@ and do_statement_dots dots_before dots_after = function
   | x::rest ->
       (statement dots_before false x)::
       do_statement_dots false dots_after rest
-       
+
 and statement_dots dots_before dots_after d =
   Ast0.rewrap d
     (match Ast0.unwrap d with
index 815a8ea..d73988c 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -34,10 +34,11 @@ without the || is only accepted in a test expression context.  This uses
 the annotations in the C file. *)
 
 let rec process_exp e =
-  let e = Ast0.set_test_pos e in
+  let e = Ast0.set_test_pos e in(* allow test isos *)
+  let e = Ast0.set_test_exp e in(* require that a test expression is matched *)
   match Ast0.unwrap e with
-    Ast0.Paren(lp,e,rp) ->
-      Ast0.rewrap e (Ast0.Paren(lp,process_exp e,rp))
+    Ast0.Paren(lp,e1,rp) ->
+      Ast0.rewrap e (Ast0.Paren(lp,process_exp e1,rp))
   | _ -> e
 
 let set_test_poss =
@@ -87,7 +88,6 @@ let set_test_poss =
 
   V0.rebuilder
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing
       donothing expression donothing donothing donothing donothing statement
       donothing donothing
index c52c7a7..271a543 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index c702dc5..e8b8e27 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -25,21 +25,23 @@ type inherited = bool (* true if inherited *)
 type keep_binding = Unitary (* need no info *)
   | Nonunitary (* need an env entry *) | Saved (* need a witness *)
 
-type typeC = 
+type typeC =
     ConstVol        of const_vol * typeC
-  | BaseType        of baseType * sign option
+  | BaseType        of baseType
+  | SignedT         of sign * typeC option
   | Pointer         of typeC
   | FunctionPointer of typeC (* only return type *)
   | Array           of typeC (* drop size info *)
+  | EnumName        of bool (* true if a metaId *) * string
   | StructUnionName of structUnion * bool (* true if a metaId *) * string
   | TypeName        of string
   | MetaType        of (string * string) * keep_binding * inherited
   | Unknown (* for metavariables of type expression *^* *)
 
 and tagged_string = string
-     
+
 and baseType = VoidType | CharType | ShortType | IntType | DoubleType
-| FloatType | LongType | BoolType
+| FloatType | LongType | LongLongType | BoolType
 
 and structUnion = Struct | Union
 
@@ -49,20 +51,20 @@ and const_vol = Const | Volatile
 
 (* --------------------------------------------------------------------- *)
 (* Printer *)
-open Format 
-       
-let rec typeC = function
-    ConstVol(cv,ty) -> const_vol cv; typeC ty
-  | BaseType(ty,None) -> baseType ty
-  | BaseType(ty,Some sgn) -> sign sgn; baseType ty
-  | Pointer(ty) -> typeC ty; print_string "*"
-  | FunctionPointer(ty) -> typeC ty; print_string "(*)(...)"
-  | Array(ty) -> typeC ty; print_string "[] "
-  | StructUnionName(kind,mv,name) ->
-      structUnion kind; print_string name; print_string " "
-  | TypeName(name) -> print_string name; print_string " "
-  | MetaType((rule,name),keep,inherited) ->
-      print_string "<"; print_string name; print_string ">"; print_string " ";
+open Format
+
+let rec type2c = function
+    ConstVol(cv,ty) -> (const_vol cv) ^ (type2c ty)
+  | BaseType(ty) -> baseType ty
+  | SignedT(sgn,None) -> sign sgn
+  | SignedT(sgn,Some ty) -> (sign sgn) ^ (type2c ty)
+  | Pointer(ty) -> (type2c ty) ^ "*"
+  | FunctionPointer(ty) -> (type2c ty) ^ "(*)(...)"
+  | Array(ty) -> (type2c ty) ^ "[] "
+  | EnumName(mv,name) -> "enum " ^ name ^ " "
+  | StructUnionName(kind,mv,name) -> (structUnion kind) ^ name ^ " "
+  | TypeName(name) -> name ^ " "
+  | MetaType((rule,name),keep,inherited) -> name ^ " "
       (*
       let print_unitary = function
          Unitary -> print_string "unitary"
@@ -73,29 +75,32 @@ let rec typeC = function
       print_string " inherited:"; print_bool inherited;
       print_string " */"
       *)
-  | Unknown -> print_string "unknown "
+  | Unknown -> "unknown "
 
 and baseType = function
-    VoidType -> print_string "void "
-  | CharType -> print_string "char "
-  | ShortType -> print_string "short "
-  | IntType -> print_string "int "
-  | DoubleType -> print_string "double "
-  | FloatType -> print_string "float "
-  | LongType -> print_string "long "
-  | BoolType -> print_string "bool "
+    VoidType -> "void "
+  | CharType -> "char "
+  | ShortType -> "short "
+  | IntType -> "int "
+  | DoubleType -> "double "
+  | FloatType -> "float "
+  | LongType -> "long "
+  | LongLongType -> "long long "
+  | BoolType -> "bool "
 
 and structUnion = function
-    Struct -> print_string "struct "
-  | Union -> print_string "union "
+    Struct -> "struct "
+  | Union -> "union "
 
 and sign = function
-    Signed -> print_string "signed "
-  | Unsigned -> print_string "unsigned "
+    Signed -> "signed "
+  | Unsigned -> "unsigned "
 
 and const_vol = function
-    Const -> print_string "const "
-  | Volatile -> print_string "volatile "
+    Const -> "const "
+  | Volatile -> "volatile "
+
+let typeC t = print_string (type2c t)
 
 (* t1 should be less informative than t1, eg t1 = Pointer(Unknown) and t2 =
 Pointer(int) *)
@@ -114,4 +119,3 @@ let compatible t1 = function
        | (Array(ty1),Array(ty2)) -> loop(ty1,ty2)
        | (_,_) -> t1=t2 in
       loop (t1,t2)
-
index 2a8c3d2..73185b0 100644 (file)
@@ -2,21 +2,23 @@ type inherited = bool (* true if inherited *)
 type keep_binding = Unitary (* need no info *)
   | Nonunitary (* need an env entry *) | Saved (* need a witness *)
 
-type typeC = 
+type typeC =
     ConstVol        of const_vol * typeC
-  | BaseType        of baseType * sign option
+  | BaseType        of baseType
+  | SignedT         of sign * typeC option
   | Pointer         of typeC
   | FunctionPointer of typeC (* only return type *)
   | Array           of typeC (* drop size info *)
+  | EnumName        of bool (* true if a metaId *) * string
   | StructUnionName of structUnion * bool (* true if type metavar *) * string
   | TypeName        of string
   | MetaType        of (string * string) * keep_binding * inherited
   | Unknown (* for metavariables of type expression *^* *)
 
 and tagged_string = string
-     
+
 and baseType = VoidType | CharType | ShortType | IntType | DoubleType
-| FloatType | LongType | BoolType
+| FloatType | LongType | LongLongType | BoolType
 
 and structUnion = Struct | Union
 
@@ -24,6 +26,7 @@ and sign = Signed | Unsigned
 
 and const_vol = Const | Volatile
 
+val type2c : typeC -> string
 val typeC : typeC -> unit
 
 val compatible : typeC -> typeC option -> bool
index 11f2f0c..24448ad 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -41,6 +41,11 @@ let err wrapped ty s =
 
 type id = Id of string | Meta of (string * string)
 
+let int_type = T.BaseType(T.IntType)
+let bool_type = T.BaseType(T.BoolType)
+let char_type = T.BaseType(T.CharType)
+let float_type = T.BaseType(T.FloatType)
+
 let rec lub_type t1 t2 =
   match (t1,t2) with
     (None,None) -> None
@@ -104,6 +109,17 @@ let rec propagate_types env =
       Some (T.ConstVol(_,t)) -> Some t
     | t -> t in
 
+  (* types that might be integer types.  should char be allowed? *)
+  let rec is_int_type = function
+      T.BaseType(T.IntType)
+    | T.BaseType(T.LongType)
+    | T.BaseType(T.ShortType)
+    | T.MetaType(_,_,_)
+    | T.TypeName _
+    | T.SignedT(_,None) -> true
+    | T.SignedT(_,Some ty) -> is_int_type ty
+    | _ -> false in
+
   let expression r k e =
     let res = k e in
     let ty =
@@ -112,12 +128,12 @@ let rec propagate_types env =
        Ast0.Ident(id) -> Ast0.set_type e res; res
       | Ast0.Constant(const) ->
          (match Ast0.unwrap_mcode const with
-           Ast.String(_) -> Some (T.Pointer(T.BaseType(T.CharType,None)))
-         | Ast.Char(_) -> Some (T.BaseType(T.CharType,None))
-         | Ast.Int(_) -> Some (T.BaseType(T.IntType,None))
-         | Ast.Float(_) ->  Some (T.BaseType(T.FloatType,None)))
-        (* pad: note that in C can do either ptr(...) or ( *ptr)(...) 
-         * so I am not sure this code is enough. 
+           Ast.String(_) -> Some (T.Pointer(char_type))
+         | Ast.Char(_) -> Some (char_type)
+         | Ast.Int(_) -> Some (int_type)
+         | Ast.Float(_) ->  Some (float_type))
+        (* pad: note that in C can do either ptr(...) or ( *ptr)(...)
+         * so I am not sure this code is enough.
          *)
       | Ast0.FunCall(fn,lp,args,rp) ->
          (match Ast0.get_type fn with
@@ -128,7 +144,7 @@ let rec propagate_types env =
                  (match Ast0.unwrap id with
                    Ast0.Id(id) ->
                      if List.mem (Ast0.unwrap_mcode id) bool_functions
-                     then Some(T.BaseType(T.BoolType,None))
+                     then Some(bool_type)
                      else None
                  | _ -> None)
              | _ -> None))
@@ -154,18 +170,18 @@ let rec propagate_types env =
          | Ast.UnPlus -> Ast0.get_type exp
          | Ast.UnMinus -> Ast0.get_type exp
          | Ast.Tilde -> Ast0.get_type exp
-         | Ast.Not -> Some(T.BaseType(T.BoolType,None)))
+         | Ast.Not -> Some(bool_type))
       | Ast0.Nested(exp1,op,exp2) -> failwith "nested in type inf not possible"
       | Ast0.Binary(exp1,op,exp2) ->
          let ty1 = Ast0.get_type exp1 in
          let ty2 = Ast0.get_type exp2 in
          let same_type = function
-             (None,None) -> Some (T.BaseType(T.IntType,None))
+             (None,None) -> Some (int_type)
 
             (* pad: pointer arithmetic handling as in ptr+1 *)
-           | (Some (T.Pointer ty1),Some ty2) ->
+           | (Some (T.Pointer ty1),Some ty2) when is_int_type ty2 ->
                Some (T.Pointer ty1)
-           | (Some ty1,Some (T.Pointer ty2)) ->
+           | (Some ty1,Some (T.Pointer ty2)) when is_int_type ty1 ->
                Some (T.Pointer ty2)
 
            | (t1,t2) ->
@@ -176,14 +192,12 @@ let rec propagate_types env =
          | Ast.Logical(op) ->
              let ty = lub_type ty1 ty2 in
              Ast0.set_type exp1 ty; Ast0.set_type exp2 ty;
-             Some(T.BaseType(T.BoolType,None)))
+             Some(bool_type))
       | Ast0.Paren(lp,exp,rp) -> Ast0.get_type exp
       | Ast0.ArrayAccess(exp1,lb,exp2,rb) ->
          (match strip_cv (Ast0.get_type exp2) with
-           None -> Ast0.set_type exp2 (Some(T.BaseType(T.IntType,None)))
-         | Some(T.BaseType(T.IntType,None)) -> ()
-         | Some (T.MetaType(_,_,_)) -> ()
-         | Some (T.TypeName _) -> ()
+           None -> Ast0.set_type exp2 (Some(int_type))
+         | Some(ty) when is_int_type ty -> ()
          | Some ty -> err exp2 ty "bad type for an array index");
          (match strip_cv (Ast0.get_type exp1) with
            None -> None
@@ -216,8 +230,8 @@ let rec propagate_types env =
          | Some (T.TypeName(_)) -> None
          | Some x -> err exp x "non-structure pointer type in field ref")
       | Ast0.Cast(lp,ty,rp,exp) -> Some(Ast0.ast0_type_to_type ty)
-      | Ast0.SizeOfExpr(szf,exp) -> Some(T.BaseType(T.IntType,None))
-      | Ast0.SizeOfType(szf,lp,ty,rp) -> Some(T.BaseType(T.IntType,None))
+      | Ast0.SizeOfExpr(szf,exp) -> Some(int_type)
+      | Ast0.SizeOfType(szf,lp,ty,rp) -> Some(int_type)
       | Ast0.TypeExp(ty) -> None
       | Ast0.MetaErr(name,_,_) -> None
       | Ast0.MetaExpr(name,_,Some [ty],_,_) -> Some ty
@@ -284,7 +298,7 @@ let rec propagate_types env =
              | Ast0.MacroDecl(_,_,_,_,_) -> []
              | Ast0.TyDecl(ty,_) -> []
               (* pad: should handle typedef one day and add a binding *)
-             | Ast0.Typedef(_,_,_,_) -> [] 
+             | Ast0.Typedef(_,_,_,_) -> []
              | Ast0.DisjDecl(_,disjs,_,_) ->
                  List.concat(List.map process_decl disjs)
              | Ast0.Ddots(_,_) -> [] (* not in a statement list anyway *)
@@ -337,7 +351,7 @@ let rec propagate_types env =
            (* if a type is known, it is specified in the decl *)
              None
          | (Ast0.Paren(lp,exp,rp),None) -> process_test exp
-         | (_,None) -> Some (T.BaseType(T.IntType,None))
+         | (_,None) -> Some (int_type)
          | _ -> None in
        let new_expty = process_test exp in
        (match new_expty with
@@ -352,14 +366,13 @@ let rec propagate_types env =
     | Ast0.Case(case,exp,colon,code) ->
        let _ = k c in
        (match Ast0.get_type exp with
-         None -> Ast0.set_type exp (Some (T.BaseType(T.IntType,None)))
+         None -> Ast0.set_type exp (Some (int_type))
        | _ -> ());
        None
     | Ast0.OptCase(case) -> k c in
 
   V0.combiner bind option_default
     mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-    mcode
     donothing donothing donothing statement_dots donothing donothing
     ident expression donothing donothing donothing donothing statement
     case_line donothing
index a6dc6e5..6d14682 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -36,6 +36,8 @@ let return b = if b then MAYBE else NO
 
 let unify_mcode (x,_,_,_) (y,_,_,_) = x = y
 
+let ret_unify_mcode a b = return (unify_mcode a b)
+
 let unify_option f t1 t2 =
   match (t1,t2) with
     (Some t1, Some t2) -> f t1 t2
@@ -60,7 +62,7 @@ let conjunct_bindings b1 b2 =
 let disjunct_bindings b1 b2 =
   match b1 with MAYBE -> b1 | NO -> b2
 
-let disjunct_all_bindings = List.fold_left disjunct_bindings NO 
+let disjunct_all_bindings = List.fold_left disjunct_bindings NO
 
 (* --------------------------------------------------------------------- *)
 
@@ -220,10 +222,16 @@ and unify_fullType ft1 ft2 =
 
 and unify_typeC t1 t2 =
   match (Ast.unwrap t1,Ast.unwrap t2) with
-    (Ast.BaseType(ty1,sgn1),Ast.BaseType(ty2,sgn2)) ->
-      return (unify_mcode ty1 ty2 && bool_unify_option unify_mcode sgn1 sgn2)
-  | (Ast.ImplicitInt(sgn1),Ast.ImplicitInt(sgn2)) ->
-      return (unify_mcode sgn1 sgn2)
+    (Ast.BaseType(ty1,stringsa),Ast.BaseType(ty2,stringsb)) ->
+      if ty1 = ty2
+      then
+       unify_lists ret_unify_mcode (function _ -> false (* not dots*))
+         stringsa stringsb
+      else return false
+  | (Ast.SignedT(sgn1,ty1),Ast.SignedT(sgn2,ty2)) ->
+      if unify_mcode sgn1 sgn2
+      then unify_option unify_typeC ty1 ty2
+      else return false
   | (Ast.Pointer(ty1,s1),Ast.Pointer(ty2,s2)) -> unify_fullType ty1 ty2
   | (Ast.FunctionPointer(tya,lp1a,stara,rp1a,lp2a,paramsa,rp2a),
      Ast.FunctionPointer(tyb,lp1b,starb,rp1b,lp2b,paramsb,rp2b)) ->
@@ -244,6 +252,8 @@ and unify_typeC t1 t2 =
   | (Ast.Array(ty1,lb1,e1,rb1),Ast.Array(ty2,lb2,e2,rb2)) ->
       conjunct_bindings
        (unify_fullType ty1 ty2) (unify_option unify_expression e1 e2)
+  | (Ast.EnumName(s1,ts1),Ast.EnumName(s2,ts2)) ->
+      if unify_mcode s1 s2 then unify_ident ts1 ts2 else return false
   | (Ast.StructUnionName(s1,Some ts1),Ast.StructUnionName(s2,Some ts2)) ->
       if unify_mcode s1 s2 then unify_ident ts1 ts2 else return false
   | (Ast.StructUnionName(s1,None),Ast.StructUnionName(s2,None)) ->
@@ -323,7 +333,7 @@ and unify_initialiser i1 i2 =
        conjunct_bindings (unify_expression exp1a exp1b)
         (conjunct_bindings (unify_expression exp2a exp2b)
            (unify_initialiser inia inib))
-       
+
   | (Ast.OptIni(_),_)
   | (Ast.UniqueIni(_),_)
   | (_,Ast.OptIni(_))
@@ -486,7 +496,6 @@ and subexp f =
   let donothing r k e = k e in
   let recursor = V.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing
       donothing expr donothing donothing donothing donothing donothing
       donothing donothing donothing donothing donothing in
@@ -500,7 +509,6 @@ and subtype f =
   let donothing r k e = k e in
   let recursor = V.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing
       donothing donothing fullType donothing donothing donothing donothing
       donothing donothing donothing donothing donothing in
index a557b0e..a58ffef 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -40,14 +40,14 @@ let minus_checker name = let id = Ast0.unwrap_mcode name in [id]
 
 (* take only what is in the plus code *)
 let plus_checker (nm,_,_,mc,_) =
-  match mc with Ast0.PLUS -> [nm] | _ -> []  
-      
+  match mc with Ast0.PLUS -> [nm] | _ -> []
+
 let get_free checker t =
   let bind x y = x @ y in
   let option_default = [] in
   let donothing r k e = k e in
   let mcode _ = option_default in
-  
+
   (* considers a single list *)
   let collect_unitary_nonunitary free_usage =
     let free_usage = List.sort compare free_usage in
@@ -66,7 +66,7 @@ let get_free checker t =
            let (unitary,non_unitary) = loop2 (y::xs) in
            (x::unitary,non_unitary) in
     loop2 free_usage in
-  
+
   (* considers a list of lists *)
   let detect_unitary_frees l =
     let (unitary,nonunitary) =
@@ -83,13 +83,13 @@ let get_free checker t =
     | Ast0.WhenModifier(_) -> option_default
     | Ast0.WhenNotTrue(a) -> expression a
     | Ast0.WhenNotFalse(a) -> expression a in
-  
+
   let ident r k i =
     match Ast0.unwrap i with
       Ast0.MetaId(name,_,_) | Ast0.MetaFunc(name,_,_)
     | Ast0.MetaLocalFunc(name,_,_) -> checker name
     | _ -> k i in
-  
+
   let expression r k e =
     match Ast0.unwrap e with
       Ast0.MetaErr(name,_,_) | Ast0.MetaExpr(name,_,_,_,_)
@@ -97,19 +97,19 @@ let get_free checker t =
     | Ast0.DisjExpr(starter,expr_list,mids,ender) ->
        detect_unitary_frees(List.map r.V0.combiner_expression expr_list)
     | _ -> k e in
-  
+
   let typeC r k t =
     match Ast0.unwrap t with
       Ast0.MetaType(name,_) -> checker name
     | Ast0.DisjType(starter,types,mids,ender) ->
        detect_unitary_frees(List.map r.V0.combiner_typeC types)
     | _ -> k t in
-  
+
   let parameter r k p =
     match Ast0.unwrap p with
       Ast0.MetaParam(name,_) | Ast0.MetaParamList(name,_,_) -> checker name
     | _ -> k p in
-  
+
   let declaration r k d =
     match Ast0.unwrap d with
       Ast0.DisjDecl(starter,decls,mids,ender) ->
@@ -123,7 +123,7 @@ let get_free checker t =
        detect_unitary_frees(List.map r.V0.combiner_statement_dots stmt_list)
     | Ast0.Nest(starter,stmt_dots,ender,whn,multi) ->
        bind (r.V0.combiner_statement_dots stmt_dots)
-         (detect_unitary_frees 
+         (detect_unitary_frees
             (List.map
                (whencode r.V0.combiner_statement_dots r.V0.combiner_statement
                    r.V0.combiner_expression)
@@ -135,24 +135,23 @@ let get_free checker t =
                r.V0.combiner_expression)
             whn)
     | _ -> k s in
-  
-  let res = V0.combiner bind option_default 
+
+  let res = V0.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing
       ident expression typeC donothing parameter declaration statement
       donothing donothing in
-  
+
   collect_unitary_nonunitary
     (List.concat (List.map res.V0.combiner_top_level t))
-    
+
 (* ----------------------------------------------------------------------- *)
 (* update the variables that are unitary *)
-    
+
 let update_unitary unitary =
   let donothing r k e = k e in
   let mcode x = x in
-  
+
   let is_unitary name =
     match (List.mem (Ast0.unwrap_mcode name) unitary,
           !Flag.sgrep_mode2, Ast0.get_mcode_mcodekind name) with
@@ -180,13 +179,13 @@ let update_unitary unitary =
     | Ast0.MetaExprList(name,lenname,_) ->
        Ast0.rewrap e (Ast0.MetaExprList(name,lenname,is_unitary name))
     | _ -> k e in
-  
+
   let typeC r k t =
     match Ast0.unwrap t with
       Ast0.MetaType(name,_) ->
        Ast0.rewrap t (Ast0.MetaType(name,is_unitary name))
     | _ -> k t in
-  
+
   let parameter r k p =
     match Ast0.unwrap p with
       Ast0.MetaParam(name,_) ->
@@ -194,7 +193,7 @@ let update_unitary unitary =
     | Ast0.MetaParamList(name,lenname,_) ->
        Ast0.rewrap p (Ast0.MetaParamList(name,lenname,is_unitary name))
     | _ -> k p in
-  
+
   let statement r k s =
     match Ast0.unwrap s with
       Ast0.MetaStmt(name,_) ->
@@ -202,10 +201,9 @@ let update_unitary unitary =
     | Ast0.MetaStmtList(name,_) ->
        Ast0.rewrap s (Ast0.MetaStmtList(name,is_unitary name))
     | _ -> k s in
-  
+
   let res = V0.rebuilder
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       donothing donothing donothing donothing donothing donothing
       ident expression typeC donothing parameter donothing statement
       donothing donothing in
@@ -234,12 +232,12 @@ let do_unitary rules =
         Ast0.ScriptRule (a,b,c,d) ->
           let (x,rules) = loop rules in
           (x, r::rules)
-      | Ast0.CocciRule ((minus,metavars,chosen_isos),((plus,_) as plusz)) ->
+      | Ast0.CocciRule ((minus,metavars,chosen_isos),((plus,_) as plusz),rt) ->
           let mm1 = List.map Ast.get_meta_name metavars in
           let (used_after, rest) = loop rules in
           let (m_unitary, m_nonunitary) = get_free minus_checker minus in
           let (p_unitary, p_nonunitary) = get_free plus_checker plus in
-          let p_free = 
+          let p_free =
             if !Flag.sgrep_mode2 then []
             else p_unitary @ p_nonunitary in
           let (in_p, m_unitary) =
@@ -253,7 +251,7 @@ let do_unitary rules =
           let rebuilt = update_unitary m_unitary minus in
           (set_minus (m_nonunitary @ used_after) mm1,
              (Ast0.CocciRule
-               ((rebuilt, metavars, chosen_isos),plusz))::rest) in
+               ((rebuilt, metavars, chosen_isos),plusz,rt))::rest) in
   let (_,rules) = loop rules in
   rules
 
index ec03073..8aa5873 100644 (file)
@@ -1,4 +1,4 @@
-(* 'iso is the return type of parse_iso, which currently is 
+(* 'iso is the return type of parse_iso, which currently is
 (Ast_cocci.metavar list * Ast0_cocci.anything list list) list *)
 
 (*
index c77a39b..fe3dd11 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -86,7 +86,7 @@ let mcodekind brackets fn x info = function
        if !quiet
        then ("","")
        else
-         let n = 
+         let n =
            match brackets with Some x -> "^"^(string_of_int x) | None -> "" in
          ("§","½"^n) in
       let (plus_streams,_,_) = !plus_streams in
@@ -253,9 +253,10 @@ and typeC t =
       match Ast0.unwrap t with
        Ast0.ConstVol(cv,ty) ->
          mcode U.const_vol cv; print_string " "; typeC ty
-      |        Ast0.BaseType(ty,sgn) ->
-         print_option (mcode U.sign) sgn; mcode U.baseType ty
-      |        Ast0.ImplicitInt(sgn) -> mcode U.sign sgn
+      |        Ast0.BaseType(ty,strings) ->
+         List.iter (function s -> mcode print_string s; print_string " ")
+           strings
+      |        Ast0.Signed(sgn,ty) -> mcode U.sign sgn; print_option typeC ty
       | Ast0.Pointer(ty,star) -> typeC ty; mcode print_string star
       | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
          print_function_pointer (ty,lp1,star,rp1,lp2,params,rp2)
@@ -265,6 +266,8 @@ and typeC t =
       | Ast0.Array(ty,lb,size,rb) ->
          typeC ty; mcode print_string lb; print_option expression size;
          mcode print_string rb
+      | Ast0.EnumName(kind,name) -> mcode print_string kind; print_string " ";
+         ident name
       | Ast0.StructUnionName(kind,name) ->
          mcode U.structUnion kind;
          print_option (function x -> ident x; print_string " ") name
@@ -337,7 +340,7 @@ and declaration d =
            (function _ -> print_string "\n|"; force_newline())
            declaration decls;
          print_string "\n)"
-      | Ast0.Ddots(dots,Some whencode) -> 
+      | Ast0.Ddots(dots,Some whencode) ->
          mcode print_string dots; print_string "   when != ";
          declaration whencode
       | Ast0.Ddots(dots,None) -> mcode print_string dots
index 5a0014f..6541953 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -52,10 +52,10 @@ type ('mc,'a) cmcode = 'a combiner -> 'mc Ast_cocci.mcode -> 'a
 type ('cd,'a) ccode = 'a combiner -> ('cd -> 'a) -> 'cd -> 'a
 
 
-let combiner bind option_default 
+let combiner bind option_default
     meta_mcodefn string_mcodefn const_mcodefn assign_mcodefn fix_mcodefn
     unary_mcodefn binary_mcodefn
-    cv_mcodefn base_mcodefn sign_mcodefn struct_mcodefn storage_mcodefn
+    cv_mcodefn sign_mcodefn struct_mcodefn storage_mcodefn
     inc_file_mcodefn
     expdotsfn paramdotsfn stmtdotsfn decldotsfn
     identfn exprfn ftfn tyfn initfn paramfn declfn rulefn stmtfn casefn
@@ -78,7 +78,6 @@ let combiner bind option_default
   and unary_mcode x = unary_mcodefn all_functions x
   and binary_mcode x = binary_mcodefn all_functions x
   and cv_mcode x = cv_mcodefn all_functions x
-  and base_mcode x = base_mcodefn all_functions x
   and sign_mcode x = sign_mcodefn all_functions x
   and struct_mcode x = struct_mcodefn all_functions x
   and storage_mcode x = storage_mcodefn all_functions x
@@ -122,7 +121,7 @@ let combiner bind option_default
       | Ast.OptIdent(id) -> ident id
       | Ast.UniqueIdent(id) -> ident id in
     identfn all_functions k i
-    
+
   and expression e =
     let k e =
       match Ast.unwrap e with
@@ -176,7 +175,7 @@ let combiner bind option_default
       | Ast.OptExp(exp) | Ast.UniqueExp(exp) ->
          expression exp in
     exprfn all_functions k e
-         
+
   and fullType ft =
     let k ft =
       match Ast.unwrap ft with
@@ -192,7 +191,7 @@ let combiner bind option_default
       ([fullType ty; string_mcode lp1; string_mcode star] @ extra @
        [string_mcode rp1;
         string_mcode lp2; parameter_dots params; string_mcode rp2])
-         
+
   and function_type (ty,lp1,params,rp1) extra =
     (* have to put the treatment of the identifier into the right position *)
     multibind
@@ -203,13 +202,12 @@ let combiner bind option_default
     multibind
       ([fullType ty] @ extra @
        [string_mcode lb; get_option expression size; string_mcode rb])
-         
+
   and typeC ty =
     let k ty =
       match Ast.unwrap ty with
-       Ast.BaseType(ty,sgn) ->
-         bind (get_option sign_mcode sgn) (base_mcode ty)
-      | Ast.ImplicitInt(sgn) -> sign_mcode sgn
+       Ast.BaseType(ty,strings) -> multibind (List.map string_mcode strings)
+      | Ast.SignedT(sgn,ty) -> bind (sign_mcode sgn) (get_option typeC ty)
       | Ast.Pointer(ty,star) ->
          bind (fullType ty) (string_mcode star)
       | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
@@ -217,6 +215,7 @@ let combiner bind option_default
       |        Ast.FunctionType (_,ty,lp1,params,rp1) ->
          function_type (ty,lp1,params,rp1) []
       | Ast.Array(ty,lb,size,rb) -> array_type (ty,lb,size,rb) []
+      | Ast.EnumName(kind,name) -> bind (string_mcode kind) (ident name)
       | Ast.StructUnionName(kind,name) ->
          bind (struct_mcode kind) (get_option ident name)
       | Ast.StructUnionDef(ty,lb,decls,rb) ->
@@ -328,22 +327,22 @@ let combiner bind option_default
                      string_mcode rp]
       | Ast.Else(els) -> string_mcode els
       | Ast.WhileHeader(whl,lp,exp,rp) ->
-         multibind [string_mcode whl; string_mcode lp; expression exp; 
+         multibind [string_mcode whl; string_mcode lp; expression exp;
                      string_mcode rp]
       | Ast.DoHeader(d) -> string_mcode d
       | Ast.WhileTail(whl,lp,exp,rp,sem) ->
-         multibind [string_mcode whl; string_mcode lp; expression exp; 
+         multibind [string_mcode whl; string_mcode lp; expression exp;
                      string_mcode rp; string_mcode sem]
       | Ast.ForHeader(fr,lp,e1,sem1,e2,sem2,e3,rp) ->
-         multibind [string_mcode fr; string_mcode lp; 
-                     get_option expression e1; string_mcode sem1; 
-                     get_option expression e2; string_mcode sem2; 
+         multibind [string_mcode fr; string_mcode lp;
+                     get_option expression e1; string_mcode sem1;
+                     get_option expression e2; string_mcode sem2;
                      get_option expression e3; string_mcode rp]
       | Ast.IteratorHeader(nm,lp,args,rp) ->
          multibind [ident nm; string_mcode lp;
                      expression_dots args; string_mcode rp]
       | Ast.SwitchHeader(switch,lp,exp,rp) ->
-         multibind [string_mcode switch; string_mcode lp; expression exp; 
+         multibind [string_mcode switch; string_mcode lp; expression exp;
                      string_mcode rp]
       | Ast.Break(br,sem) -> bind (string_mcode br) (string_mcode sem)
       | Ast.Continue(cont,sem) -> bind (string_mcode cont) (string_mcode sem)
@@ -395,7 +394,7 @@ let combiner bind option_default
       | Ast.DPcircles(c) -> string_mcode c
       | Ast.OptDParam(dp) -> define_param dp
       | Ast.UniqueDParam(dp) -> define_param dp in
-    k p 
+    k p
 
   (* discard the result, because the statement is assumed to be already
      represented elsewhere in the code *)
@@ -404,7 +403,7 @@ let combiner bind option_default
       Ast.NoDots -> ()
     | Ast.DroppingBetweenDots(stm,ind) -> let _ = statement stm in ()
     | Ast.AddingBetweenDots(stm,ind) -> let _ = statement stm in ()
-         
+
   and statement s =
     process_bef_aft s;
     let k s =
@@ -459,7 +458,7 @@ let combiner bind option_default
     | Ast.WhenModifier(_) -> option_default
     | Ast.WhenNotTrue(e) -> rule_elem e
     | Ast.WhenNotFalse(e) -> rule_elem e
+
   and case_line c =
     let k c =
       match Ast.unwrap c with
@@ -564,7 +563,7 @@ type 'cd rcode = rebuilder -> ('cd inout) -> 'cd inout
 
 let rebuilder
     meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
+    binary_mcode cv_mcode sign_mcode struct_mcode storage_mcode
     inc_file_mcode
     expdotsfn paramdotsfn stmtdotsfn decldotsfn
     identfn exprfn ftfn tyfn initfn paramfn declfn rulefn stmtfn casefn
@@ -622,7 +621,7 @@ let rebuilder
        | Ast.OptIdent(id) -> Ast.OptIdent(ident id)
        | Ast.UniqueIdent(id) -> Ast.UniqueIdent(ident id)) in
     identfn all_functions k i
-      
+
   and expression e =
     let k e =
       Ast.rewrap e
@@ -661,7 +660,7 @@ let rebuilder
        | Ast.SizeOfExpr(szf,exp) ->
            Ast.SizeOfExpr(string_mcode szf, expression exp)
        | Ast.SizeOfType(szf,lp,ty,rp) ->
-           Ast.SizeOfType(string_mcode szf,string_mcode lp, fullType ty, 
+           Ast.SizeOfType(string_mcode szf,string_mcode lp, fullType ty,
                            string_mcode rp)
        | Ast.TypeExp(ty) -> Ast.TypeExp(fullType ty)
        | Ast.MetaErr(name,constraints,keep,inherited) ->
@@ -684,7 +683,7 @@ let rebuilder
        | Ast.OptExp(exp) -> Ast.OptExp(expression exp)
        | Ast.UniqueExp(exp) -> Ast.UniqueExp(expression exp)) in
     exprfn all_functions k e
-         
+
   and fullType ft =
     let k ft =
       Ast.rewrap ft
@@ -694,14 +693,15 @@ let rebuilder
        | Ast.OptType(ty) -> Ast.OptType(fullType ty)
        | Ast.UniqueType(ty) -> Ast.UniqueType(fullType ty)) in
     ftfn all_functions k ft
-         
+
   and typeC ty =
     let k ty =
       Ast.rewrap ty
        (match Ast.unwrap ty with
-         Ast.BaseType(ty,sgn) ->
-           Ast.BaseType (base_mcode ty,get_option sign_mcode sgn)
-       | Ast.ImplicitInt(sgn) -> Ast.ImplicitInt (sign_mcode sgn)
+         Ast.BaseType(ty,strings) ->
+           Ast.BaseType (ty, List.map string_mcode strings)
+       | Ast.SignedT(sgn,ty) ->
+           Ast.SignedT(sign_mcode sgn,get_option typeC ty)
        | Ast.Pointer(ty,star) ->
            Ast.Pointer (fullType ty, string_mcode star)
        | Ast.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
@@ -715,6 +715,8 @@ let rebuilder
        | Ast.Array(ty,lb,size,rb) ->
            Ast.Array(fullType ty, string_mcode lb,
                      get_option expression size, string_mcode rb)
+       | Ast.EnumName(kind,name) ->
+           Ast.EnumName(string_mcode kind, ident name)
        | Ast.StructUnionName(kind,name) ->
            Ast.StructUnionName (struct_mcode kind, get_option ident name)
        | Ast.StructUnionDef(ty,lb,decls,rb) ->
@@ -725,7 +727,7 @@ let rebuilder
        | Ast.MetaType(name,keep,inherited) ->
            Ast.MetaType(meta_mcode name,keep,inherited)) in
     tyfn all_functions k ty
-         
+
   and declaration d =
     let k d =
       Ast.rewrap d
@@ -778,7 +780,7 @@ let rebuilder
        | Ast.OptIni(i) -> Ast.OptIni(initialiser i)
        | Ast.UniqueIni(i) -> Ast.UniqueIni(initialiser i)) in
     initfn all_functions k i
-         
+
   and parameterTypeDef p =
     let k p =
       Ast.rewrap p
@@ -815,16 +817,16 @@ let rebuilder
              string_mcode rp)
        | Ast.Else(els) -> Ast.Else(string_mcode els)
        | Ast.WhileHeader(whl,lp,exp,rp) ->
-           Ast.WhileHeader(string_mcode whl, string_mcode lp, expression exp, 
+           Ast.WhileHeader(string_mcode whl, string_mcode lp, expression exp,
                            string_mcode rp)
        | Ast.DoHeader(d) -> Ast.DoHeader(string_mcode d)
        | Ast.WhileTail(whl,lp,exp,rp,sem) ->
-           Ast.WhileTail(string_mcode whl, string_mcode lp, expression exp, 
+           Ast.WhileTail(string_mcode whl, string_mcode lp, expression exp,
                          string_mcode rp, string_mcode sem)
        | Ast.ForHeader(fr,lp,e1,sem1,e2,sem2,e3,rp) ->
-           Ast.ForHeader(string_mcode fr, string_mcode lp, 
-                         get_option expression e1, string_mcode sem1, 
-                         get_option expression e2, string_mcode sem2, 
+           Ast.ForHeader(string_mcode fr, string_mcode lp,
+                         get_option expression e1, string_mcode sem1,
+                         get_option expression e2, string_mcode sem2,
                          get_option expression e3, string_mcode rp)
        | Ast.IteratorHeader(whl,lp,args,rp) ->
            Ast.IteratorHeader(ident whl, string_mcode lp,
index e1d561a..9e2060c 100644 (file)
@@ -32,7 +32,6 @@ val combiner :
       ((Ast_cocci.unaryOp,'a) cmcode) ->
       ((Ast_cocci.binaryOp,'a) cmcode) ->
       ((Ast_cocci.const_vol,'a) cmcode) ->
-      ((Ast_cocci.baseType,'a) cmcode) ->
       ((Ast_cocci.sign,'a) cmcode) ->
       ((Ast_cocci.structUnion,'a) cmcode) ->
       ((Ast_cocci.storage,'a) cmcode) ->
@@ -90,7 +89,6 @@ val rebuilder :
     (Ast_cocci.unaryOp rmcode) ->
     (Ast_cocci.binaryOp rmcode) ->
     (Ast_cocci.const_vol rmcode) ->
-    (Ast_cocci.baseType rmcode) ->
     (Ast_cocci.sign rmcode) ->
     (Ast_cocci.structUnion rmcode) ->
     (Ast_cocci.storage rmcode) ->
index 2e258a9..8a5bd6e 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -57,9 +57,9 @@ type 'a combiner =
 type ('mc,'a) cmcode = 'mc Ast0.mcode -> 'a
 type ('cd,'a) ccode = 'a combiner -> ('cd -> 'a) -> 'cd -> 'a
 
-let combiner bind option_default 
+let combiner bind option_default
     meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
+    binary_mcode cv_mcode sign_mcode struct_mcode storage_mcode
     inc_mcode
     dotsexprfn dotsinitfn dotsparamfn dotsstmtfn dotsdeclfn dotscasefn
     identfn exprfn
@@ -206,9 +206,8 @@ let combiner bind option_default
     let k t =
       match Ast0.unwrap t with
        Ast0.ConstVol(cv,ty) -> bind (cv_mcode cv) (typeC ty)
-      |        Ast0.BaseType(ty,sign) ->
-         bind (get_option sign_mcode sign) (base_mcode ty)
-      |        Ast0.ImplicitInt(sign) -> (sign_mcode sign)
+      |        Ast0.BaseType(ty,strings) -> multibind (List.map string_mcode strings)
+      |        Ast0.Signed(sign,ty) -> bind (sign_mcode sign) (get_option typeC ty)
       | Ast0.Pointer(ty,star) -> bind (typeC ty) (string_mcode star)
       | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
          function_pointer (ty,lp1,star,rp1,lp2,params,rp2) []
@@ -216,6 +215,7 @@ let combiner bind option_default
          function_type (ty,lp1,params,rp1) []
       | Ast0.Array(ty,lb,size,rb) ->
          array_type (ty,lb,size,rb) []
+      | Ast0.EnumName(kind,name) -> bind (string_mcode kind) (ident name)
       | Ast0.StructUnionName(kind,name) ->
          bind (struct_mcode kind) (get_option ident name)
       | Ast0.StructUnionDef(ty,lb,decls,rb) ->
@@ -457,7 +457,7 @@ let combiner bind option_default
       | Ast0.DPcircles(c) -> string_mcode c
       | Ast0.OptDParam(dp) -> define_param dp
       | Ast0.UniqueDParam(dp) -> define_param dp in
-    k p 
+    k p
 
   and fninfo = function
       Ast0.FStorage(stg) -> storage_mcode stg
@@ -574,7 +574,7 @@ type 'cd rcode = rebuilder -> ('cd inout) -> 'cd inout
 
 let rebuilder = fun
     meta_mcode string_mcode const_mcode assign_mcode fix_mcode unary_mcode
-    binary_mcode cv_mcode base_mcode sign_mcode struct_mcode storage_mcode
+    binary_mcode cv_mcode sign_mcode struct_mcode storage_mcode
     inc_mcode
     dotsexprfn dotsinitfn dotsparamfn dotsstmtfn dotsdeclfn dotscasefn
     identfn exprfn tyfn initfn paramfn declfn stmtfn casefn topfn ->
@@ -681,7 +681,7 @@ let rebuilder = fun
        | Ast0.SizeOfExpr(szf,exp) ->
            Ast0.SizeOfExpr(string_mcode szf, expression exp)
        | Ast0.SizeOfType(szf,lp,ty,rp) ->
-           Ast0.SizeOfType(string_mcode szf,string_mcode lp, typeC ty, 
+           Ast0.SizeOfType(string_mcode szf,string_mcode lp, typeC ty,
                             string_mcode rp)
        | Ast0.TypeExp(ty) -> Ast0.TypeExp(typeC ty)
        | Ast0.MetaErr(name,constraints,pure) ->
@@ -712,9 +712,10 @@ let rebuilder = fun
       Ast0.rewrap t
        (match Ast0.unwrap t with
          Ast0.ConstVol(cv,ty) -> Ast0.ConstVol(cv_mcode cv,typeC ty)
-       | Ast0.BaseType(ty,sign) ->
-           Ast0.BaseType(base_mcode ty, get_option sign_mcode sign)
-       | Ast0.ImplicitInt(sign) -> Ast0.ImplicitInt(sign_mcode sign)
+       | Ast0.BaseType(ty,strings) ->
+           Ast0.BaseType(ty, List.map string_mcode strings)
+       | Ast0.Signed(sign,ty) ->
+           Ast0.Signed(sign_mcode sign,get_option typeC ty)
        | Ast0.Pointer(ty,star) ->
            Ast0.Pointer(typeC ty, string_mcode star)
        | Ast0.FunctionPointer(ty,lp1,star,rp1,lp2,params,rp2) ->
@@ -729,6 +730,8 @@ let rebuilder = fun
        | Ast0.Array(ty,lb,size,rb) ->
            Ast0.Array(typeC ty, string_mcode lb,
                       get_option expression size, string_mcode rb)
+       | Ast0.EnumName(kind,name) ->
+           Ast0.EnumName(string_mcode kind, ident name)
        | Ast0.StructUnionName(kind,name) ->
            Ast0.StructUnionName (struct_mcode kind, get_option ident name)
        | Ast0.StructUnionDef(ty,lb,decls,rb) ->
index 47cb8ed..285539f 100644 (file)
@@ -36,7 +36,6 @@ val combiner :
     ((Ast_cocci.unaryOp,'a) cmcode) ->
     ((Ast_cocci.binaryOp,'a) cmcode) ->
     ((Ast_cocci.const_vol,'a) cmcode) ->
-    ((Ast_cocci.baseType,'a) cmcode) ->
     ((Ast_cocci.sign,'a) cmcode) ->
     ((Ast_cocci.structUnion,'a) cmcode) ->
     ((Ast_cocci.storage,'a) cmcode) ->
@@ -98,7 +97,6 @@ val rebuilder :
     (Ast_cocci.unaryOp rmcode) ->
     (Ast_cocci.binaryOp rmcode) ->
     (Ast_cocci.const_vol rmcode) ->
-    (Ast_cocci.baseType rmcode) ->
     (Ast_cocci.sign rmcode) ->
     (Ast_cocci.structUnion rmcode) ->
     (Ast_cocci.storage rmcode) ->
index f73dc3b..2254a1e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+# Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 # This file is part of Coccinelle.
 # 
index 1f315e9..8a0e475 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 4aae802..6f1d840 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 8d6d340..c5294f2 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 356fbad..a982efa 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index fca3ede..4be03ce 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index fe5660c..c3e02ba 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index b3ca128..9ea7f1e 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
diff --git a/popl09/.#Makefile.1.3 b/popl09/.#Makefile.1.3
deleted file mode 100644 (file)
index 96ec617..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-# Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-# This file is part of Coccinelle.
-# 
-# Coccinelle is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, according to version 2 of the License.
-# 
-# Coccinelle is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-# 
-# The authors reserve the right to distribute this or future versions of
-# Coccinelle under other licenses.
-
-
-#note: if you add a file (a .mli or .ml), dont forget to do a   make depend
-
-TARGET = popl
-
-SRC = ast_popl.ml asttopopl.ml insert_quantifiers.ml \
-pretty_print_popl.ml flag_popl.ml popltoctl.ml popl.ml
-
-SYSLIBS=str.cma unix.cma
-LIBS=../commons/commons.cma ../globals/globals.cma
-
-INCLUDES = -I ../commons -I ../globals \
-              -I ../ctl -I ../parsing_c -I ../parsing_cocci -I ../engine
-
-#The Caml compilers.
-#for warning:  -w A 
-#for profiling:  -p -inline 0   with OCAMLOPT
-OCAMLCFLAGS ?= -g -dtypes
-OCAMLC =ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
-OCAMLOPT = ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
-OCAMLDEP = ocamldep$(OPTBIN) $(INCLUDES)
-OCAMLMKTOP=ocamlmktop -g -custom
-
-
-
-LIB=$(TARGET).cma
-OPTLIB=$(LIB:.cma=.cmxa)
-
-OBJS = $(SRC:.ml=.cmo)
-OPTOBJS = $(SRC:.ml=.cmx)
-
-all: $(LIB)
-all.opt: $(OPTLIB)
-
-$(TARGET).top: $(LIB)
-       $(OCAMLMKTOP) -o $(TARGET).top $(SYSLIBS) $(LIBS) $(OBJS)
-
-$(LIB):  $(OBJS)
-       $(OCAMLC) -a -o $(LIB) $(OBJS)
-
-clean::
-       rm -f $(LIB) $(TARGET).top
-
-
-$(OPTLIB): $(OPTOBJS)
-       $(OCAMLOPT) -a -o $(OPTLIB) $(OPTOBJS)
-
-# clean rule for LIB.opt
-clean::
-       rm -f $(OPTLIB) $(LIB:.cma=.a)  
-
-
-.SUFFIXES:
-.SUFFIXES: .ml .mli .cmo .cmi .cmx
-
-.ml.cmo:
-       $(OCAMLC) -c $<
-
-.mli.cmi:
-       $(OCAMLC) -c $<
-
-.ml.cmx:
-       $(OCAMLOPT) -c $<
-
-
-
-
-# clean rule for others files
-clean::
-       rm -f *.cm[iox] *.o *.annot
-       rm -f *~ .*~ #*# 
-
-depend: 
-       $(OCAMLDEP) *.mli *.ml > .depend
-
-#clean::
-#      rm -f .depend
-
-.depend:
-       $(OCAMLDEP) $(INCLUDE_PATH) *.mli *.ml > .depend
-
--include .depend
diff --git a/popl09/.cvsignore b/popl09/.cvsignore
deleted file mode 100644 (file)
index 0a2d2b3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.depend
-*.cma
dissimilarity index 96%
index 687e676..c0c557a 100644 (file)
@@ -1,33 +1,14 @@
-asttopopl.cmi: ast_popl.cmo ../parsing_cocci/ast_cocci.cmi 
-insert_quantifiers.cmi: ast_popl.cmo 
-popl.cmi: ../ctl/wrapper_ctl.cmi ../engine/lib_engine.cmo ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi 
-popltoctl.cmi: ../ctl/wrapper_ctl.cmi ../engine/lib_engine.cmo ast_popl.cmo \
-    ../ctl/ast_ctl.cmo ../parsing_cocci/ast_cocci.cmi 
-pretty_print_popl.cmi: ast_popl.cmo 
-ast_popl.cmo: ../parsing_cocci/ast_cocci.cmi 
-ast_popl.cmx: ../parsing_cocci/ast_cocci.cmx 
-asttopopl.cmo: ../parsing_cocci/pretty_print_cocci.cmi ast_popl.cmo \
-    ../parsing_cocci/ast_cocci.cmi asttopopl.cmi 
-asttopopl.cmx: ../parsing_cocci/pretty_print_cocci.cmx ast_popl.cmx \
-    ../parsing_cocci/ast_cocci.cmx asttopopl.cmi 
-insert_quantifiers.cmo: ../commons/common.cmi ast_popl.cmo \
-    ../parsing_cocci/ast_cocci.cmi insert_quantifiers.cmi 
-insert_quantifiers.cmx: ../commons/common.cmx ast_popl.cmx \
-    ../parsing_cocci/ast_cocci.cmx insert_quantifiers.cmi 
-popl.cmo: ../ctl/wrapper_ctl.cmi popltoctl.cmi ../engine/lib_engine.cmo \
-    insert_quantifiers.cmi asttopopl.cmi ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi popl.cmi 
-popl.cmx: ../ctl/wrapper_ctl.cmx popltoctl.cmx ../engine/lib_engine.cmx \
-    insert_quantifiers.cmx asttopopl.cmx ../ctl/ast_ctl.cmx \
-    ../parsing_cocci/ast_cocci.cmx popl.cmi 
-popltoctl.cmo: ../ctl/wrapper_ctl.cmi ../parsing_cocci/visitor_ast.cmi \
-    ../engine/lib_engine.cmo flag_popl.cmo ast_popl.cmo ../ctl/ast_ctl.cmo \
-    ../parsing_cocci/ast_cocci.cmi popltoctl.cmi 
-popltoctl.cmx: ../ctl/wrapper_ctl.cmx ../parsing_cocci/visitor_ast.cmx \
-    ../engine/lib_engine.cmx flag_popl.cmx ast_popl.cmx ../ctl/ast_ctl.cmx \
-    ../parsing_cocci/ast_cocci.cmx popltoctl.cmi 
-pretty_print_popl.cmo: ../parsing_cocci/pretty_print_cocci.cmi ast_popl.cmo \
-    ../parsing_cocci/ast_cocci.cmi pretty_print_popl.cmi 
-pretty_print_popl.cmx: ../parsing_cocci/pretty_print_cocci.cmx ast_popl.cmx \
-    ../parsing_cocci/ast_cocci.cmx pretty_print_popl.cmi 
+asttopopl.cmi: ast_popl.cmo 
+insert_quantifiers.cmi: ast_popl.cmo 
+popltoctl.cmi: ast_popl.cmo 
+pretty_print_popl.cmi: ast_popl.cmo 
+asttopopl.cmo: ast_popl.cmo asttopopl.cmi 
+asttopopl.cmx: ast_popl.cmx asttopopl.cmi 
+insert_quantifiers.cmo: ast_popl.cmo insert_quantifiers.cmi 
+insert_quantifiers.cmx: ast_popl.cmx insert_quantifiers.cmi 
+popl.cmo: popltoctl.cmi insert_quantifiers.cmi asttopopl.cmi popl.cmi 
+popl.cmx: popltoctl.cmx insert_quantifiers.cmx asttopopl.cmx popl.cmi 
+popltoctl.cmo: flag_popl.cmo ast_popl.cmo popltoctl.cmi 
+popltoctl.cmx: flag_popl.cmx ast_popl.cmx popltoctl.cmi 
+pretty_print_popl.cmo: ast_popl.cmo pretty_print_popl.cmi 
+pretty_print_popl.cmx: ast_popl.cmx pretty_print_popl.cmi 
index 36a6c27..83c32f1 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+# Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 # This file is part of Coccinelle.
 # 
@@ -37,7 +37,7 @@ INCLUDES = -I ../commons -I ../globals \
 OCAMLCFLAGS ?= -g -dtypes
 OCAMLC =ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
 OCAMLOPT = ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
-OCAMLDEP = ocamldep$(OPTBIN) $(INCLUDES)
+OCAMLDEP = ocamldep$(OPTBIN) #$(INCLUDES)
 OCAMLMKTOP=ocamlmktop -g -custom
 
 
index b05a619..64c2ec9 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index ed339e2..e256ceb 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 75f7906..20b79f1 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 4dc4ea0..a257fba 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index dd9d2ca..92ea56d 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -34,5 +34,5 @@ let poplz (name,_,ast) =
 
 let popl r =
   match r with
-    Ast_cocci.CocciRule (a,b,c,_) -> poplz (a,b,c)
+    Ast_cocci.CocciRule(a,b,c,_,Ast_cocci.Normal) -> poplz (a,b,c)
   | _ -> []
index ef7a92f..f98f199 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -53,7 +53,6 @@ let contains_modif =
   let recursor =
     V.combiner bind option_default
       mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
-      mcode
       do_nothing do_nothing do_nothing do_nothing
       do_nothing do_nothing do_nothing do_nothing do_nothing do_nothing
       do_nothing rule_elem do_nothing do_nothing do_nothing do_nothing in
index 3bfa7b3..86ca8fe 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
diff --git a/pycaml/.cvsignore b/pycaml/.cvsignore
deleted file mode 100644 (file)
index 3245aa2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-._d
-pycaml.cma
-pycaml.customtop
diff --git a/python/.#yes_pycocci.ml.1.1 b/python/.#yes_pycocci.ml.1.1
deleted file mode 100644 (file)
index c252439..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-(*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
-* Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
-* This file is part of Coccinelle.
-* 
-* Coccinelle is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, according to version 2 of the License.
-* 
-* Coccinelle is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
-* along with Coccinelle.  If not, see <http://www.gnu.org/licenses/>.
-* 
-* The authors reserve the right to distribute this or future versions of
-* Coccinelle under other licenses.
-*)
-
-
-open Ast_c
-open Common
-open Pycaml
-open Pycocci_aux
-module StringMap = Map.Make (String)
-
-exception Pycocciexception
-
-let check_return_value v =
-  if v = (pynull ()) then 
-         (pyerr_print ();
-         raise Pycocciexception)
-  else ()
-let check_int_return_value v =
-  if v = -1 then
-         (pyerr_print ();
-         raise Pycocciexception)
-  else ()
-
-let initialised = ref false
-
-let coccinelle_module = ref (pynone ())
-let cocci_file_name = ref ""
-
-(* dealing with python modules loaded *)
-let module_map = ref (StringMap.add "__main__" (pynone ()) StringMap.empty)
-
-let get_module module_name =
-  StringMap.find module_name (!module_map)
-
-let is_module_loaded module_name =
-  try
-    let _ = get_module module_name in
-    true
-  with Not_found -> false
-
-let load_module module_name =
-  if not (is_module_loaded module_name) then
-    let m = pyimport_importmodule module_name in
-    check_return_value m;
-    (module_map := (StringMap.add module_name m (!module_map));
-    m)
-  else get_module module_name
-(* end python module handling part *)
-
-(* initialisation routines *)
-let pycocci_init () =
-  (* initialize *)
-  if not !initialised then (
-  initialised := true;
-  Unix.putenv "PYTHONPATH"
-      (Printf.sprintf "%s/coccinelle" (Unix.getenv "HOME"));
-  let _ = if not (py_isinitialized () != 0) then 
-       (if !Flag.show_misc then Common.pr2 "Initializing python\n%!"; 
-       py_initialize()) in
-
-  (* set argv *)
-  let argv0 = Printf.sprintf "%s%sspatch" (Sys.getcwd ()) (match Sys.os_type with "Win32" -> "\\" | _ -> "/") in
-  let _ = pycaml_setargs argv0 in
-
-  coccinelle_module := (pymodule_new "coccinelle");
-  module_map := StringMap.add "coccinelle" !coccinelle_module !module_map;
-  let _ = load_module "coccilib.elems" in
-  let _ = load_module "coccilib.output" in
-  ()) else
-
-  ()
-
-(*let _ = pycocci_init ()*)
-(* end initialisation routines *)
-
-(* python interaction *)
-let split_fqn fqn =
-  let last_period = String.rindex fqn '.' in
-  let module_name = String.sub fqn 0 last_period in
-  let class_name = String.sub fqn (last_period + 1) (String.length fqn - last_period - 1) in
-  (module_name, class_name)
-
-let pycocci_get_class_type fqn =
-  let (module_name, class_name) = split_fqn fqn in
-  let m = get_module module_name in
-  let attr = pyobject_getattrstring(m, class_name) in
-  check_return_value attr;
-  attr
-
-let pycocci_instantiate_class fqn args =
-  let class_type = pycocci_get_class_type fqn in
-  let obj = pyobject_callobject(class_type, args) in
-  check_return_value obj;
-  obj
-
-(* end python interaction *)
-
-let inc_match = ref true
-
-let include_match v =
-  let truth = pyobject_istrue (pytuple_getitem (v, 1)) in
-  check_int_return_value truth;
-  inc_match := truth != 0;
-  pynone ()
-
-let build_method (mname, camlfunc, args) pymodule classx classdict =
-  let cmx = pymethod_new(pywrap_closure camlfunc, args, classx) in
-  let v = pydict_setitemstring(classdict, mname, cmx) in
-  check_int_return_value v;
-  ()
-
-let build_class cname parent methods pymodule =
-  let cd = pydict_new() in
-  check_return_value cd;
-  let cx = pyclass_new(pytuple_fromsingle (pycocci_get_class_type parent), cd, pystring_fromstring cname) in
-  check_return_value cx;
-  List.iter (function meth -> build_method meth pymodule cx cd) methods;
-  let v = pydict_setitemstring(pymodule_getdict pymodule, cname, cx) in
-  check_int_return_value v;
-  (cd, cx)
-
-let has_environment_binding env name =
-  let a = pytuple_toarray name in
-  let (rule, name) = (Array.get a 1, Array.get a 2) in
-  let orule = pystring_asstring rule in
-  let oname = pystring_asstring name in
-  let e = List.exists (function (x,y) -> orule = x && oname = y) env in
-  if e then pytrue () else pyfalse ()
-
-let pyoutputinstance = ref (pynone ())
-let pyoutputdict = ref (pynone ())
-
-let get_cocci_file args =
-       pystring_fromstring (!cocci_file_name)
-
-let build_classes env =
-       let _ = pycocci_init () in
-       let module_dictionary = pyimport_getmoduledict() in
-        coccinelle_module := pymodule_new "coccinelle";
-       let mx = !coccinelle_module in
-       inc_match := true;
-        let (cd, cx) = build_class "Cocci" (!Flag.pyoutput) 
-               [("include_match", include_match, (pynull()));
-                ("has_env_binding", has_environment_binding env, (pynull()))] mx in
-       pyoutputinstance := cx;
-       pyoutputdict := cd;
-       let v1 = pydict_setitemstring(module_dictionary, "coccinelle", mx) in
-       check_int_return_value v1;
-        let mypystring = pystring_fromstring !cocci_file_name in
-        let v2 = pydict_setitemstring(cd, "cocci_file", mypystring) in
-       check_int_return_value v2;
-        ()
-
-let build_variable name value =
-  let mx = !coccinelle_module in
-  check_int_return_value (pydict_setitemstring(pymodule_getdict mx, name, value))
-
-let contains_binding e (_,(r,m)) =
-  try
-    let _ = List.find (function ((re, rm), _) -> r = re && m = rm) e in true
-  with Not_found -> false
-
-let construct_variables mv e =
-  let find_binding (r,m) =
-    try
-      let elem = List.find (function ((re,rm),_) -> r = re && m = rm) e in
-      Some elem
-    with Not_found -> None
-  in
-
-  let instantiate_Expression(x) =
-    let str = pystring_fromstring (Pycocci_aux.exprrep x) in
-    pycocci_instantiate_class "coccilib.elems.Expression" (pytuple_fromsingle (str))
-  in
-
-  let instantiate_Identifier(x) =
-    let str = pystring_fromstring x in
-    pycocci_instantiate_class "coccilib.elems.Identifier" (pytuple_fromsingle (str))
-  in
-
-  List.iter (function (py,(r,m)) ->
-    match find_binding (r,m) with
-      None -> ()
-    | Some (_, Ast_c.MetaExprVal ((expr, _), info_list)) ->
-       let expr_repr = instantiate_Expression(expr) in
-       let _ = build_variable py expr_repr in
-       ()
-    | Some (_, Ast_c.MetaIdVal id) ->
-       let id_repr = instantiate_Identifier(id) in
-       let _ = build_variable py id_repr in
-       ()
-    | Some (_, Ast_c.MetaPosValList l) ->
-       let locs = List.map (function (fname,(line,col),(line_end,col_end)) ->
-               pycocci_instantiate_class "coccilib.elems.Location" (pytuple5
-               (pystring_fromstring fname,
-               pystring_fromstring (Printf.sprintf "%d" line),
-               pystring_fromstring (Printf.sprintf "%d" col),
-               pystring_fromstring (Printf.sprintf "%d" line_end),
-               pystring_fromstring (Printf.sprintf "%d" col_end)))) l in
-       let pylocs = pytuple_fromarray (Array.of_list locs) in
-       let _ = build_variable py pylocs in
-       ()
-    | Some (_,binding) ->
-       let _ = build_variable py (pystring_fromstring (Pycocci_aux.stringrep binding))
-       in ()
-    ) mv;
-
-  ()
-
-let set_coccifile cocci_file =
-       cocci_file_name := cocci_file;
-       ()
-
-
-let pyrun_simplestring s = 
-  Pycaml.pyrun_simplestring s
-
-let py_isinitialized () = 
-  Pycaml.py_isinitialized ()
-
-
-let py_finalize () =
-  Pycaml.py_finalize ()
diff --git a/python/.cvsignore b/python/.cvsignore
deleted file mode 100644 (file)
index 0a2d2b3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.depend
-*.cma
dissimilarity index 100%
index f6f1ff2..f0cf0ee 100644 (file)
@@ -1,22 +1,6 @@
-no_pycocci.cmo: pycocci_aux.cmo ../commons/common.cmi ../parsing_c/ast_c.cmo 
-no_pycocci.cmx: pycocci_aux.cmx ../commons/common.cmx ../parsing_c/ast_c.cmx 
-no_pycocci_aux.cmo: ../parsing_c/pretty_print_c.cmi ../commons/common.cmi \
-    ../parsing_c/ast_c.cmo 
-no_pycocci_aux.cmx: ../parsing_c/pretty_print_c.cmx ../commons/common.cmx \
-    ../parsing_c/ast_c.cmx 
-pycocci.cmo: pycocci_aux.cmo ../commons/common.cmi ../parsing_c/ast_c.cmo 
-pycocci.cmx: pycocci_aux.cmx ../commons/common.cmx ../parsing_c/ast_c.cmx 
-pycocci_aux.cmo: ../parsing_c/pretty_print_c.cmi ../commons/common.cmi \
-    ../parsing_c/ast_c.cmo 
-pycocci_aux.cmx: ../parsing_c/pretty_print_c.cmx ../commons/common.cmx \
-    ../parsing_c/ast_c.cmx 
-yes_pycocci.cmo: pycocci_aux.cmo ../pycaml/pycaml.cmo ../globals/flag.cmo \
-    ../commons/common.cmi ../parsing_c/ast_c.cmo 
-yes_pycocci.cmx: pycocci_aux.cmx ../pycaml/pycaml.cmx ../globals/flag.cmx \
-    ../commons/common.cmx ../parsing_c/ast_c.cmx 
-yes_pycocci_aux.cmo: ../pycaml/pycaml.cmo ../parsing_c/pretty_print_c.cmi \
-    ../commons/common.cmi ../parsing_cocci/ast_cocci.cmi \
-    ../parsing_c/ast_c.cmo 
-yes_pycocci_aux.cmx: ../pycaml/pycaml.cmx ../parsing_c/pretty_print_c.cmx \
-    ../commons/common.cmx ../parsing_cocci/ast_cocci.cmx \
-    ../parsing_c/ast_c.cmx 
+no_pycocci.cmo: pycocci_aux.cmo 
+no_pycocci.cmx: pycocci_aux.cmx 
+pycocci.cmo: pycocci_aux.cmo 
+pycocci.cmx: pycocci_aux.cmx 
+yes_pycocci.cmo: pycocci_aux.cmo 
+yes_pycocci.cmx: pycocci_aux.cmx 
index 0fe4954..d2a67ec 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+# Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 # This file is part of Coccinelle.
 # 
@@ -55,7 +55,7 @@ INCLUDES=$(INCLUDEDIRS:%=-I %) $(INCLUDESEXTRA)
 OCAMLCFLAGS ?= -g -dtypes
 OCAMLC =ocamlc$(OPTBIN) $(OCAMLCFLAGS) $(INCLUDES)
 OCAMLOPT = ocamlopt$(OPTBIN) $(OPTFLAGS) $(INCLUDES)
-OCAMLDEP = ocamldep$(OPTBIN) $(INCLUDES)
+OCAMLDEP = ocamldep$(OPTBIN) #$(INCLUDES)
 
 
 ##############################################################################
diff --git a/python/coccilib/.cvsignore b/python/coccilib/.cvsignore
deleted file mode 100644 (file)
index 0d20b64..0000000
+++ /dev/null
@@ -1 +0,0 @@
-*.pyc
diff --git a/python/coccilib/coccigui/.cvsignore b/python/coccilib/coccigui/.cvsignore
deleted file mode 100644 (file)
index 0d20b64..0000000
+++ /dev/null
@@ -1 +0,0 @@
-*.pyc
index a33a45f..af6f713 100644 (file)
@@ -39,6 +39,10 @@ class Output:
        def print_sec(self, msg, p) :
                print "[[view:%s::face=ovl-face2::linb=%s::colb=%s::cole=%s][%s]]" % (p[0].file,p[0].line,p[0].column,p[0].column_end,msg)
 
+       def print_secs(self, msg, ps) :
+               for i in ps:
+                       print "[[view:%s::face=ovl-face2::linb=%s::colb=%s::cole=%s][%s]]" % (i.file,i.line,i.column,i.column_end,msg)
+
 class Console(Output):
        def __init__(self):
                pass
index d138580..a371f2c 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index 47f9146..e4ded17 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index a0a6a22..4f55845 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index efc62f3..1566b64 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
index f299124..9d24034 100644 (file)
@@ -28,4 +28,3 @@ have to install OCaml (which contains the 'ocamlrun' bytecode interpreter,
 the equivalent of 'java', the Java virtual machine, but for OCaml) and then do:
 
  ocamlrun spatch -sp_file demos/simple.cocci demos/simple.c
-
index d029e9b..8d6c161 100644 (file)
@@ -172,18 +172,18 @@ expression X,Y;
 @@
 X & Y => Y & X
 
-// only if side effect free in theory ...
-Expression
-@ and_comm @ 
-expression X,Y; 
-@@
-X && Y => Y && X
+// only if side effect free in theory, perhaps makes no sense
+// Expression
+// @ and_comm @ 
+// expression X,Y; 
+// @@
+// X && Y => Y && X
 
-Expression
-@ or_comm @ 
-expression X,Y; 
-@@
-X || Y => Y || X
+// Expression
+// @ or_comm @ 
+// expression X,Y; 
+// @@
+// X || Y => Y || X
 
 
 // ---------------------------------------------------------------------------
@@ -558,6 +558,12 @@ return ...; => return;
 // todo: isomorphism avec les () around ? cf sizeof 3.
 // (E) => E    with some conditions.
 
+Expression
+@ paren @
+expression E;
+@@
+
+ (E) => E
 
 // ---------------------------------------------------------------------------
 // Pointer/Array isomorphisms
@@ -615,12 +621,13 @@ E.fld => E1->fld
 // sizeof isomorphisms
 // ---------------------------------------------------------------------------
 
-Expression
-@ sizeof_parens @
-expression E;
-@@
+// The following is made redundant by the paren isomorphism
+// Expression
+// @ sizeof_parens @
+// expression E;
+// @@
 
-sizeof(E) => sizeof E
+// sizeof(E) => sizeof E
 
 
 Expression
index a2a3d29..c1087eb 100644 (file)
@@ -1,5 +1,5 @@
 (*
-* Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen
+* Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller
 * This file is part of Coccinelle.
 * 
@@ -376,7 +376,7 @@ let test_parse_cocci file =
   if not (file =~ ".*\\.cocci") 
   then pr2 "warning: seems not a .cocci file";
 
-  let (xs,_,_,_,_,grep_tokens,query) =
+  let (_,xs,_,_,_,_,grep_tokens,query) =
     Parse_cocci.process file (Some !Config.std_iso) false in
   xs +> List.iter Pretty_print_cocci.unparse;
   Printf.printf "grep tokens\n";
index 508e721..8fcbfcd 100644 (file)
@@ -37,7 +37,8 @@ val test_parse_cocci : filename -> unit
 
 val sp_of_file :
   filename (* coccifile *)  -> filename option (* isofile *) ->
-  Ast_cocci.rule list * Ast_cocci.meta_name list list list *
+  Ast_cocci.metavar list list * Ast_cocci.rule list *
+      Ast_cocci.meta_name list list list *
       Ast_cocci.meta_name list list list *
       Ast_cocci.meta_name list list list * Ast_cocci.meta_name list list list *
       string list list *
diff --git a/tests/.cvsignore b/tests/.cvsignore
deleted file mode 100644 (file)
index dc63c7c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-score_cocci_best.marshalled
diff --git a/tests/bad_define_parse.c b/tests/bad_define_parse.c
new file mode 100644 (file)
index 0000000..e5df177
--- /dev/null
@@ -0,0 +1,10 @@
+/* I830 Video support */
+#define NEED_REPLIES                              /* ? */
+//#define EXTENSION_PROC_ARGS void *
+#include "file.h"                   /* required */
+#include <X11/extensions/panoramiXproto.h>        /* required */
+
+int main () {
+  f();
+  __releases(x) 
+}
diff --git a/tests/bad_define_parse.cocci b/tests/bad_define_parse.cocci
new file mode 100644 (file)
index 0000000..98be2c2
--- /dev/null
@@ -0,0 +1,5 @@
+@@
+@@
+
+- f()
++ g()
index bb8f454..35d992b 100644 (file)
@@ -10,14 +10,14 @@ if (
    )
 S1 else S2
 
-// @@
-// expression E,E1;
-// statement S1,S2;
-// @@
+@@
+expression E,E1;
+statement S1,S2;
+@@
 
-// + E = E1;
-// if (
-// -   E = E1
-// +   E
-//    )
-// S1 else S2
++ E = E1;
+if (
+-   E = E1
++   E
+   )
+S1 else S2
diff --git a/tests/bad_ptr_print.c b/tests/bad_ptr_print.c
new file mode 100644 (file)
index 0000000..faa6ea3
--- /dev/null
@@ -0,0 +1,4 @@
+static inline int tester(struct usb_endpoint_descriptor *epd)
+{
+  f((struct foo *)x);
+}
diff --git a/tests/bad_ptr_print.cocci b/tests/bad_ptr_print.cocci
new file mode 100644 (file)
index 0000000..a6ad9c5
--- /dev/null
@@ -0,0 +1,6 @@
+@@
+expression E;
+@@
+
+- f(E)
++ g(E)
diff --git a/tests/bad_ptr_print.res b/tests/bad_ptr_print.res
new file mode 100644 (file)
index 0000000..c9d91d6
--- /dev/null
@@ -0,0 +1,4 @@
+static inline int tester(struct usb_endpoint_descriptor *epd)
+{
+  g((struct foo *)x);
+}
index 7c81d75..eac71c7 100644 (file)
@@ -10,6 +10,7 @@ T { ...
 
 @@
 type rule1.T;
+identifier rule1.lock;
 T *x;
 @@
 
index 8a2f4f7..891ab8e 100644 (file)
@@ -9,6 +9,6 @@ struct aic7xxx_host {
 #define MSG_TYPE_INITIATOR_MSGOUT  0x01
 #define MSG_TYPE_INITIATOR_MSGIN   0x02
        unsigned char   msg_len;        /* Length of message */
-       unsigned char   xmsg_index;     /* Index into msg_buf array */
+       unsigned char   msg_index;      /* Index into msg_buf array */
 };
 
index 7544988..9b7cfae 100644 (file)
@@ -13,9 +13,20 @@ static char *r128_family2[] = {
        "PCI",
 };
 
+static struct foo *r128_family3[] = {
+       "AGP",
+       "PCI",
+};
+
+static const struct foo *r128_family4[] = {
+       "AGP",
+       "PCI",
+};
+
 int main () {
   ent->driver_data = ARRAY_SIZE(r128_family);
   ent->driver_data = ARRAY_SIZE(r128_family1);
   ent->driver_data = ARRAY_SIZE(r128_family2);
   ent->driver_data = ARRAY_SIZE(r128_family3);
+  ent->driver_data = ARRAY_SIZE(r128_family4);
 }
diff --git a/tests/empty.iso b/tests/empty.iso
new file mode 100644 (file)
index 0000000..e69de29
index 6ff8937..2fafe5f 100644 (file)
@@ -1,5 +1,5 @@
 static int pcm20_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
 {
-       struct video_tuner v;
+       struct video_tuner *v;
        pcm20_getflags(pcm20, &v->flags, &v->xxx, &v->signal);
 }
index 7c73717..377175f 100644 (file)
@@ -1,6 +1,6 @@
 static int pcm20_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
 {
-       struct video_tuner v;
+       struct video_tuner *v;
         //&v.field;
        f(&v->field1, &v->field2, &v->field3, &v->field4);
 }
index 544d956..0f30b86 100644 (file)
@@ -1,5 +1,5 @@
 static int pcm20_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
 {
-       struct video_tuner v;
+       struct video_tuner *v;
        f(v->field1, v->field2);
 }
diff --git a/tests/file.h b/tests/file.h
new file mode 100644 (file)
index 0000000..b3b2a13
--- /dev/null
@@ -0,0 +1,4 @@
+
+int xmain () {
+  f();
+}
index 10faa83..e0a4035 100644 (file)
@@ -1,5 +1,5 @@
 int main() {
   int *data = kmalloc(element->string.length + 1, GFP_KERNEL);
   foo();
-  memset(*data, 0, element->string.length + 1);
+  memset(data, 0, element->string.length + 1);
 }
index 88ea86f..8f0c941 100644 (file)
@@ -1,5 +1,5 @@
 int main() {
   int *data = kzalloc(element->string.length + 1, GFP_KERNEL);
   foo();
-  memset(*data, 0, element->string.length + 1);
+  memset(data, 0, element->string.length + 1);
 }
diff --git a/tests/longlong.c b/tests/longlong.c
new file mode 100644 (file)
index 0000000..2cb589b
--- /dev/null
@@ -0,0 +1,6 @@
+long long a;
+
+int main () {
+  long long b;
+  return 0;
+}
diff --git a/tests/longlong.cocci b/tests/longlong.cocci
new file mode 100644 (file)
index 0000000..65ff2a2
--- /dev/null
@@ -0,0 +1,7 @@
+@@
+identifier x;
+@@
+
+- long long
++ int
+  x;
\ No newline at end of file
diff --git a/tests/longlong.res b/tests/longlong.res
new file mode 100644 (file)
index 0000000..d185360
--- /dev/null
@@ -0,0 +1,6 @@
+int a;
+
+int main () {
+  int b;
+  return 0;
+}
index a94d8a5..b3bde41 100644 (file)
@@ -1,4 +1,4 @@
 int main() {
-  x = f(x) + 1;
+  f(x) = f(x) + 1;
   *f(x) = 12;  // or maybe f(x) has to be in parens?
 }
index 732c458..162d50e 100644 (file)
@@ -1 +1,5 @@
 #define SC_FCMND(fcmnd) ((struct scsi_cmnd *)((long)fcmnd - (long)&(((struct scsi_cmnd *)0)->SCp)))
+
+int main() {
+  return ((struct scsi_cmnd *)((long)fcmnd - (long)&(((struct scsi_cmnd *)0)->SCp)));
+}
diff --git a/tests/my.h b/tests/my.h
new file mode 100644 (file)
index 0000000..c498544
--- /dev/null
@@ -0,0 +1,10 @@
+#define DBG_OFFSCREEN(a)
+
+#define I830FALLBACK(s, arg...)                               \
+do {                                                  \
+    if (I830PTR(pScrn)->fallback_debug) {             \
+      xf86DrvMsg(pScrn->scrnIndex, X_INFO,            \
+                 "EXA fallback: " s "\n", ##arg);     \
+    }                                                 \
+    return FALSE;                                     \
+} while(0)
index 26cd80c..4b690b3 100644 (file)
@@ -11,7 +11,6 @@ expression f;
 (
      return x;
 |
-     ...
 (
      *x
 |
@@ -21,7 +20,6 @@ expression f;
 |
      f(...,(T)x,...)
 )
-     ...
 )
     ...
   }
@@ -38,7 +36,6 @@ statement S;
 (
     return x;
 |
-    ...
 (
     *x
 |
@@ -48,7 +45,6 @@ statement S;
 |
     f(...,(T)x,...)
 )
-    ...
 )
     ...
   }
@@ -65,7 +61,6 @@ statement S;
 (
     return x;
 |
-    ...
 (
     *x
 |
@@ -75,5 +70,4 @@ statement S;
 |
     f(...,(T3)x,...)
 )
-    ...
 )
index 83540b7..48574dc 100644 (file)
@@ -39,7 +39,7 @@ while ((d = \(pci_get_device\|pci_get_device_reverse\|pci_get_subsys\|pci_get_cl
 identifier d;
 type T;
 expression e;
-iterator for_each_pci_dev;
+iterator name for_each_pci_dev;
 @@
 
 T *d;
index c6f23b2..2990d80 100644 (file)
@@ -10,7 +10,7 @@ idexpression struct list_head *I;
 @@
 identifier I;
 expression E;
-iterator list_for_each_rcu;
+iterator name list_for_each_rcu;
 statement S;
 @@
 
@@ -23,7 +23,7 @@ statement S;
 @@
 identifier I;
 expression E;
-iterator list_for_each;
+iterator name list_for_each;
 statement S;
 @@
 
@@ -36,7 +36,7 @@ statement S;
 @@
 identifier I;
 expression E;
-iterator list_for_each_prev;
+iterator name list_for_each_prev;
 statement S;
 @@
 
@@ -63,7 +63,7 @@ expression E;
 type T,T1;
 identifier I, x;
 expression E, E1, E2;
-iterator list_for_each_entry_rcu;
+iterator name list_for_each_entry_rcu;
 @@
 
   <... when != _Y(I)
@@ -81,7 +81,7 @@ iterator list_for_each_entry_rcu;
 type T,T1;
 identifier I, x;
 expression E, E1, E2;
-iterator list_for_each_entry;
+iterator name list_for_each_entry;
 @@
 
   <... when != _Y(I)
@@ -99,7 +99,7 @@ iterator list_for_each_entry;
 type T,T1;
 identifier I, x;
 expression E, E1, E2;
-iterator list_for_each_entry_reverse;
+iterator name list_for_each_entry_reverse;
 @@
 
   <... when != _Y(I)
diff --git a/tests/retmac.c b/tests/retmac.c
new file mode 100644 (file)
index 0000000..43d1ff6
--- /dev/null
@@ -0,0 +1,13 @@
+#define I830FALLBACK(s, arg...)                               \
+do {                                                  \
+    if (I830PTR(pScrn)->fallback_debug) {             \
+      xf86DrvMsg(pScrn->scrnIndex, X_INFO,            \
+                 "EXA fallback: " s "\n", ##arg);     \
+    }                                                 \
+    return FALSE;                                     \
+} while(0)
+
+
+int main () {
+  I830FALLBACK(a,b);
+}
diff --git a/tests/test_unsigned_meta.c b/tests/test_unsigned_meta.c
new file mode 100644 (file)
index 0000000..2ca154b
--- /dev/null
@@ -0,0 +1,8 @@
+int main () {
+  unsigned int x;
+  signed int y;
+  unsigned char q;
+  char m;
+  return 0;
+}
+
diff --git a/tests/test_unsigned_meta.cocci b/tests/test_unsigned_meta.cocci
new file mode 100644 (file)
index 0000000..210277d
--- /dev/null
@@ -0,0 +1,40 @@
+@@
+type T;
+@@
+
+- unsigned
+  T x;
+
+@@
+type T;
+@@
+
+- signed
+  T y;
+
+@r@
+type T;
+@@
+
+  unsigned T q;
++ T r;
++ unsigned T s1;
++ signed T s2;
+
+@@
+type r.T;
+@@
+
+- T m;
+
+@@
+@@
++ signed
+  int x;
++ char new_x;
+
+@@
+@@
++ unsigned
+  int y;
++ char new_y;
diff --git a/tests/test_unsigned_meta.res b/tests/test_unsigned_meta.res
new file mode 100644 (file)
index 0000000..b37f1fd
--- /dev/null
@@ -0,0 +1,12 @@
+int main () {
+  signed int x;
+  char new_x;
+  unsigned int y;
+  char new_y;
+  unsigned char q;
+  char r;
+  unsigned char s1;
+  signed char s2;
+  return 0;
+}
+
index 5c89ef3..0d2fbad 100644 (file)
@@ -1,10 +1,10 @@
 @@
-identifier proc_info_func;
+identifier proc_info_func, usb_stor_host_template;
 @@
 
 struct SHT usb_stor_host_template = {
        .name =                         "usb-storage",
        .proc_name =                    "usb-storage",
 -      .proc_info =                    proc_info_func,
-       .ioctl =                        NULL
+       .ioctl =                        NULL,
 };
index 0a2bf25..2c4be2b 100644 (file)
@@ -5,8 +5,7 @@ identifier dev, cmd, arg;
 identifier v;
 type T;
 identifier fld;
-expression E, E1, E2;
-statement S;
+expression E1, E2;
 @@
 
   ioctlfn(
index 0232f2c..727ec22 100644 (file)
@@ -5,8 +5,6 @@ identifier dev, cmd, arg;
 identifier v;
 type T;
 identifier fld;
-expression E, E1, E2;
-statement S;
 @@
 
   ioctlfn(
index a427258..368213e 100644 (file)
@@ -1,10 +1,7 @@
 @@
-local function ioctlfn;
-identifier dev, cmd, arg;
+identifier arg;
 identifier v;
-type T;
-statement S1, S2;
-identifier fld;
+statement S1;
 @@
 
 -     if (copy_from_user(v,arg,sizeof(v)) != 0) S1 else {}
index dced34d..7a85473 100644 (file)
@@ -1,4 +1,5 @@
 @@
+identifier x;
 expression E, E1, E2;
 @@
 
index c9d2c3b..b417e72 100644 (file)
@@ -4,8 +4,6 @@ identifier dev, cmd, arg;
 identifier v;
 type T;
 identifier fld;
-expression E;
-statement S;
 @@
 
   ioctlfn(
index 615238d..7b5eb80 100644 (file)
@@ -1,6 +1,6 @@
 PROGS=gitgrep split_patch extract_c_and_res #generate_dependencies
 
-all: $(PROGS)
+all: $(SUBDIRS) $(PROGS)
 
 # for recursive make
 all.opt: $(PROGS)
@@ -24,6 +24,8 @@ bridge: bridge.ml
 install_bridge: bridge
        cp -f bridge /usr/local/bin
 
+.PHONY: $(SUBDIRS)
+
 
 SYSLIBS = str.cma unix.cma 
 
@@ -36,7 +38,7 @@ OCAMLOPT=ocamlopt$(OPTBIN)   $(INCLUDE) $(OPTFLAGS)
 #OCAMLLEX=ocamllex$(OPTBIN) -ml
 OCAMLLEX=ocamllex$(OPTBIN)
 OCAMLYACC=ocamlyacc -v
-OCAMLDEP=ocamldep$(OPTBIN)  $(INCLUDE)
+OCAMLDEP=ocamldep$(OPTBIN) #$(INCLUDE)
 OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDE)
 
 split_patch: split_patch.cmo
@@ -48,12 +50,6 @@ extract_c_and_res: extract_c_and_res.cmo
 generate_dependencies: generate_dependencies.cmo
        $(OCAMLC) -o $@ $(SYSLIBS) $(INCLUDE) $(LIBS)  $+
 
-
-clean::
-       rm -f $(PROGS)
-
-
-
 .SUFFIXES: .ml .mli .cmo .cmi .cmx
 
 .ml.cmo:
@@ -63,10 +59,10 @@ clean::
 .ml.cmx:
        $(OCAMLOPT) -c $<
 
-clean::
+clean:
+       rm -f $(PROGS)
        rm -f *.cm[ioxa] *.o *.a *.cmxa *.annot
 
-
 beforedepend::
 
 depend:: beforedepend
diff --git a/tools/distributed/.cvsignore b/tools/distributed/.cvsignore
deleted file mode 100644 (file)
index 8f4805b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-cleanup
-spatch_linux
index e08d796..5614491 100644 (file)
@@ -1,5 +1,5 @@
 spatch_linux: spatch_linux.c
-       gcc -o spatch_linux spatch_linux.c
+       gcc -D HOME="\"${COCCINELLE_HOME}/tools/distributed/\"" -o spatch_linux spatch_linux.c
 
 install: spatch_linux cleanup
        cp spatch_linux ~/bin
index cc0f6a1..c38f9bf 100644 (file)
@@ -13,7 +13,9 @@
 
 #define DONE_SEM 0 // index of the semaphore on which to wait for children
 
+#ifndef HOME
 #define HOME "/home/julia/coccinelle/tools/distributed/"
+#endif
 
 int sem;
 
index 9b18870..424d202 100755 (executable)
@@ -1,8 +1,7 @@
 #!/bin/tcsh
 
-setenv PYTHONPATH ${HOME}/coccinelle/python
-setenv LD_LIBRARY_PATH ${HOME}/coccinelle/pycaml
-setenv COCCINELLE_HOME ${HOME}/coccinelle
+setenv PYTHONPATH ${COCCINELLE_HOME}/python
+setenv LD_LIBRARY_PATH ${COCCINELLE_HOME}/pycaml
 
 #  -allow_inconsistent_paths
 
index 4c032d2..0482f07 100644 (file)
@@ -1,5 +1,5 @@
 let lines =
-["Copyright 2005-2008, Ecole des Mines de Nantes, University of Copenhagen";
+["Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen";
 "Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller";
 "This file is part of Coccinelle.";
 "";