Каковы значения этих ключевых слов:
shift
, reduce
, error
, accept
, conflict
?
Пожалуйста, дайте полное описание каждого.
switch ( oAction)
{
case SSYaccAction::shift:
oElement = shift( lookahead());
if ( !oElement) return SSTrue;
oElement->oLexeme = lookahead();
oElement->oulState = state();
push();
if ( getLexeme()) return SSTrue;
oulError++;
break;
case SSYaccAction::reduce:
oElement = reduce( production(), productionSize());
if ( !oElement) return SSTrue;
pop( productionSize());
if ( goTo( leftside())) return SSTrue;
break;
case SSYaccAction::error:
oError = SSTrue;
if ( error( state(), lookahead()))
return SSTrue;
oulError = 0;
break;
case SSYaccAction::accept:
return accept();
default:
throwException( SSExceptionYaccParse, SSYaccMsgParse);
return SSTrue;
В приведенном выше коде, что означают
lookahead()
и
reduce(production(), productionSize())