Index: tools/prettyprinter/Makefile.am
===================================================================
--- tools/prettyprinter/Makefile.am	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
+++ tools/prettyprinter/Makefile.am	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
@@ -0,0 +1,33 @@
+######################## -*- Mode: Makefile-Automake -*- ######################
+## 
+## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+##
+## The contents of this file are covered under the licence agreement in the
+## file "LICENCE" distributed with Cforall.
+## 
+## Makefile.am -- 
+## 
+## Author           : Peter A. Buhr
+## Created On       : Wed Jun 28 12:07:10 2017
+## Last Modified By : Peter A. Buhr
+## Last Modified On : Wed Jun 28 23:11:56 2017
+## Update Count     : 15
+###############################################################################
+
+BUILT_SOURCES = parser.h
+
+AM_YFLAGS = -d -t -v
+
+SRC = lex.ll \
+      parser.yy \
+      token.cc \
+      filter.cc \
+      main.cc
+
+tools_prettyprinter_PROGRAMS = pretty
+tools_prettyprinterdir = ../
+pretty_SOURCES = ${SRC}
+pretty_LDADD = ${LEXLIB} -ldl			# yywrap
+pretty_CXXFLAGS = -Wno-deprecated -Wall -DYY_NO_INPUT -O2 -g -std=c++14
+
+MAINTAINERCLEANFILES = parser.output
Index: tools/prettyprinter/Makefile.in
===================================================================
--- tools/prettyprinter/Makefile.in	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
+++ tools/prettyprinter/Makefile.in	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
@@ -0,0 +1,641 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+######################## -*- Mode: Makefile-Automake -*- ######################
+###############################################################################
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+tools_prettyprinter_PROGRAMS = pretty$(EXEEXT)
+subdir = tools/prettyprinter
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in lex.cc \
+	parser.cc parser.h
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(tools_prettyprinterdir)"
+PROGRAMS = $(tools_prettyprinter_PROGRAMS)
+am__objects_1 = pretty-lex.$(OBJEXT) pretty-parser.$(OBJEXT) \
+	pretty-token.$(OBJEXT) pretty-filter.$(OBJEXT) \
+	pretty-main.$(OBJEXT)
+am_pretty_OBJECTS = $(am__objects_1)
+pretty_OBJECTS = $(am_pretty_OBJECTS)
+am__DEPENDENCIES_1 =
+pretty_DEPENDENCIES = $(am__DEPENDENCIES_1)
+pretty_LINK = $(CXXLD) $(pretty_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/automake/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ ||
+LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
+AM_V_LEX = $(am__v_LEX_@AM_V@)
+am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@)
+am__v_LEX_0 = @echo "  LEX   " $@;
+YLWRAP = $(top_srcdir)/automake/ylwrap
+@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
+YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
+AM_V_YACC = $(am__v_YACC_@AM_V@)
+am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@)
+am__v_YACC_0 = @echo "  YACC  " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(pretty_SOURCES)
+DIST_SOURCES = $(pretty_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BACKEND_CC = @BACKEND_CC@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFA_BACKEND_CC = @CFA_BACKEND_CC@
+CFA_BINDIR = @CFA_BINDIR@
+CFA_FLAGS = @CFA_FLAGS@
+CFA_INCDIR = @CFA_INCDIR@
+CFA_LIBDIR = @CFA_LIBDIR@
+CFA_NAME = @CFA_NAME@
+CFA_PREFIX = @CFA_PREFIX@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MACHINE_TYPE = @MACHINE_TYPE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+BUILT_SOURCES = parser.h
+AM_YFLAGS = -d -t -v
+SRC = lex.ll \
+      parser.yy \
+      token.cc \
+      filter.cc \
+      main.cc
+
+tools_prettyprinterdir = ../
+pretty_SOURCES = ${SRC}
+pretty_LDADD = ${LEXLIB} -ldl			# yywrap
+pretty_CXXFLAGS = -Wno-deprecated -Wall -DYY_NO_INPUT -O2 -g -std=c++14
+MAINTAINERCLEANFILES = parser.output
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .ll .o .obj .yy
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/prettyprinter/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tools/prettyprinter/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-tools_prettyprinterPROGRAMS: $(tools_prettyprinter_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(tools_prettyprinterdir)" || $(MKDIR_P) "$(DESTDIR)$(tools_prettyprinterdir)"
+	@list='$(tools_prettyprinter_PROGRAMS)'; test -n "$(tools_prettyprinterdir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tools_prettyprinterdir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tools_prettyprinterdir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-tools_prettyprinterPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(tools_prettyprinter_PROGRAMS)'; test -n "$(tools_prettyprinterdir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(tools_prettyprinterdir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(tools_prettyprinterdir)" && rm -f $$files
+
+clean-tools_prettyprinterPROGRAMS:
+	-test -z "$(tools_prettyprinter_PROGRAMS)" || rm -f $(tools_prettyprinter_PROGRAMS)
+parser.h: parser.cc
+	@if test ! -f $@; then rm -f parser.cc; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) parser.cc; else :; fi
+pretty$(EXEEXT): $(pretty_OBJECTS) $(pretty_DEPENDENCIES) $(EXTRA_pretty_DEPENDENCIES) 
+	@rm -f pretty$(EXEEXT)
+	$(AM_V_CXXLD)$(pretty_LINK) $(pretty_OBJECTS) $(pretty_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pretty-filter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pretty-lex.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pretty-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pretty-parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pretty-token.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+pretty-lex.o: lex.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-lex.o -MD -MP -MF $(DEPDIR)/pretty-lex.Tpo -c -o pretty-lex.o `test -f 'lex.cc' || echo '$(srcdir)/'`lex.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pretty-lex.Tpo $(DEPDIR)/pretty-lex.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='lex.cc' object='pretty-lex.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -c -o pretty-lex.o `test -f 'lex.cc' || echo '$(srcdir)/'`lex.cc
+
+pretty-lex.obj: lex.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-lex.obj -MD -MP -MF $(DEPDIR)/pretty-lex.Tpo -c -o pretty-lex.obj `if test -f 'lex.cc'; then $(CYGPATH_W) 'lex.cc'; else $(CYGPATH_W) '$(srcdir)/lex.cc'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pretty-lex.Tpo $(DEPDIR)/pretty-lex.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='lex.cc' object='pretty-lex.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -c -o pretty-lex.obj `if test -f 'lex.cc'; then $(CYGPATH_W) 'lex.cc'; else $(CYGPATH_W) '$(srcdir)/lex.cc'; fi`
+
+pretty-parser.o: parser.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-parser.o -MD -MP -MF $(DEPDIR)/pretty-parser.Tpo -c -o pretty-parser.o `test -f 'parser.cc' || echo '$(srcdir)/'`parser.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pretty-parser.Tpo $(DEPDIR)/pretty-parser.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='parser.cc' object='pretty-parser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -c -o pretty-parser.o `test -f 'parser.cc' || echo '$(srcdir)/'`parser.cc
+
+pretty-parser.obj: parser.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-parser.obj -MD -MP -MF $(DEPDIR)/pretty-parser.Tpo -c -o pretty-parser.obj `if test -f 'parser.cc'; then $(CYGPATH_W) 'parser.cc'; else $(CYGPATH_W) '$(srcdir)/parser.cc'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pretty-parser.Tpo $(DEPDIR)/pretty-parser.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='parser.cc' object='pretty-parser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -c -o pretty-parser.obj `if test -f 'parser.cc'; then $(CYGPATH_W) 'parser.cc'; else $(CYGPATH_W) '$(srcdir)/parser.cc'; fi`
+
+pretty-token.o: token.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-token.o -MD -MP -MF $(DEPDIR)/pretty-token.Tpo -c -o pretty-token.o `test -f 'token.cc' || echo '$(srcdir)/'`token.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pretty-token.Tpo $(DEPDIR)/pretty-token.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='token.cc' object='pretty-token.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -c -o pretty-token.o `test -f 'token.cc' || echo '$(srcdir)/'`token.cc
+
+pretty-token.obj: token.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-token.obj -MD -MP -MF $(DEPDIR)/pretty-token.Tpo -c -o pretty-token.obj `if test -f 'token.cc'; then $(CYGPATH_W) 'token.cc'; else $(CYGPATH_W) '$(srcdir)/token.cc'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pretty-token.Tpo $(DEPDIR)/pretty-token.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='token.cc' object='pretty-token.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -c -o pretty-token.obj `if test -f 'token.cc'; then $(CYGPATH_W) 'token.cc'; else $(CYGPATH_W) '$(srcdir)/token.cc'; fi`
+
+pretty-filter.o: filter.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-filter.o -MD -MP -MF $(DEPDIR)/pretty-filter.Tpo -c -o pretty-filter.o `test -f 'filter.cc' || echo '$(srcdir)/'`filter.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pretty-filter.Tpo $(DEPDIR)/pretty-filter.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='filter.cc' object='pretty-filter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -c -o pretty-filter.o `test -f 'filter.cc' || echo '$(srcdir)/'`filter.cc
+
+pretty-filter.obj: filter.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-filter.obj -MD -MP -MF $(DEPDIR)/pretty-filter.Tpo -c -o pretty-filter.obj `if test -f 'filter.cc'; then $(CYGPATH_W) 'filter.cc'; else $(CYGPATH_W) '$(srcdir)/filter.cc'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pretty-filter.Tpo $(DEPDIR)/pretty-filter.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='filter.cc' object='pretty-filter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -c -o pretty-filter.obj `if test -f 'filter.cc'; then $(CYGPATH_W) 'filter.cc'; else $(CYGPATH_W) '$(srcdir)/filter.cc'; fi`
+
+pretty-main.o: main.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-main.o -MD -MP -MF $(DEPDIR)/pretty-main.Tpo -c -o pretty-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pretty-main.Tpo $(DEPDIR)/pretty-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='main.cc' object='pretty-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -c -o pretty-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+pretty-main.obj: main.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -MT pretty-main.obj -MD -MP -MF $(DEPDIR)/pretty-main.Tpo -c -o pretty-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pretty-main.Tpo $(DEPDIR)/pretty-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='main.cc' object='pretty-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pretty_CXXFLAGS) $(CXXFLAGS) -c -o pretty-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+.ll.cc:
+	$(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
+
+.yy.cc:
+	$(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(tools_prettyprinterdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-rm -f lex.cc
+	-rm -f parser.cc
+	-rm -f parser.h
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-tools_prettyprinterPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-tools_prettyprinterPROGRAMS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-tools_prettyprinterPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-tools_prettyprinterPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	install-tools_prettyprinterPROGRAMS installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-tools_prettyprinterPROGRAMS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: tools/prettyprinter/filter.cc
===================================================================
--- tools/prettyprinter/filter.cc	(revision a67b60e61ca74c9f7db6048cc5cc87b412778d13)
+++ tools/prettyprinter/filter.cc	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
@@ -1,5 +1,7 @@
-//                              -*- Mode: C++ -*- 
-// 
-// Pretty Printer, Copyright (C) Peter A. Buhr 2002
+// 
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
 // 
 // filter.cc -- 
@@ -8,10 +10,14 @@
 // Created On       : Tue Apr  9 22:33:44 2002
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Dec 17 11:25:50 2002
-// Update Count     : 60
-// 
-
+// Last Modified On : Wed Jun 28 22:56:58 2017
+// Update Count     : 72
+// 
+
+#include <iostream>
+#include <string>
+#include <list>
+using namespace std;
 #include "filter.h"
-#include "yacc.tab.h" 
+#include "parser.h" 
 
 
@@ -20,222 +26,222 @@
 
 void freeTree( Token *tree ) {				// postfix tree traversal
-    if ( tree == NULL ) return;
-    if ( tree->down != NULL ) freeTree( tree->down );
-    if ( tree->left != NULL ) freeTree( tree->left );
-    //cerr << "free token: \"" << tree->getText() << "\" : " << tree->getKind() << endl;
-    delete tree;
+	if ( tree == NULL ) return;
+	if ( tree->down != NULL ) freeTree( tree->down );
+	if ( tree->left != NULL ) freeTree( tree->left );
+	//cerr << "free token: \"" << tree->getText() << "\" : " << tree->getKind() << endl;
+	delete tree;
 } // freeTree
 
 
 void Identity( Token *tree ) {				// prefix tree traversal
-    if ( tree == NULL ) return;
-    // print only the terminals
-    if ( tree->isTerminal() ) cout << tree->getWS() << tree->getText();
-    if ( tree->down != NULL ) Identity( tree->down );
-    if ( tree->left != NULL ) Identity( tree->left );
+	if ( tree == NULL ) return;
+	// print only the terminals
+	if ( tree->isTerminal() ) cout << tree->getWS() << tree->getText();
+	if ( tree->down != NULL ) Identity( tree->down );
+	if ( tree->left != NULL ) Identity( tree->left );
 } // Identity
 
 
 static void Parse_Tree1( Token *tree, int indent ) {	// prefix tree traversal
-    cout << string( indent, ' ' );
-    if ( tree->isTerminal() ) {				// terminals
-	cout << "\"" << tree->getText() << "\"";
-    } else {						// non-terminals
-	cout << tree->getText();
-    } // if
-    cout << " : " << tree->getKind()
-	 //<< " \"" << tree->getWS() << " \""
-	 << endl;
-    if ( tree->down != NULL ) Parse_Tree1( tree->down, indent + 2 );
-    if ( tree->left != NULL ) Parse_Tree1( tree->left, indent );
+	cout << string( indent, ' ' );
+	if ( tree->isTerminal() ) {				// terminals
+		cout << "\"" << tree->getText() << "\"";
+	} else {						// non-terminals
+		cout << tree->getText();
+	} // if
+	cout << " : " << tree->getKind()
+		//<< " \"" << tree->getWS() << " \""
+		 << endl;
+	if ( tree->down != NULL ) Parse_Tree1( tree->down, indent + 2 );
+	if ( tree->left != NULL ) Parse_Tree1( tree->left, indent );
 } // Parse_Tree1
 
 void Parse_Tree( Token *tree ) {
-    if ( tree == NULL ) return;
-    Parse_Tree1( tree, 0 );
+	if ( tree == NULL ) return;
+	Parse_Tree1( tree, 0 );
 } // Parse_Tree
 
 
 void Nocode( Token *tree ) {				// prefix tree traversal
-    static bool declprt = true;
-    if ( tree == NULL ) return;
-
-    if ( tree->isTerminal() ) {				// terminals
-	cout << tree->getWS() << tree->getText();
-    } else {						// non-terminals
-	switch ( tree->getKind() ) {
-	  case _RHS: {
-	      int first = 0;				// first RHS after ':' or '|' treated specially
-	      int push = 0, pop = 0;
-	      for ( Token *i = tree->down; i != 0; i = i->left ) {
-		  switch ( i->getKind() ) {
-		    case _ACTION:
-		      cout << string( (push * 4 + pop * 3) / 7, '\t' );
-		      push = pop = 0;
-		      cout << i->down->getComment();	// ignore code but print its comment, if any
-		      break;
-		    case _PREC:
-		      Nocode( i->down );		// print verbatim
-		      break;
-		    case '|':				// start of alternative and special case
-		      first = 0;
-		    case ';':				// print with whitespace
-		      cout << string( (push * 4 + pop * 3) / 7, '\t' );
-		      push = pop = 0;
-		      cout << i->getWS() << i->getText();
-		      break;
-		    default:
-		      if ( i->getKind() == IDENTIFIER ) {
-			  if ( i->getText() == "push" ) {
-			      push += 1;
-			      if ( first == 0 ) {	// first RHS after ':' or '|' ?
-				  cout << i->getComment(); // ignore rhs but print its comment, if any
-			      } // if 
-			      break;
-			  } else if ( i->getText() == "pop" ) {
-			      pop += 1;
-			      if ( first == 0 ) {	// first RHS after ':' or '|' ?
-				  cout << i->getComment(); // ignore rhs but print its comment, if any
-			      } // if 
-			      break;
+	static bool declprt = true;
+	if ( tree == NULL ) return;
+
+	if ( tree->isTerminal() ) {				// terminals
+		cout << tree->getWS() << tree->getText();
+	} else {						// non-terminals
+		switch ( tree->getKind() ) {
+		  case _RHS: {
+			  int first = 0;				// first RHS after ':' or '|' treated specially
+			  int push = 0, pop = 0;
+			  for ( Token *i = tree->down; i != 0; i = i->left ) {
+				  switch ( i->getKind() ) {
+					case _ACTION:
+					  cout << string( (push * 4 + pop * 3) / 7, '\t' );
+					  push = pop = 0;
+					  cout << i->down->getComment();	// ignore code but print its comment, if any
+					  break;
+					case _PREC:
+					  Nocode( i->down );		// print verbatim
+					  break;
+					case '|':				// start of alternative and special case
+					  first = 0;
+					case ';':				// print with whitespace
+					  cout << string( (push * 4 + pop * 3) / 7, '\t' );
+					  push = pop = 0;
+					  cout << i->getWS() << i->getText();
+					  break;
+					default:
+					  if ( i->getKind() == IDENTIFIER ) {
+						  if ( i->getText() == "push" ) {
+							  push += 1;
+							  if ( first == 0 ) {	// first RHS after ':' or '|' ?
+								  cout << i->getComment(); // ignore rhs but print its comment, if any
+							  } // if 
+							  break;
+						  } else if ( i->getText() == "pop" ) {
+							  pop += 1;
+							  if ( first == 0 ) {	// first RHS after ':' or '|' ?
+								  cout << i->getComment(); // ignore rhs but print its comment, if any
+							  } // if 
+							  break;
+						  } // if
+					  } // if
+					  // If there is a comment or this is the first RHS after
+					  // ':' or '|', then include the whitespace before the
+					  // token. Otherwise, fold the token onto the same line
+					  // separated with a blank.
+					  string t1( i->getText() );
+					  if ( i->isComment() || first == 0 ) {
+						  first = t1.length();
+						  cout << i->getWS() << t1;
+					  } else {
+						  if ( first + t1.length() <= 100 ) { // check for long lines during folding
+							  first += t1.length();
+							  cout << " " << t1;
+						  } else {
+							  first = t1.length();
+							  cout << endl << "\t\t\t\t" << t1;
+						  } // if
+					  } // if
+				  } // switch
+			  } // for
+			  break;
+		  }
+		  case _LITERALBLOCK:				// ignore code but print its comment, if any
+			cout << tree->down->getComment();
+			break;
+		  case _DECLARATION: {				// ignore certain declarations
+			  int kind = tree->down->getKind();		// get kind of declaration
+			  if ( kind != UNION && kind != TYPE ) {
+				  declprt = true;
+				  Nocode( tree->down );			// print verbatim
+			  } else if ( declprt ) {			// ignore declaration but print its comment, if any
+				  declprt = false;
+				  cout << tree->down->getComment();
 			  } // if
-		      } // if
-		      // If there is a comment or this is the first RHS after
-		      // ':' or '|', then include the whitespace before the
-		      // token. Otherwise, fold the token onto the same line
-		      // separated with a blank.
-		      string t1( i->getText() );
-		      if ( i->isComment() || first == 0 ) {
-			  first = t1.length();
-			  cout << i->getWS() << t1;
-		      } else {
-			  if ( first + t1.length() <= 100 ) { // check for long lines during folding
-			      first += t1.length();
-			      cout << " " << t1;
-			  } else {
-			      first = t1.length();
-			      cout << endl << "\t\t\t\t" << t1;
+			  break;
+		  }
+		  case _USERSECTION_OPT:			// ignore but add newline at the end
+			cout << endl;
+			break;
+		  default:
+			if ( tree->down != NULL ) Nocode( tree->down );
+		} // switch
+	} // if
+	if ( tree->left != NULL ) Nocode( tree->left );
+} // Nocode
+
+
+void LaTeX( Token *tree ) {				// prefix tree traversal
+	if ( tree == NULL ) return;
+
+	if ( tree->isTerminal() ) {				// terminals
+		cout << tree->getWS() << tree->getText();
+		if ( tree->getKind() == IDENTIFIER ) {
+			string id( tree->getText() );
+			cout << "\\(\\index{" << id << "@\\protect\\LGbegin\\protect\\lgrinde\\)" << id << "\\(\\protect\\endlgrinde\\protect\\LGend{}}\\)";
+		} // if
+	} else {						// non-terminals
+		switch ( tree->getKind() ) {
+		  case _RHS: {
+			  int first = 0;				// first RHS after ':' or '|' treated specially
+			  int push = 0, pop = 0;
+			  for ( Token *i = tree->down; i != 0; i = i->left ) {
+				  switch ( i->getKind() ) {
+					case _ACTION:
+					  cout << i->down->getComment();	// ignore code but print its comment, if any
+					  break;
+					case _PREC:
+					  LaTeX( i->down );			// print verbatim
+					  break;
+					case '|':				// start of alternative and special case
+					  first = 0;
+					  push = pop = 0;
+					case ';':				// print with whitespace
+					  cout << i->getWS() << i->getText();
+					  break;
+					default:
+					  if ( i->getKind() == IDENTIFIER ) {
+						  if ( i->getText() == "push" ) {
+							  push += 1;
+							  break;
+						  } else if ( i->getText() == "pop" ) {
+							  pop += 1;
+							  break;
+						  } // if
+					  } // if
+					  // If there is a comment or this is the first RHS after
+					  // ':' or '|', then include the whitespace before the
+					  // token. Otherwise, fold the token onto the same line
+					  // separated with a blank.
+					  string t1( i->getText() );
+					  if ( i->isComment() || first == 0 ) {
+						  first = t1.length();
+						  cout << i->getWS() << t1;
+						  if ( i->getKind() == IDENTIFIER ) {
+							  string id( tree->getText() );
+							  cout << "\\(\\index{" << id << "@\"\\verb=" << id << "=}\\)";
+						  } // if
+					  } else {
+						  if ( first + t1.length() <= 100 ) { // check for long lines during folding
+							  first += t1.length();
+							  cout << " " << t1;
+						  } else {
+							  first = t1.length();
+							  cout << endl << "\t\t\t\t" << t1;
+						  } // if
+					  } // if
+				  } // switch
+			  } // for
+			  break;
+		  }
+		  case _LITERALBLOCK:				// ignore code but print its comment, if any
+			cout << tree->down->getComment();
+			break;
+		  case _DECLARATION: {				// ignore certain declarations
+			  int kind = tree->down->getKind();	// get kind of declaration
+			  if ( kind != UNION && kind != TYPE ) {
+				  LaTeX( tree->down );		// print verbatim
 			  } // if
-		      } // if
-		  } // switch
-	      } // for
-	      break;
-	  }
-	  case _LITERALBLOCK:				// ignore code but print its comment, if any
-	    cout << tree->down->getComment();
-	    break;
-	  case _DECLARATION: {				// ignore certain declarations
-	      int kind = tree->down->getKind();		// get kind of declaration
-	      if ( kind != UNION && kind != TYPE ) {
-		  declprt = true;
-		  Nocode( tree->down );			// print verbatim
-	      } else if ( declprt ) {			// ignore declaration but print its comment, if any
-		  declprt = false;
-		  cout << tree->down->getComment();
-	      } // if
-	      break;
-	  }
-	  case _USERSECTION_OPT:			// ignore but add newline at the end
-	    cout << endl;
-	    break;
-	  default:
-	    if ( tree->down != NULL ) Nocode( tree->down );
-	} // switch
-    } // if
-    if ( tree->left != NULL ) Nocode( tree->left );
-} // Nocode
-
-
-void LaTeX( Token *tree ) {				// prefix tree traversal
-    if ( tree == NULL ) return;
-
-    if ( tree->isTerminal() ) {				// terminals
-	cout << tree->getWS() << tree->getText();
-	if ( tree->getKind() == IDENTIFIER ) {
-	    string id( tree->getText() );
-	    cout << "\\(\\index{" << id << "@\\protect\\LGbegin\\protect\\lgrinde\\)" << id << "\\(\\protect\\endlgrinde\\protect\\LGend{}}\\)";
+			  break;
+		  }
+		  case _USERSECTION_OPT:			// ignore but add newline at the end
+			cout << endl;
+			break;
+		  default:
+			if ( tree->down != NULL ) LaTeX( tree->down );
+		} // switch
 	} // if
-    } else {						// non-terminals
-	switch ( tree->getKind() ) {
-	  case _RHS: {
-	      int first = 0;				// first RHS after ':' or '|' treated specially
-	      int push = 0, pop = 0;
-	      Token *prev = 0;
-	      for ( Token *i = tree->down; i != 0; prev = i, i = i->left ) {
-		  switch ( i->getKind() ) {
-		    case _ACTION:
-		      cout << i->down->getComment();	// ignore code but print its comment, if any
-		      break;
-		    case _PREC:
-		      LaTeX( i->down );			// print verbatim
-		      break;
-		    case '|':				// start of alternative and special case
-		      first = 0;
-		      push = pop = 0;
-		    case ';':				// print with whitespace
-		      cout << i->getWS() << i->getText();
-		      break;
-		    default:
-		      if ( i->getKind() == IDENTIFIER ) {
-			  if ( i->getText() == "push" ) {
-			      push += 1;
-			      break;
-			  } else if ( i->getText() == "pop" ) {
-			      pop += 1;
-			      break;
-			  } // if
-		      } // if
-		      // If there is a comment or this is the first RHS after
-		      // ':' or '|', then include the whitespace before the
-		      // token. Otherwise, fold the token onto the same line
-		      // separated with a blank.
-		      string t1( i->getText() );
-		      if ( i->isComment() || first == 0 ) {
-			  first = t1.length();
-			  cout << i->getWS() << t1;
-			  if ( i->getKind() == IDENTIFIER ) {
-			      string id( tree->getText() );
-			      cout << "\\(\\index{" << id << "@\"\\verb=" << id << "=}\\)";
-			  } // if
-		      } else {
-			  if ( first + t1.length() <= 100 ) { // check for long lines during folding
-			      first += t1.length();
-			      cout << " " << t1;
-			  } else {
-			      first = t1.length();
-			      cout << endl << "\t\t\t\t" << t1;
-			  } // if
-		      } // if
-		  } // switch
-	      } // for
-	      break;
-	  }
-	  case _LITERALBLOCK:				// ignore code but print its comment, if any
-	    cout << tree->down->getComment();
-	    break;
-	  case _DECLARATION: {				// ignore certain declarations
-	      int kind = tree->down->getKind();	// get kind of declaration
-	      if ( kind != UNION && kind != TYPE ) {
-		  LaTeX( tree->down );		// print verbatim
-	      } // if
-	      break;
-	  }
-	  case _USERSECTION_OPT:			// ignore but add newline at the end
-	    cout << endl;
-	    break;
-	  default:
-	    if ( tree->down != NULL ) LaTeX( tree->down );
-	} // switch
-    } // if
-    if ( tree->left != NULL ) LaTeX( tree->left );
+	if ( tree->left != NULL ) LaTeX( tree->left );
 } // LaTeX
 
 
 void HTML( Token *tree ) {				// prefix tree traversal
-    cerr << "ERROR: html style not implemented" << endl;
+	cerr << "ERROR: html style not implemented" << endl;
 } // HTML
 
-
 // Local Variables: //
-// compile-command: "gmake" //
+// mode: c++ //
+// tab-width: 4 //
+// compile-command: "make install" //
 // End: //
Index: tools/prettyprinter/filter.h
===================================================================
--- tools/prettyprinter/filter.h	(revision a67b60e61ca74c9f7db6048cc5cc87b412778d13)
+++ tools/prettyprinter/filter.h	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
@@ -1,5 +1,7 @@
-//                              -*- Mode: C++ -*- 
 // 
-// Pretty Printer, Copyright (C) Peter A. Buhr 2002
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
 // 
 // filter.h -- 
@@ -8,6 +10,6 @@
 // Created On       : Tue Apr  9 22:31:18 2002
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Apr  9 22:35:55 2002
-// Update Count     : 2
+// Last Modified On : Wed Jun 28 22:57:04 2017
+// Update Count     : 9
 // 
 
@@ -15,6 +17,5 @@
 #define __FILTER_H__
 
-#include "parse.h"
-
+#include "parser.hh"
 
 extern void (*filter)( Token *tree );			// pointer to filter for parse tree
@@ -27,8 +28,9 @@
 void HTML( Token *tree );
 
-#endif /* __FILTER_H__ */
-
+#endif // __FILTER_H__
 
 // Local Variables: //
-// compile-command: "gmake" //
+// mode: c++ //
+// tab-width: 4 //
+// compile-command: "make install" //
 // End: //
Index: tools/prettyprinter/lex.ll
===================================================================
--- tools/prettyprinter/lex.ll	(revision a67b60e61ca74c9f7db6048cc5cc87b412778d13)
+++ tools/prettyprinter/lex.ll	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
@@ -1,15 +1,16 @@
 /*                               -*- Mode: C -*- 
  * 
- * Pretty Printer Lexer, Copyright (C) Rodolfo Gabriel Esteves and Peter A. Buhr 2001
- *      Permission is granted to copy this grammar and to use it within software systems.
- *      THIS GRAMMAR IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
+ * Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+ *
+ * The contents of this file are covered under the licence agreement in the
+ * file "LICENCE" distributed with Cforall.
  * 
- * lex.l -- 
+ * lex.ll --
  * 
  * Author           : Rodolfo Gabriel Esteves
  * Created On       : Sat Dec 15 11:45:59 2001
  * Last Modified By : Peter A. Buhr
- * Last Modified On : Mon Apr  8 15:48:24 2002
- * Update Count     : 245
+ * Last Modified On : Wed Jun 28 22:57:17 2017
+ * Update Count     : 253
  */
 
@@ -21,7 +22,7 @@
 #include <string>
 #include <iostream>
-
-#include "parse.h" 
-#include "yacc.tab.h" 
+using namespace std;
+#include "parser.hh" 
+#include "parser.h" 
 
 #define RETURN_TOKEN( kind ) yylval.tokenp = new Token( yytext, ws_list, kind ); return kind;
@@ -164,6 +165,7 @@
 }
 
-/* Local Variables: */
-/* fill-column: 100 */
-/* compile-command: "gmake" */
-/* End: */
+// Local Variables: //
+// mode: c++ //
+// tab-width: 4 //
+// compile-command: "make install" //
+// End: //
Index: tools/prettyprinter/main.cc
===================================================================
--- tools/prettyprinter/main.cc	(revision a67b60e61ca74c9f7db6048cc5cc87b412778d13)
+++ tools/prettyprinter/main.cc	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
@@ -1,3 +1,20 @@
-#include <cstdlib>
+// 
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+// 
+// main.cc -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Wed Jun 28 22:57:26 2017
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Jun 28 22:58:40 2017
+// Update Count     : 3
+// 
+
+#include <iostream>
+#include <string>
+using namespace std;
 #include "filter.h"
 
@@ -6,35 +23,37 @@
 
 int main( int argc, char *argv[] ) {
-    switch ( argc ) {
-      case 2: {
-	  string arg( argv[1] );
+	switch ( argc ) {
+	  case 2: {
+		  string arg( argv[1] );
 
-	  if ( arg == "-identity" ) {
-	      filter = Identity;
-	  } else if ( arg == "-parse_tree" ) {
-	      filter = Parse_Tree;
-	  } else if ( arg == "-nocode" ) {
-	      filter = Nocode;
-	  } else if ( arg == "-latex" ) {
-	      filter = LaTeX;
-	  } else if ( arg == "-html" ) {
-	      filter = HTML;
-	  } else {
-	      cerr << "Unknown printer option: " << argv[1] << endl;
-	      goto usage;
-	  } // if
-	  break;
-      }
-      usage:
-      default:
-	cerr << "Usage: " << argv[0] << " [-identity | -parse_tree | -nocode | -latex | -html] < bison.y" << endl;
-	exit( -1 );
-    }
+		  if ( arg == "-identity" ) {
+			  filter = Identity;
+		  } else if ( arg == "-parse_tree" ) {
+			  filter = Parse_Tree;
+		  } else if ( arg == "-nocode" ) {
+			  filter = Nocode;
+		  } else if ( arg == "-latex" ) {
+			  filter = LaTeX;
+		  } else if ( arg == "-html" ) {
+			  filter = HTML;
+		  } else {
+			  cerr << "Unknown printer option: " << argv[1] << endl;
+			  goto usage;
+		  } // if
+		  break;
+	  }
+	  usage:
+	  default:
+		cerr << "Usage: " << argv[0] << " [-identity | -parse_tree | -nocode | -latex | -html] < bison.y" << endl;
+		exit( -1 );
+	}
 
-    //yydebug = 1;
-    yyparse();
+	//yydebug = 1;
+	yyparse();
 }
 
 // Local Variables: //
-// compile-command: "gmake" //
+// mode: c++ //
+// tab-width: 4 //
+// compile-command: "make install" //
 // End: //
Index: tools/prettyprinter/parser.hh
===================================================================
--- tools/prettyprinter/parser.hh	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
+++ tools/prettyprinter/parser.hh	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
@@ -0,0 +1,34 @@
+//                              -*- Mode: C++ -*- 
+// 
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+// 
+// parse.h - Various declarations that are needed so that the generated parser
+//           and lexer compile with C++, and to share information between the
+//           parser, lexer, and driver program
+// 
+// Author           : Richard C. Bilson and Rodolfo G. Esteves
+// Created On       : Sun Dec 16 15:00:49 2001
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Jun 28 22:59:27 2017
+// Update Count     : 174
+// 
+
+#ifndef __PARSER_HH__
+#define __PARSER_HH__
+
+int yylex();
+
+#include <string>
+#include <list>
+#include "token.h"
+
+#endif // __PARSER_HH__
+
+// Local Variables: //
+// mode: c++ //
+// tab-width: 4 //
+// compile-command: "make install" //
+// End: //
Index: tools/prettyprinter/parser.yy
===================================================================
--- tools/prettyprinter/parser.yy	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
+++ tools/prettyprinter/parser.yy	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
@@ -0,0 +1,504 @@
+//  
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//  
+// parser.yy --
+//  
+// Author           : Rodolfo G. Esteves
+// Created On       : Sat Dec 15 13:44:21 2001
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Jun 28 23:27:34 2017
+// Update Count     : 1043
+// 
+
+%{
+#define YYDEBUG_LEXER_TEXT( yylval )					// lexer loads this up each time
+#define YYDEBUG 1										// get the pretty debugging code to compile
+
+#include <iostream>
+using namespace std;
+#include "parser.hh"
+#include "filter.h"
+
+extern list<string> ws_list;							// lex variable containing accumulated whitespace
+void lexC( void );
+string lexYacc( void );
+
+void yyerror( string s ) {
+	extern int yylineno;
+
+	cerr << "Error in line: " << yylineno << ": " << s << endl;
+	return;
+}
+
+Token *declstart;
+Token *rulestart;
+Token *nameliststart;
+%}
+
+%union {
+	Token *tokenp;
+}
+
+%token<tokenp>	','
+%token<tokenp>	'<'
+%token<tokenp>	'>'
+%token<tokenp>	'{'
+%token<tokenp>	'}'
+%token<tokenp>	':'
+%token<tokenp>	';'
+%token<tokenp>	'|'
+
+%token<tokenp>	MARK									// %%
+%token<tokenp>	LCURL									// %{
+%token<tokenp>	RCURL									// %}
+
+%token<tokenp>	INTEGER									// integer constant
+%token<tokenp>	CHARACTER								// character constant
+%token<tokenp>	IDENTIFIER								// identifier
+%token<tokenp>	CODE									// C code
+
+%token<tokenp>	START									// %start
+%token<tokenp>	UNION									// %union
+%token<tokenp>	TOKEN									// %token
+%token<tokenp>	LEFT									// %left
+%token<tokenp>	RIGHT									// %right
+%token<tokenp>	NONASSOC								// %nonassoc
+%token<tokenp>	TYPE									// %type
+%token<tokenp>	PURE_PARSER								// %pure_parser
+%token<tokenp>	SEMANTIC_PARSER							// %semantic_parser
+%token<tokenp>	EXPECT									// %expect
+%token<tokenp>	THONG									// %thong
+
+%token<tokenp>	PREC									// %prec
+
+%token		END_TERMINALS								// ALL TERMINAL TOKEN NAMES MUST APPEAR BEFORE THIS
+
+%type<tokenp>	sections
+%token		_SECTIONS
+%type<tokenp>	mark
+%type<tokenp>	defsection_opt
+%token		_DEFSECTION_OPT
+%type<tokenp>	declarations
+%type<tokenp>	literalblock
+%token		_LITERALBLOCK
+%type<tokenp>	declaration
+%token		_DECLARATION
+%type<tokenp>	union
+%type<tokenp>	rword
+%type<tokenp>	tag_opt
+%token		_TAG_OPT
+%type<tokenp>	namenolist
+%token		_NAMENOLIST
+%type<tokenp>	nameno
+%token		_NAMENO
+%type<tokenp>	namelist
+%token		_NAMELIST
+%type<tokenp>	name
+%type<tokenp>	rulesection
+%token		_RULESECTION
+%type<tokenp>	rules
+%token		_RULE
+%type<tokenp>	lhs
+%token		_LHS
+%type<tokenp>	rhs
+%token		_RHS
+%type<tokenp>	prod
+%type<tokenp>	prec
+%token		_PREC
+%type<tokenp>	action
+%token		_ACTION
+%type<tokenp>	usersection_opt
+%token		_USERSECTION_OPT
+%type<tokenp>	ccode_opt
+%type<tokenp>	blocks
+
+%start grammar
+
+%%
+grammar :
+	sections
+		{
+			filter( $1 );								// filter parse tree
+			freeTree( $1 );								// free parse-tree storage (optional: used with purify)
+		}
+	;
+
+sections :
+	defsection_opt mark rulesection usersection_opt
+		{
+			$$ = new Token( "sections", _SECTIONS );
+			$1->left = $2;
+			$2->left = $3;
+			$3->left = $4;
+			$$->down = $1;
+		}
+	;
+
+mark :
+	MARK
+	| error												// missing %%
+		{
+			cerr << "no input grammar, missing %% mark" << endl;
+			exit( -1 );
+		}
+	;
+
+defsection_opt :
+	// empty
+		{
+			//cerr << "defsection_opt1: " << endl;
+			$$ = new Token( "declaration_opt", _DEFSECTION_OPT );
+		}
+	| declarations
+		{
+			//cerr << "defsection_opt2: " << $1->text << "(" << $1 << ")" << endl;
+			$$ = new Token( "declaration_opt", _DEFSECTION_OPT );
+			$$->down = declstart;
+		}
+	;
+
+declarations :
+	literalblock
+		{
+			//cerr << "declarations1: " << $1->text << "(" << $1 << ")" << endl;
+			$$ = declstart = $1;
+		}
+	| declaration
+		{
+			//cerr << "declarations2: " << $1->text << "(" << $1 << ")" << endl;
+			$$ = declstart = new Token( "declaration", _DECLARATION );
+			$$->down = $1;
+		}
+	| declarations literalblock
+		{
+			//cerr << "declarations3: "<< $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ")" << endl;
+			$1->left = $2;
+			$$ = $2;
+		}
+	| declarations declaration
+		{
+			//cerr << "declarations4: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ")" << endl;
+			$$ = new Token( "declaration", _DECLARATION );
+			$1->left = $$;
+			$$->down = $2;
+		}
+	;
+
+literalblock :
+	LCURL
+		{ lexC(); }
+	  ccode_opt
+		{ $<tokenp>$ = new Token( lexYacc(), CODE ); }
+	  RCURL
+		{
+			//cerr << "literalblock: " << $1->text << "(" << $1 << ") " << $<tokenp>4->text << " " << $5->text << "(" << $5 << ")" << endl;
+			$1->left = $<tokenp>4;
+			$<tokenp>4->left = $5;
+			$$ = new Token( "literalblock", _LITERALBLOCK );
+			$$->down = $1;
+		}
+	;
+
+declaration :
+	union
+	| START IDENTIFIER
+		{
+			$1->left = $2;
+			$$ = $1;
+		}
+	| rword tag_opt namenolist
+		{
+		    Token *n = new Token( "namenolist", _NAMENOLIST );
+		    n->down = nameliststart;
+		    $1->left = $2;
+		    $2->left = n;
+		    $$ = $1;
+		}
+	| TYPE tag_opt namelist
+		{
+		    Token *n = new Token( "namelist", _NAMELIST );
+		    n->down = nameliststart;
+		    $1->left = $2;
+		    $2->left = n;
+		    $$ = $1;
+		}
+	| PURE_PARSER
+	| SEMANTIC_PARSER
+	| EXPECT INTEGER									// bison
+		{
+		    $1->left = $2;
+		    $$ = $1;
+		}
+| THONG													// bison
+	;
+
+union :
+	UNION '{'
+		{ lexC(); }
+	  ccode_opt
+		{
+		    // Remove the trailing '}' which is added in lex.
+		    string temp( lexYacc() );
+		    $<tokenp>$ = new Token( temp.substr( 0, temp.length() - 1 ), CODE );
+		}
+	  '}'
+		{
+		    $1->left = $2;
+		    $2->left = $<tokenp>5;
+		    $<tokenp>5->left = $6;
+		    $$ = $1;
+		}
+	;
+
+rword :
+	TOKEN
+	| LEFT
+	| RIGHT
+	| NONASSOC
+	;
+
+tag_opt :
+	// empty
+		{
+		    //cerr << "tag_opt" << endl;
+		    $$ = new Token( "tag_opt", _TAG_OPT );
+		}
+	| '<' IDENTIFIER '>'
+		{
+		    $1->left = $2;
+		    $2->left = $3;
+		    $$ = new Token( "tag_opt", _TAG_OPT );
+		    $$->down = $1;
+		}
+	;
+
+namenolist	: nameno
+			{
+			    //cerr << "namenolist1: " << $1->text << "(" << $1 << ")" << endl;
+			    $$ = nameliststart = $1;
+			}
+		| namenolist nameno
+			{
+			    //cerr << "namenolist2: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ")" << endl;
+			    $1->left = $2;
+			    $$ = $2;
+			}
+		| namenolist ',' nameno
+			{
+			    //cerr << "namenolist3: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ") " << $3->text << "(" << $3 << ")" << endl;
+			    $1->left = $2;
+			    $2->left = $3;
+			    $$ = $3;
+			}
+		;
+
+nameno		: name
+			{
+			    $$ = new Token( "nameno", _NAMENO );
+			    $$->down = $1;
+			}
+		| name INTEGER
+			{
+			    $$ = new Token( "nameno", _NAMENO );
+			    $1->left = $2;
+			    $$->down = $1;
+			}
+		;
+
+namelist	: name
+			{
+			    //cerr << "namelist1: " << $1->text << "(" << $1 << ")" << endl;
+			    $$ = nameliststart = $1;
+			}
+		| namelist name
+			{
+			    //cerr << "namelist2: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ")" << endl;
+			    $1->left = $2;
+			    $$ = $2;
+			}
+		| namelist ',' name
+			{
+			    //cerr << "namelist3: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ") " << $3->text << "(" << $3 << ")" << endl;
+			    $1->left = $2;
+			    $2->left = $3;
+			    $$ = $3;
+			}
+		;
+
+name		: IDENTIFIER
+		| CHARACTER
+		;
+
+rulesection	: rules
+			{
+			    //cerr << "rulesection1: " << $1->text << "(" << $1 << ")" << endl;
+			    $$ = new Token( "rulesection", _RULESECTION );
+			    $$->down = $1;
+			}
+		| error					/* no rules */
+			{
+			    cerr << "no rules in the input grammar" << endl;
+			    exit( -1 );
+			}
+		;
+
+// These grammar rules are complex because the Yacc language is LR(2) due to the optional ';' at the end of rules. The
+// following rules convert the LR(2) grammar into LR(1) by lengthening the rules to allow sufficient look
+// ahead. Unfortunately, this change makes handling the semantic actions more complex because there are two lists
+// (rules, rhs) being built but only one list tail can be returned through $$ for chaining.
+
+rules		: lhs rhs
+			{
+			    //cerr << "rules1: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ")" << endl;
+			    $$ = rulestart;
+			}
+		| lhs rhs ';'
+			{
+			    //cerr << "rules2: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ") " << $3->text << "(" << $3 << ")" << endl;
+			    $2->addDownLeftTail( $3 );
+			    $$ = rulestart;
+			}
+		;
+
+lhs		: IDENTIFIER ':'
+			{
+			    //cerr << "lhs: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ")" << endl;
+			    $$ = new Token( "lhs", _LHS );
+			    //cerr << " lhs: "  << $$->text << "(" << $$ << ")" << endl;
+			    $1->left = $2;
+			    $$->down = $1;
+			}
+		;
+
+rhs	:
+	// empty
+		{
+		    //cerr << "rhs1: " << $<tokenp>0->text << "(" << $<tokenp>0 << ")"  << endl;
+		    rulestart = new Token( "rule", _RULE );
+		    rulestart->down = $<tokenp>0; // initial lhs is already on the stack from "rules"
+		    $$ = new Token( "rhs", _RHS );
+		    //cerr << "  rhs: " << $$->text << "(" << $$ << ")" << endl;
+		    $<tokenp>0->left = $$;
+		}
+	| rhs lhs
+		{
+		    //cerr << "rhs2: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ")" << endl;
+		    Token *temp = new Token( "rule", _RULE );
+		    rulestart->addLeftTail( temp );
+		    temp->down = $2;
+		    $$ = new Token( "rhs", _RHS );
+		    //cerr << "  rhs: "  << $$->text << "(" << $$ << ")" << endl;
+		    $2->left = $$;
+		}
+	| rhs ';' lhs
+		{
+		    //cerr << "rhs3: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ") " << $3->text << "(" << $3 << ")" << endl;
+		    $1->addDownLeftTail( $2 );
+		    Token *temp = new Token( "rule", _RULE );
+		    rulestart->addLeftTail( temp );
+		    temp->down = $3;
+		    $$ = new Token( "rhs", _RHS );
+		    //cerr << "  rhs: "  << $$->text << "(" << $$ << ")" << endl;
+		    $3->left = $$;
+		}
+	| rhs prod
+		{
+		    //cerr << "rhs4: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ")" << endl;
+		    $1->addDownLeftTail( $2 );
+		    $$ = $1;
+		}
+	| rhs '|'
+		{
+		    //cerr << "rhs5: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ")" << endl;
+		    $1->addDownLeftTail( $2 );
+		    $$ = new Token( "rhs", _RHS );
+		    $1->left = $$;
+		    //cerr << "  rhs: "  << $$->text << "(" << $$ << ")" << endl;
+		}
+	;
+
+prod :
+	action
+	| IDENTIFIER
+	| CHARACTER
+	| prec
+	;
+
+prec :
+	PREC name
+		{
+		    //cerr << "prec: " << $1->text << "(" << $1 << ") " << $2->text << "(" << $2 << ")" << endl;
+		    $1->left = $2;
+		    $$ = new Token( "prec", _PREC );
+		    $$->down = $1;
+		}
+	;
+
+action :
+	'{'
+		{ lexC(); }
+	  ccode_opt
+		{
+		    // Remove the trailing '}' added in lex.
+		    string temp( lexYacc() );
+		    $<tokenp>$ = new Token( temp.substr( 0, temp.length() - 1 ), CODE );
+		}
+	  '}'
+		{
+		    $1->left = $<tokenp>4;
+		    $<tokenp>4->left = $5;
+		    $$ = new Token( "action", _ACTION );
+		    $$->down = $1;
+		}
+	;
+
+usersection_opt :
+	// empty
+		{
+		    //cerr << "usersection_opt" << endl;
+		    // attach remaining WS to fictitious code
+		    Token *temp = new Token( "", ws_list, CODE );
+		    $$ = new Token( "usersection_opt", _USERSECTION_OPT );
+		    $$->down = temp;
+		}
+	| MARK
+		{ lexC(); }
+	  ccode_opt
+		{
+		    Token *temp = new Token( lexYacc(), CODE );
+		    //cerr << "usersection_opt: " << $1->text << " " << temp->text << endl;
+		    $1->left = temp;
+		    $$ = new Token( "usersection_opt", _USERSECTION_OPT );
+		    $$->down = $1;
+		}
+	;
+
+ccode_opt :
+	// empty
+	| blocks
+	;
+
+// This rule matches internal braces "{}" in C code to the level of the braces of a union/action.  These internal braces
+// are returned as Tokens from the lexer but are unused because the braces are already concatenated into the code string
+// built by the lexer. Therefore, the tokens for the braces are immediately deleted.
+
+blocks :
+	'{'
+		{ delete $1; }
+	  ccode_opt '}'
+		{ delete $4; }
+	| blocks '{'
+		{ delete $2; }
+	  ccode_opt '}'
+		{ delete $5; }
+	;
+%%
+
+// Local Variables: //
+// mode: c++ //
+// tab-width: 4 //
+// compile-command: "make install" //
+// End: //
Index: tools/prettyprinter/token.cc
===================================================================
--- tools/prettyprinter/token.cc	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
+++ tools/prettyprinter/token.cc	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
@@ -0,0 +1,98 @@
+//                              -*- Mode: C++ -*- 
+// 
+// Copyright (C) Peter A. Buhr 2017
+// 
+// Pretty Printer, Copyright (C) Richard C. Bilson and Rodolfo G. Esteves 2001
+// 
+// token.cc -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Wed Jun 28 22:46:23 2017
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Jun 28 23:06:07 2017
+// Update Count     : 8
+// 
+
+#include <string>
+using namespace std;
+#include "parser.hh" 
+#include "parser.h"
+#include "filter.h"
+
+Token::Token( const string &text, int kind ) : text(text), kind(kind) {
+	left = down = NULL;
+} // Token::Token
+
+Token::Token( const string &text, list<string> &ws_list, int kind ) : text(text), kind(kind) {
+//    cerr << "Token3 : text \"" << text << "\"";
+//    for ( list<string>::iterator i = ws_list.begin(); i != ws_list.end(); i ++ ) {
+//	cerr << " WSt: \"" << *i << "\"";
+//    }
+//    cerr << endl;
+	left = down = NULL;
+	// O(1) transfer of the current lex whitespace list to the token's whitespace list, and clearing the lex whitespace
+	// list.
+	Token::ws_list.splice( Token::ws_list.end(), ws_list );
+} // Token::Token
+
+void Token::addLeftTail( Token *n ) {
+	Token *p = this;
+	while ( p->left != 0 ) {
+		p = p->left;
+	} // while
+	p->left = n;
+} // Token::addLeftTail
+
+void Token::addDownLeftTail( Token *n ) {
+	if ( down == 0 ) {
+		down = n;
+	} else {
+		down->addLeftTail( n );
+	} // if
+} // Token::addDownLeftTail
+
+bool Token::isTerminal() {
+	return kind < END_TERMINALS;
+} // Token::isTerminal
+
+int Token::getKind() const {
+	return kind;
+} // Token::getKind()
+
+string Token::getText() const {
+	return text;
+} // Token::getText()
+
+string Token::getWS() {
+	string ret;
+	// concatenate whitespace and comment text
+	for ( list<string>::iterator i = ws_list.begin(); i != ws_list.end(); i ++ ) {
+		ret += *i;
+	} // for
+	return ret;
+} // Token::getWS
+
+bool Token::isComment() {
+	return ws_list.size() > 1 || ( ws_list.size() == 1 && (*ws_list.begin())[0] == '/' );
+} // Token::isComment
+
+string Token::getComment() {
+	string ret;
+	// concatenate whitespace and comment text up to the last comment
+	if ( ws_list.size() > 1 ) {
+		list<string>::iterator end = -- ws_list.end();
+		if ( (*end)[0] == '/' ) end ++;
+		for ( list<string>::iterator i = ws_list.begin(); i != end; i ++ ) {
+			ret += *i;
+		} // for
+	} else if ( ws_list.size() == 1 ) {
+		if ( (*ws_list.begin())[0] == '/' ) ret = *ws_list.begin();
+	} // if
+	return ret;
+} // Token::getComment
+
+// Local Variables: //
+// mode: c++ //
+// tab-width: 4 //
+// compile-command: "make install" //
+// End: //
Index: tools/prettyprinter/token.h
===================================================================
--- tools/prettyprinter/token.h	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
+++ tools/prettyprinter/token.h	(revision 7d4f6ed5e24a81ba67229ed1240413b39513e433)
@@ -0,0 +1,43 @@
+// 
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+// 
+// token.h -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Wed Jun 28 22:47:58 2017
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Jun 28 23:02:06 2017
+// Update Count     : 5
+// 
+
+#ifndef __TOKEN_H__
+#define __TOKEN_H__
+
+struct Token {
+	std::string text;									// text of terminal or non-terminal token
+	int kind;											// kind of terminal or non-terminal token
+	std::list<std::string> ws_list;						// list of whitespace and comments before terminal token
+	Token *left, *down;									// binary parse tree links
+
+	Token( const std::string &, int );
+	Token( const std::string &, std::list<std::string> &, int );
+	void addLeftTail( Token * );
+	void addDownLeftTail( Token * );
+	bool isTerminal();
+	int getKind() const;
+	std::string getText() const;
+	std::string getWS();
+	bool isComment();
+	std::string getComment();
+};
+
+#endif // __TOKEN_H__
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
