feat: 🚧 continuation du mtl prototype

This commit is contained in:
Laurent Fainsin 2021-12-04 16:41:43 +01:00
parent 71b2144c04
commit 57bdb73260
31 changed files with 12277 additions and 11932 deletions

View file

@ -1,15 +1,29 @@
public class Prototype {
public static void main(String[] args) { public static void main(String[] args) {
Condition vraie = new Condition(new ConditionEt(new ConditionBoolean(true)));
// "Objets" // "Objets"
List<Objet> jeu_objets = new ArrayList<>(); List<Objet> jeu_objets = new ArrayList<>();
List<Description> objet_tentative_descriptions = new new ArrayList<>();
List<Description> objet_tentative_descriptions = new ArrayList<>();
List<ConditionEt> conditions_ET_objet_tentative_description_1 = new ArrayList<>();
List<ConditionTest> conditions_TEST_objet_tentative_description_1 = new ArrayList<>();
conditions_TEST_objet_tentative_description_1.add(
new ConditionConnaissance(
connaissance_true,
false
);
);
Condition condition_objet_tentative_description_1 = new Condition(conditions_ET_objet_tentative_description_1);
objet_tentative_descriptions.add( objet_tentative_descriptions.add(
new Description( new Description(
"permet répondre une question du sphinx", "permet répondre une question du sphinx",
vraie objet_tentative_description_1
) )
); );
@ -23,8 +37,10 @@ List<Objet> jeu_objets = new ArrayList<>();
jeu_objets.add(tentative_objet); jeu_objets.add(tentative_objet);
// "Connaissances" // "Connaissances"
List<Conaissance> jeu_connaissances = new ArrayList<>(); List<Conaissance> jeu_connaissances = new ArrayList<>();
List<Description> connaissance_Réussite_descriptions = new new ArrayList<>();
List<Description> connaissance_Réussite_descriptions = new ArrayList<>();
objet_Réussite_descriptions.add( objet_Réussite_descriptions.add(
new Description( new Description(
@ -40,4 +56,39 @@ List<Conaissance> jeu_connaissances = new ArrayList<>();
); );
jeu_connaissances.add(reussite_connaissance); jeu_connaissances.add(reussite_connaissance);
// "Explorateur"
List<Objet> explorateur_inventaire = new ArrayList<>();
explorateur_inventaire.add(tentative);
explorateur_inventaire.add(tentative);
explorateur_inventaire.add(tentative);
List<Connaissance> explorateur_connaissances = new ArrayList<>();
Jeu.explorateur = new Explorateur(
3,
explorateur_connaissances,
explorateur_inventaire
);
// "Personnes"
List<Personne> jeu_personnes = new ArrayList<>();
Personne personne_Sphinx = new Personne(
"Sphinx",
condition0,
vraie,
personne_Sphinx_interactions
);
jeu_personnes.add(personne_Sphinx);
jeu.jouer();
}
} }

View file

@ -5,23 +5,23 @@
[template public jeuToPrototype(jeu : Jeu)] [template public jeuToPrototype(jeu : Jeu)]
[comment @main/] [comment @main/]
[file ('Prototype.java', false, 'UTF-8')] [file ('Prototype.java', false, 'UTF-8')]
public class Prototype {
public static void main(String['['/][']'/] args) { public static void main(String['['/][']'/] args) {
Condition faux = new Condition(new ConditionEt(new ConditionBoolean(false)));
Condition vraie = new Condition(new ConditionEt(new ConditionBoolean(true)));
// "Objets" // "Objets"
List<Objet> jeu_objets = new ArrayList<>(); List<Objet> jeu_objets = new ArrayList<>();
[for (o : Objet | jeu.objets)] [for (o : Objet | jeu.objets)]
List<Description> objet_[o.nom.nom/]_descriptions = new new ArrayList<>(); List<Description> objet_[o.nom.nom/]_descriptions = new ArrayList<>();
[for (d : Description | o.descriptions)] [for (d : Description | o.descriptions)]
[print(d.condition, 'objet_' + o.nom.nom + '_description_' + i.toString())/]
objet_[o.nom.nom/]_descriptions.add( objet_[o.nom.nom/]_descriptions.add(
new Description( new Description(
"[d.texte/]", "[d.texte/]",
vraie objet_[o.nom.nom/]_description_[i/]
) )
); );
[/for] [/for]
@ -41,7 +41,7 @@ List<Objet> jeu_objets = new ArrayList<>();
List<Conaissance> jeu_connaissances = new ArrayList<>(); List<Conaissance> jeu_connaissances = new ArrayList<>();
[for (c : Connaissance | jeu.connaissances)] [for (c : Connaissance | jeu.connaissances)]
List<Description> connaissance_[c.nom.nom/]_descriptions = new new ArrayList<>(); List<Description> connaissance_[c.nom.nom/]_descriptions = new ArrayList<>();
[for (d : Description | c.descriptions)] [for (d : Description | c.descriptions)]
objet_[c.nom.nom/]_descriptions.add( objet_[c.nom.nom/]_descriptions.add(
@ -79,7 +79,8 @@ List<Connaissance> explorateur_connaissances = new ArrayList<>();
Jeu.explorateur = new Explorateur( Jeu.explorateur = new Explorateur(
[jeu.explorateur.tailleInventaire/], [jeu.explorateur.tailleInventaire/],
explorateur_connaissances, explorateur_connaissances,
explorateur_inventaire); explorateur_inventaire
);
// "Personnes" // "Personnes"
@ -97,33 +98,37 @@ List<Personne> jeu_personnes = new ArrayList<>();
[/for] [/for]
jeu.jouer(); jeu.jouer();
}
} }
[/file] [/file]
[/template] [/template]
[template public print(c : Condition, name: String) post (trim()) ] [template public print(c : Condition, name: String) post (trim()) ]
Condition condition_[name/] = new Condition(
new ConditionEt(
new ConditionConnaissance(
reussite_connaissance,
true
),
new ConditionObjet(
tentative_objet,
">",
0
)
)
);
List<ConditionEt> conditions_ET_[name/] = new ArrayList<>(); List<ConditionEt> conditions_ET_[name/] = new ArrayList<>();
[for (cET : ConditionEt | c.condition)] [for (cET : ConditionEt | c.condition)]
List<ConditionTest> conditions_TEST_[name/] = new ArrayList<>(); List<ConditionTest> conditions_TEST_[name/] = new ArrayList<>();
[for (cTEST : ConditionTest | cET.conditionTest)] [for (cTEST : ConditionTest | cET.conditionTest)]
[if (cTEST.oclIsTypeOf(ConditionObjet))] [if (cTEST.oclIsTypeOf(ConditionBoolean))]
[let cBOOL : ConditionBoolean = cTEST.oclAsType(ConditionBoolean)]
conditions_TEST_[name/].add(
new ConditionBoolean(
[cBOOL.valeur/],
);
);
[/let]
[elseif (cTEST.oclIsTypeOf(ConditionConnaissance))]
[let cCONN : ConditionConnaissance = cTEST.oclAsType(ConditionConnaissance)]
conditions_TEST_[name/].add(
new ConditionConnaissance(
connaissance_[cCONN.connaissance.nom/],
[if (cCONN.connaissance.nom.startsWith('!'))]true[else]false[/if]
);
);
[/let]
[elseif (cTEST.oclIsTypeOf(ConditionObjet))]
[let cOBJET : ConditionObjet = cTEST.oclAsType(ConditionObjet)] [let cOBJET : ConditionObjet = cTEST.oclAsType(ConditionObjet)]
conditions_TEST_[name/].add( conditions_TEST_[name/].add(
new ConditionObjet( new ConditionObjet(
@ -133,29 +138,11 @@ List<ConditionEt> conditions_ET_[name/] = new ArrayList<>();
); );
); );
[/let] [/let]
[elseif (cTEST.oclIsTypeOf(ConditionConnaissance))]
[let cCONN : ConditionConnaissance = cTEST.oclAsType(ConditionConnaissance)]
conditions_TEST_[name/].add(
new ConditionConnaissance(
connaissance_[cCONN.connaissance.nom/],
[cCONN.negation/],
);
);
[/let]
[elseif (cTEST.oclIsTypeOf(ConditionBoolean))]
[let cBOOL : ConditionBoolean = cTEST.oclAsType(ConditionBoolean)]
conditions_TEST_[name/].add(
new ConditionBoolean(
[cBOOL.valeur/],
);
);
[/let]
[/if] [/if]
[/for] [/for]
[/for] [/for]
Condition condition_[name/] = new Condition(conditions_ET_[name/]); Condition condition_[name/] = new Condition(conditions_ET_[name/]);
[/template] [/template]

View file

@ -5,23 +5,23 @@
[template public jeuToPrototype(jeu : Jeu)] [template public jeuToPrototype(jeu : Jeu)]
[comment @main/] [comment @main/]
[file ('Prototype.java', false, 'UTF-8')] [file ('Prototype.java', false, 'UTF-8')]
public class Prototype {
public static void main(String['['/][']'/] args) { public static void main(String['['/][']'/] args) {
Condition faux = new Condition(new ConditionEt(new ConditionBoolean(false)));
Condition vraie = new Condition(new ConditionEt(new ConditionBoolean(true)));
// "Objets" // "Objets"
List<Objet> jeu_objets = new ArrayList<>(); List<Objet> jeu_objets = new ArrayList<>();
[for (o : Objet | jeu.objets)] [for (o : Objet | jeu.objets)]
List<Description> objet_[o.nom.nom/]_descriptions = new new ArrayList<>(); List<Description> objet_[o.nom.nom/]_descriptions = new ArrayList<>();
[for (d : Description | o.descriptions)] [for (d : Description | o.descriptions)]
[print(d.condition, 'objet_' + o.nom.nom + '_description_' + i.toString())/]
objet_[o.nom.nom/]_descriptions.add( objet_[o.nom.nom/]_descriptions.add(
new Description( new Description(
"[d.texte/]", "[d.texte/]",
vraie objet_[o.nom.nom/]_description_[i/]
) )
); );
[/for] [/for]
@ -41,7 +41,7 @@ List<Objet> jeu_objets = new ArrayList<>();
List<Conaissance> jeu_connaissances = new ArrayList<>(); List<Conaissance> jeu_connaissances = new ArrayList<>();
[for (c : Connaissance | jeu.connaissances)] [for (c : Connaissance | jeu.connaissances)]
List<Description> connaissance_[c.nom.nom/]_descriptions = new new ArrayList<>(); List<Description> connaissance_[c.nom.nom/]_descriptions = new ArrayList<>();
[for (d : Description | c.descriptions)] [for (d : Description | c.descriptions)]
objet_[c.nom.nom/]_descriptions.add( objet_[c.nom.nom/]_descriptions.add(
@ -79,7 +79,8 @@ List<Connaissance> explorateur_connaissances = new ArrayList<>();
Jeu.explorateur = new Explorateur( Jeu.explorateur = new Explorateur(
[jeu.explorateur.tailleInventaire/], [jeu.explorateur.tailleInventaire/],
explorateur_connaissances, explorateur_connaissances,
explorateur_inventaire); explorateur_inventaire
);
// "Personnes" // "Personnes"
@ -97,33 +98,37 @@ List<Personne> jeu_personnes = new ArrayList<>();
[/for] [/for]
jeu.jouer(); jeu.jouer();
}
} }
[/file] [/file]
[/template] [/template]
[template public print(c : Condition, name: String) post (trim()) ] [template public print(c : Condition, name: String) post (trim()) ]
Condition condition_[name/] = new Condition(
new ConditionEt(
new ConditionConnaissance(
reussite_connaissance,
true
),
new ConditionObjet(
tentative_objet,
">",
0
)
)
);
List<ConditionEt> conditions_ET_[name/] = new ArrayList<>(); List<ConditionEt> conditions_ET_[name/] = new ArrayList<>();
[for (cET : ConditionEt | c.condition)] [for (cET : ConditionEt | c.condition)]
List<ConditionTest> conditions_TEST_[name/] = new ArrayList<>(); List<ConditionTest> conditions_TEST_[name/] = new ArrayList<>();
[for (cTEST : ConditionTest | cET.conditionTest)] [for (cTEST : ConditionTest | cET.conditionTest)]
[if (cTEST.oclIsTypeOf(ConditionObjet))] [if (cTEST.oclIsTypeOf(ConditionBoolean))]
[let cBOOL : ConditionBoolean = cTEST.oclAsType(ConditionBoolean)]
conditions_TEST_[name/].add(
new ConditionBoolean(
[cBOOL.valeur/],
);
);
[/let]
[elseif (cTEST.oclIsTypeOf(ConditionConnaissance))]
[let cCONN : ConditionConnaissance = cTEST.oclAsType(ConditionConnaissance)]
conditions_TEST_[name/].add(
new ConditionConnaissance(
connaissance_[cCONN.connaissance.nom/],
[if (cCONN.connaissance.nom.startsWith('!'))]true[else]false[/if]
);
);
[/let]
[elseif (cTEST.oclIsTypeOf(ConditionObjet))]
[let cOBJET : ConditionObjet = cTEST.oclAsType(ConditionObjet)] [let cOBJET : ConditionObjet = cTEST.oclAsType(ConditionObjet)]
conditions_TEST_[name/].add( conditions_TEST_[name/].add(
new ConditionObjet( new ConditionObjet(
@ -133,29 +138,11 @@ List<ConditionEt> conditions_ET_[name/] = new ArrayList<>();
); );
); );
[/let] [/let]
[elseif (cTEST.oclIsTypeOf(ConditionConnaissance))]
[let cCONN : ConditionConnaissance = cTEST.oclAsType(ConditionConnaissance)]
conditions_TEST_[name/].add(
new ConditionConnaissance(
connaissance_[cCONN.connaissance.nom/],
[cCONN.negation/],
);
);
[/let]
[elseif (cTEST.oclIsTypeOf(ConditionBoolean))]
[let cBOOL : ConditionBoolean = cTEST.oclAsType(ConditionBoolean)]
conditions_TEST_[name/].add(
new ConditionBoolean(
[cBOOL.valeur/],
);
);
[/let]
[/if] [/if]
[/for] [/for]
[/for] [/for]
Condition condition_[name/] = new Condition(conditions_ET_[name/]); Condition condition_[name/] = new Condition(conditions_ET_[name/]);
[/template] [/template]

View file

@ -33,6 +33,7 @@ public class GameParser extends AbstractContentAssistParser {
private static void init(ImmutableMap.Builder<AbstractElement, String> builder, GameGrammarAccess grammarAccess) { private static void init(ImmutableMap.Builder<AbstractElement, String> builder, GameGrammarAccess grammarAccess) {
builder.put(grammarAccess.getConditionTestAccess().getAlternatives(), "rule__ConditionTest__Alternatives"); builder.put(grammarAccess.getConditionTestAccess().getAlternatives(), "rule__ConditionTest__Alternatives");
builder.put(grammarAccess.getComparateurAccess().getAlternatives(), "rule__Comparateur__Alternatives"); builder.put(grammarAccess.getComparateurAccess().getAlternatives(), "rule__Comparateur__Alternatives");
builder.put(grammarAccess.getBooleanAccess().getAlternatives(), "rule__Boolean__Alternatives");
builder.put(grammarAccess.getJeuAccess().getGroup(), "rule__Jeu__Group__0"); builder.put(grammarAccess.getJeuAccess().getGroup(), "rule__Jeu__Group__0");
builder.put(grammarAccess.getJeuAccess().getGroup_12(), "rule__Jeu__Group_12__0"); builder.put(grammarAccess.getJeuAccess().getGroup_12(), "rule__Jeu__Group_12__0");
builder.put(grammarAccess.getJeuAccess().getGroup_12_1(), "rule__Jeu__Group_12_1__0"); builder.put(grammarAccess.getJeuAccess().getGroup_12_1(), "rule__Jeu__Group_12_1__0");
@ -48,10 +49,10 @@ public class GameParser extends AbstractContentAssistParser {
builder.put(grammarAccess.getExplorateurAccess().getGroup_14(), "rule__Explorateur__Group_14__0"); builder.put(grammarAccess.getExplorateurAccess().getGroup_14(), "rule__Explorateur__Group_14__0");
builder.put(grammarAccess.getExplorateurAccess().getGroup_14_1(), "rule__Explorateur__Group_14_1__0"); builder.put(grammarAccess.getExplorateurAccess().getGroup_14_1(), "rule__Explorateur__Group_14_1__0");
builder.put(grammarAccess.getTerritoireAccess().getGroup(), "rule__Territoire__Group__0"); builder.put(grammarAccess.getTerritoireAccess().getGroup(), "rule__Territoire__Group__0");
builder.put(grammarAccess.getTerritoireAccess().getGroup_4(), "rule__Territoire__Group_4__0"); builder.put(grammarAccess.getTerritoireAccess().getGroup_5(), "rule__Territoire__Group_5__0");
builder.put(grammarAccess.getTerritoireAccess().getGroup_4_1(), "rule__Territoire__Group_4_1__0"); builder.put(grammarAccess.getTerritoireAccess().getGroup_5_1(), "rule__Territoire__Group_5_1__0");
builder.put(grammarAccess.getTerritoireAccess().getGroup_10(), "rule__Territoire__Group_10__0"); builder.put(grammarAccess.getTerritoireAccess().getGroup_11(), "rule__Territoire__Group_11__0");
builder.put(grammarAccess.getTerritoireAccess().getGroup_10_1(), "rule__Territoire__Group_10_1__0"); builder.put(grammarAccess.getTerritoireAccess().getGroup_11_1(), "rule__Territoire__Group_11_1__0");
builder.put(grammarAccess.getLieuAccess().getGroup(), "rule__Lieu__Group__0"); builder.put(grammarAccess.getLieuAccess().getGroup(), "rule__Lieu__Group__0");
builder.put(grammarAccess.getLieuAccess().getGroup_20(), "rule__Lieu__Group_20__0"); builder.put(grammarAccess.getLieuAccess().getGroup_20(), "rule__Lieu__Group_20__0");
builder.put(grammarAccess.getLieuAccess().getGroup_20_1(), "rule__Lieu__Group_20_1__0"); builder.put(grammarAccess.getLieuAccess().getGroup_20_1(), "rule__Lieu__Group_20_1__0");
@ -101,7 +102,6 @@ public class GameParser extends AbstractContentAssistParser {
builder.put(grammarAccess.getConditionAccess().getGroup_1(), "rule__Condition__Group_1__0"); builder.put(grammarAccess.getConditionAccess().getGroup_1(), "rule__Condition__Group_1__0");
builder.put(grammarAccess.getConditionEtAccess().getGroup(), "rule__ConditionEt__Group__0"); builder.put(grammarAccess.getConditionEtAccess().getGroup(), "rule__ConditionEt__Group__0");
builder.put(grammarAccess.getConditionEtAccess().getGroup_1(), "rule__ConditionEt__Group_1__0"); builder.put(grammarAccess.getConditionEtAccess().getGroup_1(), "rule__ConditionEt__Group_1__0");
builder.put(grammarAccess.getNOTConditionConnaissanceAccess().getGroup(), "rule__NOTConditionConnaissance__Group__0");
builder.put(grammarAccess.getConditionObjetAccess().getGroup(), "rule__ConditionObjet__Group__0"); builder.put(grammarAccess.getConditionObjetAccess().getGroup(), "rule__ConditionObjet__Group__0");
builder.put(grammarAccess.getJeuAccess().getExplorateurAssignment_3(), "rule__Jeu__ExplorateurAssignment_3"); builder.put(grammarAccess.getJeuAccess().getExplorateurAssignment_3(), "rule__Jeu__ExplorateurAssignment_3");
builder.put(grammarAccess.getJeuAccess().getTerritoireAssignment_7(), "rule__Jeu__TerritoireAssignment_7"); builder.put(grammarAccess.getJeuAccess().getTerritoireAssignment_7(), "rule__Jeu__TerritoireAssignment_7");
@ -118,10 +118,10 @@ public class GameParser extends AbstractContentAssistParser {
builder.put(grammarAccess.getExplorateurAccess().getConnaissancesAssignment_8_1_1(), "rule__Explorateur__ConnaissancesAssignment_8_1_1"); builder.put(grammarAccess.getExplorateurAccess().getConnaissancesAssignment_8_1_1(), "rule__Explorateur__ConnaissancesAssignment_8_1_1");
builder.put(grammarAccess.getExplorateurAccess().getObjetsAssignment_14_0(), "rule__Explorateur__ObjetsAssignment_14_0"); builder.put(grammarAccess.getExplorateurAccess().getObjetsAssignment_14_0(), "rule__Explorateur__ObjetsAssignment_14_0");
builder.put(grammarAccess.getExplorateurAccess().getObjetsAssignment_14_1_1(), "rule__Explorateur__ObjetsAssignment_14_1_1"); builder.put(grammarAccess.getExplorateurAccess().getObjetsAssignment_14_1_1(), "rule__Explorateur__ObjetsAssignment_14_1_1");
builder.put(grammarAccess.getTerritoireAccess().getLieuxAssignment_4_0(), "rule__Territoire__LieuxAssignment_4_0"); builder.put(grammarAccess.getTerritoireAccess().getLieuxAssignment_5_0(), "rule__Territoire__LieuxAssignment_5_0");
builder.put(grammarAccess.getTerritoireAccess().getLieuxAssignment_4_1_1(), "rule__Territoire__LieuxAssignment_4_1_1"); builder.put(grammarAccess.getTerritoireAccess().getLieuxAssignment_5_1_1(), "rule__Territoire__LieuxAssignment_5_1_1");
builder.put(grammarAccess.getTerritoireAccess().getCheminsAssignment_10_0(), "rule__Territoire__CheminsAssignment_10_0"); builder.put(grammarAccess.getTerritoireAccess().getCheminsAssignment_11_0(), "rule__Territoire__CheminsAssignment_11_0");
builder.put(grammarAccess.getTerritoireAccess().getCheminsAssignment_10_1_1(), "rule__Territoire__CheminsAssignment_10_1_1"); builder.put(grammarAccess.getTerritoireAccess().getCheminsAssignment_11_1_1(), "rule__Territoire__CheminsAssignment_11_1_1");
builder.put(grammarAccess.getLieuAccess().getNomAssignment_3(), "rule__Lieu__NomAssignment_3"); builder.put(grammarAccess.getLieuAccess().getNomAssignment_3(), "rule__Lieu__NomAssignment_3");
builder.put(grammarAccess.getLieuAccess().getDeposableAssignment_7(), "rule__Lieu__DeposableAssignment_7"); builder.put(grammarAccess.getLieuAccess().getDeposableAssignment_7(), "rule__Lieu__DeposableAssignment_7");
builder.put(grammarAccess.getLieuAccess().getDepartAssignment_11(), "rule__Lieu__DepartAssignment_11"); builder.put(grammarAccess.getLieuAccess().getDepartAssignment_11(), "rule__Lieu__DepartAssignment_11");
@ -191,8 +191,8 @@ public class GameParser extends AbstractContentAssistParser {
builder.put(grammarAccess.getConditionAccess().getConditionAssignment_1_1(), "rule__Condition__ConditionAssignment_1_1"); builder.put(grammarAccess.getConditionAccess().getConditionAssignment_1_1(), "rule__Condition__ConditionAssignment_1_1");
builder.put(grammarAccess.getConditionEtAccess().getConditionTestAssignment_0(), "rule__ConditionEt__ConditionTestAssignment_0"); builder.put(grammarAccess.getConditionEtAccess().getConditionTestAssignment_0(), "rule__ConditionEt__ConditionTestAssignment_0");
builder.put(grammarAccess.getConditionEtAccess().getConditionTestAssignment_1_1(), "rule__ConditionEt__ConditionTestAssignment_1_1"); builder.put(grammarAccess.getConditionEtAccess().getConditionTestAssignment_1_1(), "rule__ConditionEt__ConditionTestAssignment_1_1");
builder.put(grammarAccess.getConditionBooleanAccess().getValeurAssignment(), "rule__ConditionBoolean__ValeurAssignment");
builder.put(grammarAccess.getConditionConnaissanceAccess().getConnaissanceAssignment(), "rule__ConditionConnaissance__ConnaissanceAssignment"); builder.put(grammarAccess.getConditionConnaissanceAccess().getConnaissanceAssignment(), "rule__ConditionConnaissance__ConnaissanceAssignment");
builder.put(grammarAccess.getNOTConditionConnaissanceAccess().getConnaissanceAssignment_1(), "rule__NOTConditionConnaissance__ConnaissanceAssignment_1");
builder.put(grammarAccess.getConditionObjetAccess().getObjetAssignment_0(), "rule__ConditionObjet__ObjetAssignment_0"); builder.put(grammarAccess.getConditionObjetAccess().getObjetAssignment_0(), "rule__ConditionObjet__ObjetAssignment_0");
builder.put(grammarAccess.getConditionObjetAccess().getComparateurAssignment_1(), "rule__ConditionObjet__ComparateurAssignment_1"); builder.put(grammarAccess.getConditionObjetAccess().getComparateurAssignment_1(), "rule__ConditionObjet__ComparateurAssignment_1");
builder.put(grammarAccess.getConditionObjetAccess().getNombreAssignment_2(), "rule__ConditionObjet__NombreAssignment_2"); builder.put(grammarAccess.getConditionObjetAccess().getNombreAssignment_2(), "rule__ConditionObjet__NombreAssignment_2");

View file

@ -424,6 +424,31 @@ finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
// Entry rule entryRuleConditionBoolean
entryRuleConditionBoolean
:
{ before(grammarAccess.getConditionBooleanRule()); }
ruleConditionBoolean
{ after(grammarAccess.getConditionBooleanRule()); }
EOF
;
// Rule ConditionBoolean
ruleConditionBoolean
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getConditionBooleanAccess().getValeurAssignment()); }
(rule__ConditionBoolean__ValeurAssignment)
{ after(grammarAccess.getConditionBooleanAccess().getValeurAssignment()); }
)
;
finally {
restoreStackSize(stackSize);
}
// Entry rule entryRuleConditionConnaissance // Entry rule entryRuleConditionConnaissance
entryRuleConditionConnaissance entryRuleConditionConnaissance
: :
@ -449,31 +474,6 @@ finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
// Entry rule entryRuleNOTConditionConnaissance
entryRuleNOTConditionConnaissance
:
{ before(grammarAccess.getNOTConditionConnaissanceRule()); }
ruleNOTConditionConnaissance
{ after(grammarAccess.getNOTConditionConnaissanceRule()); }
EOF
;
// Rule NOTConditionConnaissance
ruleNOTConditionConnaissance
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getNOTConditionConnaissanceAccess().getGroup()); }
(rule__NOTConditionConnaissance__Group__0)
{ after(grammarAccess.getNOTConditionConnaissanceAccess().getGroup()); }
)
;
finally {
restoreStackSize(stackSize);
}
// Entry rule entryRuleConditionObjet // Entry rule entryRuleConditionObjet
entryRuleConditionObjet entryRuleConditionObjet
: :
@ -524,6 +524,31 @@ finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
// Entry rule entryRuleBoolean
entryRuleBoolean
:
{ before(grammarAccess.getBooleanRule()); }
ruleBoolean
{ after(grammarAccess.getBooleanRule()); }
EOF
;
// Rule Boolean
ruleBoolean
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getBooleanAccess().getAlternatives()); }
(rule__Boolean__Alternatives)
{ after(grammarAccess.getBooleanAccess().getAlternatives()); }
)
;
finally {
restoreStackSize(stackSize);
}
// Entry rule entryRuleNom // Entry rule entryRuleNom
entryRuleNom entryRuleNom
: :
@ -555,15 +580,15 @@ rule__ConditionTest__Alternatives
} }
: :
( (
{ before(grammarAccess.getConditionTestAccess().getConditionConnaissanceParserRuleCall_0()); } { before(grammarAccess.getConditionTestAccess().getConditionBooleanParserRuleCall_0()); }
ruleConditionConnaissance ruleConditionBoolean
{ after(grammarAccess.getConditionTestAccess().getConditionConnaissanceParserRuleCall_0()); } { after(grammarAccess.getConditionTestAccess().getConditionBooleanParserRuleCall_0()); }
) )
| |
( (
{ before(grammarAccess.getConditionTestAccess().getNOTConditionConnaissanceParserRuleCall_1()); } { before(grammarAccess.getConditionTestAccess().getConditionConnaissanceParserRuleCall_1()); }
ruleNOTConditionConnaissance ruleConditionConnaissance
{ after(grammarAccess.getConditionTestAccess().getNOTConditionConnaissanceParserRuleCall_1()); } { after(grammarAccess.getConditionTestAccess().getConditionConnaissanceParserRuleCall_1()); }
) )
| |
( (
@ -571,18 +596,6 @@ rule__ConditionTest__Alternatives
ruleConditionObjet ruleConditionObjet
{ after(grammarAccess.getConditionTestAccess().getConditionObjetParserRuleCall_2()); } { after(grammarAccess.getConditionTestAccess().getConditionObjetParserRuleCall_2()); }
) )
|
(
{ before(grammarAccess.getConditionTestAccess().getTrueKeyword_3()); }
'true'
{ after(grammarAccess.getConditionTestAccess().getTrueKeyword_3()); }
)
|
(
{ before(grammarAccess.getConditionTestAccess().getFalseKeyword_4()); }
'false'
{ after(grammarAccess.getConditionTestAccess().getFalseKeyword_4()); }
)
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
@ -633,6 +646,27 @@ finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Boolean__Alternatives
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getBooleanAccess().getTrueKeyword_0()); }
'true'
{ after(grammarAccess.getBooleanAccess().getTrueKeyword_0()); }
)
|
(
{ before(grammarAccess.getBooleanAccess().getFalseKeyword_1()); }
'false'
{ after(grammarAccess.getBooleanAccess().getFalseKeyword_1()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__Jeu__Group__0 rule__Jeu__Group__0
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
@ -2649,9 +2683,9 @@ rule__Territoire__Group__0__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getLeftCurlyBracketKeyword_0()); } { before(grammarAccess.getTerritoireAccess().getTerritoireAction_0()); }
'{' ()
{ after(grammarAccess.getTerritoireAccess().getLeftCurlyBracketKeyword_0()); } { after(grammarAccess.getTerritoireAccess().getTerritoireAction_0()); }
) )
; ;
finally { finally {
@ -2676,9 +2710,9 @@ rule__Territoire__Group__1__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getLieuxKeyword_1()); } { before(grammarAccess.getTerritoireAccess().getLeftCurlyBracketKeyword_1()); }
'"Lieux"' '{'
{ after(grammarAccess.getTerritoireAccess().getLieuxKeyword_1()); } { after(grammarAccess.getTerritoireAccess().getLeftCurlyBracketKeyword_1()); }
) )
; ;
finally { finally {
@ -2703,9 +2737,9 @@ rule__Territoire__Group__2__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getColonKeyword_2()); } { before(grammarAccess.getTerritoireAccess().getLieuxKeyword_2()); }
':' '"Lieux"'
{ after(grammarAccess.getTerritoireAccess().getColonKeyword_2()); } { after(grammarAccess.getTerritoireAccess().getLieuxKeyword_2()); }
) )
; ;
finally { finally {
@ -2730,9 +2764,9 @@ rule__Territoire__Group__3__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_3()); } { before(grammarAccess.getTerritoireAccess().getColonKeyword_3()); }
'[' ':'
{ after(grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_3()); } { after(grammarAccess.getTerritoireAccess().getColonKeyword_3()); }
) )
; ;
finally { finally {
@ -2757,9 +2791,9 @@ rule__Territoire__Group__4__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getGroup_4()); } { before(grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_4()); }
(rule__Territoire__Group_4__0)? '['
{ after(grammarAccess.getTerritoireAccess().getGroup_4()); } { after(grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_4()); }
) )
; ;
finally { finally {
@ -2784,9 +2818,9 @@ rule__Territoire__Group__5__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_5()); } { before(grammarAccess.getTerritoireAccess().getGroup_5()); }
']' (rule__Territoire__Group_5__0)?
{ after(grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_5()); } { after(grammarAccess.getTerritoireAccess().getGroup_5()); }
) )
; ;
finally { finally {
@ -2811,9 +2845,9 @@ rule__Territoire__Group__6__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getCommaKeyword_6()); } { before(grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_6()); }
',' ']'
{ after(grammarAccess.getTerritoireAccess().getCommaKeyword_6()); } { after(grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_6()); }
) )
; ;
finally { finally {
@ -2838,9 +2872,9 @@ rule__Territoire__Group__7__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getCheminsKeyword_7()); } { before(grammarAccess.getTerritoireAccess().getCommaKeyword_7()); }
'"Chemins"' ','
{ after(grammarAccess.getTerritoireAccess().getCheminsKeyword_7()); } { after(grammarAccess.getTerritoireAccess().getCommaKeyword_7()); }
) )
; ;
finally { finally {
@ -2865,9 +2899,9 @@ rule__Territoire__Group__8__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getColonKeyword_8()); } { before(grammarAccess.getTerritoireAccess().getCheminsKeyword_8()); }
':' '"Chemins"'
{ after(grammarAccess.getTerritoireAccess().getColonKeyword_8()); } { after(grammarAccess.getTerritoireAccess().getCheminsKeyword_8()); }
) )
; ;
finally { finally {
@ -2892,9 +2926,9 @@ rule__Territoire__Group__9__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_9()); } { before(grammarAccess.getTerritoireAccess().getColonKeyword_9()); }
'[' ':'
{ after(grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_9()); } { after(grammarAccess.getTerritoireAccess().getColonKeyword_9()); }
) )
; ;
finally { finally {
@ -2919,9 +2953,9 @@ rule__Territoire__Group__10__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getGroup_10()); } { before(grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_10()); }
(rule__Territoire__Group_10__0)? '['
{ after(grammarAccess.getTerritoireAccess().getGroup_10()); } { after(grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_10()); }
) )
; ;
finally { finally {
@ -2946,9 +2980,9 @@ rule__Territoire__Group__11__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_11()); } { before(grammarAccess.getTerritoireAccess().getGroup_11()); }
']' (rule__Territoire__Group_11__0)?
{ after(grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_11()); } { after(grammarAccess.getTerritoireAccess().getGroup_11()); }
) )
; ;
finally { finally {
@ -2961,6 +2995,7 @@ rule__Territoire__Group__12
} }
: :
rule__Territoire__Group__12__Impl rule__Territoire__Group__12__Impl
rule__Territoire__Group__13
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
@ -2972,9 +3007,35 @@ rule__Territoire__Group__12__Impl
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getRightCurlyBracketKeyword_12()); } { before(grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_12()); }
']'
{ after(grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_12()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__Territoire__Group__13
@init {
int stackSize = keepStackSize();
}
:
rule__Territoire__Group__13__Impl
;
finally {
restoreStackSize(stackSize);
}
rule__Territoire__Group__13__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getTerritoireAccess().getRightCurlyBracketKeyword_13()); }
'}' '}'
{ after(grammarAccess.getTerritoireAccess().getRightCurlyBracketKeyword_12()); } { after(grammarAccess.getTerritoireAccess().getRightCurlyBracketKeyword_13()); }
) )
; ;
finally { finally {
@ -2982,53 +3043,53 @@ finally {
} }
rule__Territoire__Group_4__0 rule__Territoire__Group_5__0
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
rule__Territoire__Group_4__0__Impl rule__Territoire__Group_5__0__Impl
rule__Territoire__Group_4__1 rule__Territoire__Group_5__1
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_4__0__Impl rule__Territoire__Group_5__0__Impl
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getLieuxAssignment_4_0()); } { before(grammarAccess.getTerritoireAccess().getLieuxAssignment_5_0()); }
(rule__Territoire__LieuxAssignment_4_0) (rule__Territoire__LieuxAssignment_5_0)
{ after(grammarAccess.getTerritoireAccess().getLieuxAssignment_4_0()); } { after(grammarAccess.getTerritoireAccess().getLieuxAssignment_5_0()); }
) )
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_4__1 rule__Territoire__Group_5__1
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
rule__Territoire__Group_4__1__Impl rule__Territoire__Group_5__1__Impl
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_4__1__Impl rule__Territoire__Group_5__1__Impl
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getGroup_4_1()); } { before(grammarAccess.getTerritoireAccess().getGroup_5_1()); }
(rule__Territoire__Group_4_1__0)* (rule__Territoire__Group_5_1__0)*
{ after(grammarAccess.getTerritoireAccess().getGroup_4_1()); } { after(grammarAccess.getTerritoireAccess().getGroup_5_1()); }
) )
; ;
finally { finally {
@ -3036,53 +3097,53 @@ finally {
} }
rule__Territoire__Group_4_1__0 rule__Territoire__Group_5_1__0
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
rule__Territoire__Group_4_1__0__Impl rule__Territoire__Group_5_1__0__Impl
rule__Territoire__Group_4_1__1 rule__Territoire__Group_5_1__1
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_4_1__0__Impl rule__Territoire__Group_5_1__0__Impl
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getCommaKeyword_4_1_0()); } { before(grammarAccess.getTerritoireAccess().getCommaKeyword_5_1_0()); }
',' ','
{ after(grammarAccess.getTerritoireAccess().getCommaKeyword_4_1_0()); } { after(grammarAccess.getTerritoireAccess().getCommaKeyword_5_1_0()); }
) )
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_4_1__1 rule__Territoire__Group_5_1__1
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
rule__Territoire__Group_4_1__1__Impl rule__Territoire__Group_5_1__1__Impl
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_4_1__1__Impl rule__Territoire__Group_5_1__1__Impl
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getLieuxAssignment_4_1_1()); } { before(grammarAccess.getTerritoireAccess().getLieuxAssignment_5_1_1()); }
(rule__Territoire__LieuxAssignment_4_1_1) (rule__Territoire__LieuxAssignment_5_1_1)
{ after(grammarAccess.getTerritoireAccess().getLieuxAssignment_4_1_1()); } { after(grammarAccess.getTerritoireAccess().getLieuxAssignment_5_1_1()); }
) )
; ;
finally { finally {
@ -3090,53 +3151,53 @@ finally {
} }
rule__Territoire__Group_10__0 rule__Territoire__Group_11__0
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
rule__Territoire__Group_10__0__Impl rule__Territoire__Group_11__0__Impl
rule__Territoire__Group_10__1 rule__Territoire__Group_11__1
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_10__0__Impl rule__Territoire__Group_11__0__Impl
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getCheminsAssignment_10_0()); } { before(grammarAccess.getTerritoireAccess().getCheminsAssignment_11_0()); }
(rule__Territoire__CheminsAssignment_10_0) (rule__Territoire__CheminsAssignment_11_0)
{ after(grammarAccess.getTerritoireAccess().getCheminsAssignment_10_0()); } { after(grammarAccess.getTerritoireAccess().getCheminsAssignment_11_0()); }
) )
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_10__1 rule__Territoire__Group_11__1
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
rule__Territoire__Group_10__1__Impl rule__Territoire__Group_11__1__Impl
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_10__1__Impl rule__Territoire__Group_11__1__Impl
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getGroup_10_1()); } { before(grammarAccess.getTerritoireAccess().getGroup_11_1()); }
(rule__Territoire__Group_10_1__0)* (rule__Territoire__Group_11_1__0)*
{ after(grammarAccess.getTerritoireAccess().getGroup_10_1()); } { after(grammarAccess.getTerritoireAccess().getGroup_11_1()); }
) )
; ;
finally { finally {
@ -3144,53 +3205,53 @@ finally {
} }
rule__Territoire__Group_10_1__0 rule__Territoire__Group_11_1__0
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
rule__Territoire__Group_10_1__0__Impl rule__Territoire__Group_11_1__0__Impl
rule__Territoire__Group_10_1__1 rule__Territoire__Group_11_1__1
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_10_1__0__Impl rule__Territoire__Group_11_1__0__Impl
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getCommaKeyword_10_1_0()); } { before(grammarAccess.getTerritoireAccess().getCommaKeyword_11_1_0()); }
',' ','
{ after(grammarAccess.getTerritoireAccess().getCommaKeyword_10_1_0()); } { after(grammarAccess.getTerritoireAccess().getCommaKeyword_11_1_0()); }
) )
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_10_1__1 rule__Territoire__Group_11_1__1
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
rule__Territoire__Group_10_1__1__Impl rule__Territoire__Group_11_1__1__Impl
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__Group_10_1__1__Impl rule__Territoire__Group_11_1__1__Impl
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getCheminsAssignment_10_1_1()); } { before(grammarAccess.getTerritoireAccess().getCheminsAssignment_11_1_1()); }
(rule__Territoire__CheminsAssignment_10_1_1) (rule__Territoire__CheminsAssignment_11_1_1)
{ after(grammarAccess.getTerritoireAccess().getCheminsAssignment_10_1_1()); } { after(grammarAccess.getTerritoireAccess().getCheminsAssignment_11_1_1()); }
) )
; ;
finally { finally {
@ -11676,60 +11737,6 @@ finally {
} }
rule__NOTConditionConnaissance__Group__0
@init {
int stackSize = keepStackSize();
}
:
rule__NOTConditionConnaissance__Group__0__Impl
rule__NOTConditionConnaissance__Group__1
;
finally {
restoreStackSize(stackSize);
}
rule__NOTConditionConnaissance__Group__0__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getNOTConditionConnaissanceAccess().getExclamationMarkKeyword_0()); }
'!'
{ after(grammarAccess.getNOTConditionConnaissanceAccess().getExclamationMarkKeyword_0()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__NOTConditionConnaissance__Group__1
@init {
int stackSize = keepStackSize();
}
:
rule__NOTConditionConnaissance__Group__1__Impl
;
finally {
restoreStackSize(stackSize);
}
rule__NOTConditionConnaissance__Group__1__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getNOTConditionConnaissanceAccess().getConnaissanceAssignment_1()); }
(rule__NOTConditionConnaissance__ConnaissanceAssignment_1)
{ after(grammarAccess.getNOTConditionConnaissanceAccess().getConnaissanceAssignment_1()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__ConditionObjet__Group__0 rule__ConditionObjet__Group__0
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
@ -12036,60 +12043,60 @@ finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__LieuxAssignment_4_0 rule__Territoire__LieuxAssignment_5_0
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_4_0_0()); } { before(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_5_0_0()); }
ruleLieu ruleLieu
{ after(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_4_0_0()); } { after(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_5_0_0()); }
) )
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__LieuxAssignment_4_1_1 rule__Territoire__LieuxAssignment_5_1_1
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_4_1_1_0()); } { before(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_5_1_1_0()); }
ruleLieu ruleLieu
{ after(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_4_1_1_0()); } { after(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_5_1_1_0()); }
) )
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__CheminsAssignment_10_0 rule__Territoire__CheminsAssignment_11_0
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_10_0_0()); } { before(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_11_0_0()); }
ruleChemin ruleChemin
{ after(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_10_0_0()); } { after(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_11_0_0()); }
) )
; ;
finally { finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__Territoire__CheminsAssignment_10_1_1 rule__Territoire__CheminsAssignment_11_1_1
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
} }
: :
( (
{ before(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_10_1_1_0()); } { before(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_11_1_1_0()); }
ruleChemin ruleChemin
{ after(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_10_1_1_0()); } { after(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_11_1_1_0()); }
) )
; ;
finally { finally {
@ -13131,6 +13138,21 @@ finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__ConditionBoolean__ValeurAssignment
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getConditionBooleanAccess().getValeurBooleanParserRuleCall_0()); }
ruleBoolean
{ after(grammarAccess.getConditionBooleanAccess().getValeurBooleanParserRuleCall_0()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__ConditionConnaissance__ConnaissanceAssignment rule__ConditionConnaissance__ConnaissanceAssignment
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();
@ -13146,21 +13168,6 @@ finally {
restoreStackSize(stackSize); restoreStackSize(stackSize);
} }
rule__NOTConditionConnaissance__ConnaissanceAssignment_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getNOTConditionConnaissanceAccess().getConnaissanceNomParserRuleCall_1_0()); }
ruleNom
{ after(grammarAccess.getNOTConditionConnaissanceAccess().getConnaissanceNomParserRuleCall_1_0()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__ConditionObjet__ObjetAssignment_0 rule__ConditionObjet__ObjetAssignment_0
@init { @init {
int stackSize = keepStackSize(); int stackSize = keepStackSize();

View file

@ -1,5 +1,4 @@
'!'=58 '!='=16
'!='=18
'"Chemins"'=35 '"Chemins"'=35
'"Connaissances"'=27 '"Connaissances"'=27
'"Explorateur"'=20 '"Explorateur"'=20
@ -34,15 +33,15 @@
'&&'=57 '&&'=57
','=22 ','=22
':'=21 ':'=21
'<'=13 '<'=11
'<='=16 '<='=14
'=='=15 '=='=13
'>'=14 '>'=12
'>='=17 '>='=15
'['=25 '['=25
']'=26 ']'=26
'false'=12 'false'=18
'true'=11 'true'=17
'{'=19 '{'=19
'||'=56 '||'=56
'}'=30 '}'=30
@ -100,4 +99,3 @@ T__54=54
T__55=55 T__55=55
T__56=56 T__56=56
T__57=57 T__57=57
T__58=58

View file

@ -188,10 +188,10 @@ public abstract class AbstractGameProposalProvider extends TerminalsProposalProv
public void completeConditionEt_ConditionTest(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void completeConditionEt_ConditionTest(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
} }
public void completeConditionConnaissance_Connaissance(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void completeConditionBoolean_Valeur(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
} }
public void completeNOTConditionConnaissance_Connaissance(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void completeConditionConnaissance_Connaissance(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
} }
public void completeConditionObjet_Objet(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void completeConditionObjet_Objet(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
@ -252,10 +252,10 @@ public abstract class AbstractGameProposalProvider extends TerminalsProposalProv
public void complete_ConditionTest(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void complete_ConditionTest(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override // subclasses may override
} }
public void complete_ConditionConnaissance(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void complete_ConditionBoolean(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override // subclasses may override
} }
public void complete_NOTConditionConnaissance(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void complete_ConditionConnaissance(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override // subclasses may override
} }
public void complete_ConditionObjet(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void complete_ConditionObjet(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
@ -264,6 +264,9 @@ public abstract class AbstractGameProposalProvider extends TerminalsProposalProv
public void complete_Comparateur(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void complete_Comparateur(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override // subclasses may override
} }
public void complete_Boolean(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_Nom(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void complete_Nom(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override // subclasses may override
} }

View file

@ -137,11 +137,10 @@
eType="#//ConditionTest" containment="true"/> eType="#//ConditionTest" containment="true"/>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ConditionTest"/> <eClassifiers xsi:type="ecore:EClass" name="ConditionTest"/>
<eClassifiers xsi:type="ecore:EClass" name="ConditionConnaissance" eSuperTypes="#//ConditionTest"> <eClassifiers xsi:type="ecore:EClass" name="ConditionBoolean" eSuperTypes="#//ConditionTest">
<eStructuralFeatures xsi:type="ecore:EReference" name="connaissance" eType="#//Nom" <eStructuralFeatures xsi:type="ecore:EAttribute" name="valeur" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
containment="true"/>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="NOTConditionConnaissance" eSuperTypes="#//ConditionTest"> <eClassifiers xsi:type="ecore:EClass" name="ConditionConnaissance" eSuperTypes="#//ConditionTest">
<eStructuralFeatures xsi:type="ecore:EReference" name="connaissance" eType="#//Nom" <eStructuralFeatures xsi:type="ecore:EReference" name="connaissance" eType="#//Nom"
containment="true"/> containment="true"/>
</eClassifiers> </eClassifiers>

View file

@ -92,12 +92,12 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Game.ecore#//ConditionEt/conditionTest"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Game.ecore#//ConditionEt/conditionTest"/>
</genClasses> </genClasses>
<genClasses ecoreClass="Game.ecore#//ConditionTest"/> <genClasses ecoreClass="Game.ecore#//ConditionTest"/>
<genClasses ecoreClass="Game.ecore#//ConditionBoolean">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute Game.ecore#//ConditionBoolean/valeur"/>
</genClasses>
<genClasses ecoreClass="Game.ecore#//ConditionConnaissance"> <genClasses ecoreClass="Game.ecore#//ConditionConnaissance">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Game.ecore#//ConditionConnaissance/connaissance"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Game.ecore#//ConditionConnaissance/connaissance"/>
</genClasses> </genClasses>
<genClasses ecoreClass="Game.ecore#//NOTConditionConnaissance">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Game.ecore#//NOTConditionConnaissance/connaissance"/>
</genClasses>
<genClasses ecoreClass="Game.ecore#//ConditionObjet"> <genClasses ecoreClass="Game.ecore#//ConditionObjet">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Game.ecore#//ConditionObjet/objet"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Game.ecore#//ConditionObjet/objet"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute Game.ecore#//ConditionObjet/comparateur"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Game.ecore#//ConditionObjet/comparateur"/>

View file

@ -0,0 +1,47 @@
/**
* generated by Xtext 2.23.0
*/
package fr.n7.game.xtext.game;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Condition Boolean</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link fr.n7.game.xtext.game.ConditionBoolean#getValeur <em>Valeur</em>}</li>
* </ul>
*
* @see fr.n7.game.xtext.game.GamePackage#getConditionBoolean()
* @model
* @generated
*/
public interface ConditionBoolean extends ConditionTest
{
/**
* Returns the value of the '<em><b>Valeur</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Valeur</em>' attribute.
* @see #setValeur(String)
* @see fr.n7.game.xtext.game.GamePackage#getConditionBoolean_Valeur()
* @model
* @generated
*/
String getValeur();
/**
* Sets the value of the '{@link fr.n7.game.xtext.game.ConditionBoolean#getValeur <em>Valeur</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Valeur</em>' attribute.
* @see #getValeur()
* @generated
*/
void setValeur(String value);
} // ConditionBoolean

View file

@ -158,6 +158,15 @@ public interface GameFactory extends EFactory
*/ */
ConditionTest createConditionTest(); ConditionTest createConditionTest();
/**
* Returns a new object of class '<em>Condition Boolean</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Condition Boolean</em>'.
* @generated
*/
ConditionBoolean createConditionBoolean();
/** /**
* Returns a new object of class '<em>Condition Connaissance</em>'. * Returns a new object of class '<em>Condition Connaissance</em>'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
@ -167,15 +176,6 @@ public interface GameFactory extends EFactory
*/ */
ConditionConnaissance createConditionConnaissance(); ConditionConnaissance createConditionConnaissance();
/**
* Returns a new object of class '<em>NOT Condition Connaissance</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>NOT Condition Connaissance</em>'.
* @generated
*/
NOTConditionConnaissance createNOTConditionConnaissance();
/** /**
* Returns a new object of class '<em>Condition Objet</em>'. * Returns a new object of class '<em>Condition Objet</em>'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->

View file

@ -855,6 +855,34 @@ public interface GamePackage extends EPackage
*/ */
int CONDITION_TEST_FEATURE_COUNT = 0; int CONDITION_TEST_FEATURE_COUNT = 0;
/**
* The meta object id for the '{@link fr.n7.game.xtext.game.impl.ConditionBooleanImpl <em>Condition Boolean</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see fr.n7.game.xtext.game.impl.ConditionBooleanImpl
* @see fr.n7.game.xtext.game.impl.GamePackageImpl#getConditionBoolean()
* @generated
*/
int CONDITION_BOOLEAN = 15;
/**
* The feature id for the '<em><b>Valeur</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDITION_BOOLEAN__VALEUR = CONDITION_TEST_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Condition Boolean</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONDITION_BOOLEAN_FEATURE_COUNT = CONDITION_TEST_FEATURE_COUNT + 1;
/** /**
* The meta object id for the '{@link fr.n7.game.xtext.game.impl.ConditionConnaissanceImpl <em>Condition Connaissance</em>}' class. * The meta object id for the '{@link fr.n7.game.xtext.game.impl.ConditionConnaissanceImpl <em>Condition Connaissance</em>}' class.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
@ -863,7 +891,7 @@ public interface GamePackage extends EPackage
* @see fr.n7.game.xtext.game.impl.GamePackageImpl#getConditionConnaissance() * @see fr.n7.game.xtext.game.impl.GamePackageImpl#getConditionConnaissance()
* @generated * @generated
*/ */
int CONDITION_CONNAISSANCE = 15; int CONDITION_CONNAISSANCE = 16;
/** /**
* The feature id for the '<em><b>Connaissance</b></em>' containment reference. * The feature id for the '<em><b>Connaissance</b></em>' containment reference.
@ -883,34 +911,6 @@ public interface GamePackage extends EPackage
*/ */
int CONDITION_CONNAISSANCE_FEATURE_COUNT = CONDITION_TEST_FEATURE_COUNT + 1; int CONDITION_CONNAISSANCE_FEATURE_COUNT = CONDITION_TEST_FEATURE_COUNT + 1;
/**
* The meta object id for the '{@link fr.n7.game.xtext.game.impl.NOTConditionConnaissanceImpl <em>NOT Condition Connaissance</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see fr.n7.game.xtext.game.impl.NOTConditionConnaissanceImpl
* @see fr.n7.game.xtext.game.impl.GamePackageImpl#getNOTConditionConnaissance()
* @generated
*/
int NOT_CONDITION_CONNAISSANCE = 16;
/**
* The feature id for the '<em><b>Connaissance</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NOT_CONDITION_CONNAISSANCE__CONNAISSANCE = CONDITION_TEST_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>NOT Condition Connaissance</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NOT_CONDITION_CONNAISSANCE_FEATURE_COUNT = CONDITION_TEST_FEATURE_COUNT + 1;
/** /**
* The meta object id for the '{@link fr.n7.game.xtext.game.impl.ConditionObjetImpl <em>Condition Objet</em>}' class. * The meta object id for the '{@link fr.n7.game.xtext.game.impl.ConditionObjetImpl <em>Condition Objet</em>}' class.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
@ -1763,6 +1763,27 @@ public interface GamePackage extends EPackage
*/ */
EClass getConditionTest(); EClass getConditionTest();
/**
* Returns the meta object for class '{@link fr.n7.game.xtext.game.ConditionBoolean <em>Condition Boolean</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Condition Boolean</em>'.
* @see fr.n7.game.xtext.game.ConditionBoolean
* @generated
*/
EClass getConditionBoolean();
/**
* Returns the meta object for the attribute '{@link fr.n7.game.xtext.game.ConditionBoolean#getValeur <em>Valeur</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Valeur</em>'.
* @see fr.n7.game.xtext.game.ConditionBoolean#getValeur()
* @see #getConditionBoolean()
* @generated
*/
EAttribute getConditionBoolean_Valeur();
/** /**
* Returns the meta object for class '{@link fr.n7.game.xtext.game.ConditionConnaissance <em>Condition Connaissance</em>}'. * Returns the meta object for class '{@link fr.n7.game.xtext.game.ConditionConnaissance <em>Condition Connaissance</em>}'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
@ -1784,27 +1805,6 @@ public interface GamePackage extends EPackage
*/ */
EReference getConditionConnaissance_Connaissance(); EReference getConditionConnaissance_Connaissance();
/**
* Returns the meta object for class '{@link fr.n7.game.xtext.game.NOTConditionConnaissance <em>NOT Condition Connaissance</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>NOT Condition Connaissance</em>'.
* @see fr.n7.game.xtext.game.NOTConditionConnaissance
* @generated
*/
EClass getNOTConditionConnaissance();
/**
* Returns the meta object for the containment reference '{@link fr.n7.game.xtext.game.NOTConditionConnaissance#getConnaissance <em>Connaissance</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Connaissance</em>'.
* @see fr.n7.game.xtext.game.NOTConditionConnaissance#getConnaissance()
* @see #getNOTConditionConnaissance()
* @generated
*/
EReference getNOTConditionConnaissance_Connaissance();
/** /**
* Returns the meta object for class '{@link fr.n7.game.xtext.game.ConditionObjet <em>Condition Objet</em>}'. * Returns the meta object for class '{@link fr.n7.game.xtext.game.ConditionObjet <em>Condition Objet</em>}'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
@ -2498,6 +2498,24 @@ public interface GamePackage extends EPackage
*/ */
EClass CONDITION_TEST = eINSTANCE.getConditionTest(); EClass CONDITION_TEST = eINSTANCE.getConditionTest();
/**
* The meta object literal for the '{@link fr.n7.game.xtext.game.impl.ConditionBooleanImpl <em>Condition Boolean</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see fr.n7.game.xtext.game.impl.ConditionBooleanImpl
* @see fr.n7.game.xtext.game.impl.GamePackageImpl#getConditionBoolean()
* @generated
*/
EClass CONDITION_BOOLEAN = eINSTANCE.getConditionBoolean();
/**
* The meta object literal for the '<em><b>Valeur</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CONDITION_BOOLEAN__VALEUR = eINSTANCE.getConditionBoolean_Valeur();
/** /**
* The meta object literal for the '{@link fr.n7.game.xtext.game.impl.ConditionConnaissanceImpl <em>Condition Connaissance</em>}' class. * The meta object literal for the '{@link fr.n7.game.xtext.game.impl.ConditionConnaissanceImpl <em>Condition Connaissance</em>}' class.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
@ -2516,24 +2534,6 @@ public interface GamePackage extends EPackage
*/ */
EReference CONDITION_CONNAISSANCE__CONNAISSANCE = eINSTANCE.getConditionConnaissance_Connaissance(); EReference CONDITION_CONNAISSANCE__CONNAISSANCE = eINSTANCE.getConditionConnaissance_Connaissance();
/**
* The meta object literal for the '{@link fr.n7.game.xtext.game.impl.NOTConditionConnaissanceImpl <em>NOT Condition Connaissance</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see fr.n7.game.xtext.game.impl.NOTConditionConnaissanceImpl
* @see fr.n7.game.xtext.game.impl.GamePackageImpl#getNOTConditionConnaissance()
* @generated
*/
EClass NOT_CONDITION_CONNAISSANCE = eINSTANCE.getNOTConditionConnaissance();
/**
* The meta object literal for the '<em><b>Connaissance</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference NOT_CONDITION_CONNAISSANCE__CONNAISSANCE = eINSTANCE.getNOTConditionConnaissance_Connaissance();
/** /**
* The meta object literal for the '{@link fr.n7.game.xtext.game.impl.ConditionObjetImpl <em>Condition Objet</em>}' class. * The meta object literal for the '{@link fr.n7.game.xtext.game.impl.ConditionObjetImpl <em>Condition Objet</em>}' class.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->

View file

@ -1,47 +0,0 @@
/**
* generated by Xtext 2.23.0
*/
package fr.n7.game.xtext.game;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>NOT Condition Connaissance</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link fr.n7.game.xtext.game.NOTConditionConnaissance#getConnaissance <em>Connaissance</em>}</li>
* </ul>
*
* @see fr.n7.game.xtext.game.GamePackage#getNOTConditionConnaissance()
* @model
* @generated
*/
public interface NOTConditionConnaissance extends ConditionTest
{
/**
* Returns the value of the '<em><b>Connaissance</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Connaissance</em>' containment reference.
* @see #setConnaissance(Nom)
* @see fr.n7.game.xtext.game.GamePackage#getNOTConditionConnaissance_Connaissance()
* @model containment="true"
* @generated
*/
Nom getConnaissance();
/**
* Sets the value of the '{@link fr.n7.game.xtext.game.NOTConditionConnaissance#getConnaissance <em>Connaissance</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Connaissance</em>' containment reference.
* @see #getConnaissance()
* @generated
*/
void setConnaissance(Nom value);
} // NOTConditionConnaissance

View file

@ -0,0 +1,179 @@
/**
* generated by Xtext 2.23.0
*/
package fr.n7.game.xtext.game.impl;
import fr.n7.game.xtext.game.ConditionBoolean;
import fr.n7.game.xtext.game.GamePackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Condition Boolean</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link fr.n7.game.xtext.game.impl.ConditionBooleanImpl#getValeur <em>Valeur</em>}</li>
* </ul>
*
* @generated
*/
public class ConditionBooleanImpl extends ConditionTestImpl implements ConditionBoolean
{
/**
* The default value of the '{@link #getValeur() <em>Valeur</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValeur()
* @generated
* @ordered
*/
protected static final String VALEUR_EDEFAULT = null;
/**
* The cached value of the '{@link #getValeur() <em>Valeur</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValeur()
* @generated
* @ordered
*/
protected String valeur = VALEUR_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ConditionBooleanImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return GamePackage.Literals.CONDITION_BOOLEAN;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getValeur()
{
return valeur;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setValeur(String newValeur)
{
String oldValeur = valeur;
valeur = newValeur;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, GamePackage.CONDITION_BOOLEAN__VALEUR, oldValeur, valeur));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case GamePackage.CONDITION_BOOLEAN__VALEUR:
return getValeur();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case GamePackage.CONDITION_BOOLEAN__VALEUR:
setValeur((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case GamePackage.CONDITION_BOOLEAN__VALEUR:
setValeur(VALEUR_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case GamePackage.CONDITION_BOOLEAN__VALEUR:
return VALEUR_EDEFAULT == null ? valeur != null : !VALEUR_EDEFAULT.equals(valeur);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (valeur: ");
result.append(valeur);
result.append(')');
return result.toString();
}
} //ConditionBooleanImpl

View file

@ -80,8 +80,8 @@ public class GameFactoryImpl extends EFactoryImpl implements GameFactory
case GamePackage.CONDITION: return createCondition(); case GamePackage.CONDITION: return createCondition();
case GamePackage.CONDITION_ET: return createConditionEt(); case GamePackage.CONDITION_ET: return createConditionEt();
case GamePackage.CONDITION_TEST: return createConditionTest(); case GamePackage.CONDITION_TEST: return createConditionTest();
case GamePackage.CONDITION_BOOLEAN: return createConditionBoolean();
case GamePackage.CONDITION_CONNAISSANCE: return createConditionConnaissance(); case GamePackage.CONDITION_CONNAISSANCE: return createConditionConnaissance();
case GamePackage.NOT_CONDITION_CONNAISSANCE: return createNOTConditionConnaissance();
case GamePackage.CONDITION_OBJET: return createConditionObjet(); case GamePackage.CONDITION_OBJET: return createConditionObjet();
case GamePackage.NOM: return createNom(); case GamePackage.NOM: return createNom();
default: default:
@ -275,10 +275,10 @@ public class GameFactoryImpl extends EFactoryImpl implements GameFactory
* @generated * @generated
*/ */
@Override @Override
public ConditionConnaissance createConditionConnaissance() public ConditionBoolean createConditionBoolean()
{ {
ConditionConnaissanceImpl conditionConnaissance = new ConditionConnaissanceImpl(); ConditionBooleanImpl conditionBoolean = new ConditionBooleanImpl();
return conditionConnaissance; return conditionBoolean;
} }
/** /**
@ -287,10 +287,10 @@ public class GameFactoryImpl extends EFactoryImpl implements GameFactory
* @generated * @generated
*/ */
@Override @Override
public NOTConditionConnaissance createNOTConditionConnaissance() public ConditionConnaissance createConditionConnaissance()
{ {
NOTConditionConnaissanceImpl notConditionConnaissance = new NOTConditionConnaissanceImpl(); ConditionConnaissanceImpl conditionConnaissance = new ConditionConnaissanceImpl();
return notConditionConnaissance; return conditionConnaissance;
} }
/** /**

View file

@ -6,6 +6,7 @@ package fr.n7.game.xtext.game.impl;
import fr.n7.game.xtext.game.Action; import fr.n7.game.xtext.game.Action;
import fr.n7.game.xtext.game.Chemin; import fr.n7.game.xtext.game.Chemin;
import fr.n7.game.xtext.game.Condition; import fr.n7.game.xtext.game.Condition;
import fr.n7.game.xtext.game.ConditionBoolean;
import fr.n7.game.xtext.game.ConditionConnaissance; import fr.n7.game.xtext.game.ConditionConnaissance;
import fr.n7.game.xtext.game.ConditionEt; import fr.n7.game.xtext.game.ConditionEt;
import fr.n7.game.xtext.game.ConditionObjet; import fr.n7.game.xtext.game.ConditionObjet;
@ -18,7 +19,6 @@ import fr.n7.game.xtext.game.GamePackage;
import fr.n7.game.xtext.game.Interaction; import fr.n7.game.xtext.game.Interaction;
import fr.n7.game.xtext.game.Jeu; import fr.n7.game.xtext.game.Jeu;
import fr.n7.game.xtext.game.Lieu; import fr.n7.game.xtext.game.Lieu;
import fr.n7.game.xtext.game.NOTConditionConnaissance;
import fr.n7.game.xtext.game.Nom; import fr.n7.game.xtext.game.Nom;
import fr.n7.game.xtext.game.Objet; import fr.n7.game.xtext.game.Objet;
import fr.n7.game.xtext.game.Personne; import fr.n7.game.xtext.game.Personne;
@ -150,14 +150,14 @@ public class GamePackageImpl extends EPackageImpl implements GamePackage
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
private EClass conditionConnaissanceEClass = null; private EClass conditionBooleanEClass = null;
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
private EClass notConditionConnaissanceEClass = null; private EClass conditionConnaissanceEClass = null;
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
@ -1028,6 +1028,28 @@ public class GamePackageImpl extends EPackageImpl implements GamePackage
return conditionTestEClass; return conditionTestEClass;
} }
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EClass getConditionBoolean()
{
return conditionBooleanEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getConditionBoolean_Valeur()
{
return (EAttribute)conditionBooleanEClass.getEStructuralFeatures().get(0);
}
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
@ -1050,28 +1072,6 @@ public class GamePackageImpl extends EPackageImpl implements GamePackage
return (EReference)conditionConnaissanceEClass.getEStructuralFeatures().get(0); return (EReference)conditionConnaissanceEClass.getEStructuralFeatures().get(0);
} }
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EClass getNOTConditionConnaissance()
{
return notConditionConnaissanceEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getNOTConditionConnaissance_Connaissance()
{
return (EReference)notConditionConnaissanceEClass.getEStructuralFeatures().get(0);
}
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
@ -1256,12 +1256,12 @@ public class GamePackageImpl extends EPackageImpl implements GamePackage
conditionTestEClass = createEClass(CONDITION_TEST); conditionTestEClass = createEClass(CONDITION_TEST);
conditionBooleanEClass = createEClass(CONDITION_BOOLEAN);
createEAttribute(conditionBooleanEClass, CONDITION_BOOLEAN__VALEUR);
conditionConnaissanceEClass = createEClass(CONDITION_CONNAISSANCE); conditionConnaissanceEClass = createEClass(CONDITION_CONNAISSANCE);
createEReference(conditionConnaissanceEClass, CONDITION_CONNAISSANCE__CONNAISSANCE); createEReference(conditionConnaissanceEClass, CONDITION_CONNAISSANCE__CONNAISSANCE);
notConditionConnaissanceEClass = createEClass(NOT_CONDITION_CONNAISSANCE);
createEReference(notConditionConnaissanceEClass, NOT_CONDITION_CONNAISSANCE__CONNAISSANCE);
conditionObjetEClass = createEClass(CONDITION_OBJET); conditionObjetEClass = createEClass(CONDITION_OBJET);
createEReference(conditionObjetEClass, CONDITION_OBJET__OBJET); createEReference(conditionObjetEClass, CONDITION_OBJET__OBJET);
createEAttribute(conditionObjetEClass, CONDITION_OBJET__COMPARATEUR); createEAttribute(conditionObjetEClass, CONDITION_OBJET__COMPARATEUR);
@ -1300,8 +1300,8 @@ public class GamePackageImpl extends EPackageImpl implements GamePackage
// Set bounds for type parameters // Set bounds for type parameters
// Add supertypes to classes // Add supertypes to classes
conditionBooleanEClass.getESuperTypes().add(this.getConditionTest());
conditionConnaissanceEClass.getESuperTypes().add(this.getConditionTest()); conditionConnaissanceEClass.getESuperTypes().add(this.getConditionTest());
notConditionConnaissanceEClass.getESuperTypes().add(this.getConditionTest());
conditionObjetEClass.getESuperTypes().add(this.getConditionTest()); conditionObjetEClass.getESuperTypes().add(this.getConditionTest());
// Initialize classes and features; add operations and parameters // Initialize classes and features; add operations and parameters
@ -1392,12 +1392,12 @@ public class GamePackageImpl extends EPackageImpl implements GamePackage
initEClass(conditionTestEClass, ConditionTest.class, "ConditionTest", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(conditionTestEClass, ConditionTest.class, "ConditionTest", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(conditionBooleanEClass, ConditionBoolean.class, "ConditionBoolean", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getConditionBoolean_Valeur(), ecorePackage.getEString(), "valeur", null, 0, 1, ConditionBoolean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(conditionConnaissanceEClass, ConditionConnaissance.class, "ConditionConnaissance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(conditionConnaissanceEClass, ConditionConnaissance.class, "ConditionConnaissance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getConditionConnaissance_Connaissance(), this.getNom(), null, "connaissance", null, 0, 1, ConditionConnaissance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getConditionConnaissance_Connaissance(), this.getNom(), null, "connaissance", null, 0, 1, ConditionConnaissance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(notConditionConnaissanceEClass, NOTConditionConnaissance.class, "NOTConditionConnaissance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getNOTConditionConnaissance_Connaissance(), this.getNom(), null, "connaissance", null, 0, 1, NOTConditionConnaissance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(conditionObjetEClass, ConditionObjet.class, "ConditionObjet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(conditionObjetEClass, ConditionObjet.class, "ConditionObjet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getConditionObjet_Objet(), this.getNom(), null, "objet", null, 0, 1, ConditionObjet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getConditionObjet_Objet(), this.getNom(), null, "objet", null, 0, 1, ConditionObjet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getConditionObjet_Comparateur(), ecorePackage.getEString(), "comparateur", null, 0, 1, ConditionObjet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getConditionObjet_Comparateur(), ecorePackage.getEString(), "comparateur", null, 0, 1, ConditionObjet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

View file

@ -1,196 +0,0 @@
/**
* generated by Xtext 2.23.0
*/
package fr.n7.game.xtext.game.impl;
import fr.n7.game.xtext.game.GamePackage;
import fr.n7.game.xtext.game.NOTConditionConnaissance;
import fr.n7.game.xtext.game.Nom;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>NOT Condition Connaissance</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link fr.n7.game.xtext.game.impl.NOTConditionConnaissanceImpl#getConnaissance <em>Connaissance</em>}</li>
* </ul>
*
* @generated
*/
public class NOTConditionConnaissanceImpl extends ConditionTestImpl implements NOTConditionConnaissance
{
/**
* The cached value of the '{@link #getConnaissance() <em>Connaissance</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getConnaissance()
* @generated
* @ordered
*/
protected Nom connaissance;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected NOTConditionConnaissanceImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return GamePackage.Literals.NOT_CONDITION_CONNAISSANCE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Nom getConnaissance()
{
return connaissance;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetConnaissance(Nom newConnaissance, NotificationChain msgs)
{
Nom oldConnaissance = connaissance;
connaissance = newConnaissance;
if (eNotificationRequired())
{
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GamePackage.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE, oldConnaissance, newConnaissance);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setConnaissance(Nom newConnaissance)
{
if (newConnaissance != connaissance)
{
NotificationChain msgs = null;
if (connaissance != null)
msgs = ((InternalEObject)connaissance).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GamePackage.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE, null, msgs);
if (newConnaissance != null)
msgs = ((InternalEObject)newConnaissance).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GamePackage.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE, null, msgs);
msgs = basicSetConnaissance(newConnaissance, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, GamePackage.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE, newConnaissance, newConnaissance));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case GamePackage.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE:
return basicSetConnaissance(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case GamePackage.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE:
return getConnaissance();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case GamePackage.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE:
setConnaissance((Nom)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case GamePackage.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE:
setConnaissance((Nom)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case GamePackage.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE:
return connaissance != null;
}
return super.eIsSet(featureID);
}
} //NOTConditionConnaissanceImpl

View file

@ -151,16 +151,16 @@ public class GameAdapterFactory extends AdapterFactoryImpl
return createConditionTestAdapter(); return createConditionTestAdapter();
} }
@Override @Override
public Adapter caseConditionBoolean(ConditionBoolean object)
{
return createConditionBooleanAdapter();
}
@Override
public Adapter caseConditionConnaissance(ConditionConnaissance object) public Adapter caseConditionConnaissance(ConditionConnaissance object)
{ {
return createConditionConnaissanceAdapter(); return createConditionConnaissanceAdapter();
} }
@Override @Override
public Adapter caseNOTConditionConnaissance(NOTConditionConnaissance object)
{
return createNOTConditionConnaissanceAdapter();
}
@Override
public Adapter caseConditionObjet(ConditionObjet object) public Adapter caseConditionObjet(ConditionObjet object)
{ {
return createConditionObjetAdapter(); return createConditionObjetAdapter();
@ -417,6 +417,21 @@ public class GameAdapterFactory extends AdapterFactoryImpl
return null; return null;
} }
/**
* Creates a new adapter for an object of class '{@link fr.n7.game.xtext.game.ConditionBoolean <em>Condition Boolean</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see fr.n7.game.xtext.game.ConditionBoolean
* @generated
*/
public Adapter createConditionBooleanAdapter()
{
return null;
}
/** /**
* Creates a new adapter for an object of class '{@link fr.n7.game.xtext.game.ConditionConnaissance <em>Condition Connaissance</em>}'. * Creates a new adapter for an object of class '{@link fr.n7.game.xtext.game.ConditionConnaissance <em>Condition Connaissance</em>}'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
@ -432,21 +447,6 @@ public class GameAdapterFactory extends AdapterFactoryImpl
return null; return null;
} }
/**
* Creates a new adapter for an object of class '{@link fr.n7.game.xtext.game.NOTConditionConnaissance <em>NOT Condition Connaissance</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see fr.n7.game.xtext.game.NOTConditionConnaissance
* @generated
*/
public Adapter createNOTConditionConnaissanceAdapter()
{
return null;
}
/** /**
* Creates a new adapter for an object of class '{@link fr.n7.game.xtext.game.ConditionObjet <em>Condition Objet</em>}'. * Creates a new adapter for an object of class '{@link fr.n7.game.xtext.game.ConditionObjet <em>Condition Objet</em>}'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->

View file

@ -178,6 +178,14 @@ public class GameSwitch<T> extends Switch<T>
if (result == null) result = defaultCase(theEObject); if (result == null) result = defaultCase(theEObject);
return result; return result;
} }
case GamePackage.CONDITION_BOOLEAN:
{
ConditionBoolean conditionBoolean = (ConditionBoolean)theEObject;
T result = caseConditionBoolean(conditionBoolean);
if (result == null) result = caseConditionTest(conditionBoolean);
if (result == null) result = defaultCase(theEObject);
return result;
}
case GamePackage.CONDITION_CONNAISSANCE: case GamePackage.CONDITION_CONNAISSANCE:
{ {
ConditionConnaissance conditionConnaissance = (ConditionConnaissance)theEObject; ConditionConnaissance conditionConnaissance = (ConditionConnaissance)theEObject;
@ -186,14 +194,6 @@ public class GameSwitch<T> extends Switch<T>
if (result == null) result = defaultCase(theEObject); if (result == null) result = defaultCase(theEObject);
return result; return result;
} }
case GamePackage.NOT_CONDITION_CONNAISSANCE:
{
NOTConditionConnaissance notConditionConnaissance = (NOTConditionConnaissance)theEObject;
T result = caseNOTConditionConnaissance(notConditionConnaissance);
if (result == null) result = caseConditionTest(notConditionConnaissance);
if (result == null) result = defaultCase(theEObject);
return result;
}
case GamePackage.CONDITION_OBJET: case GamePackage.CONDITION_OBJET:
{ {
ConditionObjet conditionObjet = (ConditionObjet)theEObject; ConditionObjet conditionObjet = (ConditionObjet)theEObject;
@ -453,6 +453,22 @@ public class GameSwitch<T> extends Switch<T>
return null; return null;
} }
/**
* Returns the result of interpreting the object as an instance of '<em>Condition Boolean</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Condition Boolean</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseConditionBoolean(ConditionBoolean object)
{
return null;
}
/** /**
* Returns the result of interpreting the object as an instance of '<em>Condition Connaissance</em>'. * Returns the result of interpreting the object as an instance of '<em>Condition Connaissance</em>'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
@ -469,22 +485,6 @@ public class GameSwitch<T> extends Switch<T>
return null; return null;
} }
/**
* Returns the result of interpreting the object as an instance of '<em>NOT Condition Connaissance</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>NOT Condition Connaissance</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNOTConditionConnaissance(NOTConditionConnaissance object)
{
return null;
}
/** /**
* Returns the result of interpreting the object as an instance of '<em>Condition Objet</em>'. * Returns the result of interpreting the object as an instance of '<em>Condition Objet</em>'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->

View file

@ -610,29 +610,36 @@ ruleTerritoire returns [EObject current=null]
leaveRule(); leaveRule();
}: }:
( (
otherlv_0='{' (
{ {
newLeafNode(otherlv_0, grammarAccess.getTerritoireAccess().getLeftCurlyBracketKeyword_0()); $current = forceCreateModelElement(
grammarAccess.getTerritoireAccess().getTerritoireAction_0(),
$current);
} }
otherlv_1='"Lieux"' )
otherlv_1='{'
{ {
newLeafNode(otherlv_1, grammarAccess.getTerritoireAccess().getLieuxKeyword_1()); newLeafNode(otherlv_1, grammarAccess.getTerritoireAccess().getLeftCurlyBracketKeyword_1());
} }
otherlv_2=':' otherlv_2='"Lieux"'
{ {
newLeafNode(otherlv_2, grammarAccess.getTerritoireAccess().getColonKeyword_2()); newLeafNode(otherlv_2, grammarAccess.getTerritoireAccess().getLieuxKeyword_2());
} }
otherlv_3='[' otherlv_3=':'
{ {
newLeafNode(otherlv_3, grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_3()); newLeafNode(otherlv_3, grammarAccess.getTerritoireAccess().getColonKeyword_3());
}
otherlv_4='['
{
newLeafNode(otherlv_4, grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_4());
} }
( (
( (
( (
{ {
newCompositeNode(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_4_0_0()); newCompositeNode(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_5_0_0());
} }
lv_lieux_4_0=ruleLieu lv_lieux_5_0=ruleLieu
{ {
if ($current==null) { if ($current==null) {
$current = createModelElementForParent(grammarAccess.getTerritoireRule()); $current = createModelElementForParent(grammarAccess.getTerritoireRule());
@ -640,23 +647,23 @@ ruleTerritoire returns [EObject current=null]
add( add(
$current, $current,
"lieux", "lieux",
lv_lieux_4_0, lv_lieux_5_0,
"fr.n7.game.xtext.Game.Lieu"); "fr.n7.game.xtext.Game.Lieu");
afterParserOrEnumRuleCall(); afterParserOrEnumRuleCall();
} }
) )
) )
( (
otherlv_5=',' otherlv_6=','
{ {
newLeafNode(otherlv_5, grammarAccess.getTerritoireAccess().getCommaKeyword_4_1_0()); newLeafNode(otherlv_6, grammarAccess.getTerritoireAccess().getCommaKeyword_5_1_0());
} }
( (
( (
{ {
newCompositeNode(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_4_1_1_0()); newCompositeNode(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_5_1_1_0());
} }
lv_lieux_6_0=ruleLieu lv_lieux_7_0=ruleLieu
{ {
if ($current==null) { if ($current==null) {
$current = createModelElementForParent(grammarAccess.getTerritoireRule()); $current = createModelElementForParent(grammarAccess.getTerritoireRule());
@ -664,7 +671,7 @@ ruleTerritoire returns [EObject current=null]
add( add(
$current, $current,
"lieux", "lieux",
lv_lieux_6_0, lv_lieux_7_0,
"fr.n7.game.xtext.Game.Lieu"); "fr.n7.game.xtext.Game.Lieu");
afterParserOrEnumRuleCall(); afterParserOrEnumRuleCall();
} }
@ -672,33 +679,33 @@ ruleTerritoire returns [EObject current=null]
) )
)* )*
)? )?
otherlv_7=']' otherlv_8=']'
{ {
newLeafNode(otherlv_7, grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_5()); newLeafNode(otherlv_8, grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_6());
} }
otherlv_8=',' otherlv_9=','
{ {
newLeafNode(otherlv_8, grammarAccess.getTerritoireAccess().getCommaKeyword_6()); newLeafNode(otherlv_9, grammarAccess.getTerritoireAccess().getCommaKeyword_7());
} }
otherlv_9='"Chemins"' otherlv_10='"Chemins"'
{ {
newLeafNode(otherlv_9, grammarAccess.getTerritoireAccess().getCheminsKeyword_7()); newLeafNode(otherlv_10, grammarAccess.getTerritoireAccess().getCheminsKeyword_8());
} }
otherlv_10=':' otherlv_11=':'
{ {
newLeafNode(otherlv_10, grammarAccess.getTerritoireAccess().getColonKeyword_8()); newLeafNode(otherlv_11, grammarAccess.getTerritoireAccess().getColonKeyword_9());
} }
otherlv_11='[' otherlv_12='['
{ {
newLeafNode(otherlv_11, grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_9()); newLeafNode(otherlv_12, grammarAccess.getTerritoireAccess().getLeftSquareBracketKeyword_10());
} }
( (
( (
( (
{ {
newCompositeNode(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_10_0_0()); newCompositeNode(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_11_0_0());
} }
lv_chemins_12_0=ruleChemin lv_chemins_13_0=ruleChemin
{ {
if ($current==null) { if ($current==null) {
$current = createModelElementForParent(grammarAccess.getTerritoireRule()); $current = createModelElementForParent(grammarAccess.getTerritoireRule());
@ -706,23 +713,23 @@ ruleTerritoire returns [EObject current=null]
add( add(
$current, $current,
"chemins", "chemins",
lv_chemins_12_0, lv_chemins_13_0,
"fr.n7.game.xtext.Game.Chemin"); "fr.n7.game.xtext.Game.Chemin");
afterParserOrEnumRuleCall(); afterParserOrEnumRuleCall();
} }
) )
) )
( (
otherlv_13=',' otherlv_14=','
{ {
newLeafNode(otherlv_13, grammarAccess.getTerritoireAccess().getCommaKeyword_10_1_0()); newLeafNode(otherlv_14, grammarAccess.getTerritoireAccess().getCommaKeyword_11_1_0());
} }
( (
( (
{ {
newCompositeNode(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_10_1_1_0()); newCompositeNode(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_11_1_1_0());
} }
lv_chemins_14_0=ruleChemin lv_chemins_15_0=ruleChemin
{ {
if ($current==null) { if ($current==null) {
$current = createModelElementForParent(grammarAccess.getTerritoireRule()); $current = createModelElementForParent(grammarAccess.getTerritoireRule());
@ -730,7 +737,7 @@ ruleTerritoire returns [EObject current=null]
add( add(
$current, $current,
"chemins", "chemins",
lv_chemins_14_0, lv_chemins_15_0,
"fr.n7.game.xtext.Game.Chemin"); "fr.n7.game.xtext.Game.Chemin");
afterParserOrEnumRuleCall(); afterParserOrEnumRuleCall();
} }
@ -738,13 +745,13 @@ ruleTerritoire returns [EObject current=null]
) )
)* )*
)? )?
otherlv_15=']' otherlv_16=']'
{ {
newLeafNode(otherlv_15, grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_11()); newLeafNode(otherlv_16, grammarAccess.getTerritoireAccess().getRightSquareBracketKeyword_12());
} }
otherlv_16='}' otherlv_17='}'
{ {
newLeafNode(otherlv_16, grammarAccess.getTerritoireAccess().getRightCurlyBracketKeyword_12()); newLeafNode(otherlv_17, grammarAccess.getTerritoireAccess().getRightCurlyBracketKeyword_13());
} }
) )
; ;
@ -3188,20 +3195,20 @@ ruleConditionTest returns [EObject current=null]
}: }:
( (
{ {
newCompositeNode(grammarAccess.getConditionTestAccess().getConditionConnaissanceParserRuleCall_0()); newCompositeNode(grammarAccess.getConditionTestAccess().getConditionBooleanParserRuleCall_0());
} }
this_ConditionConnaissance_0=ruleConditionConnaissance this_ConditionBoolean_0=ruleConditionBoolean
{ {
$current = $this_ConditionConnaissance_0.current; $current = $this_ConditionBoolean_0.current;
afterParserOrEnumRuleCall(); afterParserOrEnumRuleCall();
} }
| |
{ {
newCompositeNode(grammarAccess.getConditionTestAccess().getNOTConditionConnaissanceParserRuleCall_1()); newCompositeNode(grammarAccess.getConditionTestAccess().getConditionConnaissanceParserRuleCall_1());
} }
this_NOTConditionConnaissance_1=ruleNOTConditionConnaissance this_ConditionConnaissance_1=ruleConditionConnaissance
{ {
$current = $this_NOTConditionConnaissance_1.current; $current = $this_ConditionConnaissance_1.current;
afterParserOrEnumRuleCall(); afterParserOrEnumRuleCall();
} }
| |
@ -3213,16 +3220,42 @@ ruleConditionTest returns [EObject current=null]
$current = $this_ConditionObjet_2.current; $current = $this_ConditionObjet_2.current;
afterParserOrEnumRuleCall(); afterParserOrEnumRuleCall();
} }
| )
otherlv_3='true' ;
// Entry rule entryRuleConditionBoolean
entryRuleConditionBoolean returns [EObject current=null]:
{ newCompositeNode(grammarAccess.getConditionBooleanRule()); }
iv_ruleConditionBoolean=ruleConditionBoolean
{ $current=$iv_ruleConditionBoolean.current; }
EOF;
// Rule ConditionBoolean
ruleConditionBoolean returns [EObject current=null]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
(
{ {
newLeafNode(otherlv_3, grammarAccess.getConditionTestAccess().getTrueKeyword_3()); newCompositeNode(grammarAccess.getConditionBooleanAccess().getValeurBooleanParserRuleCall_0());
} }
| lv_valeur_0_0=ruleBoolean
otherlv_4='false'
{ {
newLeafNode(otherlv_4, grammarAccess.getConditionTestAccess().getFalseKeyword_4()); if ($current==null) {
$current = createModelElementForParent(grammarAccess.getConditionBooleanRule());
} }
set(
$current,
"valeur",
lv_valeur_0_0,
"fr.n7.game.xtext.Game.Boolean");
afterParserOrEnumRuleCall();
}
)
) )
; ;
@ -3262,48 +3295,6 @@ ruleConditionConnaissance returns [EObject current=null]
) )
; ;
// Entry rule entryRuleNOTConditionConnaissance
entryRuleNOTConditionConnaissance returns [EObject current=null]:
{ newCompositeNode(grammarAccess.getNOTConditionConnaissanceRule()); }
iv_ruleNOTConditionConnaissance=ruleNOTConditionConnaissance
{ $current=$iv_ruleNOTConditionConnaissance.current; }
EOF;
// Rule NOTConditionConnaissance
ruleNOTConditionConnaissance returns [EObject current=null]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
otherlv_0='!'
{
newLeafNode(otherlv_0, grammarAccess.getNOTConditionConnaissanceAccess().getExclamationMarkKeyword_0());
}
(
(
{
newCompositeNode(grammarAccess.getNOTConditionConnaissanceAccess().getConnaissanceNomParserRuleCall_1_0());
}
lv_connaissance_1_0=ruleNom
{
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getNOTConditionConnaissanceRule());
}
set(
$current,
"connaissance",
lv_connaissance_1_0,
"fr.n7.game.xtext.Game.Nom");
afterParserOrEnumRuleCall();
}
)
)
)
;
// Entry rule entryRuleConditionObjet // Entry rule entryRuleConditionObjet
entryRuleConditionObjet returns [EObject current=null]: entryRuleConditionObjet returns [EObject current=null]:
{ newCompositeNode(grammarAccess.getConditionObjetRule()); } { newCompositeNode(grammarAccess.getConditionObjetRule()); }
@ -3433,6 +3424,36 @@ ruleComparateur returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleTok
) )
; ;
// Entry rule entryRuleBoolean
entryRuleBoolean returns [String current=null]:
{ newCompositeNode(grammarAccess.getBooleanRule()); }
iv_ruleBoolean=ruleBoolean
{ $current=$iv_ruleBoolean.current.getText(); }
EOF;
// Rule Boolean
ruleBoolean returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
kw='true'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getBooleanAccess().getTrueKeyword_0());
}
|
kw='false'
{
$current.merge(kw);
newLeafNode(kw, grammarAccess.getBooleanAccess().getFalseKeyword_1());
}
)
;
// Entry rule entryRuleNom // Entry rule entryRuleNom
entryRuleNom returns [EObject current=null]: entryRuleNom returns [EObject current=null]:
{ newCompositeNode(grammarAccess.getNomRule()); } { newCompositeNode(grammarAccess.getNomRule()); }

View file

@ -1,5 +1,4 @@
'!'=52 '!='=55
'!='=58
'"Chemins"'=27 '"Chemins"'=27
'"Connaissances"'=19 '"Connaissances"'=19
'"Explorateur"'=12 '"Explorateur"'=12
@ -34,15 +33,15 @@
'&&'=49 '&&'=49
','=14 ','=14
':'=13 ':'=13
'<'=53 '<'=50
'<='=56 '<='=53
'=='=55 '=='=52
'>'=54 '>'=51
'>='=57 '>='=54
'['=17 '['=17
']'=18 ']'=18
'false'=51 'false'=57
'true'=50 'true'=56
'{'=11 '{'=11
'||'=48 '||'=48
'}'=22 '}'=22
@ -100,4 +99,3 @@ T__54=54
T__55=55 T__55=55
T__56=56 T__56=56
T__57=57 T__57=57
T__58=58

View file

@ -6,6 +6,7 @@ package fr.n7.game.xtext.serializer;
import com.google.inject.Inject; import com.google.inject.Inject;
import fr.n7.game.xtext.game.Chemin; import fr.n7.game.xtext.game.Chemin;
import fr.n7.game.xtext.game.Condition; import fr.n7.game.xtext.game.Condition;
import fr.n7.game.xtext.game.ConditionBoolean;
import fr.n7.game.xtext.game.ConditionConnaissance; import fr.n7.game.xtext.game.ConditionConnaissance;
import fr.n7.game.xtext.game.ConditionEt; import fr.n7.game.xtext.game.ConditionEt;
import fr.n7.game.xtext.game.ConditionObjet; import fr.n7.game.xtext.game.ConditionObjet;
@ -16,7 +17,6 @@ import fr.n7.game.xtext.game.GamePackage;
import fr.n7.game.xtext.game.Interaction; import fr.n7.game.xtext.game.Interaction;
import fr.n7.game.xtext.game.Jeu; import fr.n7.game.xtext.game.Jeu;
import fr.n7.game.xtext.game.Lieu; import fr.n7.game.xtext.game.Lieu;
import fr.n7.game.xtext.game.NOTConditionConnaissance;
import fr.n7.game.xtext.game.Nom; import fr.n7.game.xtext.game.Nom;
import fr.n7.game.xtext.game.Objet; import fr.n7.game.xtext.game.Objet;
import fr.n7.game.xtext.game.Personne; import fr.n7.game.xtext.game.Personne;
@ -57,6 +57,9 @@ public class GameSemanticSequencer extends AbstractDelegatingSemanticSequencer {
case GamePackage.CONDITION: case GamePackage.CONDITION:
sequence_Condition(context, (Condition) semanticObject); sequence_Condition(context, (Condition) semanticObject);
return; return;
case GamePackage.CONDITION_BOOLEAN:
sequence_ConditionBoolean(context, (ConditionBoolean) semanticObject);
return;
case GamePackage.CONDITION_CONNAISSANCE: case GamePackage.CONDITION_CONNAISSANCE:
sequence_ConditionConnaissance(context, (ConditionConnaissance) semanticObject); sequence_ConditionConnaissance(context, (ConditionConnaissance) semanticObject);
return; return;
@ -84,9 +87,6 @@ public class GameSemanticSequencer extends AbstractDelegatingSemanticSequencer {
case GamePackage.LIEU: case GamePackage.LIEU:
sequence_Lieu(context, (Lieu) semanticObject); sequence_Lieu(context, (Lieu) semanticObject);
return; return;
case GamePackage.NOT_CONDITION_CONNAISSANCE:
sequence_NOTConditionConnaissance(context, (NOTConditionConnaissance) semanticObject);
return;
case GamePackage.NOM: case GamePackage.NOM:
sequence_Nom(context, (Nom) semanticObject); sequence_Nom(context, (Nom) semanticObject);
return; return;
@ -150,6 +150,25 @@ public class GameSemanticSequencer extends AbstractDelegatingSemanticSequencer {
} }
/**
* Contexts:
* ConditionTest returns ConditionBoolean
* ConditionBoolean returns ConditionBoolean
*
* Constraint:
* valeur=Boolean
*/
protected void sequence_ConditionBoolean(ISerializationContext context, ConditionBoolean semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, GamePackage.Literals.CONDITION_BOOLEAN__VALEUR) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GamePackage.Literals.CONDITION_BOOLEAN__VALEUR));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getConditionBooleanAccess().getValeurBooleanParserRuleCall_0(), semanticObject.getValeur());
feeder.finish();
}
/** /**
* Contexts: * Contexts:
* ConditionTest returns ConditionConnaissance * ConditionTest returns ConditionConnaissance
@ -323,25 +342,6 @@ public class GameSemanticSequencer extends AbstractDelegatingSemanticSequencer {
} }
/**
* Contexts:
* ConditionTest returns NOTConditionConnaissance
* NOTConditionConnaissance returns NOTConditionConnaissance
*
* Constraint:
* connaissance=Nom
*/
protected void sequence_NOTConditionConnaissance(ISerializationContext context, NOTConditionConnaissance semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, GamePackage.Literals.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GamePackage.Literals.NOT_CONDITION_CONNAISSANCE__CONNAISSANCE));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getNOTConditionConnaissanceAccess().getConnaissanceNomParserRuleCall_1_0(), semanticObject.getConnaissance());
feeder.finish();
}
/** /**
* Contexts: * Contexts:
* Nom returns Nom * Nom returns Nom

View file

@ -11,9 +11,6 @@ import org.eclipse.xtext.IGrammarAccess;
import org.eclipse.xtext.RuleCall; import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
import org.eclipse.xtext.serializer.analysis.GrammarAlias.AlternativeAlias;
import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias;
import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable;
import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;
@ -21,12 +18,10 @@ import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;
public class GameSyntacticSequencer extends AbstractSyntacticSequencer { public class GameSyntacticSequencer extends AbstractSyntacticSequencer {
protected GameGrammarAccess grammarAccess; protected GameGrammarAccess grammarAccess;
protected AbstractElementAlias match_ConditionTest_FalseKeyword_4_or_TrueKeyword_3;
@Inject @Inject
protected void init(IGrammarAccess access) { protected void init(IGrammarAccess access) {
grammarAccess = (GameGrammarAccess) access; grammarAccess = (GameGrammarAccess) access;
match_ConditionTest_FalseKeyword_4_or_TrueKeyword_3 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getConditionTestAccess().getFalseKeyword_4()), new TokenAlias(false, false, grammarAccess.getConditionTestAccess().getTrueKeyword_3()));
} }
@Override @Override
@ -41,21 +36,8 @@ public class GameSyntacticSequencer extends AbstractSyntacticSequencer {
List<INode> transitionNodes = collectNodes(fromNode, toNode); List<INode> transitionNodes = collectNodes(fromNode, toNode);
for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax); List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
if (match_ConditionTest_FalseKeyword_4_or_TrueKeyword_3.equals(syntax)) acceptNodes(getLastNavigableState(), syntaxNodes);
emit_ConditionTest_FalseKeyword_4_or_TrueKeyword_3(semanticObject, getLastNavigableState(), syntaxNodes);
else acceptNodes(getLastNavigableState(), syntaxNodes);
} }
} }
/**
* Ambiguous syntax:
* 'true' | 'false'
*
* This ambiguous syntax occurs at:
* (rule start) (ambiguity) (rule start)
*/
protected void emit_ConditionTest_FalseKeyword_4_or_TrueKeyword_3(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
} }

View file

@ -6,6 +6,7 @@ package fr.n7.game.xtext.services;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.google.inject.Singleton; import com.google.inject.Singleton;
import java.util.List; import java.util.List;
import org.eclipse.xtext.Action;
import org.eclipse.xtext.Alternatives; import org.eclipse.xtext.Alternatives;
import org.eclipse.xtext.Assignment; import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.Grammar; import org.eclipse.xtext.Grammar;
@ -419,117 +420,121 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
public class TerritoireElements extends AbstractParserRuleElementFinder { public class TerritoireElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.Territoire"); private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.Territoire");
private final Group cGroup = (Group)rule.eContents().get(1); private final Group cGroup = (Group)rule.eContents().get(1);
private final Keyword cLeftCurlyBracketKeyword_0 = (Keyword)cGroup.eContents().get(0); private final Action cTerritoireAction_0 = (Action)cGroup.eContents().get(0);
private final Keyword cLieuxKeyword_1 = (Keyword)cGroup.eContents().get(1); private final Keyword cLeftCurlyBracketKeyword_1 = (Keyword)cGroup.eContents().get(1);
private final Keyword cColonKeyword_2 = (Keyword)cGroup.eContents().get(2); private final Keyword cLieuxKeyword_2 = (Keyword)cGroup.eContents().get(2);
private final Keyword cLeftSquareBracketKeyword_3 = (Keyword)cGroup.eContents().get(3); private final Keyword cColonKeyword_3 = (Keyword)cGroup.eContents().get(3);
private final Group cGroup_4 = (Group)cGroup.eContents().get(4); private final Keyword cLeftSquareBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
private final Assignment cLieuxAssignment_4_0 = (Assignment)cGroup_4.eContents().get(0); private final Group cGroup_5 = (Group)cGroup.eContents().get(5);
private final RuleCall cLieuxLieuParserRuleCall_4_0_0 = (RuleCall)cLieuxAssignment_4_0.eContents().get(0); private final Assignment cLieuxAssignment_5_0 = (Assignment)cGroup_5.eContents().get(0);
private final Group cGroup_4_1 = (Group)cGroup_4.eContents().get(1); private final RuleCall cLieuxLieuParserRuleCall_5_0_0 = (RuleCall)cLieuxAssignment_5_0.eContents().get(0);
private final Keyword cCommaKeyword_4_1_0 = (Keyword)cGroup_4_1.eContents().get(0); private final Group cGroup_5_1 = (Group)cGroup_5.eContents().get(1);
private final Assignment cLieuxAssignment_4_1_1 = (Assignment)cGroup_4_1.eContents().get(1); private final Keyword cCommaKeyword_5_1_0 = (Keyword)cGroup_5_1.eContents().get(0);
private final RuleCall cLieuxLieuParserRuleCall_4_1_1_0 = (RuleCall)cLieuxAssignment_4_1_1.eContents().get(0); private final Assignment cLieuxAssignment_5_1_1 = (Assignment)cGroup_5_1.eContents().get(1);
private final Keyword cRightSquareBracketKeyword_5 = (Keyword)cGroup.eContents().get(5); private final RuleCall cLieuxLieuParserRuleCall_5_1_1_0 = (RuleCall)cLieuxAssignment_5_1_1.eContents().get(0);
private final Keyword cCommaKeyword_6 = (Keyword)cGroup.eContents().get(6); private final Keyword cRightSquareBracketKeyword_6 = (Keyword)cGroup.eContents().get(6);
private final Keyword cCheminsKeyword_7 = (Keyword)cGroup.eContents().get(7); private final Keyword cCommaKeyword_7 = (Keyword)cGroup.eContents().get(7);
private final Keyword cColonKeyword_8 = (Keyword)cGroup.eContents().get(8); private final Keyword cCheminsKeyword_8 = (Keyword)cGroup.eContents().get(8);
private final Keyword cLeftSquareBracketKeyword_9 = (Keyword)cGroup.eContents().get(9); private final Keyword cColonKeyword_9 = (Keyword)cGroup.eContents().get(9);
private final Group cGroup_10 = (Group)cGroup.eContents().get(10); private final Keyword cLeftSquareBracketKeyword_10 = (Keyword)cGroup.eContents().get(10);
private final Assignment cCheminsAssignment_10_0 = (Assignment)cGroup_10.eContents().get(0); private final Group cGroup_11 = (Group)cGroup.eContents().get(11);
private final RuleCall cCheminsCheminParserRuleCall_10_0_0 = (RuleCall)cCheminsAssignment_10_0.eContents().get(0); private final Assignment cCheminsAssignment_11_0 = (Assignment)cGroup_11.eContents().get(0);
private final Group cGroup_10_1 = (Group)cGroup_10.eContents().get(1); private final RuleCall cCheminsCheminParserRuleCall_11_0_0 = (RuleCall)cCheminsAssignment_11_0.eContents().get(0);
private final Keyword cCommaKeyword_10_1_0 = (Keyword)cGroup_10_1.eContents().get(0); private final Group cGroup_11_1 = (Group)cGroup_11.eContents().get(1);
private final Assignment cCheminsAssignment_10_1_1 = (Assignment)cGroup_10_1.eContents().get(1); private final Keyword cCommaKeyword_11_1_0 = (Keyword)cGroup_11_1.eContents().get(0);
private final RuleCall cCheminsCheminParserRuleCall_10_1_1_0 = (RuleCall)cCheminsAssignment_10_1_1.eContents().get(0); private final Assignment cCheminsAssignment_11_1_1 = (Assignment)cGroup_11_1.eContents().get(1);
private final Keyword cRightSquareBracketKeyword_11 = (Keyword)cGroup.eContents().get(11); private final RuleCall cCheminsCheminParserRuleCall_11_1_1_0 = (RuleCall)cCheminsAssignment_11_1_1.eContents().get(0);
private final Keyword cRightCurlyBracketKeyword_12 = (Keyword)cGroup.eContents().get(12); private final Keyword cRightSquareBracketKeyword_12 = (Keyword)cGroup.eContents().get(12);
private final Keyword cRightCurlyBracketKeyword_13 = (Keyword)cGroup.eContents().get(13);
//Territoire: //Territoire:
// '{' // {Territoire} '{'
// '"Lieux"' ':' '[' (lieux+=Lieu (',' lieux+=Lieu)*)? ']' ',' // '"Lieux"' ':' '[' (lieux+=Lieu (',' lieux+=Lieu)*)? ']' ','
// '"Chemins"' ':' '[' (chemins+=Chemin (',' chemins+=Chemin)*)? ']' // '"Chemins"' ':' '[' (chemins+=Chemin (',' chemins+=Chemin)*)? ']'
// '}'; // '}';
@Override public ParserRule getRule() { return rule; } @Override public ParserRule getRule() { return rule; }
//'{' '"Lieux"' ':' '[' (lieux+=Lieu (',' lieux+=Lieu)*)? ']' ',' '"Chemins"' ':' '[' (chemins+=Chemin (',' //{Territoire} '{' '"Lieux"' ':' '[' (lieux+=Lieu (',' lieux+=Lieu)*)? ']' ',' '"Chemins"' ':' '[' (chemins+=Chemin (','
//chemins+=Chemin)*)? ']' '}' //chemins+=Chemin)*)? ']' '}'
public Group getGroup() { return cGroup; } public Group getGroup() { return cGroup; }
//{Territoire}
public Action getTerritoireAction_0() { return cTerritoireAction_0; }
//'{' //'{'
public Keyword getLeftCurlyBracketKeyword_0() { return cLeftCurlyBracketKeyword_0; } public Keyword getLeftCurlyBracketKeyword_1() { return cLeftCurlyBracketKeyword_1; }
//'"Lieux"' //'"Lieux"'
public Keyword getLieuxKeyword_1() { return cLieuxKeyword_1; } public Keyword getLieuxKeyword_2() { return cLieuxKeyword_2; }
//':' //':'
public Keyword getColonKeyword_2() { return cColonKeyword_2; } public Keyword getColonKeyword_3() { return cColonKeyword_3; }
//'[' //'['
public Keyword getLeftSquareBracketKeyword_3() { return cLeftSquareBracketKeyword_3; } public Keyword getLeftSquareBracketKeyword_4() { return cLeftSquareBracketKeyword_4; }
//(lieux+=Lieu (',' lieux+=Lieu)*)? //(lieux+=Lieu (',' lieux+=Lieu)*)?
public Group getGroup_4() { return cGroup_4; } public Group getGroup_5() { return cGroup_5; }
//lieux+=Lieu //lieux+=Lieu
public Assignment getLieuxAssignment_4_0() { return cLieuxAssignment_4_0; } public Assignment getLieuxAssignment_5_0() { return cLieuxAssignment_5_0; }
//Lieu //Lieu
public RuleCall getLieuxLieuParserRuleCall_4_0_0() { return cLieuxLieuParserRuleCall_4_0_0; } public RuleCall getLieuxLieuParserRuleCall_5_0_0() { return cLieuxLieuParserRuleCall_5_0_0; }
//(',' lieux+=Lieu)* //(',' lieux+=Lieu)*
public Group getGroup_4_1() { return cGroup_4_1; } public Group getGroup_5_1() { return cGroup_5_1; }
//',' //','
public Keyword getCommaKeyword_4_1_0() { return cCommaKeyword_4_1_0; } public Keyword getCommaKeyword_5_1_0() { return cCommaKeyword_5_1_0; }
//lieux+=Lieu //lieux+=Lieu
public Assignment getLieuxAssignment_4_1_1() { return cLieuxAssignment_4_1_1; } public Assignment getLieuxAssignment_5_1_1() { return cLieuxAssignment_5_1_1; }
//Lieu //Lieu
public RuleCall getLieuxLieuParserRuleCall_4_1_1_0() { return cLieuxLieuParserRuleCall_4_1_1_0; } public RuleCall getLieuxLieuParserRuleCall_5_1_1_0() { return cLieuxLieuParserRuleCall_5_1_1_0; }
//']' //']'
public Keyword getRightSquareBracketKeyword_5() { return cRightSquareBracketKeyword_5; } public Keyword getRightSquareBracketKeyword_6() { return cRightSquareBracketKeyword_6; }
//',' //','
public Keyword getCommaKeyword_6() { return cCommaKeyword_6; } public Keyword getCommaKeyword_7() { return cCommaKeyword_7; }
//'"Chemins"' //'"Chemins"'
public Keyword getCheminsKeyword_7() { return cCheminsKeyword_7; } public Keyword getCheminsKeyword_8() { return cCheminsKeyword_8; }
//':' //':'
public Keyword getColonKeyword_8() { return cColonKeyword_8; } public Keyword getColonKeyword_9() { return cColonKeyword_9; }
//'[' //'['
public Keyword getLeftSquareBracketKeyword_9() { return cLeftSquareBracketKeyword_9; } public Keyword getLeftSquareBracketKeyword_10() { return cLeftSquareBracketKeyword_10; }
//(chemins+=Chemin (',' chemins+=Chemin)*)? //(chemins+=Chemin (',' chemins+=Chemin)*)?
public Group getGroup_10() { return cGroup_10; } public Group getGroup_11() { return cGroup_11; }
//chemins+=Chemin //chemins+=Chemin
public Assignment getCheminsAssignment_10_0() { return cCheminsAssignment_10_0; } public Assignment getCheminsAssignment_11_0() { return cCheminsAssignment_11_0; }
//Chemin //Chemin
public RuleCall getCheminsCheminParserRuleCall_10_0_0() { return cCheminsCheminParserRuleCall_10_0_0; } public RuleCall getCheminsCheminParserRuleCall_11_0_0() { return cCheminsCheminParserRuleCall_11_0_0; }
//(',' chemins+=Chemin)* //(',' chemins+=Chemin)*
public Group getGroup_10_1() { return cGroup_10_1; } public Group getGroup_11_1() { return cGroup_11_1; }
//',' //','
public Keyword getCommaKeyword_10_1_0() { return cCommaKeyword_10_1_0; } public Keyword getCommaKeyword_11_1_0() { return cCommaKeyword_11_1_0; }
//chemins+=Chemin //chemins+=Chemin
public Assignment getCheminsAssignment_10_1_1() { return cCheminsAssignment_10_1_1; } public Assignment getCheminsAssignment_11_1_1() { return cCheminsAssignment_11_1_1; }
//Chemin //Chemin
public RuleCall getCheminsCheminParserRuleCall_10_1_1_0() { return cCheminsCheminParserRuleCall_10_1_1_0; } public RuleCall getCheminsCheminParserRuleCall_11_1_1_0() { return cCheminsCheminParserRuleCall_11_1_1_0; }
//']' //']'
public Keyword getRightSquareBracketKeyword_11() { return cRightSquareBracketKeyword_11; } public Keyword getRightSquareBracketKeyword_12() { return cRightSquareBracketKeyword_12; }
//'}' //'}'
public Keyword getRightCurlyBracketKeyword_12() { return cRightCurlyBracketKeyword_12; } public Keyword getRightCurlyBracketKeyword_13() { return cRightCurlyBracketKeyword_13; }
} }
public class LieuElements extends AbstractParserRuleElementFinder { public class LieuElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.Lieu"); private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.Lieu");
@ -2256,33 +2261,40 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
public class ConditionTestElements extends AbstractParserRuleElementFinder { public class ConditionTestElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.ConditionTest"); private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.ConditionTest");
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
private final RuleCall cConditionConnaissanceParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); private final RuleCall cConditionBooleanParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
private final RuleCall cNOTConditionConnaissanceParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); private final RuleCall cConditionConnaissanceParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
private final RuleCall cConditionObjetParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); private final RuleCall cConditionObjetParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
private final Keyword cTrueKeyword_3 = (Keyword)cAlternatives.eContents().get(3);
private final Keyword cFalseKeyword_4 = (Keyword)cAlternatives.eContents().get(4);
//ConditionTest: //ConditionTest:
// ConditionConnaissance | NOTConditionConnaissance | ConditionObjet | 'true' | 'false'; // ConditionBoolean | ConditionConnaissance | ConditionObjet;
@Override public ParserRule getRule() { return rule; } @Override public ParserRule getRule() { return rule; }
//ConditionConnaissance | NOTConditionConnaissance | ConditionObjet | 'true' | 'false' //ConditionBoolean | ConditionConnaissance | ConditionObjet
public Alternatives getAlternatives() { return cAlternatives; } public Alternatives getAlternatives() { return cAlternatives; }
//ConditionConnaissance //ConditionBoolean
public RuleCall getConditionConnaissanceParserRuleCall_0() { return cConditionConnaissanceParserRuleCall_0; } public RuleCall getConditionBooleanParserRuleCall_0() { return cConditionBooleanParserRuleCall_0; }
//NOTConditionConnaissance //ConditionConnaissance
public RuleCall getNOTConditionConnaissanceParserRuleCall_1() { return cNOTConditionConnaissanceParserRuleCall_1; } public RuleCall getConditionConnaissanceParserRuleCall_1() { return cConditionConnaissanceParserRuleCall_1; }
//ConditionObjet //ConditionObjet
public RuleCall getConditionObjetParserRuleCall_2() { return cConditionObjetParserRuleCall_2; } public RuleCall getConditionObjetParserRuleCall_2() { return cConditionObjetParserRuleCall_2; }
}
public class ConditionBooleanElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.ConditionBoolean");
private final Assignment cValeurAssignment = (Assignment)rule.eContents().get(1);
private final RuleCall cValeurBooleanParserRuleCall_0 = (RuleCall)cValeurAssignment.eContents().get(0);
//'true' //ConditionBoolean:
public Keyword getTrueKeyword_3() { return cTrueKeyword_3; } // valeur=Boolean;
@Override public ParserRule getRule() { return rule; }
//'false' //valeur=Boolean
public Keyword getFalseKeyword_4() { return cFalseKeyword_4; } public Assignment getValeurAssignment() { return cValeurAssignment; }
//Boolean
public RuleCall getValeurBooleanParserRuleCall_0() { return cValeurBooleanParserRuleCall_0; }
} }
public class ConditionConnaissanceElements extends AbstractParserRuleElementFinder { public class ConditionConnaissanceElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.ConditionConnaissance"); private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.ConditionConnaissance");
@ -2299,29 +2311,6 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
//Nom //Nom
public RuleCall getConnaissanceNomParserRuleCall_0() { return cConnaissanceNomParserRuleCall_0; } public RuleCall getConnaissanceNomParserRuleCall_0() { return cConnaissanceNomParserRuleCall_0; }
} }
public class NOTConditionConnaissanceElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.NOTConditionConnaissance");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Keyword cExclamationMarkKeyword_0 = (Keyword)cGroup.eContents().get(0);
private final Assignment cConnaissanceAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cConnaissanceNomParserRuleCall_1_0 = (RuleCall)cConnaissanceAssignment_1.eContents().get(0);
//NOTConditionConnaissance:
// '!' connaissance=Nom;
@Override public ParserRule getRule() { return rule; }
//'!' connaissance=Nom
public Group getGroup() { return cGroup; }
//'!'
public Keyword getExclamationMarkKeyword_0() { return cExclamationMarkKeyword_0; }
//connaissance=Nom
public Assignment getConnaissanceAssignment_1() { return cConnaissanceAssignment_1; }
//Nom
public RuleCall getConnaissanceNomParserRuleCall_1_0() { return cConnaissanceNomParserRuleCall_1_0; }
}
public class ConditionObjetElements extends AbstractParserRuleElementFinder { public class ConditionObjetElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.ConditionObjet"); private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.ConditionObjet");
private final Group cGroup = (Group)rule.eContents().get(1); private final Group cGroup = (Group)rule.eContents().get(1);
@ -2392,6 +2381,25 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
//'!=' //'!='
public Keyword getExclamationMarkEqualsSignKeyword_5() { return cExclamationMarkEqualsSignKeyword_5; } public Keyword getExclamationMarkEqualsSignKeyword_5() { return cExclamationMarkEqualsSignKeyword_5; }
} }
public class BooleanElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.Boolean");
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
private final Keyword cTrueKeyword_0 = (Keyword)cAlternatives.eContents().get(0);
private final Keyword cFalseKeyword_1 = (Keyword)cAlternatives.eContents().get(1);
//Boolean:
// 'true' | 'false';
@Override public ParserRule getRule() { return rule; }
//'true' | 'false'
public Alternatives getAlternatives() { return cAlternatives; }
//'true'
public Keyword getTrueKeyword_0() { return cTrueKeyword_0; }
//'false'
public Keyword getFalseKeyword_1() { return cFalseKeyword_1; }
}
public class NomElements extends AbstractParserRuleElementFinder { public class NomElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.Nom"); private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "fr.n7.game.xtext.Game.Nom");
private final Assignment cNomAssignment = (Assignment)rule.eContents().get(1); private final Assignment cNomAssignment = (Assignment)rule.eContents().get(1);
@ -2424,10 +2432,11 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
private final ConditionElements pCondition; private final ConditionElements pCondition;
private final ConditionEtElements pConditionEt; private final ConditionEtElements pConditionEt;
private final ConditionTestElements pConditionTest; private final ConditionTestElements pConditionTest;
private final ConditionBooleanElements pConditionBoolean;
private final ConditionConnaissanceElements pConditionConnaissance; private final ConditionConnaissanceElements pConditionConnaissance;
private final NOTConditionConnaissanceElements pNOTConditionConnaissance;
private final ConditionObjetElements pConditionObjet; private final ConditionObjetElements pConditionObjet;
private final ComparateurElements pComparateur; private final ComparateurElements pComparateur;
private final BooleanElements pBoolean;
private final NomElements pNom; private final NomElements pNom;
private final Grammar grammar; private final Grammar grammar;
@ -2454,10 +2463,11 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
this.pCondition = new ConditionElements(); this.pCondition = new ConditionElements();
this.pConditionEt = new ConditionEtElements(); this.pConditionEt = new ConditionEtElements();
this.pConditionTest = new ConditionTestElements(); this.pConditionTest = new ConditionTestElements();
this.pConditionBoolean = new ConditionBooleanElements();
this.pConditionConnaissance = new ConditionConnaissanceElements(); this.pConditionConnaissance = new ConditionConnaissanceElements();
this.pNOTConditionConnaissance = new NOTConditionConnaissanceElements();
this.pConditionObjet = new ConditionObjetElements(); this.pConditionObjet = new ConditionObjetElements();
this.pComparateur = new ComparateurElements(); this.pComparateur = new ComparateurElements();
this.pBoolean = new BooleanElements();
this.pNom = new NomElements(); this.pNom = new NomElements();
} }
@ -2521,7 +2531,7 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
} }
//Territoire: //Territoire:
// '{' // {Territoire} '{'
// '"Lieux"' ':' '[' (lieux+=Lieu (',' lieux+=Lieu)*)? ']' ',' // '"Lieux"' ':' '[' (lieux+=Lieu (',' lieux+=Lieu)*)? ']' ','
// '"Chemins"' ':' '[' (chemins+=Chemin (',' chemins+=Chemin)*)? ']' // '"Chemins"' ':' '[' (chemins+=Chemin (',' chemins+=Chemin)*)? ']'
// '}'; // '}';
@ -2697,7 +2707,7 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
} }
//ConditionTest: //ConditionTest:
// ConditionConnaissance | NOTConditionConnaissance | ConditionObjet | 'true' | 'false'; // ConditionBoolean | ConditionConnaissance | ConditionObjet;
public ConditionTestElements getConditionTestAccess() { public ConditionTestElements getConditionTestAccess() {
return pConditionTest; return pConditionTest;
} }
@ -2706,6 +2716,16 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
return getConditionTestAccess().getRule(); return getConditionTestAccess().getRule();
} }
//ConditionBoolean:
// valeur=Boolean;
public ConditionBooleanElements getConditionBooleanAccess() {
return pConditionBoolean;
}
public ParserRule getConditionBooleanRule() {
return getConditionBooleanAccess().getRule();
}
//ConditionConnaissance: //ConditionConnaissance:
// connaissance=Nom; // connaissance=Nom;
public ConditionConnaissanceElements getConditionConnaissanceAccess() { public ConditionConnaissanceElements getConditionConnaissanceAccess() {
@ -2716,16 +2736,6 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
return getConditionConnaissanceAccess().getRule(); return getConditionConnaissanceAccess().getRule();
} }
//NOTConditionConnaissance:
// '!' connaissance=Nom;
public NOTConditionConnaissanceElements getNOTConditionConnaissanceAccess() {
return pNOTConditionConnaissance;
}
public ParserRule getNOTConditionConnaissanceRule() {
return getNOTConditionConnaissanceAccess().getRule();
}
//ConditionObjet: //ConditionObjet:
// objet=Nom comparateur=Comparateur nombre=INT; // objet=Nom comparateur=Comparateur nombre=INT;
public ConditionObjetElements getConditionObjetAccess() { public ConditionObjetElements getConditionObjetAccess() {
@ -2746,6 +2756,16 @@ public class GameGrammarAccess extends AbstractElementFinder.AbstractGrammarElem
return getComparateurAccess().getRule(); return getComparateurAccess().getRule();
} }
//Boolean:
// 'true' | 'false';
public BooleanElements getBooleanAccess() {
return pBoolean;
}
public ParserRule getBooleanRule() {
return getBooleanAccess().getRule();
}
//Nom: //Nom:
// nom=STRING; // nom=STRING;
public NomElements getNomAccess() { public NomElements getNomAccess() {

View file

@ -24,7 +24,7 @@ Explorateur:
; ;
Territoire: Territoire:
'{' {Territoire} '{'
'"Lieux"' ':' '[' (lieux+=Lieu (',' lieux+=Lieu)*)? ']' ',' '"Lieux"' ':' '[' (lieux+=Lieu (',' lieux+=Lieu)*)? ']' ','
'"Chemins"' ':' '[' (chemins+=Chemin (',' chemins+=Chemin)*)? ']' '"Chemins"' ':' '[' (chemins+=Chemin (',' chemins+=Chemin)*)? ']'
'}' '}'
@ -128,17 +128,17 @@ ConditionEt:
; ;
ConditionTest: ConditionTest:
ConditionConnaissance | NOTConditionConnaissance | ConditionObjet | 'true' | 'false' ConditionBoolean | ConditionConnaissance | ConditionObjet
;
ConditionBoolean:
valeur=Boolean
; ;
ConditionConnaissance: ConditionConnaissance:
connaissance=Nom connaissance=Nom
; ;
NOTConditionConnaissance:
'!' connaissance=Nom
;
ConditionObjet: ConditionObjet:
objet=Nom comparateur=Comparateur nombre=INT objet=Nom comparateur=Comparateur nombre=INT
; ;
@ -147,6 +147,10 @@ Comparateur:
'<' | '>' | '==' | '<=' | '>=' | '!=' '<' | '>' | '==' | '<=' | '>=' | '!='
; ;
Boolean:
'true' | 'false'
;
Nom: Nom:
nom=STRING nom=STRING
; ;