1752 lines
38 KiB
Plaintext
1752 lines
38 KiB
Plaintext
/*
|
|
* generated by Xtext 2.23.0
|
|
*/
|
|
grammar InternalGame;
|
|
|
|
options {
|
|
superClass=AbstractInternalAntlrParser;
|
|
}
|
|
|
|
@lexer::header {
|
|
package xtext.parser.antlr.internal;
|
|
|
|
// Hack: Use our own Lexer superclass by means of import.
|
|
// Currently there is no other way to specify the superclass for the lexer.
|
|
import org.eclipse.xtext.parser.antlr.Lexer;
|
|
}
|
|
|
|
@parser::header {
|
|
package xtext.parser.antlr.internal;
|
|
|
|
import org.eclipse.xtext.*;
|
|
import org.eclipse.xtext.parser.*;
|
|
import org.eclipse.xtext.parser.impl.*;
|
|
import org.eclipse.emf.ecore.util.EcoreUtil;
|
|
import org.eclipse.emf.ecore.EObject;
|
|
import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
|
|
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
|
|
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
|
|
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
|
|
import xtext.services.GameGrammarAccess;
|
|
|
|
}
|
|
|
|
@parser::members {
|
|
|
|
private GameGrammarAccess grammarAccess;
|
|
|
|
public InternalGameParser(TokenStream input, GameGrammarAccess grammarAccess) {
|
|
this(input);
|
|
this.grammarAccess = grammarAccess;
|
|
registerRules(grammarAccess.getGrammar());
|
|
}
|
|
|
|
@Override
|
|
protected String getFirstRuleName() {
|
|
return "Jeu";
|
|
}
|
|
|
|
@Override
|
|
protected GameGrammarAccess getGrammarAccess() {
|
|
return grammarAccess;
|
|
}
|
|
|
|
}
|
|
|
|
@rulecatch {
|
|
catch (RecognitionException re) {
|
|
recover(input,re);
|
|
appendSkippedTokens();
|
|
}
|
|
}
|
|
|
|
// Entry rule entryRuleJeu
|
|
entryRuleJeu returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getJeuRule()); }
|
|
iv_ruleJeu=ruleJeu
|
|
{ $current=$iv_ruleJeu.current; }
|
|
EOF;
|
|
|
|
// Rule Jeu
|
|
ruleJeu returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Jeu'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getJeuAccess().getJeuKeyword_0());
|
|
}
|
|
otherlv_1='{'
|
|
{
|
|
newLeafNode(otherlv_1, grammarAccess.getJeuAccess().getLeftCurlyBracketKeyword_1());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getJeuAccess().getExplorateurExplorateurParserRuleCall_2_0());
|
|
}
|
|
lv_explorateur_2_0=ruleExplorateur
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getJeuRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"explorateur",
|
|
lv_explorateur_2_0,
|
|
"xtext.Game.Explorateur");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getJeuAccess().getTerritoireTerritoireParserRuleCall_3_0());
|
|
}
|
|
lv_territoire_3_0=ruleTerritoire
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getJeuRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"territoire",
|
|
lv_territoire_3_0,
|
|
"xtext.Game.Territoire");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getJeuAccess().getObjetsObjetParserRuleCall_4_0());
|
|
}
|
|
lv_objets_4_0=ruleObjet
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getJeuRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"objets",
|
|
lv_objets_4_0,
|
|
"xtext.Game.Objet");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getJeuAccess().getConnaissancesConnaissanceParserRuleCall_5_0());
|
|
}
|
|
lv_connaissances_5_0=ruleConnaissance
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getJeuRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"connaissances",
|
|
lv_connaissances_5_0,
|
|
"xtext.Game.Connaissance");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getJeuAccess().getPersonnesPersonneParserRuleCall_6_0());
|
|
}
|
|
lv_personnes_6_0=rulePersonne
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getJeuRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"personnes",
|
|
lv_personnes_6_0,
|
|
"xtext.Game.Personne");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getJeuAccess().getTransformationsTransformationParserRuleCall_7_0());
|
|
}
|
|
lv_transformations_7_0=ruleTransformation
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getJeuRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"transformations",
|
|
lv_transformations_7_0,
|
|
"xtext.Game.Transformation");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
otherlv_8='}'
|
|
{
|
|
newLeafNode(otherlv_8, grammarAccess.getJeuAccess().getRightCurlyBracketKeyword_8());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleExplorateur
|
|
entryRuleExplorateur returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getExplorateurRule()); }
|
|
iv_ruleExplorateur=ruleExplorateur
|
|
{ $current=$iv_ruleExplorateur.current; }
|
|
EOF;
|
|
|
|
// Rule Explorateur
|
|
ruleExplorateur returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Explorateur'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getExplorateurAccess().getExplorateurKeyword_0());
|
|
}
|
|
otherlv_1='{'
|
|
{
|
|
newLeafNode(otherlv_1, grammarAccess.getExplorateurAccess().getLeftCurlyBracketKeyword_1());
|
|
}
|
|
otherlv_2='taille'
|
|
{
|
|
newLeafNode(otherlv_2, grammarAccess.getExplorateurAccess().getTailleKeyword_2());
|
|
}
|
|
otherlv_3='='
|
|
{
|
|
newLeafNode(otherlv_3, grammarAccess.getExplorateurAccess().getEqualsSignKeyword_3());
|
|
}
|
|
(
|
|
(
|
|
lv_tailleTotaleMax_4_0=RULE_INT
|
|
{
|
|
newLeafNode(lv_tailleTotaleMax_4_0, grammarAccess.getExplorateurAccess().getTailleTotaleMaxINTTerminalRuleCall_4_0());
|
|
}
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElement(grammarAccess.getExplorateurRule());
|
|
}
|
|
setWithLastConsumed(
|
|
$current,
|
|
"tailleTotaleMax",
|
|
lv_tailleTotaleMax_4_0,
|
|
"org.eclipse.xtext.common.Terminals.INT");
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getExplorateurAccess().getConnaissancesNomParserRuleCall_5_0());
|
|
}
|
|
lv_connaissances_5_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getExplorateurRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"connaissances",
|
|
lv_connaissances_5_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getExplorateurAccess().getObjetsNomParserRuleCall_6_0());
|
|
}
|
|
lv_objets_6_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getExplorateurRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"objets",
|
|
lv_objets_6_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
otherlv_7='}'
|
|
{
|
|
newLeafNode(otherlv_7, grammarAccess.getExplorateurAccess().getRightCurlyBracketKeyword_7());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleTerritoire
|
|
entryRuleTerritoire returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getTerritoireRule()); }
|
|
iv_ruleTerritoire=ruleTerritoire
|
|
{ $current=$iv_ruleTerritoire.current; }
|
|
EOF;
|
|
|
|
// Rule Territoire
|
|
ruleTerritoire returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Territoire'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getTerritoireAccess().getTerritoireKeyword_0());
|
|
}
|
|
otherlv_1='{'
|
|
{
|
|
newLeafNode(otherlv_1, grammarAccess.getTerritoireAccess().getLeftCurlyBracketKeyword_1());
|
|
}
|
|
otherlv_2='lieux'
|
|
{
|
|
newLeafNode(otherlv_2, grammarAccess.getTerritoireAccess().getLieuxKeyword_2());
|
|
}
|
|
otherlv_3=':'
|
|
{
|
|
newLeafNode(otherlv_3, grammarAccess.getTerritoireAccess().getColonKeyword_3());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getTerritoireAccess().getLieuxLieuParserRuleCall_4_0());
|
|
}
|
|
lv_lieux_4_0=ruleLieu
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getTerritoireRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"lieux",
|
|
lv_lieux_4_0,
|
|
"xtext.Game.Lieu");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)+
|
|
otherlv_5='chemins'
|
|
{
|
|
newLeafNode(otherlv_5, grammarAccess.getTerritoireAccess().getCheminsKeyword_5());
|
|
}
|
|
otherlv_6=':'
|
|
{
|
|
newLeafNode(otherlv_6, grammarAccess.getTerritoireAccess().getColonKeyword_6());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getTerritoireAccess().getCheminsCheminParserRuleCall_7_0());
|
|
}
|
|
lv_chemins_7_0=ruleChemin
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getTerritoireRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"chemins",
|
|
lv_chemins_7_0,
|
|
"xtext.Game.Chemin");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
otherlv_8='}'
|
|
{
|
|
newLeafNode(otherlv_8, grammarAccess.getTerritoireAccess().getRightCurlyBracketKeyword_8());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleLieu
|
|
entryRuleLieu returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getLieuRule()); }
|
|
iv_ruleLieu=ruleLieu
|
|
{ $current=$iv_ruleLieu.current; }
|
|
EOF;
|
|
|
|
// Rule Lieu
|
|
ruleLieu returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Lieu'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getLieuAccess().getLieuKeyword_0());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getLieuAccess().getNomNomParserRuleCall_1_0());
|
|
}
|
|
lv_nom_1_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getLieuRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"nom",
|
|
lv_nom_1_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
otherlv_2='{'
|
|
{
|
|
newLeafNode(otherlv_2, grammarAccess.getLieuAccess().getLeftCurlyBracketKeyword_2());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getLieuAccess().getConnaissancesNomParserRuleCall_3_0());
|
|
}
|
|
lv_connaissances_3_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getLieuRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"connaissances",
|
|
lv_connaissances_3_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getLieuAccess().getPersonnesPersonneParserRuleCall_4_0());
|
|
}
|
|
lv_personnes_4_0=rulePersonne
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getLieuRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"personnes",
|
|
lv_personnes_4_0,
|
|
"xtext.Game.Personne");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getLieuAccess().getObjetsNomParserRuleCall_5_0());
|
|
}
|
|
lv_objets_5_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getLieuRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"objets",
|
|
lv_objets_5_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getLieuAccess().getDeposableConditionParserRuleCall_6_0());
|
|
}
|
|
lv_deposable_6_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getLieuRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"deposable",
|
|
lv_deposable_6_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getLieuAccess().getDescriptionsDescriptionParserRuleCall_7_0());
|
|
}
|
|
lv_descriptions_7_0=ruleDescription
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getLieuRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"descriptions",
|
|
lv_descriptions_7_0,
|
|
"xtext.Game.Description");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)+
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getLieuAccess().getDepartConditionParserRuleCall_8_0());
|
|
}
|
|
lv_depart_8_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getLieuRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"depart",
|
|
lv_depart_8_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getLieuAccess().getFinConditionParserRuleCall_9_0());
|
|
}
|
|
lv_fin_9_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getLieuRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"fin",
|
|
lv_fin_9_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
otherlv_10='}'
|
|
{
|
|
newLeafNode(otherlv_10, grammarAccess.getLieuAccess().getRightCurlyBracketKeyword_10());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleChemin
|
|
entryRuleChemin returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getCheminRule()); }
|
|
iv_ruleChemin=ruleChemin
|
|
{ $current=$iv_ruleChemin.current; }
|
|
EOF;
|
|
|
|
// Rule Chemin
|
|
ruleChemin returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Chemin'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getCheminAccess().getCheminKeyword_0());
|
|
}
|
|
otherlv_1='{'
|
|
{
|
|
newLeafNode(otherlv_1, grammarAccess.getCheminAccess().getLeftCurlyBracketKeyword_1());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getCheminAccess().getLieuInNomParserRuleCall_2_0());
|
|
}
|
|
lv_lieuIn_2_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getCheminRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"lieuIn",
|
|
lv_lieuIn_2_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
otherlv_3='->'
|
|
{
|
|
newLeafNode(otherlv_3, grammarAccess.getCheminAccess().getHyphenMinusGreaterThanSignKeyword_3());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getCheminAccess().getLieuOutNomParserRuleCall_4_0());
|
|
}
|
|
lv_lieuOut_4_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getCheminRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"lieuOut",
|
|
lv_lieuOut_4_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getCheminAccess().getConnaissancesNomParserRuleCall_5_0());
|
|
}
|
|
lv_connaissances_5_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getCheminRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"connaissances",
|
|
lv_connaissances_5_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getCheminAccess().getObjetsNomParserRuleCall_6_0());
|
|
}
|
|
lv_objets_6_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getCheminRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"objets",
|
|
lv_objets_6_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getCheminAccess().getObjetsConsoNomParserRuleCall_7_0());
|
|
}
|
|
lv_objetsConso_7_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getCheminRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"objetsConso",
|
|
lv_objetsConso_7_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getCheminAccess().getOuvertConditionParserRuleCall_8_0());
|
|
}
|
|
lv_ouvert_8_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getCheminRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"ouvert",
|
|
lv_ouvert_8_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getCheminAccess().getFermeConditionParserRuleCall_9_0());
|
|
}
|
|
lv_ferme_9_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getCheminRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"ferme",
|
|
lv_ferme_9_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getCheminAccess().getObligatoireConditionParserRuleCall_10_0());
|
|
}
|
|
lv_obligatoire_10_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getCheminRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"obligatoire",
|
|
lv_obligatoire_10_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getCheminAccess().getDescriptionsDescriptionParserRuleCall_11_0());
|
|
}
|
|
lv_descriptions_11_0=ruleDescription
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getCheminRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"descriptions",
|
|
lv_descriptions_11_0,
|
|
"xtext.Game.Description");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)+
|
|
otherlv_12='}'
|
|
{
|
|
newLeafNode(otherlv_12, grammarAccess.getCheminAccess().getRightCurlyBracketKeyword_12());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleObjet
|
|
entryRuleObjet returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getObjetRule()); }
|
|
iv_ruleObjet=ruleObjet
|
|
{ $current=$iv_ruleObjet.current; }
|
|
EOF;
|
|
|
|
// Rule Objet
|
|
ruleObjet returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Objet'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getObjetAccess().getObjetKeyword_0());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getObjetAccess().getNomNomParserRuleCall_1_0());
|
|
}
|
|
lv_nom_1_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getObjetRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"nom",
|
|
lv_nom_1_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
otherlv_2='{'
|
|
{
|
|
newLeafNode(otherlv_2, grammarAccess.getObjetAccess().getLeftCurlyBracketKeyword_2());
|
|
}
|
|
(
|
|
(
|
|
lv_taille_3_0=RULE_INT
|
|
{
|
|
newLeafNode(lv_taille_3_0, grammarAccess.getObjetAccess().getTailleINTTerminalRuleCall_3_0());
|
|
}
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElement(grammarAccess.getObjetRule());
|
|
}
|
|
setWithLastConsumed(
|
|
$current,
|
|
"taille",
|
|
lv_taille_3_0,
|
|
"org.eclipse.xtext.common.Terminals.INT");
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getObjetAccess().getVisibleConditionParserRuleCall_4_0());
|
|
}
|
|
lv_visible_4_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getObjetRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"visible",
|
|
lv_visible_4_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getObjetAccess().getDescriptionsDescriptionParserRuleCall_5_0());
|
|
}
|
|
lv_descriptions_5_0=ruleDescription
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getObjetRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"descriptions",
|
|
lv_descriptions_5_0,
|
|
"xtext.Game.Description");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)+
|
|
otherlv_6='}'
|
|
{
|
|
newLeafNode(otherlv_6, grammarAccess.getObjetAccess().getRightCurlyBracketKeyword_6());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleTransformation
|
|
entryRuleTransformation returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getTransformationRule()); }
|
|
iv_ruleTransformation=ruleTransformation
|
|
{ $current=$iv_ruleTransformation.current; }
|
|
EOF;
|
|
|
|
// Rule Transformation
|
|
ruleTransformation returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Transformation'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getTransformationAccess().getTransformationKeyword_0());
|
|
}
|
|
otherlv_1='{'
|
|
{
|
|
newLeafNode(otherlv_1, grammarAccess.getTransformationAccess().getLeftCurlyBracketKeyword_1());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getTransformationAccess().getConditionConditionParserRuleCall_2_0());
|
|
}
|
|
lv_condition_2_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getTransformationRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"condition",
|
|
lv_condition_2_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getTransformationAccess().getObjetSourceNomParserRuleCall_3_0());
|
|
}
|
|
lv_objetSource_3_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getTransformationRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"objetSource",
|
|
lv_objetSource_3_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)+
|
|
otherlv_4='->'
|
|
{
|
|
newLeafNode(otherlv_4, grammarAccess.getTransformationAccess().getHyphenMinusGreaterThanSignKeyword_4());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getTransformationAccess().getObjetsResultatsNomParserRuleCall_5_0());
|
|
}
|
|
lv_objetsResultats_5_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getTransformationRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"objetsResultats",
|
|
lv_objetsResultats_5_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)+
|
|
otherlv_6='}'
|
|
{
|
|
newLeafNode(otherlv_6, grammarAccess.getTransformationAccess().getRightCurlyBracketKeyword_6());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleConnaissance
|
|
entryRuleConnaissance returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getConnaissanceRule()); }
|
|
iv_ruleConnaissance=ruleConnaissance
|
|
{ $current=$iv_ruleConnaissance.current; }
|
|
EOF;
|
|
|
|
// Rule Connaissance
|
|
ruleConnaissance returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Connaissance'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getConnaissanceAccess().getConnaissanceKeyword_0());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getConnaissanceAccess().getNomNomParserRuleCall_1_0());
|
|
}
|
|
lv_nom_1_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getConnaissanceRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"nom",
|
|
lv_nom_1_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
otherlv_2='{'
|
|
{
|
|
newLeafNode(otherlv_2, grammarAccess.getConnaissanceAccess().getLeftCurlyBracketKeyword_2());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getConnaissanceAccess().getVisibleConditionParserRuleCall_3_0());
|
|
}
|
|
lv_visible_3_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getConnaissanceRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"visible",
|
|
lv_visible_3_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getConnaissanceAccess().getDescriptionsDescriptionParserRuleCall_4_0());
|
|
}
|
|
lv_descriptions_4_0=ruleDescription
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getConnaissanceRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"descriptions",
|
|
lv_descriptions_4_0,
|
|
"xtext.Game.Description");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)+
|
|
otherlv_5='}'
|
|
{
|
|
newLeafNode(otherlv_5, grammarAccess.getConnaissanceAccess().getRightCurlyBracketKeyword_5());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRulePersonne
|
|
entryRulePersonne returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getPersonneRule()); }
|
|
iv_rulePersonne=rulePersonne
|
|
{ $current=$iv_rulePersonne.current; }
|
|
EOF;
|
|
|
|
// Rule Personne
|
|
rulePersonne returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Personne'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getPersonneAccess().getPersonneKeyword_0());
|
|
}
|
|
otherlv_1='{'
|
|
{
|
|
newLeafNode(otherlv_1, grammarAccess.getPersonneAccess().getLeftCurlyBracketKeyword_1());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getPersonneAccess().getVisibleConditionParserRuleCall_2_0());
|
|
}
|
|
lv_visible_2_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getPersonneRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"visible",
|
|
lv_visible_2_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getPersonneAccess().getObligatoireConditionParserRuleCall_3_0());
|
|
}
|
|
lv_obligatoire_3_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getPersonneRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"obligatoire",
|
|
lv_obligatoire_3_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getPersonneAccess().getInterractionsInterractionParserRuleCall_4_0());
|
|
}
|
|
lv_interractions_4_0=ruleInterraction
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getPersonneRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"interractions",
|
|
lv_interractions_4_0,
|
|
"xtext.Game.Interraction");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)+
|
|
otherlv_5='}'
|
|
{
|
|
newLeafNode(otherlv_5, grammarAccess.getPersonneAccess().getRightCurlyBracketKeyword_5());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleInterraction
|
|
entryRuleInterraction returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getInterractionRule()); }
|
|
iv_ruleInterraction=ruleInterraction
|
|
{ $current=$iv_ruleInterraction.current; }
|
|
EOF;
|
|
|
|
// Rule Interraction
|
|
ruleInterraction returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Interraction'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getInterractionAccess().getInterractionKeyword_0());
|
|
}
|
|
otherlv_1='{'
|
|
{
|
|
newLeafNode(otherlv_1, grammarAccess.getInterractionAccess().getLeftCurlyBracketKeyword_1());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getInterractionAccess().getActionsActionParserRuleCall_2_0());
|
|
}
|
|
lv_actions_2_0=ruleAction
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getInterractionRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"actions",
|
|
lv_actions_2_0,
|
|
"xtext.Game.Action");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)+
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getInterractionAccess().getConnaissancesNomParserRuleCall_3_0());
|
|
}
|
|
lv_connaissances_3_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getInterractionRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"connaissances",
|
|
lv_connaissances_3_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getInterractionAccess().getObjetsNomParserRuleCall_4_0());
|
|
}
|
|
lv_objets_4_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getInterractionRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"objets",
|
|
lv_objets_4_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getInterractionAccess().getVisibleConditionParserRuleCall_5_0());
|
|
}
|
|
lv_visible_5_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getInterractionRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"visible",
|
|
lv_visible_5_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
otherlv_6='}'
|
|
{
|
|
newLeafNode(otherlv_6, grammarAccess.getInterractionAccess().getRightCurlyBracketKeyword_6());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleAction
|
|
entryRuleAction returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getActionRule()); }
|
|
iv_ruleAction=ruleAction
|
|
{ $current=$iv_ruleAction.current; }
|
|
EOF;
|
|
|
|
// Rule Action
|
|
ruleAction returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Action'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getActionAccess().getActionKeyword_0());
|
|
}
|
|
otherlv_1='{'
|
|
{
|
|
newLeafNode(otherlv_1, grammarAccess.getActionAccess().getLeftCurlyBracketKeyword_1());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getActionAccess().getConnaissancesNomParserRuleCall_2_0());
|
|
}
|
|
lv_connaissances_2_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getActionRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"connaissances",
|
|
lv_connaissances_2_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getActionAccess().getObjetsNomParserRuleCall_3_0());
|
|
}
|
|
lv_objets_3_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getActionRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"objets",
|
|
lv_objets_3_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getActionAccess().getObjetsConsoNomParserRuleCall_4_0());
|
|
}
|
|
lv_objetsConso_4_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getActionRule());
|
|
}
|
|
add(
|
|
$current,
|
|
"objetsConso",
|
|
lv_objetsConso_4_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)*
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getActionAccess().getVisibleConditionParserRuleCall_5_0());
|
|
}
|
|
lv_visible_5_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getActionRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"visible",
|
|
lv_visible_5_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getActionAccess().getFinInterractionConditionParserRuleCall_6_0());
|
|
}
|
|
lv_finInterraction_6_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getActionRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"finInterraction",
|
|
lv_finInterraction_6_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
otherlv_7='}'
|
|
{
|
|
newLeafNode(otherlv_7, grammarAccess.getActionAccess().getRightCurlyBracketKeyword_7());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleDescription
|
|
entryRuleDescription returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getDescriptionRule()); }
|
|
iv_ruleDescription=ruleDescription
|
|
{ $current=$iv_ruleDescription.current; }
|
|
EOF;
|
|
|
|
// Rule Description
|
|
ruleDescription returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Description'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getDescriptionAccess().getDescriptionKeyword_0());
|
|
}
|
|
otherlv_1='{'
|
|
{
|
|
newLeafNode(otherlv_1, grammarAccess.getDescriptionAccess().getLeftCurlyBracketKeyword_1());
|
|
}
|
|
(
|
|
(
|
|
lv_texte_2_0=RULE_STRING
|
|
{
|
|
newLeafNode(lv_texte_2_0, grammarAccess.getDescriptionAccess().getTexteSTRINGTerminalRuleCall_2_0());
|
|
}
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElement(grammarAccess.getDescriptionRule());
|
|
}
|
|
setWithLastConsumed(
|
|
$current,
|
|
"texte",
|
|
lv_texte_2_0,
|
|
"org.eclipse.xtext.common.Terminals.STRING");
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getDescriptionAccess().getConditionConditionParserRuleCall_3_0());
|
|
}
|
|
lv_condition_3_0=ruleCondition
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getDescriptionRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"condition",
|
|
lv_condition_3_0,
|
|
"xtext.Game.Condition");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
otherlv_4='}'
|
|
{
|
|
newLeafNode(otherlv_4, grammarAccess.getDescriptionAccess().getRightCurlyBracketKeyword_4());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleCondition
|
|
entryRuleCondition returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getConditionRule()); }
|
|
iv_ruleCondition=ruleCondition
|
|
{ $current=$iv_ruleCondition.current; }
|
|
EOF;
|
|
|
|
// Rule Condition
|
|
ruleCondition returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='Condition'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getConditionAccess().getConditionKeyword_0());
|
|
}
|
|
otherlv_1='{'
|
|
{
|
|
newLeafNode(otherlv_1, grammarAccess.getConditionAccess().getLeftCurlyBracketKeyword_1());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElement(grammarAccess.getConditionRule());
|
|
}
|
|
}
|
|
otherlv_2=RULE_ID
|
|
{
|
|
newLeafNode(otherlv_2, grammarAccess.getConditionAccess().getConditionConditionEtCrossReference_2_0());
|
|
}
|
|
)
|
|
)
|
|
(
|
|
otherlv_3='||'
|
|
{
|
|
newLeafNode(otherlv_3, grammarAccess.getConditionAccess().getVerticalLineVerticalLineKeyword_3_0());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElement(grammarAccess.getConditionRule());
|
|
}
|
|
}
|
|
otherlv_4=RULE_ID
|
|
{
|
|
newLeafNode(otherlv_4, grammarAccess.getConditionAccess().getConditionConditionEtCrossReference_3_1_0());
|
|
}
|
|
)
|
|
)
|
|
)*
|
|
otherlv_5='}'
|
|
{
|
|
newLeafNode(otherlv_5, grammarAccess.getConditionAccess().getRightCurlyBracketKeyword_4());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleConditionConnaissance
|
|
entryRuleConditionConnaissance returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getConditionConnaissanceRule()); }
|
|
iv_ruleConditionConnaissance=ruleConditionConnaissance
|
|
{ $current=$iv_ruleConditionConnaissance.current; }
|
|
EOF;
|
|
|
|
// Rule ConditionConnaissance
|
|
ruleConditionConnaissance returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getConditionConnaissanceAccess().getConnaissanceNomParserRuleCall_0());
|
|
}
|
|
lv_connaissance_0_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getConditionConnaissanceRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"connaissance",
|
|
lv_connaissance_0_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleAntiConditionConnaissance
|
|
entryRuleAntiConditionConnaissance returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getAntiConditionConnaissanceRule()); }
|
|
iv_ruleAntiConditionConnaissance=ruleAntiConditionConnaissance
|
|
{ $current=$iv_ruleAntiConditionConnaissance.current; }
|
|
EOF;
|
|
|
|
// Rule AntiConditionConnaissance
|
|
ruleAntiConditionConnaissance returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
otherlv_0='!'
|
|
{
|
|
newLeafNode(otherlv_0, grammarAccess.getAntiConditionConnaissanceAccess().getExclamationMarkKeyword_0());
|
|
}
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getAntiConditionConnaissanceAccess().getConnaissanceNomParserRuleCall_1_0());
|
|
}
|
|
lv_connaissance_1_0=ruleNom
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getAntiConditionConnaissanceRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"connaissance",
|
|
lv_connaissance_1_0,
|
|
"xtext.Game.Nom");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleConditionObjet
|
|
entryRuleConditionObjet returns [EObject current=null]:
|
|
{ newCompositeNode(grammarAccess.getConditionObjetRule()); }
|
|
iv_ruleConditionObjet=ruleConditionObjet
|
|
{ $current=$iv_ruleConditionObjet.current; }
|
|
EOF;
|
|
|
|
// Rule ConditionObjet
|
|
ruleConditionObjet returns [EObject current=null]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
(
|
|
(
|
|
lv_objet_0_0=RULE_STRING
|
|
{
|
|
newLeafNode(lv_objet_0_0, grammarAccess.getConditionObjetAccess().getObjetSTRINGTerminalRuleCall_0_0());
|
|
}
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElement(grammarAccess.getConditionObjetRule());
|
|
}
|
|
setWithLastConsumed(
|
|
$current,
|
|
"objet",
|
|
lv_objet_0_0,
|
|
"org.eclipse.xtext.common.Terminals.STRING");
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
{
|
|
newCompositeNode(grammarAccess.getConditionObjetAccess().getComparateurComparateurParserRuleCall_1_0());
|
|
}
|
|
lv_comparateur_1_0=ruleComparateur
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElementForParent(grammarAccess.getConditionObjetRule());
|
|
}
|
|
set(
|
|
$current,
|
|
"comparateur",
|
|
lv_comparateur_1_0,
|
|
"xtext.Game.Comparateur");
|
|
afterParserOrEnumRuleCall();
|
|
}
|
|
)
|
|
)
|
|
(
|
|
(
|
|
lv_nombre_2_0=RULE_INT
|
|
{
|
|
newLeafNode(lv_nombre_2_0, grammarAccess.getConditionObjetAccess().getNombreINTTerminalRuleCall_2_0());
|
|
}
|
|
{
|
|
if ($current==null) {
|
|
$current = createModelElement(grammarAccess.getConditionObjetRule());
|
|
}
|
|
setWithLastConsumed(
|
|
$current,
|
|
"nombre",
|
|
lv_nombre_2_0,
|
|
"org.eclipse.xtext.common.Terminals.INT");
|
|
}
|
|
)
|
|
)
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleComparateur
|
|
entryRuleComparateur returns [String current=null]:
|
|
{ newCompositeNode(grammarAccess.getComparateurRule()); }
|
|
iv_ruleComparateur=ruleComparateur
|
|
{ $current=$iv_ruleComparateur.current.getText(); }
|
|
EOF;
|
|
|
|
// Rule Comparateur
|
|
ruleComparateur returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
(
|
|
kw='<'
|
|
{
|
|
$current.merge(kw);
|
|
newLeafNode(kw, grammarAccess.getComparateurAccess().getLessThanSignKeyword_0());
|
|
}
|
|
|
|
|
kw='>'
|
|
{
|
|
$current.merge(kw);
|
|
newLeafNode(kw, grammarAccess.getComparateurAccess().getGreaterThanSignKeyword_1());
|
|
}
|
|
|
|
|
kw='='
|
|
{
|
|
$current.merge(kw);
|
|
newLeafNode(kw, grammarAccess.getComparateurAccess().getEqualsSignKeyword_2());
|
|
}
|
|
|
|
|
kw='<='
|
|
{
|
|
$current.merge(kw);
|
|
newLeafNode(kw, grammarAccess.getComparateurAccess().getLessThanSignEqualsSignKeyword_3());
|
|
}
|
|
|
|
|
kw='>='
|
|
{
|
|
$current.merge(kw);
|
|
newLeafNode(kw, grammarAccess.getComparateurAccess().getGreaterThanSignEqualsSignKeyword_4());
|
|
}
|
|
)
|
|
;
|
|
|
|
// Entry rule entryRuleNom
|
|
entryRuleNom returns [String current=null]:
|
|
{ newCompositeNode(grammarAccess.getNomRule()); }
|
|
iv_ruleNom=ruleNom
|
|
{ $current=$iv_ruleNom.current.getText(); }
|
|
EOF;
|
|
|
|
// Rule Nom
|
|
ruleNom returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
|
|
@init {
|
|
enterRule();
|
|
}
|
|
@after {
|
|
leaveRule();
|
|
}:
|
|
this_STRING_0=RULE_STRING
|
|
{
|
|
$current.merge(this_STRING_0);
|
|
}
|
|
{
|
|
newLeafNode(this_STRING_0, grammarAccess.getNomAccess().getSTRINGTerminalRuleCall());
|
|
}
|
|
;
|
|
|
|
RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
|
|
|
|
RULE_INT : ('0'..'9')+;
|
|
|
|
RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\'');
|
|
|
|
RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
|
|
|
|
RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
|
|
|
RULE_WS : (' '|'\t'|'\r'|'\n')+;
|
|
|
|
RULE_ANY_OTHER : .;
|