本文整理汇总了C++中Automate::Decalage方法的典型用法代码示例。如果您正苦于以下问题:C++ Automate::Decalage方法的具体用法?C++ Automate::Decalage怎么用?C++ Automate::Decalage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Automate
的用法示例。
在下文中一共展示了Automate::Decalage方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
bool E1::Transition ( Automate & automate, Symbole * s )
{
switch(*s)
{
case VAR:
{
automate.Decalage(s, new E4);
return true;
}
case CONST:
{
automate.Decalage(s, new E5);
return true;
}
case LIRE:
case ECRIRE:
case ID:
case FIN:
{
automate.Reduction(new PartieInstructions, 0);
return true;
}
case D:
{
automate.Decalage(s, new E3);
return true;
}
case PI:
{
automate.Decalage(s, new E2);
return true;
}
}
return false;
}
示例2: switch
bool GeneratedState1122::Transition (Automate & automate, Symbole *s)
{
// Generated code :
switch ((int)*s) {
case OUVRE_PAR:
automate.Consommer();
automate.Decalage(s, new GeneratedState114);
break;
case FACTEUR:
automate.Decalage(s, new GeneratedState11221);
break;
case IDENTIFIANT:
automate.Consommer();
automate.Decalage(s, new GeneratedState115);
break;
case VALEUR:
automate.Consommer();
automate.Decalage(s, new GeneratedState116);
break;
default:
automate.SetErreur();
break;
}
return false;
}
示例3: switch
bool GeneratedState1::Transition (Automate & automate, Symbole *s)
{
// Generated code :
switch ((int)*s) {
case FIN:
automate.Reduction(2);
break;
case ECRIRE:
automate.Consommer();
automate.Decalage(s, new GeneratedState11);
break;
case IDENTIFIANT:
automate.Consommer();
automate.Decalage(s, new GeneratedState13);
break;
case LIRE:
automate.Consommer();
automate.Decalage(s, new GeneratedState12);
break;
default:
automate.SetErreur();
break;
}
return false;
}
示例4: switch
bool GeneratedState0::Transition (Automate & automate, Symbole *s)
{
// Generated code :
switch ((int)*s) {
case CONST:
automate.Reduction(0);
break;
case ECRIRE:
automate.Reduction(0);
break;
case IDENTIFIANT:
automate.Reduction(0);
break;
case LIRE:
automate.Reduction(0);
break;
case PDECL:
automate.Decalage(s, new GeneratedState0p);
break;
case VAR:
automate.Reduction(0);
break;
case PROGRAMME:
automate.Consommer();
Programme* progSymbole;
progSymbole = static_cast<Programme*>(s);
automate.Accepter(progSymbole);
break;
default:
automate.SetErreur();
break;
}
return false;
}
示例5: switch
bool E29::Transition ( Automate & automate, Symbole * s )
{
switch(*s)
{
case FERMEPAR:
{
automate.Decalage(s, new E36);
return true;
}
case OPA:
{
automate.Decalage(s, new E27);
return true;
}
}
return false;
}
示例6: switch
bool E4::Transition ( Automate & automate, Symbole * s )
{
switch(*s)
{
case ID:
{
automate.Decalage(s, new E12);
return true;
}
case LID:
{
automate.Decalage(s, new E11);
return true;
}
}
return false;
}
示例7: switch
bool E2::Transition ( Automate & automate, Symbole * s )
{
switch(*s)
{
case LIRE:
{
automate.Decalage(s, new E7);
return true;
}
case ECRIRE:
{
automate.Decalage(s, new E8);
return true;
}
case ID:
{
automate.Decalage(s, new E9);
return true;
}
case FIN:
{
PartieInstructions * pi = (PartieInstructions *) automate.PopSymbole();
PartieDeclarative * pd = (PartieDeclarative *) automate.PopSymbole();
Programme * prog = new Programme(pd->GetDeclarations(), pi->GetInstructions());
delete pi;
delete pd;
//réduire R0
automate.Reduction(prog, 2);
return true;
}
case I:
{
automate.Decalage(s, new E6);
return true;
}
}
return false;
}
示例8: switch
bool E26::Transition ( Automate & automate, Symbole * s )
{
switch(*s)
{
case VAL:
{
automate.Decalage(s, new E33);
return true;
}
}
return false;
}
示例9: switch
bool E6::Transition ( Automate & automate, Symbole * s )
{
switch(*s)
{
case POINT_VIRGULE:
{
automate.Decalage(s, new E15);
return true;
}
}
return false;
}
示例10: switch
bool GeneratedState12p::Transition (Automate & automate, Symbole *s)
{
// Generated code :
switch ((int)*s) {
case POINT_VIRGULE:
automate.Consommer();
automate.Decalage(s, new GeneratedState12s);
break;
default:
automate.SetErreur();
break;
}
return false;
}
示例11: switch
bool E13::Transition ( Automate & automate, Symbole * s )
{
switch(*s)
{
case VIRGULE:
{
automate.Decalage(s, new E25);
return true;
}
case POINT_VIRGULE:
{
ListeIdentifiantsValeurs * lidv = (ListeIdentifiantsValeurs *) automate.PopSymbole();
lidv->SetIdent(D);
//Symbole * constante =
delete automate.PopSymbole();
//réduire R4
automate.Reduction(lidv, 2);
return true;
}
}
return false;
}
示例12: switch
bool E8::Transition ( Automate & automate, Symbole * s )
{
switch(*s)
{
case OUVREPAR:
{
automate.Decalage(s, new E20);
return true;
}
case ID:
{
automate.Decalage(s, new E21);
return true;
}
case VAL:
{
automate.Decalage(s, new E22);
return true;
}
case E:
{
automate.Decalage(s, new E17);
return true;
}
case T:
{
automate.Decalage(s, new E18);
return true;
}
case F:
{
automate.Decalage(s, new E19);
return true;
}
}
return false;
}