- Timestamp:
- Jul 5, 2017, 4:46:58 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- b877fa8
- Parents:
- 67fa9f9 (diff), 1ce2189 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- tools/prettyprinter
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/prettyprinter/Makefile.am
r67fa9f9 r0614d14 15 15 ############################################################################### 16 16 17 BUILT_SOURCES = parser.h 17 BUILT_SOURCES = parser.hh 18 18 19 19 AM_YFLAGS = -d -t -v -
tools/prettyprinter/Makefile.in
r67fa9f9 r0614d14 1 # Makefile.in generated by automake 1.1 1.3from Makefile.am.1 # Makefile.in generated by automake 1.15 from Makefile.am. 2 2 # @configure_input@ 3 3 4 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software 6 # Foundation, Inc. 4 # Copyright (C) 1994-2014 Free Software Foundation, Inc. 5 7 6 # This Makefile.in is free software; the Free Software Foundation 8 7 # gives unlimited permission to copy and/or distribute it, … … 20 19 21 20 VPATH = @srcdir@ 21 am__is_gnu_make = { \ 22 if test -z '$(MAKELEVEL)'; then \ 23 false; \ 24 elif test -n '$(MAKE_HOST)'; then \ 25 true; \ 26 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ 27 true; \ 28 else \ 29 false; \ 30 fi; \ 31 } 32 am__make_running_with_option = \ 33 case $${target_option-} in \ 34 ?) ;; \ 35 *) echo "am__make_running_with_option: internal error: invalid" \ 36 "target option '$${target_option-}' specified" >&2; \ 37 exit 1;; \ 38 esac; \ 39 has_opt=no; \ 40 sane_makeflags=$$MAKEFLAGS; \ 41 if $(am__is_gnu_make); then \ 42 sane_makeflags=$$MFLAGS; \ 43 else \ 44 case $$MAKEFLAGS in \ 45 *\\[\ \ ]*) \ 46 bs=\\; \ 47 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 48 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 49 esac; \ 50 fi; \ 51 skip_next=no; \ 52 strip_trailopt () \ 53 { \ 54 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 55 }; \ 56 for flg in $$sane_makeflags; do \ 57 test $$skip_next = yes && { skip_next=no; continue; }; \ 58 case $$flg in \ 59 *=*|--*) continue;; \ 60 -*I) strip_trailopt 'I'; skip_next=yes;; \ 61 -*I?*) strip_trailopt 'I';; \ 62 -*O) strip_trailopt 'O'; skip_next=yes;; \ 63 -*O?*) strip_trailopt 'O';; \ 64 -*l) strip_trailopt 'l'; skip_next=yes;; \ 65 -*l?*) strip_trailopt 'l';; \ 66 -[dEDm]) skip_next=yes;; \ 67 -[JT]) skip_next=yes;; \ 68 esac; \ 69 case $$flg in \ 70 *$$target_option*) has_opt=yes; break;; \ 71 esac; \ 72 done; \ 73 test $$has_opt = yes 74 am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 75 am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 22 76 pkgdatadir = $(datadir)/@PACKAGE@ 23 77 pkgincludedir = $(includedir)/@PACKAGE@ … … 40 94 tools_prettyprinter_PROGRAMS = pretty$(EXEEXT) 41 95 subdir = tools/prettyprinter 42 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in lex.cc \43 parser.cc parser.h44 96 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 45 97 am__aclocal_m4_deps = $(top_srcdir)/configure.ac 46 98 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 47 99 $(ACLOCAL_M4) 100 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 48 101 mkinstalldirs = $(install_sh) -d 49 102 CONFIG_HEADER = $(top_builddir)/config.h … … 61 114 pretty_LINK = $(CXXLD) $(pretty_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ 62 115 $(LDFLAGS) -o $@ 116 AM_V_P = $(am__v_P_@AM_V@) 117 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 118 am__v_P_0 = false 119 am__v_P_1 = : 120 AM_V_GEN = $(am__v_GEN_@AM_V@) 121 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 122 am__v_GEN_0 = @echo " GEN " $@; 123 am__v_GEN_1 = 124 AM_V_at = $(am__v_at_@AM_V@) 125 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 126 am__v_at_0 = @ 127 am__v_at_1 = 63 128 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 64 129 depcomp = $(SHELL) $(top_srcdir)/automake/depcomp … … 68 133 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 69 134 am__v_lt_0 = --silent 135 am__v_lt_1 = 70 136 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 71 137 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 72 138 AM_V_CXX = $(am__v_CXX_@AM_V@) 73 139 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) 74 am__v_CXX_0 = @echo " CXX " $@; 75 AM_V_at = $(am__v_at_@AM_V@) 76 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 77 am__v_at_0 = @ 140 am__v_CXX_0 = @echo " CXX " $@; 141 am__v_CXX_1 = 78 142 CXXLD = $(CXX) 79 143 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ … … 81 145 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) 82 146 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) 83 am__v_CXXLD_0 = @echo " CXXLD " $@; 147 am__v_CXXLD_0 = @echo " CXXLD " $@; 148 am__v_CXXLD_1 = 84 149 @MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || 85 150 LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) 86 151 AM_V_LEX = $(am__v_LEX_@AM_V@) 87 152 am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) 88 am__v_LEX_0 = @echo " LEX " $@; 153 am__v_LEX_0 = @echo " LEX " $@; 154 am__v_LEX_1 = 89 155 YLWRAP = $(top_srcdir)/automake/ylwrap 90 156 @MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || 157 am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ 158 -e s/c++$$/h++/ -e s/c$$/h/ 91 159 YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) 92 160 AM_V_YACC = $(am__v_YACC_@AM_V@) 93 161 am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) 94 am__v_YACC_0 = @echo " YACC " $@; 162 am__v_YACC_0 = @echo " YACC " $@; 163 am__v_YACC_1 = 95 164 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 96 165 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 97 166 AM_V_CC = $(am__v_CC_@AM_V@) 98 167 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) 99 am__v_CC_0 = @echo " CC " $@; 168 am__v_CC_0 = @echo " CC " $@; 169 am__v_CC_1 = 100 170 CCLD = $(CC) 101 171 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 102 172 AM_V_CCLD = $(am__v_CCLD_@AM_V@) 103 173 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) 104 am__v_CCLD_0 = @echo " CCLD " $@; 105 AM_V_GEN = $(am__v_GEN_@AM_V@) 106 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 107 am__v_GEN_0 = @echo " GEN " $@; 174 am__v_CCLD_0 = @echo " CCLD " $@; 175 am__v_CCLD_1 = 108 176 SOURCES = $(pretty_SOURCES) 109 177 DIST_SOURCES = $(pretty_SOURCES) 178 am__can_run_installinfo = \ 179 case $$AM_UPDATE_INFO_DIR in \ 180 n|no|NO) false;; \ 181 *) (install-info --version) >/dev/null 2>&1;; \ 182 esac 183 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 184 # Read a list of newline-separated strings from the standard input, 185 # and print each of them once, without duplicates. Input order is 186 # *not* preserved. 187 am__uniquify_input = $(AWK) '\ 188 BEGIN { nonempty = 0; } \ 189 { items[$$0] = 1; nonempty = 1; } \ 190 END { if (nonempty) { for (i in items) print i; }; } \ 191 ' 192 # Make sure the list of sources is unique. This is necessary because, 193 # e.g., the same source file might be shared among _SOURCES variables 194 # for different programs/libraries. 195 am__define_uniq_tagged_files = \ 196 list='$(am__tagged_files)'; \ 197 unique=`for i in $$list; do \ 198 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 199 done | $(am__uniquify_input)` 110 200 ETAGS = etags 111 201 CTAGS = ctags 202 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/automake/depcomp \ 203 $(top_srcdir)/automake/ylwrap lex.cc parser.cc parser.hh 112 204 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 113 205 ACLOCAL = @ACLOCAL@ … … 222 314 program_transform_name = @program_transform_name@ 223 315 psdir = @psdir@ 316 runstatedir = @runstatedir@ 224 317 sbindir = @sbindir@ 225 318 sharedstatedir = @sharedstatedir@ … … 230 323 top_builddir = @top_builddir@ 231 324 top_srcdir = @top_srcdir@ 232 BUILT_SOURCES = parser.h 325 BUILT_SOURCES = parser.hh 233 326 AM_YFLAGS = -d -t -v 234 327 SRC = lex.ll \ … … 257 350 esac; \ 258 351 done; \ 259 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreigntools/prettyprinter/Makefile'; \352 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/prettyprinter/Makefile'; \ 260 353 $(am__cd) $(top_srcdir) && \ 261 $(AUTOMAKE) --foreign tools/prettyprinter/Makefile 262 .PRECIOUS: Makefile 354 $(AUTOMAKE) --gnu tools/prettyprinter/Makefile 263 355 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 264 356 @case '$?' in \ … … 280 372 install-tools_prettyprinterPROGRAMS: $(tools_prettyprinter_PROGRAMS) 281 373 @$(NORMAL_INSTALL) 282 test -z "$(tools_prettyprinterdir)" || $(MKDIR_P) "$(DESTDIR)$(tools_prettyprinterdir)"283 374 @list='$(tools_prettyprinter_PROGRAMS)'; test -n "$(tools_prettyprinterdir)" || list=; \ 375 if test -n "$$list"; then \ 376 echo " $(MKDIR_P) '$(DESTDIR)$(tools_prettyprinterdir)'"; \ 377 $(MKDIR_P) "$(DESTDIR)$(tools_prettyprinterdir)" || exit 1; \ 378 fi; \ 284 379 for p in $$list; do echo "$$p $$p"; done | \ 285 380 sed 's/$(EXEEXT)$$//' | \ 286 while read p p1; do if test -f $$p ;\287 then echo "$$p"; echo "$$p"; else :; fi; \381 while read p p1; do if test -f $$p \ 382 ; then echo "$$p"; echo "$$p"; else :; fi; \ 288 383 done | \ 289 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ 384 sed -e 'p;s,.*/,,;n;h' \ 385 -e 's|.*|.|' \ 290 386 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 291 387 sed 'N;N;N;s,\n, ,g' | \ … … 308 404 files=`for p in $$list; do echo "$$p"; done | \ 309 405 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 310 -e 's/$$/$(EXEEXT)/' `; \ 406 -e 's/$$/$(EXEEXT)/' \ 407 `; \ 311 408 test -n "$$list" || exit 0; \ 312 409 echo " ( cd '$(DESTDIR)$(tools_prettyprinterdir)' && rm -f" $$files ")"; \ … … 315 412 clean-tools_prettyprinterPROGRAMS: 316 413 -test -z "$(tools_prettyprinter_PROGRAMS)" || rm -f $(tools_prettyprinter_PROGRAMS) 317 parser.h : parser.cc414 parser.hh: parser.cc 318 415 @if test ! -f $@; then rm -f parser.cc; else :; fi 319 416 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) parser.cc; else :; fi 417 320 418 pretty$(EXEEXT): $(pretty_OBJECTS) $(pretty_DEPENDENCIES) $(EXTRA_pretty_DEPENDENCIES) 321 419 @rm -f pretty$(EXEEXT) … … 335 433 336 434 .cc.o: 337 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 338 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 435 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ 436 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 437 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po 339 438 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 340 439 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ … … 342 441 343 442 .cc.obj: 344 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 345 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 443 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ 444 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ 445 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po 346 446 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 347 447 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ … … 422 522 423 523 .yy.cc: 424 $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) 425 426 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 427 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 428 unique=`for i in $$list; do \ 429 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 430 done | \ 431 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 432 END { if (nonempty) { for (i in files) print i; }; }'`; \ 433 mkid -fID $$unique 434 tags: TAGS 435 436 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 437 $(TAGS_FILES) $(LISP) 524 $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) 525 526 ID: $(am__tagged_files) 527 $(am__define_uniq_tagged_files); mkid -fID $$unique 528 tags: tags-am 529 TAGS: tags 530 531 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 438 532 set x; \ 439 533 here=`pwd`; \ 440 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 441 unique=`for i in $$list; do \ 442 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 443 done | \ 444 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 445 END { if (nonempty) { for (i in files) print i; }; }'`; \ 534 $(am__define_uniq_tagged_files); \ 446 535 shift; \ 447 536 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ … … 455 544 fi; \ 456 545 fi 457 ctags: CTAGS 458 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 459 $(TAGS_FILES) $(LISP) 460 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 461 unique=`for i in $$list; do \ 462 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 463 done | \ 464 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 465 END { if (nonempty) { for (i in files) print i; }; }'`; \ 546 ctags: ctags-am 547 548 CTAGS: ctags 549 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 550 $(am__define_uniq_tagged_files); \ 466 551 test -z "$(CTAGS_ARGS)$$unique" \ 467 552 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ … … 472 557 && $(am__cd) $(top_srcdir) \ 473 558 && gtags -i $(GTAGS_ARGS) "$$here" 559 cscopelist: cscopelist-am 560 561 cscopelist-am: $(am__tagged_files) 562 list='$(am__tagged_files)'; \ 563 case "$(srcdir)" in \ 564 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 565 *) sdir=$(subdir)/$(srcdir) ;; \ 566 esac; \ 567 for i in $$list; do \ 568 if test -f "$$i"; then \ 569 echo "$(subdir)/$$i"; \ 570 else \ 571 echo "$$sdir/$$i"; \ 572 fi; \ 573 done >> $(top_builddir)/cscope.files 474 574 475 575 distclean-tags: … … 547 647 -rm -f lex.cc 548 648 -rm -f parser.cc 549 -rm -f parser.h 649 -rm -f parser.hh 550 650 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) 551 651 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) … … 622 722 .MAKE: all check install install-am install-strip 623 723 624 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \625 clean-tools_prettyprinterPROGRAMS c tags distclean\626 distclean -compile distclean-generic distclean-tags distdir dvi\627 d vi-am html html-am info info-am install install-am\628 install- data install-data-am install-dvi install-dvi-am\629 install- exec install-exec-am install-html install-html-am\630 install- info install-info-am install-man install-pdf\631 install-pdf -am install-ps install-ps-am install-strip\632 install- tools_prettyprinterPROGRAMS installcheck \724 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ 725 clean-tools_prettyprinterPROGRAMS cscopelist-am ctags ctags-am \ 726 distclean distclean-compile distclean-generic distclean-tags \ 727 distdir dvi dvi-am html html-am info info-am install \ 728 install-am install-data install-data-am install-dvi \ 729 install-dvi-am install-exec install-exec-am install-html \ 730 install-html-am install-info install-info-am install-man \ 731 install-pdf install-pdf-am install-ps install-ps-am \ 732 install-strip install-tools_prettyprinterPROGRAMS installcheck \ 633 733 installcheck-am installdirs maintainer-clean \ 634 734 maintainer-clean-generic mostlyclean mostlyclean-compile \ 635 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \735 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ 636 736 uninstall-am uninstall-tools_prettyprinterPROGRAMS 737 738 .PRECIOUS: Makefile 637 739 638 740 -
tools/prettyprinter/filter.cc
r67fa9f9 r0614d14 19 19 using namespace std; 20 20 #include "filter.h" 21 #include "parser.h "21 #include "parser.hh" 22 22 23 23 -
tools/prettyprinter/filter.h
r67fa9f9 r0614d14 17 17 #define __FILTER_H__ 18 18 19 #include " parser.hh"19 #include "ParserTypes.h" 20 20 21 21 extern void (* filter)( Token * tree ); // pointer to filter for parse tree -
tools/prettyprinter/lex.ll
r67fa9f9 r0614d14 23 23 #include <iostream> 24 24 using namespace std; 25 #include "ParserTypes.h" 25 26 #include "parser.hh" 26 #include "parser.h"27 27 28 28 #define RETURN_TOKEN( kind ) yylval.tokenp = new Token( yytext, ws_list, kind ); return kind; -
tools/prettyprinter/parser.hh
r67fa9f9 r0614d14 1 // -*- Mode: C++ -*- 2 // 3 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo 4 // 5 // The contents of this file are covered under the licence agreement in the 6 // file "LICENCE" distributed with Cforall. 7 // 8 // parse.h - Various declarations that are needed so that the generated parser 9 // and lexer compile with C++, and to share information between the 10 // parser, lexer, and driver program 11 // 12 // Author : Richard C. Bilson and Rodolfo G. Esteves 13 // Created On : Sun Dec 16 15:00:49 2001 14 // Last Modified By : Peter A. Buhr 15 // Last Modified On : Wed Jun 28 22:59:27 2017 16 // Update Count : 174 17 // 1 /* A Bison parser, made by GNU Bison 3.0.4. */ 18 2 19 #ifndef __PARSER_HH__ 20 #define __PARSER_HH__ 3 /* Bison interface for Yacc-like parsers in C 21 4 22 int yylex(); 5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. 23 6 24 #include <string> 25 #include <list> 26 #include "token.h" 7 This program is free software: you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation, either version 3 of the License, or 10 (at your option) any later version. 27 11 28 #endif // __PARSER_HH__ 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 29 16 30 // Local Variables: // 31 // mode: c++ // 32 // tab-width: 4 // 33 // compile-command: "make install" // 34 // End: // 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19 20 /* As a special exception, you may create a larger work that contains 21 part or all of the Bison parser skeleton and distribute that work 22 under terms of your choice, so long as that work isn't itself a 23 parser generator using the skeleton or a modified version thereof 24 as a parser skeleton. Alternatively, if you modify or redistribute 25 the parser skeleton itself, you may (at your option) remove this 26 special exception, which will cause the skeleton and the resulting 27 Bison output files to be licensed under the GNU General Public 28 License without this special exception. 29 30 This special exception was added by the Free Software Foundation in 31 version 2.2 of Bison. */ 32 33 #ifndef YY_YY_PARSER_HH_INCLUDED 34 # define YY_YY_PARSER_HH_INCLUDED 35 /* Debug traces. */ 36 #ifndef YYDEBUG 37 # define YYDEBUG 1 38 #endif 39 #if YYDEBUG 40 extern int yydebug; 41 #endif 42 43 /* Token type. */ 44 #ifndef YYTOKENTYPE 45 # define YYTOKENTYPE 46 enum yytokentype 47 { 48 MARK = 258, 49 LCURL = 259, 50 RCURL = 260, 51 INTEGER = 261, 52 CHARACTER = 262, 53 IDENTIFIER = 263, 54 CODE = 264, 55 START = 265, 56 UNION = 266, 57 TOKEN = 267, 58 LEFT = 268, 59 RIGHT = 269, 60 NONASSOC = 270, 61 TYPE = 271, 62 PURE_PARSER = 272, 63 SEMANTIC_PARSER = 273, 64 EXPECT = 274, 65 THONG = 275, 66 PREC = 276, 67 END_TERMINALS = 277, 68 _SECTIONS = 278, 69 _DEFSECTION_OPT = 279, 70 _LITERALBLOCK = 280, 71 _DECLARATION = 281, 72 _TAG_OPT = 282, 73 _NAMENOLIST = 283, 74 _NAMENO = 284, 75 _NAMELIST = 285, 76 _RULESECTION = 286, 77 _RULE = 287, 78 _LHS = 288, 79 _RHS = 289, 80 _PREC = 290, 81 _ACTION = 291, 82 _USERSECTION_OPT = 292 83 }; 84 #endif 85 /* Tokens. */ 86 #define MARK 258 87 #define LCURL 259 88 #define RCURL 260 89 #define INTEGER 261 90 #define CHARACTER 262 91 #define IDENTIFIER 263 92 #define CODE 264 93 #define START 265 94 #define UNION 266 95 #define TOKEN 267 96 #define LEFT 268 97 #define RIGHT 269 98 #define NONASSOC 270 99 #define TYPE 271 100 #define PURE_PARSER 272 101 #define SEMANTIC_PARSER 273 102 #define EXPECT 274 103 #define THONG 275 104 #define PREC 276 105 #define END_TERMINALS 277 106 #define _SECTIONS 278 107 #define _DEFSECTION_OPT 279 108 #define _LITERALBLOCK 280 109 #define _DECLARATION 281 110 #define _TAG_OPT 282 111 #define _NAMENOLIST 283 112 #define _NAMENO 284 113 #define _NAMELIST 285 114 #define _RULESECTION 286 115 #define _RULE 287 116 #define _LHS 288 117 #define _RHS 289 118 #define _PREC 290 119 #define _ACTION 291 120 #define _USERSECTION_OPT 292 121 122 /* Value type. */ 123 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 124 125 union YYSTYPE 126 { 127 #line 41 "parser.yy" /* yacc.c:1909 */ 128 129 Token *tokenp; 130 131 #line 132 "parser.hh" /* yacc.c:1909 */ 132 }; 133 134 typedef union YYSTYPE YYSTYPE; 135 # define YYSTYPE_IS_TRIVIAL 1 136 # define YYSTYPE_IS_DECLARED 1 137 #endif 138 139 140 extern YYSTYPE yylval; 141 142 int yyparse (void); 143 144 #endif /* !YY_YY_PARSER_HH_INCLUDED */ -
tools/prettyprinter/parser.yy
r67fa9f9 r0614d14 20 20 #include <iostream> 21 21 using namespace std; 22 #include " parser.hh"22 #include "ParserTypes.h" 23 23 #include "filter.h" 24 24 -
tools/prettyprinter/token.cc
r67fa9f9 r0614d14 16 16 #include <string> 17 17 using namespace std; 18 #include " parser.hh"19 #include "parser.h "18 #include "ParserTypes.h" 19 #include "parser.hh" 20 20 #include "filter.h" 21 21
Note:
See TracChangeset
for help on using the changeset viewer.