ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
deferred_resn
demangler
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
with_gc
|
Last change
on this file since 7d4f6ed was 7d4f6ed, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago |
|
remainder of pretty printer
|
-
Property mode
set to
100644
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | //
|
|---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
|
|---|
| 3 | //
|
|---|
| 4 | // The contents of this file are covered under the licence agreement in the
|
|---|
| 5 | // file "LICENCE" distributed with Cforall.
|
|---|
| 6 | //
|
|---|
| 7 | // main.cc --
|
|---|
| 8 | //
|
|---|
| 9 | // Author : Peter A. Buhr
|
|---|
| 10 | // Created On : Wed Jun 28 22:57:26 2017
|
|---|
| 11 | // Last Modified By : Peter A. Buhr
|
|---|
| 12 | // Last Modified On : Wed Jun 28 22:58:40 2017
|
|---|
| 13 | // Update Count : 3
|
|---|
| 14 | //
|
|---|
| 15 |
|
|---|
| 16 | #include <iostream>
|
|---|
| 17 | #include <string>
|
|---|
| 18 | using namespace std;
|
|---|
| 19 | #include "filter.h"
|
|---|
| 20 |
|
|---|
| 21 | extern int yydebug;
|
|---|
| 22 | extern int yyparse( void );
|
|---|
| 23 |
|
|---|
| 24 | int main( int argc, char *argv[] ) {
|
|---|
| 25 | switch ( argc ) {
|
|---|
| 26 | case 2: {
|
|---|
| 27 | string arg( argv[1] );
|
|---|
| 28 |
|
|---|
| 29 | if ( arg == "-identity" ) {
|
|---|
| 30 | filter = Identity;
|
|---|
| 31 | } else if ( arg == "-parse_tree" ) {
|
|---|
| 32 | filter = Parse_Tree;
|
|---|
| 33 | } else if ( arg == "-nocode" ) {
|
|---|
| 34 | filter = Nocode;
|
|---|
| 35 | } else if ( arg == "-latex" ) {
|
|---|
| 36 | filter = LaTeX;
|
|---|
| 37 | } else if ( arg == "-html" ) {
|
|---|
| 38 | filter = HTML;
|
|---|
| 39 | } else {
|
|---|
| 40 | cerr << "Unknown printer option: " << argv[1] << endl;
|
|---|
| 41 | goto usage;
|
|---|
| 42 | } // if
|
|---|
| 43 | break;
|
|---|
| 44 | }
|
|---|
| 45 | usage:
|
|---|
| 46 | default:
|
|---|
| 47 | cerr << "Usage: " << argv[0] << " [-identity | -parse_tree | -nocode | -latex | -html] < bison.y" << endl;
|
|---|
| 48 | exit( -1 );
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | //yydebug = 1;
|
|---|
| 52 | yyparse();
|
|---|
| 53 | }
|
|---|
| 54 |
|
|---|
| 55 | // Local Variables: //
|
|---|
| 56 | // mode: c++ //
|
|---|
| 57 | // tab-width: 4 //
|
|---|
| 58 | // compile-command: "make install" //
|
|---|
| 59 | // End: //
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.