1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-09-28 19:05:55 +08:00
ULib/examples/parser/ParserInterface.cpp
stefanocasazza 877766b00d bug fixing
2015-07-10 19:16:37 +02:00

42 lines
614 B
C++

// ParserInterface.cpp
#include <ParserInterface.h>
bool ParserInterface::parse()
{
U_TRACE(5, "ParserInterface::parse()")
/**
* extern int yydebug;
* yydebug = 1;
*/
if (UBison::parse(this)) U_RETURN(true);
U_RETURN(false);
}
// DEBUG
#ifdef DEBUG
# include <ulib/internal/objectIO.h>
const char* ParserInterface::dump(bool reset) const
{
UBison::dump(false);
*UObjectIO::os << "\n"
<< "pcdata (UString " << (void*)&pcdata << ")";
if (reset)
{
UObjectIO::output();
return UObjectIO::buffer_output;
}
return 0;
}
#endif