version 1.26, 2008/12/02 09:01:21
|
version 1.26.8.1, 2013/09/29 21:45:43
|
|
|
//#include <sstream> | //#include <sstream> |
#include "parserExceptions.h" | #include "parserExceptions.h" |
| |
|
|
|
//----------------------------------------------------------------------- |
|
//Implementation of the parserTypeFunctions |
|
//----------------------------------------------------------------------- |
|
static const char* _parserTypeStrings[] = |
|
{ |
|
"Null","Integer", "Real", "String", "Boolean,", "Char" |
|
}; |
|
|
|
static const Uint32 _NUM_TYPES = sizeof(_parserTypeStrings) / |
|
sizeof(_parserTypeStrings[0]); |
|
|
|
const char* strValTypeEnumToString(strValTypeNS::strValTypeEnum type) |
|
{ |
|
PEGASUS_ASSERT(Uint32(type) < _NUM_TYPES); |
|
return _parserTypeStrings[Uint32(type)]; |
|
|
|
} |
//--------------------------------------------------------------------- | //--------------------------------------------------------------------- |
// Take a YY_BUFFERSTATE off the stack of saved contexts | // Take a YY_BUFFERSTATE off the stack of saved contexts |
//--------------------------------------------------------------------- | //--------------------------------------------------------------------- |
|
|
#else | #else |
FILE *f = fopen(filename.getCString(),"rt"); | FILE *f = fopen(filename.getCString(),"rt"); |
#endif | #endif |
if (f) { |
if (f) |
|
{ |
set_current_filename(filename); | set_current_filename(filename); |
set_lineno(1); | set_lineno(1); |
return setInputBuffer(f, false); | return setInputBuffer(f, false); |
} else { |
} else |
|
{ |
return 1; | return 1; |
} | } |
} | } |
|
|
set_current_filenamePath(v->filenamePath); | set_current_filenamePath(v->filenamePath); |
delete v; | delete v; |
return 0; // more data available | return 0; // more data available |
} else { |
} else |
|
{ |
return 1; // end of it all | return 1; // end of it all |
} | } |
} | } |