Changes in / [a49a11b:288eede]
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main.cc
ra49a11b r288eede 11 11 // Created On : Fri May 15 23:12:02 2015 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Thu Jun 29 12:46:50201714 // Update Count : 44 113 // Last Modified On : Wed Jun 28 21:56:47 2017 14 // Update Count : 440 15 15 // 16 16 … … 481 481 break; 482 482 case '?': 483 if ( optopt ) { // short option ? 484 assertf( false, "Unknown option: -%c\n", (char)optopt ); 485 } else { 486 assertf( false, "Unknown option: %s\n", argv[optind - 1] ); 487 } // if 483 assertf( false, "Unknown option: '%c'\n", (char)optopt ); 488 484 default: 489 485 abort(); -
src/prelude/Makefile.am
ra49a11b r288eede 23 23 noinst_DATA = ../libcfa/libcfa-prelude.c 24 24 25 $(DEPDIR) :26 mkdir $(DEPDIR)27 28 $(DEPDIR)/builtins.Po : $(DEPDIR)29 touch ${@}30 31 25 # create extra forward types/declarations to reduce inclusion of library files 32 26 extras.cf : extras.regx extras.c … … 46 40 # create forward declarations for cfa builtins 47 41 builtins.cf : builtins.c 48 ${AM_V_GEN}@BACKEND_CC@ -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po 49 ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po 50 51 include $(DEPDIR)/builtins.Po 42 ${AM_V_GEN}@BACKEND_CC@ -E -P ${<} -o ${@} 52 43 53 44 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp … … 57 48 ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpmL bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 58 49 59 maintainer-clean-local :60 rm -rf $(DEPDIR)61 62 50 MAINTAINERCLEANFILES = gcc-builtins.c gcc-builtins.cf builtins.cf extras.cf bootloader.c ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} -
src/prelude/Makefile.in
ra49a11b r288eede 390 390 maintainer-clean: maintainer-clean-am 391 391 -rm -f Makefile 392 maintainer-clean-am: distclean-am maintainer-clean-generic \ 393 maintainer-clean-local 392 maintainer-clean-am: distclean-am maintainer-clean-generic 394 393 395 394 mostlyclean: mostlyclean-am … … 417 416 install-ps install-ps-am install-strip installcheck \ 418 417 installcheck-am installdirs maintainer-clean \ 419 maintainer-clean-generic maintainer-clean-local mostlyclean \ 420 mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ 421 uninstall-cfalibDATA 422 423 424 $(DEPDIR) : 425 mkdir $(DEPDIR) 426 427 $(DEPDIR)/builtins.Po : $(DEPDIR) 428 touch ${@} 418 maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ 419 pdf-am ps ps-am uninstall uninstall-am uninstall-cfalibDATA 420 429 421 430 422 # create extra forward types/declarations to reduce inclusion of library files … … 445 437 # create forward declarations for cfa builtins 446 438 builtins.cf : builtins.c 447 ${AM_V_GEN}@BACKEND_CC@ -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po 448 ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po 449 450 include $(DEPDIR)/builtins.Po 439 ${AM_V_GEN}@BACKEND_CC@ -E -P ${<} -o ${@} 451 440 452 441 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp … … 455 444 bootloader.c : bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp 456 445 ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpmL bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 457 458 maintainer-clean-local :459 rm -rf $(DEPDIR)460 446 461 447 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
src/tests/preempt_longrun/Makefile.am
ra49a11b r288eede 16 16 17 17 repeats=10 18 max_time=30 18 max_time=10 19 N=10ul 19 20 preempt=10_000ul 20 21 21 22 REPEAT = ${abs_top_srcdir}/tools/repeat -s 22 23 23 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -D PREEMPTION_RATE=${preempt}24 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -DN=${N} -DPREEMPTION_RATE=${preempt} 24 25 CFLAGS = ${BUILD_FLAGS} 25 26 CC = @CFA_BINDIR@/@CFA_NAME@ -
src/tests/preempt_longrun/Makefile.in
ra49a11b r288eede 178 178 top_srcdir = @top_srcdir@ 179 179 repeats = 10 180 max_time = 30 180 max_time = 10 181 N = 10ul 181 182 preempt = 10_000ul 182 183 REPEAT = ${abs_top_srcdir}/tools/repeat -s 183 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -D PREEMPTION_RATE=${preempt}184 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -DN=${N} -DPREEMPTION_RATE=${preempt} 184 185 TESTS = barge block create disjoint processor stack wait yield 185 186 all: all-am -
tools/prettyprinter/main.cc
ra49a11b r288eede 1 1 // 2 // Cforall Version 1.0.0 Copyright (C) 201 7University of Waterloo2 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the … … 10 10 // Created On : Wed Jun 28 22:57:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 29 13:09:32201713 // Update Count : 5812 // Last Modified On : Thu Jun 29 09:02:37 2017 13 // Update Count : 15 14 14 // 15 15 … … 19 19 using namespace std; 20 20 #include <unistd.h> // close 21 #include <getopt.h> // getopt22 21 #include "filter.h" 23 22 24 23 extern FILE * yyin; 24 extern int yylineno; 25 25 extern int yydebug; 26 26 extern int yyparse( void ); 27 27 28 bool parse_cmdline( int argc, char * argv[] ) {29 enum { Html, Identity, Latex, Nocode, ParseTree, };30 31 static struct option long_opts[] = {32 { "html", no_argument, nullptr, Html },33 { "identity", no_argument, nullptr, Identity },34 { "latex", no_argument, nullptr, Latex },35 { "nocode", no_argument, nullptr, Nocode },36 { "parse-tree", no_argument, nullptr, ParseTree },37 { nullptr, 0, nullptr, 0 }38 }; // long_opts39 int long_index;40 41 opterr = 0; // (global) prevent getopt from printing error messages42 43 int c;44 while ( (c = getopt_long( argc, argv, "hilnp", long_opts, &long_index )) != -1 ) {45 switch ( c ) {46 case Html:47 case 'h':48 filter = HTML;49 break;50 case Identity:51 case 'i':52 filter = ::Identity;53 break;54 case Latex:55 case 'l':56 filter = LaTeX;57 break;58 case Nocode:59 case 'n':60 filter = ::Nocode;61 break;62 case ParseTree:63 case 'p':64 filter = Parse_Tree;65 case '?':66 if ( optopt ) { // short option ?67 cerr << "Unknown option: -" << (char)optopt << endl;68 } else { // long option69 cerr << "Unknown option: " << argv[optind - 1] << endl;70 } // if71 return false;72 default:73 abort();74 } // switch75 } // while76 77 if ( optind != argc ) { // input files ?78 if ( optind == argc - 1 ) { // any commands after the flags ? => input file name79 yyin = fopen( argv[ optind ], "r" );80 if ( yyin == nullptr ) {81 cerr << "Open failure for input file \"" << argv[ optind ] << "\"" << endl;82 return false;83 } // if84 } else {85 cerr << "Too many input files " << argv[ optind + 1 ] << endl;86 return false;87 } // if88 } // if89 return true;90 } // parse_cmdline91 92 28 int main( int argc, char *argv[] ) { 93 yyin = stdin; // defaults29 yyin = stdin; 94 30 filter = Nocode; 95 31 96 if ( ! parse_cmdline( argc, argv ) ) { 97 cerr << "Usage: " << argv[0] 98 << " [" 99 << "-h/--html | " 100 << "-i/--identity | " 101 << "-l/--latex | " 102 << "-n/--nocode | " 103 << "-p/--parse-tree" 32 try { 33 switch ( argc ) { 34 case 3: 35 yyin = fopen( argv[ 2 ], "r" ); 36 if ( yyin == nullptr ) { 37 throw ios_base::failure( "unknown printer option arguments" ); 38 } // if 39 // FALL THROUGH 40 case 2: { 41 string arg( argv[1] ); 42 43 if ( arg == "-identity" ) { 44 filter = Identity; 45 } else if ( arg == "-parse_tree" ) { 46 filter = Parse_Tree; 47 } else if ( arg == "-nocode" ) { 48 filter = Nocode; 49 } else if ( arg == "-latex" ) { 50 filter = LaTeX; 51 } else if ( arg == "-html" ) { 52 filter = HTML; 53 } else { 54 throw ios_base::failure( "unknown printer option arguments" ); 55 } // if 56 break; 57 } 58 default: 59 throw ios_base::failure( "wrong number of arguments" ); 60 } // switch 61 } catch( ios_base::failure err ) { 62 cerr << err.what() << endl; 63 cerr << "Usage: [" << argv[0] 64 << "-identity |" 65 << "-parse_tree |" 66 << "-nocode |" 67 << "-latex |" 68 << "-html" 104 69 << "] [input-file]" 105 70 << endl; 106 71 exit( EXIT_FAILURE ); // TERMINATE 107 } // if72 } // try 108 73 109 74 //yydebug = 1;
Note: See TracChangeset
for help on using the changeset viewer.