aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-21 05:54:52 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-21 05:54:52 +0000
commit4887f62bea708f24e03b3f926f2698c60a94c807 (patch)
tree77271e92cf517cbc2846897f7482c9df5efee124 /src/main.cpp
parentdf5286fe3bca619beb4771da1ffa8ace9613e9e5 (diff)
downloadbuild-4887f62bea708f24e03b3f926f2698c60a94c807.tar.gz
build-4887f62bea708f24e03b3f926f2698c60a94c807.tar.bz2
build-4887f62bea708f24e03b3f926f2698c60a94c807.tar.xz
build-4887f62bea708f24e03b3f926f2698c60a94c807.zip
Getting there, it compiles, now for the fun sophisticated pieces where the
builder itself tells the lexer which tokens are functions, and which are target types.
Diffstat (limited to '')
-rw-r--r--src/main.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2b4baa5..9168df7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,7 +1,7 @@
1#include "builder.h" 1#include "builder.h"
2#include "viewerplain.h" 2//#include "viewerplain.h"
3#include "viewerpercent.h" 3//#include "viewerpercent.h"
4#include "viewermake.h" 4//#include "viewermake.h"
5#include "paramproc.h" 5#include "paramproc.h"
6#include "staticstring.h" 6#include "staticstring.h"
7 7
@@ -26,12 +26,12 @@ public:
26 "Print out a debug dump of the read build.conf", "true" ); 26 "Print out a debug dump of the read build.conf", "true" );
27 addParam("help", mkproc(ParamProc::help), 27 addParam("help", mkproc(ParamProc::help),
28 "This help"); 28 "This help");
29 pViewer = new ViewerPlain; 29 //pViewer = new ViewerPlain;
30 } 30 }
31 31
32 virtual ~Param() 32 virtual ~Param()
33 { 33 {
34 delete pViewer; 34 //delete pViewer;
35 } 35 }
36 36
37 virtual int cmdParam( int argc, char *argv[] ) 37 virtual int cmdParam( int argc, char *argv[] )
@@ -47,20 +47,20 @@ public:
47 47
48 int procViewPercent( int argc, char *argv[] ) 48 int procViewPercent( int argc, char *argv[] )
49 { 49 {
50 delete pViewer; 50 //delete pViewer;
51 pViewer = new ViewerPercent; 51 //pViewer = new ViewerPercent;
52 } 52 }
53 53
54 int procViewMake( int argc, char *argv[] ) 54 int procViewMake( int argc, char *argv[] )
55 { 55 {
56 delete pViewer; 56 //delete pViewer;
57 pViewer = new ViewerMake; 57 //pViewer = new ViewerMake;
58 } 58 }
59 59
60 std::string sCache; 60 std::string sCache;
61 std::string sFile; 61 std::string sFile;
62 StaticString sAction; 62 StaticString sAction;
63 Viewer *pViewer; 63 //Viewer *pViewer;
64 bool bDebug; 64 bool bDebug;
65 65
66private: 66private:
@@ -71,31 +71,31 @@ int main( int argc, char *argv[] )
71 Param prm; 71 Param prm;
72 prm.process( argc, argv ); 72 prm.process( argc, argv );
73 73
74 Builder bld( *prm.pViewer ); 74 Builder bld;//*prm.pViewer );
75 75
76 bld.setCache( prm.sCache ); 76 //bld.setCache( prm.sCache );
77 try 77 //try
78 { 78 //{
79 bld.load( prm.sFile.c_str() ); 79 bld.load( prm.sFile.c_str() );
80 } 80 //}
81 catch( BuildException &e ) 81 //catch( BuildException &e )
82 { 82 //{
83 fputs( e.what(), stderr ); 83 // fputs( e.what(), stderr );
84 fputs( "\n", stderr ); 84 // fputs( "\n", stderr );
85 return 1; 85 // return 1;
86 } 86 //}
87 87
88 if( prm.bDebug ) 88 if( prm.bDebug )
89 { 89 {
90 printf("\n\n----------\nDebug dump\n----------\n"); 90 printf("\n\n----------\nDebug dump\n----------\n");
91 bld.debug(); 91 //bld.debug();
92 } 92 }
93 else 93 else
94 { 94 {
95 if( prm.sAction > 0 ) 95 //if( prm.sAction > 0 )
96 bld.build( prm.sAction ); 96 // bld.build( prm.sAction );
97 else 97 //else
98 bld.build(); 98 // bld.build();
99 } 99 }
100} 100}
101 101