aboutsummaryrefslogtreecommitdiff
path: root/src/tafreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tafreader.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tafreader.cpp b/src/tafreader.cpp
index 4f0e1ec..29796f1 100644
--- a/src/tafreader.cpp
+++ b/src/tafreader.cpp
@@ -13,7 +13,8 @@ using namespace Bu;
13 13
14Bu::TafReader::TafReader( Bu::Stream &sIn ) : 14Bu::TafReader::TafReader( Bu::Stream &sIn ) :
15 c( 0 ), 15 c( 0 ),
16 sIn( sIn ) 16 sIn( sIn ),
17 iLine( 1 ), iCol( 1 )
17{ 18{
18 next(); next(); 19 next(); next();
19} 20}
@@ -62,7 +63,7 @@ void Bu::TafReader::groupContent( Bu::TafGroup *pGroup )
62 else if( c == '/' && la == '/' ) 63 else if( c == '/' && la == '/' )
63 pGroup->addChild( readComment( true ) ); 64 pGroup->addChild( readComment( true ) );
64 else if( c == ':' ) 65 else if( c == ':' )
65 throw TafException("Encountered stray ':' in taf stream."); 66 throw TafException("Encountered stray ':' in taf stream at %d:%d.", iLine, iCol );
66 else 67 else
67 pGroup->addChild( readProperty() ); 68 pGroup->addChild( readProperty() );
68 } 69 }
@@ -187,6 +188,13 @@ bool Bu::TafReader::isws()
187 188
188void Bu::TafReader::next() 189void Bu::TafReader::next()
189{ 190{
191 if( c == '\n' )
192 {
193 iLine++;
194 iCol = 1;
195 }
196 else
197 iCol++;
190 if( c == '}' ) 198 if( c == '}' )
191 { 199 {
192 sIn.read( &c, 1 ); 200 sIn.read( &c, 1 );