aboutsummaryrefslogtreecommitdiff
path: root/src/buildparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/buildparser.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/buildparser.cpp b/src/buildparser.cpp
index 125a31e..f5c3132 100644
--- a/src/buildparser.cpp
+++ b/src/buildparser.cpp
@@ -17,7 +17,7 @@ BuildParser::~BuildParser()
17 17
18int build_parse( yyscan_t yyscanner, BuildParser &bld ); 18int build_parse( yyscan_t yyscanner, BuildParser &bld );
19 19
20void BuildParser::load( const Bu::FString &sFile ) 20void BuildParser::load( const Bu::String &sFile )
21{ 21{
22 yyscan_t scanner; 22 yyscan_t scanner;
23 23
@@ -39,7 +39,7 @@ void BuildParser::load( const Bu::FString &sFile )
39 // Bu::sio << xAst; 39 // Bu::sio << xAst;
40} 40}
41 41
42bool BuildParser::isKeyword( const Bu::FString &sStr ) 42bool BuildParser::isKeyword( const Bu::String &sStr )
43{ 43{
44 if( sStr == "important" ) 44 if( sStr == "important" )
45 return true; 45 return true;
@@ -52,7 +52,7 @@ bool BuildParser::isKeyword( const Bu::FString &sStr )
52 return false; 52 return false;
53} 53}
54 54
55bool BuildParser::isCond( const Bu::FString &sStr ) 55bool BuildParser::isCond( const Bu::String &sStr )
56{ 56{
57 if( sStr == "filetime" ) 57 if( sStr == "filetime" )
58 return true; 58 return true;
@@ -63,7 +63,7 @@ bool BuildParser::isCond( const Bu::FString &sStr )
63 return false; 63 return false;
64} 64}
65 65
66void BuildParser::include( const Bu::FString &sStr, void *scanner, YYLTYPE *loc ) 66void BuildParser::include( const Bu::String &sStr, void *scanner, YYLTYPE *loc )
67{ 67{
68 for( StrList::iterator pi = lIncludePaths.begin(); pi; pi++ ) 68 for( StrList::iterator pi = lIncludePaths.begin(); pi; pi++ )
69 { 69 {
@@ -80,12 +80,12 @@ void BuildParser::include( const Bu::FString &sStr, void *scanner, YYLTYPE *loc
80 build__create_buffer( fIn, YY_READ_BUF_SIZE, scanner ), 80 build__create_buffer( fIn, YY_READ_BUF_SIZE, scanner ),
81 scanner 81 scanner
82 ); 82 );
83 Bu::FString::const_iterator i = sStr.find('/'); 83 Bu::String::const_iterator i = sStr.find('/');
84 if( i ) 84 if( i )
85 { 85 {
86 for(;;) 86 for(;;)
87 { 87 {
88 Bu::FString::const_iterator j = i.find('/'); 88 Bu::String::const_iterator j = i.find('/');
89 if( !j ) 89 if( !j )
90 break; 90 break;
91 i = j+1; 91 i = j+1;
@@ -99,7 +99,7 @@ void BuildParser::include( const Bu::FString &sStr, void *scanner, YYLTYPE *loc
99 } 99 }
100 return; 100 return;
101 } 101 }
102 Bu::FString msg("Could not open include file: "); 102 Bu::String msg("Could not open include file: ");
103 msg += sStr; 103 msg += sStr;
104 error( 104 error(
105 loc->first_line, loc->last_line, 105 loc->first_line, loc->last_line,
@@ -117,14 +117,14 @@ void BuildParser::endInclude( YYLTYPE *loc )
117} 117}
118 118
119void BuildParser::error( int iLine1, int iLine2, int iCol1, int iCol2, 119void BuildParser::error( int iLine1, int iLine2, int iCol1, int iCol2,
120 const Bu::FString &sMsg ) 120 const Bu::String &sMsg )
121{ 121{
122 throw Bu::ExceptionBase("%s: %d-%d:%d-%d: %s", 122 throw Bu::ExceptionBase("%s: %d-%d:%d-%d: %s",
123 sFilename.peek().getStr(), iLine1, iLine2, iCol1, iCol2, sMsg.getStr() 123 sFilename.peek().getStr(), iLine1, iLine2, iCol1, iCol2, sMsg.getStr()
124 ); 124 );
125} 125}
126 126
127void BuildParser::addIncludePath( const Bu::FString &sPath ) 127void BuildParser::addIncludePath( const Bu::String &sPath )
128{ 128{
129 lIncludePaths.append( sPath + "/" ); 129 lIncludePaths.append( sPath + "/" );
130} 130}