| Home | Index | universal Index | gsp Index | Examples | Tutorial |
#include "gsp__Visitor.h"
The Expander Visitor's work consists in printing out the values of the parsed constants and tokens. More...
Public Functions | |||
| ExpanderVisitor | ( std::ostream & os , bool bRestoreWS = true ) | ||
| ~ExpanderVisitor | ( ) | ||
| process | ( gsp::Symbol * & rpSymbol ) | |
| process | ( const char * c_pszConstant , gsp::Symbol & parent , unsigned long uSymbolRank ) | |
Private Variables | |||
| m_bRestoreWS | ||
| m_os | ||
The Expander Visitor's work consists in printing out the values of the parsed constants and tokens.
The symbol's expand() functions are implemented using this visitor.
See also:
Constructor.
See also:
Destructor.
See also:
If the symbol is a non-terminal, it does nothing and true is returned. If the symbol is a token, it prints out the value of the token as it was parsed in the original input stream.
Returns true if the operation was successful, which is normally always the case if the expanded symbol was initially parsed successfully.
The code executed is the following:
Example:
if (rpSymbol)
{
if (rpSymbol->isToken())
{
rpSymbol->restore_ws(0, m_os);
rpSymbol->expand(m_os);
}
else // (rpSymbol->isNonTerminal())
{
// Nothing to do
}
return true;
}
else
{
return false;
}See also:
Prints out the value of the passed constant, restituting the preceding whitespaces that were eaten during parsing.
Returns always true.
The code executed is the following:
Example:
parent.restore_ws(uSymbolRank, m_os); m_os << c_pszConstant; return true;
See also:
This file is part of the LLOOP LL Object-Oriented Parser Generator and Object Expander Generator. Copyright (c) 2005-2006 Michel MEHL, France. All rights reserved. LLOOP is distributed by the company ERSA SaRL.
| Copyright (c) 2005-2006 Michel MEHL, Haguenau, France |
| LLOOP version 1.1 |