瀏覽代碼

Mapped INT rule to int instead of LONG

Andreas Mülder 13 年之前
父節點
當前提交
a1dc968561
共有 22 個文件被更改,包括 5536 次插入4766 次删除
  1. 2 17
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/AbstractSTextProposalProvider.java
  2. 13 9
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSText.g
  3. 121 119
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSText.tokens
  4. 1248 899
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSTextLexer.java
  5. 576 574
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSTextParser.java
  6. 3 3
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore
  7. 1573 1501
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.xmi
  8. 1 9
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/STextStandaloneSetupGenerated.java
  9. 14 14
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parseTreeConstruction/STextParsetreeConstructor.java
  10. 16 12
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g
  11. 121 119
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.tokens
  12. 1258 911
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSTextLexer.java
  13. 501 499
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSTextParser.java
  14. 54 37
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/services/STextGrammarAccess.java
  15. 3 3
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/IntLiteral.java
  16. 3 3
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/ReactionPriority.java
  17. 3 3
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/TimeEventSpec.java
  18. 6 6
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/IntLiteralImpl.java
  19. 6 6
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/ReactionPriorityImpl.java
  20. 3 3
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/StextPackageImpl.java
  21. 6 6
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/TimeEventSpecImpl.java
  22. 5 13
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/SText.xtext

+ 2 - 17
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/AbstractSTextProposalProvider.java

@@ -5,7 +5,7 @@ package org.yakindu.sct.model.stext.ui.contentassist;
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.xtext.*;
-import org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider;
+import org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider;
 import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
 import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
 
@@ -15,7 +15,7 @@ import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
  * with a more concrete subtype. 
  */
 @SuppressWarnings("all")
-public class AbstractSTextProposalProvider extends AbstractJavaBasedContentProposalProvider {
+public class AbstractSTextProposalProvider extends TerminalsProposalProvider {
 		
 	public void completeRoot_Roots(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
 		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
@@ -495,9 +495,6 @@ public class AbstractSTextProposalProvider extends AbstractJavaBasedContentPropo
 	public void complete_HexLiteral(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
 		// subclasses may override
 	}
-	public void complete_LONG_INT(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
-		// subclasses may override
-	}
 	public void complete_BOOL(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
 		// subclasses may override
 	}
@@ -507,16 +504,4 @@ public class AbstractSTextProposalProvider extends AbstractJavaBasedContentPropo
 	public void complete_DOUBLE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
 		// subclasses may override
 	}
-	public void complete_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
-		// subclasses may override
-	}
-	public void complete_ML_COMMENT(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
-		// subclasses may override
-	}
-	public void complete_SL_COMMENT(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
-		// subclasses may override
-	}
-	public void complete_WS(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
-		// subclasses may override
-	}
 }

+ 13 - 9
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSText.g

@@ -10835,8 +10835,8 @@ rule__ReactionPriority__PriorityAssignment
     }
 :
 (
-{ before(grammarAccess.getReactionPriorityAccess().getPriorityLONG_INTTerminalRuleCall_0()); }
-	RULE_LONG_INT{ after(grammarAccess.getReactionPriorityAccess().getPriorityLONG_INTTerminalRuleCall_0()); }
+{ before(grammarAccess.getReactionPriorityAccess().getPriorityINTTerminalRuleCall_0()); }
+	RULE_INT{ after(grammarAccess.getReactionPriorityAccess().getPriorityINTTerminalRuleCall_0()); }
 )
 
 ;
@@ -10922,8 +10922,8 @@ rule__TimeEventSpec__ValueAssignment_1
     }
 :
 (
-{ before(grammarAccess.getTimeEventSpecAccess().getValueLONG_INTTerminalRuleCall_1_0()); }
-	RULE_LONG_INT{ after(grammarAccess.getTimeEventSpecAccess().getValueLONG_INTTerminalRuleCall_1_0()); }
+{ before(grammarAccess.getTimeEventSpecAccess().getValueINTTerminalRuleCall_1_0()); }
+	RULE_INT{ after(grammarAccess.getTimeEventSpecAccess().getValueINTTerminalRuleCall_1_0()); }
 )
 
 ;
@@ -11460,8 +11460,8 @@ rule__IntLiteral__ValueAssignment_1
     }
 :
 (
-{ before(grammarAccess.getIntLiteralAccess().getValueLONG_INTTerminalRuleCall_1_0()); }
-	RULE_LONG_INT{ after(grammarAccess.getIntLiteralAccess().getValueLONG_INTTerminalRuleCall_1_0()); }
+{ before(grammarAccess.getIntLiteralAccess().getValueINTTerminalRuleCall_1_0()); }
+	RULE_INT{ after(grammarAccess.getIntLiteralAccess().getValueINTTerminalRuleCall_1_0()); }
 )
 
 ;
@@ -11500,20 +11500,24 @@ finally {
 }
 
 
-RULE_LONG_INT : ('0'..'9')+;
-
 RULE_BOOL : ('true'|'false'|'yes'|'no');
 
 RULE_HEX : '0' ('x'|'X') ('0'..'9'|'a'..'f'|'A'..'F')+;
 
-RULE_DOUBLE : RULE_LONG_INT '.' RULE_LONG_INT ('e' ('-'|'+') RULE_LONG_INT)? ('f'|'F'|'d'|'D')?;
+RULE_DOUBLE : RULE_INT '.' RULE_INT ('e' ('-'|'+') RULE_INT)? ('f'|'F'|'d'|'D')?;
 
 RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
 
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
+
 RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
 
 RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
 
 RULE_WS : (' '|'\t'|'\r'|'\n')+;
 
+RULE_ANY_OTHER : .;
+
 

+ 121 - 119
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSText.tokens

@@ -1,164 +1,166 @@
-T__68=68
-T__69=69
 RULE_ID=4
-T__66=66
-T__67=67
-T__64=64
 T__29=29
-T__65=65
 T__28=28
-T__62=62
 T__27=27
-T__63=63
 T__26=26
 T__25=25
 T__24=24
 T__23=23
 T__22=22
 T__21=21
+RULE_ANY_OTHER=13
 T__20=20
+T__19=19
+T__91=91
+RULE_HEX=8
+T__16=16
+T__15=15
+T__90=90
+T__18=18
+T__17=17
+T__14=14
+T__80=80
+T__81=81
+T__82=82
+T__83=83
+T__85=85
+T__84=84
+T__87=87
+T__86=86
+T__89=89
+T__88=88
+RULE_ML_COMMENT=10
+RULE_STRING=9
+T__71=71
+T__72=72
+T__70=70
+T__76=76
+T__75=75
+T__74=74
+T__73=73
+T__79=79
+T__78=78
+T__77=77
+T__68=68
+T__69=69
+T__66=66
+T__67=67
+T__64=64
+T__65=65
+T__62=62
+T__63=63
 RULE_BOOL=6
 T__61=61
 T__60=60
 T__55=55
 T__56=56
-T__19=19
 T__57=57
-RULE_HEX=8
 T__58=58
-T__16=16
 T__51=51
 T__52=52
-T__15=15
 T__53=53
-T__18=18
 T__54=54
-T__17=17
-T__12=12
-T__14=14
-T__13=13
 T__59=59
+RULE_INT=5
 T__50=50
 T__42=42
 T__43=43
 T__40=40
 T__41=41
-T__80=80
 T__46=46
-T__81=81
 T__47=47
-T__82=82
 T__44=44
-T__83=83
 T__45=45
 T__48=48
 T__49=49
-T__85=85
-RULE_SL_COMMENT=10
-T__84=84
-T__87=87
+RULE_SL_COMMENT=11
 RULE_DOUBLE=7
-T__86=86
-T__89=89
-T__88=88
-RULE_ML_COMMENT=9
 T__30=30
 T__31=31
 T__32=32
-T__71=71
 T__33=33
-T__72=72
 T__34=34
 T__35=35
-T__70=70
 T__36=36
 T__37=37
 T__38=38
 T__39=39
-RULE_WS=11
-T__76=76
-T__75=75
-RULE_LONG_INT=5
-T__74=74
-T__73=73
-T__79=79
-T__78=78
-T__77=77
-'#'=69
-'out'=16
-'>='=41
-'internal'=58
-'~'=37
-'/'=35
-'=='=42
-'/='=21
-'string'=51
-'integer'=48
-'%='=22
-'>'=40
-'event'=59
-'||'=79
-'&&'=80
-';'=72
-'raise'=77
-'+'=32
-'active'=87
-'.'=68
-'^'=82
-'>>'=31
-'else'=13
-'^='=28
-'+='=23
-'readonly'=88
-'>>='=26
-'void'=47
-'?'=78
-'var'=60
-'&='=27
-'s'=44
-'('=63
-':'=57
-'exit'=74
-'-'=33
-','=65
-'default'=12
-'in'=15
-'-='=24
-']'=71
-'<<='=25
-'ns'=46
-'real'=49
-'!'=81
-'|'=83
-'ms'=45
-'every'=18
-'|='=29
-'@@statechart@@'=52
-'exitpoint'=67
-'@@state@@'=53
-'='=19
-'always'=76
-'oncycle'=75
-')'=64
-'*='=20
-'entry'=73
-'operation'=62
-'%'=36
-'after'=17
-'boolean'=50
-'entrypoint'=66
-'namespace'=55
-'<<'=30
-'<='=39
-'valueof'=85
-'!='=43
-'@@transition@@'=54
-'external'=89
-'<'=38
-'['=70
-'*'=34
-'clock'=61
-'local'=14
-'raised'=86
-'&'=84
-'interface'=56
+RULE_WS=12
+'#'=71
+'out'=18
+'>='=43
+'internal'=60
+'~'=39
+'/'=37
+'=='=44
+'/='=23
+'string'=53
+'integer'=50
+'%='=24
+'>'=42
+'event'=61
+'||'=81
+'&&'=82
+';'=74
+'raise'=79
+'+'=34
+'active'=89
+'.'=70
+'^'=84
+'>>'=33
+'else'=15
+'^='=30
+'+='=25
+'readonly'=90
+'>>='=28
+'void'=49
+'?'=80
+'var'=62
+'&='=29
+'s'=46
+'('=65
+':'=59
+'exit'=76
+'-'=35
+','=67
+'default'=14
+'in'=17
+'-='=26
+']'=73
+'<<='=27
+'ns'=48
+'real'=51
+'!'=83
+'|'=85
+'ms'=47
+'every'=20
+'|='=31
+'@@statechart@@'=54
+'exitpoint'=69
+'@@state@@'=55
+'='=21
+'always'=78
+'oncycle'=77
+')'=66
+'*='=22
+'entry'=75
+'operation'=64
+'%'=38
+'after'=19
+'boolean'=52
+'entrypoint'=68
+'namespace'=57
+'<<'=32
+'<='=41
+'valueof'=87
+'!='=45
+'@@transition@@'=56
+'external'=91
+'<'=40
+'['=72
+'*'=36
+'clock'=63
+'local'=16
+'raised'=88
+'&'=86
+'interface'=58

文件差異過大導致無法顯示
+ 1248 - 899
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSTextLexer.java


文件差異過大導致無法顯示
+ 576 - 574
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSTextParser.java


+ 3 - 3
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore

@@ -58,7 +58,7 @@
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="ReactionProperty"/>
   <eClassifiers xsi:type="ecore:EClass" name="ReactionPriority" eSuperTypes="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//ReactionProperty">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="EntryPointSpec" eSuperTypes="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//ReactionProperty">
     <eStructuralFeatures xsi:type="ecore:EReference" name="entrypoint" eType="ecore:EClass platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Entrypoint"/>
@@ -72,7 +72,7 @@
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="TimeEventSpec" eSuperTypes="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//EventSpec">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EEnum platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//TimeEventType"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="unit" eType="ecore:EEnum platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//TimeUnit"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EEnum" name="TimeEventType">
@@ -165,7 +165,7 @@
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="IntLiteral" eSuperTypes="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Literal">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="RealLiteral" eSuperTypes="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Literal">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>

文件差異過大導致無法顯示
+ 1573 - 1501
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.xmi


+ 1 - 9
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/STextStandaloneSetupGenerated.java

@@ -15,15 +15,7 @@ import com.google.inject.Injector;
 public class STextStandaloneSetupGenerated implements ISetup {
 
 	public Injector createInjectorAndDoEMFRegistration() {
-		// register default ePackages
-		if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
-			Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
-				"ecore", new org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl());
-		if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
-			Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
-				"xmi", new org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl());
-		if (!EPackage.Registry.INSTANCE.containsKey(org.eclipse.xtext.XtextPackage.eNS_URI))
-			EPackage.Registry.INSTANCE.put(org.eclipse.xtext.XtextPackage.eNS_URI, org.eclipse.xtext.XtextPackage.eINSTANCE);
+		org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
 
 		Injector injector = createInjector();
 		register(injector);

+ 14 - 14
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parseTreeConstruction/STextParsetreeConstructor.java

@@ -5140,11 +5140,11 @@ protected class ReactionProperty_ExitPointSpecParserRuleCall_2 extends RuleCallT
 /************ begin Rule ReactionPriority ****************
  *
  * ReactionPriority:
- * 	priority=LONG_INT;
+ * 	priority=INT;
  *
  **/
 
-// priority=LONG_INT
+// priority=INT
 protected class ReactionPriority_PriorityAssignment extends AssignmentToken  {
 	
 	public ReactionPriority_PriorityAssignment(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -5169,9 +5169,9 @@ protected class ReactionPriority_PriorityAssignment extends AssignmentToken  {
 			return null;
 		if((value = eObjectConsumer.getConsumable("priority",true)) == null) return null;
 		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("priority");
-		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getReactionPriorityAccess().getPriorityLONG_INTTerminalRuleCall_0(), value, null)) {
+		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getReactionPriorityAccess().getPriorityINTTerminalRuleCall_0(), value, null)) {
 			type = AssignmentType.TERMINAL_RULE_CALL;
-			element = grammarAccess.getReactionPriorityAccess().getPriorityLONG_INTTerminalRuleCall_0();
+			element = grammarAccess.getReactionPriorityAccess().getPriorityINTTerminalRuleCall_0();
 			return obj;
 		}
 		return null;
@@ -5590,11 +5590,11 @@ protected class RegularEventSpec_EventAssignment extends AssignmentToken  {
  *
  * // TODO: redefine after trigger - we need to use it with clocks
  * TimeEventSpec:
- * 	type=TimeEventType value=LONG_INT unit=TimeUnit?;
+ * 	type=TimeEventType value=INT unit=TimeUnit?;
  *
  **/
 
-// type=TimeEventType value=LONG_INT unit=TimeUnit?
+// type=TimeEventType value=INT unit=TimeUnit?
 protected class TimeEventSpec_Group extends GroupToken {
 	
 	public TimeEventSpec_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -5657,7 +5657,7 @@ protected class TimeEventSpec_TypeAssignment_0 extends AssignmentToken  {
 
 }
 
-// value=LONG_INT
+// value=INT
 protected class TimeEventSpec_ValueAssignment_1 extends AssignmentToken  {
 	
 	public TimeEventSpec_ValueAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -5681,9 +5681,9 @@ protected class TimeEventSpec_ValueAssignment_1 extends AssignmentToken  {
 	public IEObjectConsumer tryConsume() {
 		if((value = eObjectConsumer.getConsumable("value",true)) == null) return null;
 		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("value");
-		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getTimeEventSpecAccess().getValueLONG_INTTerminalRuleCall_1_0(), value, null)) {
+		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getTimeEventSpecAccess().getValueINTTerminalRuleCall_1_0(), value, null)) {
 			type = AssignmentType.TERMINAL_RULE_CALL;
-			element = grammarAccess.getTimeEventSpecAccess().getValueLONG_INTTerminalRuleCall_1_0();
+			element = grammarAccess.getTimeEventSpecAccess().getValueINTTerminalRuleCall_1_0();
 			return obj;
 		}
 		return null;
@@ -11549,11 +11549,11 @@ protected class BoolLiteral_ValueAssignment_1 extends AssignmentToken  {
 /************ begin Rule IntLiteral ****************
  *
  * IntLiteral:
- * 	{IntLiteral} value=LONG_INT;
+ * 	{IntLiteral} value=INT;
  *
  **/
 
-// {IntLiteral} value=LONG_INT
+// {IntLiteral} value=INT
 protected class IntLiteral_Group extends GroupToken {
 	
 	public IntLiteral_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -11608,7 +11608,7 @@ protected class IntLiteral_IntLiteralAction_0 extends ActionToken  {
 	}
 }
 
-// value=LONG_INT
+// value=INT
 protected class IntLiteral_ValueAssignment_1 extends AssignmentToken  {
 	
 	public IntLiteral_ValueAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -11632,9 +11632,9 @@ protected class IntLiteral_ValueAssignment_1 extends AssignmentToken  {
 	public IEObjectConsumer tryConsume() {
 		if((value = eObjectConsumer.getConsumable("value",true)) == null) return null;
 		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("value");
-		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getIntLiteralAccess().getValueLONG_INTTerminalRuleCall_1_0(), value, null)) {
+		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getIntLiteralAccess().getValueINTTerminalRuleCall_1_0(), value, null)) {
 			type = AssignmentType.TERMINAL_RULE_CALL;
-			element = grammarAccess.getIntLiteralAccess().getValueLONG_INTTerminalRuleCall_1_0();
+			element = grammarAccess.getIntLiteralAccess().getValueINTTerminalRuleCall_1_0();
 			return obj;
 		}
 		return null;

+ 16 - 12
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g

@@ -1816,9 +1816,9 @@ ruleReactionPriority returns [EObject current=null]
     @after { leaveRule(); }:
 (
 (
-		lv_priority_0_0=RULE_LONG_INT
+		lv_priority_0_0=RULE_INT
 		{
-			newLeafNode(lv_priority_0_0, grammarAccess.getReactionPriorityAccess().getPriorityLONG_INTTerminalRuleCall_0()); 
+			newLeafNode(lv_priority_0_0, grammarAccess.getReactionPriorityAccess().getPriorityINTTerminalRuleCall_0()); 
 		}
 		{
 	        if ($current==null) {
@@ -1828,7 +1828,7 @@ ruleReactionPriority returns [EObject current=null]
        			$current, 
        			"priority",
         		lv_priority_0_0, 
-        		"LONG_INT");
+        		"INT");
 	    }
 
 )
@@ -2039,9 +2039,9 @@ ruleTimeEventSpec returns [EObject current=null]
 )
 )(
 (
-		lv_value_1_0=RULE_LONG_INT
+		lv_value_1_0=RULE_INT
 		{
-			newLeafNode(lv_value_1_0, grammarAccess.getTimeEventSpecAccess().getValueLONG_INTTerminalRuleCall_1_0()); 
+			newLeafNode(lv_value_1_0, grammarAccess.getTimeEventSpecAccess().getValueINTTerminalRuleCall_1_0()); 
 		}
 		{
 	        if ($current==null) {
@@ -2051,7 +2051,7 @@ ruleTimeEventSpec returns [EObject current=null]
        			$current, 
        			"value",
         		lv_value_1_0, 
-        		"LONG_INT");
+        		"INT");
 	    }
 
 )
@@ -3906,9 +3906,9 @@ ruleIntLiteral returns [EObject current=null]
     }
 )(
 (
-		lv_value_1_0=RULE_LONG_INT
+		lv_value_1_0=RULE_INT
 		{
-			newLeafNode(lv_value_1_0, grammarAccess.getIntLiteralAccess().getValueLONG_INTTerminalRuleCall_1_0()); 
+			newLeafNode(lv_value_1_0, grammarAccess.getIntLiteralAccess().getValueINTTerminalRuleCall_1_0()); 
 		}
 		{
 	        if ($current==null) {
@@ -3918,7 +3918,7 @@ ruleIntLiteral returns [EObject current=null]
        			$current, 
        			"value",
         		lv_value_1_0, 
-        		"LONG_INT");
+        		"INT");
 	    }
 
 )
@@ -4329,20 +4329,24 @@ ruleType returns [Enumerator current=null]
 
 
 
-RULE_LONG_INT : ('0'..'9')+;
-
 RULE_BOOL : ('true'|'false'|'yes'|'no');
 
 RULE_HEX : '0' ('x'|'X') ('0'..'9'|'a'..'f'|'A'..'F')+;
 
-RULE_DOUBLE : RULE_LONG_INT '.' RULE_LONG_INT ('e' ('-'|'+') RULE_LONG_INT)? ('f'|'F'|'d'|'D')?;
+RULE_DOUBLE : RULE_INT '.' RULE_INT ('e' ('-'|'+') RULE_INT)? ('f'|'F'|'d'|'D')?;
 
 RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
 
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
+
 RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
 
 RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
 
 RULE_WS : (' '|'\t'|'\r'|'\n')+;
 
+RULE_ANY_OTHER : .;
+
 

+ 121 - 119
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.tokens

@@ -1,164 +1,166 @@
-T__68=68
-T__69=69
 RULE_ID=4
-T__66=66
-T__67=67
-T__64=64
 T__29=29
-T__65=65
 T__28=28
-T__62=62
 T__27=27
-T__63=63
 T__26=26
 T__25=25
 T__24=24
 T__23=23
 T__22=22
 T__21=21
+RULE_ANY_OTHER=13
 T__20=20
+T__19=19
+T__91=91
+RULE_HEX=8
+T__16=16
+T__15=15
+T__90=90
+T__18=18
+T__17=17
+T__14=14
+T__80=80
+T__81=81
+T__82=82
+T__83=83
+T__85=85
+T__84=84
+T__87=87
+T__86=86
+T__89=89
+T__88=88
+RULE_ML_COMMENT=10
+RULE_STRING=9
+T__71=71
+T__72=72
+T__70=70
+T__76=76
+T__75=75
+T__74=74
+T__73=73
+T__79=79
+T__78=78
+T__77=77
+T__68=68
+T__69=69
+T__66=66
+T__67=67
+T__64=64
+T__65=65
+T__62=62
+T__63=63
 RULE_BOOL=6
 T__61=61
 T__60=60
 T__55=55
 T__56=56
-T__19=19
 T__57=57
-RULE_HEX=8
 T__58=58
-T__16=16
 T__51=51
 T__52=52
-T__15=15
 T__53=53
-T__18=18
 T__54=54
-T__17=17
-T__12=12
-T__14=14
-T__13=13
 T__59=59
+RULE_INT=5
 T__50=50
 T__42=42
 T__43=43
 T__40=40
 T__41=41
-T__80=80
 T__46=46
-T__81=81
 T__47=47
-T__82=82
 T__44=44
-T__83=83
 T__45=45
 T__48=48
 T__49=49
-T__85=85
-RULE_SL_COMMENT=10
-T__84=84
-T__87=87
+RULE_SL_COMMENT=11
 RULE_DOUBLE=7
-T__86=86
-T__89=89
-T__88=88
-RULE_ML_COMMENT=9
 T__30=30
 T__31=31
 T__32=32
-T__71=71
 T__33=33
-T__72=72
 T__34=34
 T__35=35
-T__70=70
 T__36=36
 T__37=37
 T__38=38
 T__39=39
-RULE_WS=11
-T__76=76
-T__75=75
-RULE_LONG_INT=5
-T__74=74
-T__73=73
-T__79=79
-T__78=78
-T__77=77
-'>='=79
-'#'=33
-'internal'=18
-'out'=57
-'~'=76
-'=='=80
-'/'=32
-'string'=89
-'/='=61
-'integer'=86
-'%='=62
-'event'=19
-'>'=37
-'||'=46
-'&&'=47
-';'=36
-'raise'=44
-'+'=72
-'.'=31
-'active'=54
-'^'=49
-'>>'=71
-'else'=43
-'^='=68
-'+='=63
-'readonly'=22
-'>>='=66
-'void'=85
-'?'=45
-'var'=21
-'s'=82
-'&='=67
-'('=26
-':'=17
-'-'=73
-'exit'=39
-','=27
-'default'=42
-'in'=56
-'-='=64
-'<<='=65
-']'=35
-'real'=87
-'ns'=84
-'!'=48
-'|'=50
-'ms'=83
-'every'=59
-'|='=69
-'@@statechart@@'=12
-'exitpoint'=30
-'@@state@@'=13
-'='=20
-'always'=41
-')'=28
-'oncycle'=40
-'*='=60
-'entry'=38
-'%'=75
-'operation'=25
-'after'=58
-'boolean'=88
-'entrypoint'=29
-'namespace'=15
-'<<'=70
-'<='=78
-'!='=81
-'@@transition@@'=14
-'valueof'=52
-'external'=23
-'<'=77
-'*'=74
-'['=34
-'clock'=24
-'local'=55
-'raised'=53
-'&'=51
-'interface'=16
+RULE_WS=12
+'>='=81
+'#'=35
+'internal'=20
+'out'=59
+'~'=78
+'=='=82
+'/'=34
+'string'=91
+'/='=63
+'integer'=88
+'%='=64
+'event'=21
+'>'=39
+'||'=48
+'&&'=49
+';'=38
+'raise'=46
+'+'=74
+'.'=33
+'active'=56
+'^'=51
+'>>'=73
+'else'=45
+'^='=70
+'+='=65
+'readonly'=24
+'>>='=68
+'void'=87
+'?'=47
+'var'=23
+'s'=84
+'&='=69
+'('=28
+':'=19
+'-'=75
+'exit'=41
+','=29
+'default'=44
+'in'=58
+'-='=66
+'<<='=67
+']'=37
+'real'=89
+'ns'=86
+'!'=50
+'|'=52
+'ms'=85
+'every'=61
+'|='=71
+'@@statechart@@'=14
+'exitpoint'=32
+'@@state@@'=15
+'='=22
+'always'=43
+')'=30
+'oncycle'=42
+'*='=62
+'entry'=40
+'%'=77
+'operation'=27
+'after'=60
+'boolean'=90
+'entrypoint'=31
+'namespace'=17
+'<<'=72
+'<='=80
+'!='=83
+'@@transition@@'=16
+'valueof'=54
+'external'=25
+'<'=79
+'*'=76
+'['=36
+'clock'=26
+'local'=57
+'raised'=55
+'&'=53
+'interface'=18

文件差異過大導致無法顯示
+ 1258 - 911
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSTextLexer.java


文件差異過大導致無法顯示
+ 501 - 499
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSTextParser.java


+ 54 - 37
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/services/STextGrammarAccess.java

@@ -11,6 +11,7 @@ import org.eclipse.xtext.*;
 import org.eclipse.xtext.service.GrammarProvider;
 import org.eclipse.xtext.service.AbstractElementFinder.*;
 
+import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
 
 @Singleton
 public class STextGrammarAccess extends AbstractGrammarElementFinder {
@@ -1058,17 +1059,17 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	public class ReactionPriorityElements extends AbstractParserRuleElementFinder {
 		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ReactionPriority");
 		private final Assignment cPriorityAssignment = (Assignment)rule.eContents().get(1);
-		private final RuleCall cPriorityLONG_INTTerminalRuleCall_0 = (RuleCall)cPriorityAssignment.eContents().get(0);
+		private final RuleCall cPriorityINTTerminalRuleCall_0 = (RuleCall)cPriorityAssignment.eContents().get(0);
 		
 		//ReactionPriority:
-		//	priority=LONG_INT;
+		//	priority=INT;
 		public ParserRule getRule() { return rule; }
 
-		//priority=LONG_INT
+		//priority=INT
 		public Assignment getPriorityAssignment() { return cPriorityAssignment; }
 
-		//LONG_INT
-		public RuleCall getPriorityLONG_INTTerminalRuleCall_0() { return cPriorityLONG_INTTerminalRuleCall_0; }
+		//INT
+		public RuleCall getPriorityINTTerminalRuleCall_0() { return cPriorityINTTerminalRuleCall_0; }
 	}
 
 	public class EntryPointSpecElements extends AbstractParserRuleElementFinder {
@@ -1177,16 +1178,16 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final Assignment cTypeAssignment_0 = (Assignment)cGroup.eContents().get(0);
 		private final RuleCall cTypeTimeEventTypeEnumRuleCall_0_0 = (RuleCall)cTypeAssignment_0.eContents().get(0);
 		private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
-		private final RuleCall cValueLONG_INTTerminalRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
+		private final RuleCall cValueINTTerminalRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
 		private final Assignment cUnitAssignment_2 = (Assignment)cGroup.eContents().get(2);
 		private final RuleCall cUnitTimeUnitEnumRuleCall_2_0 = (RuleCall)cUnitAssignment_2.eContents().get(0);
 		
 		//// TODO: redefine after trigger - we need to use it with clocks
 		//TimeEventSpec:
-		//	type=TimeEventType value=LONG_INT unit=TimeUnit?;
+		//	type=TimeEventType value=INT unit=TimeUnit?;
 		public ParserRule getRule() { return rule; }
 
-		//type=TimeEventType value=LONG_INT unit=TimeUnit?
+		//type=TimeEventType value=INT unit=TimeUnit?
 		public Group getGroup() { return cGroup; }
 
 		//type=TimeEventType
@@ -1195,11 +1196,11 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		//TimeEventType
 		public RuleCall getTypeTimeEventTypeEnumRuleCall_0_0() { return cTypeTimeEventTypeEnumRuleCall_0_0; }
 
-		//value=LONG_INT
+		//value=INT
 		public Assignment getValueAssignment_1() { return cValueAssignment_1; }
 
-		//LONG_INT
-		public RuleCall getValueLONG_INTTerminalRuleCall_1_0() { return cValueLONG_INTTerminalRuleCall_1_0; }
+		//INT
+		public RuleCall getValueINTTerminalRuleCall_1_0() { return cValueINTTerminalRuleCall_1_0; }
 
 		//unit=TimeUnit?
 		public Assignment getUnitAssignment_2() { return cUnitAssignment_2; }
@@ -2313,23 +2314,23 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final Group cGroup = (Group)rule.eContents().get(1);
 		private final Action cIntLiteralAction_0 = (Action)cGroup.eContents().get(0);
 		private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
-		private final RuleCall cValueLONG_INTTerminalRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
+		private final RuleCall cValueINTTerminalRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
 		
 		//IntLiteral:
-		//	{IntLiteral} value=LONG_INT;
+		//	{IntLiteral} value=INT;
 		public ParserRule getRule() { return rule; }
 
-		//{IntLiteral} value=LONG_INT
+		//{IntLiteral} value=INT
 		public Group getGroup() { return cGroup; }
 
 		//{IntLiteral}
 		public Action getIntLiteralAction_0() { return cIntLiteralAction_0; }
 
-		//value=LONG_INT
+		//value=INT
 		public Assignment getValueAssignment_1() { return cValueAssignment_1; }
 
-		//LONG_INT
-		public RuleCall getValueLONG_INTTerminalRuleCall_1_0() { return cValueLONG_INTTerminalRuleCall_1_0; }
+		//INT
+		public RuleCall getValueINTTerminalRuleCall_1_0() { return cValueINTTerminalRuleCall_1_0; }
 	}
 
 	public class RealLiteralElements extends AbstractParserRuleElementFinder {
@@ -2903,20 +2904,19 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	private IntLiteralElements pIntLiteral;
 	private RealLiteralElements pRealLiteral;
 	private HexLiteralElements pHexLiteral;
-	private TerminalRule tLONG_INT;
 	private TerminalRule tBOOL;
 	private TerminalRule tHEX;
 	private TerminalRule tDOUBLE;
-	private TerminalRule tID;
-	private TerminalRule tML_COMMENT;
-	private TerminalRule tSL_COMMENT;
-	private TerminalRule tWS;
 	
 	private final GrammarProvider grammarProvider;
 
+	private TerminalsGrammarAccess gaTerminals;
+
 	@Inject
-	public STextGrammarAccess(GrammarProvider grammarProvider) {
+	public STextGrammarAccess(GrammarProvider grammarProvider,
+		TerminalsGrammarAccess gaTerminals) {
 		this.grammarProvider = grammarProvider;
+		this.gaTerminals = gaTerminals;
 	}
 	
 	public Grammar getGrammar() {	
@@ -2924,6 +2924,10 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 	
 
+	public TerminalsGrammarAccess getTerminalsGrammarAccess() {
+		return gaTerminals;
+	}
+
 	
 	/// * ---- root rules ----
 	//These root rules are not relevant for the grammar integration in the statechart. They just integrate the different start rules consistently 
@@ -3241,7 +3245,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//ReactionPriority:
-	//	priority=LONG_INT;
+	//	priority=INT;
 	public ReactionPriorityElements getReactionPriorityAccess() {
 		return (pReactionPriority != null) ? pReactionPriority : (pReactionPriority = new ReactionPriorityElements());
 	}
@@ -3292,7 +3296,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 
 	//// TODO: redefine after trigger - we need to use it with clocks
 	//TimeEventSpec:
-	//	type=TimeEventType value=LONG_INT unit=TimeUnit?;
+	//	type=TimeEventType value=INT unit=TimeUnit?;
 	public TimeEventSpecElements getTimeEventSpecAccess() {
 		return (pTimeEventSpec != null) ? pTimeEventSpec : (pTimeEventSpec = new TimeEventSpecElements());
 	}
@@ -3725,7 +3729,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//IntLiteral:
-	//	{IntLiteral} value=LONG_INT;
+	//	{IntLiteral} value=INT;
 	public IntLiteralElements getIntLiteralAccess() {
 		return (pIntLiteral != null) ? pIntLiteral : (pIntLiteral = new IntLiteralElements());
 	}
@@ -3754,12 +3758,6 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getHexLiteralAccess().getRule();
 	}
 
-	//terminal LONG_INT returns ecore::ELong:
-	//	"0".."9"+;
-	public TerminalRule getLONG_INTRule() {
-		return (tLONG_INT != null) ? tLONG_INT : (tLONG_INT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "LONG_INT"));
-	} 
-
 	//terminal BOOL returns ecore::EBoolean:
 	//	"true" | "false" | "yes" | "no";
 	public TerminalRule getBOOLRule() {
@@ -3773,7 +3771,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	} 
 
 	//terminal DOUBLE returns ecore::EDouble:
-	//	(LONG_INT "." LONG_INT) ("e" ("-" | "+") LONG_INT)? ("f" | "F" | "d" | "D")?;
+	//	(INT "." INT) ("e" ("-" | "+") INT)? ("f" | "F" | "d" | "D")?;
 	public TerminalRule getDOUBLERule() {
 		return (tDOUBLE != null) ? tDOUBLE : (tDOUBLE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "DOUBLE"));
 	} 
@@ -3781,24 +3779,43 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	//terminal ID:
 	//	"^"? ("a".."z" | "A".."Z" | "_") ("a".."z" | "A".."Z" | "_" | "0".."9")*;
 	public TerminalRule getIDRule() {
-		return (tID != null) ? tID : (tID = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "ID"));
+		return gaTerminals.getIDRule();
+	} 
+
+	//terminal INT returns ecore::EInt:
+	//	"0".."9"+;
+	public TerminalRule getINTRule() {
+		return gaTerminals.getINTRule();
+	} 
+
+	//terminal STRING:
+	//	"\"" ("\\" ("b" | "t" | "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\""))* "\"" | "\'" ("\\" ("b" | "t" |
+	//	"n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\'"))* "\'";
+	public TerminalRule getSTRINGRule() {
+		return gaTerminals.getSTRINGRule();
 	} 
 
 	//terminal ML_COMMENT:
 	//	"/ *"->"* /";
 	public TerminalRule getML_COMMENTRule() {
-		return (tML_COMMENT != null) ? tML_COMMENT : (tML_COMMENT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "ML_COMMENT"));
+		return gaTerminals.getML_COMMENTRule();
 	} 
 
 	//terminal SL_COMMENT:
 	//	"//" !("\n" | "\r")* ("\r"? "\n")?;
 	public TerminalRule getSL_COMMENTRule() {
-		return (tSL_COMMENT != null) ? tSL_COMMENT : (tSL_COMMENT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "SL_COMMENT"));
+		return gaTerminals.getSL_COMMENTRule();
 	} 
 
 	//terminal WS:
 	//	(" " | "\t" | "\r" | "\n")+;
 	public TerminalRule getWSRule() {
-		return (tWS != null) ? tWS : (tWS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "WS"));
+		return gaTerminals.getWSRule();
+	} 
+
+	//terminal ANY_OTHER:
+	//	.;
+	public TerminalRule getANY_OTHERRule() {
+		return gaTerminals.getANY_OTHERRule();
 	} 
 }

+ 3 - 3
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/IntLiteral.java

@@ -34,12 +34,12 @@ public interface IntLiteral extends Literal
    * </p>
    * <!-- end-user-doc -->
    * @return the value of the '<em>Value</em>' attribute.
-   * @see #setValue(long)
+   * @see #setValue(int)
    * @see org.yakindu.sct.model.stext.stext.StextPackage#getIntLiteral_Value()
    * @model
    * @generated
    */
-  long getValue();
+  int getValue();
 
   /**
    * Sets the value of the '{@link org.yakindu.sct.model.stext.stext.IntLiteral#getValue <em>Value</em>}' attribute.
@@ -49,6 +49,6 @@ public interface IntLiteral extends Literal
    * @see #getValue()
    * @generated
    */
-  void setValue(long value);
+  void setValue(int value);
 
 } // IntLiteral

+ 3 - 3
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/ReactionPriority.java

@@ -34,12 +34,12 @@ public interface ReactionPriority extends ReactionProperty
    * </p>
    * <!-- end-user-doc -->
    * @return the value of the '<em>Priority</em>' attribute.
-   * @see #setPriority(long)
+   * @see #setPriority(int)
    * @see org.yakindu.sct.model.stext.stext.StextPackage#getReactionPriority_Priority()
    * @model
    * @generated
    */
-  long getPriority();
+  int getPriority();
 
   /**
    * Sets the value of the '{@link org.yakindu.sct.model.stext.stext.ReactionPriority#getPriority <em>Priority</em>}' attribute.
@@ -49,6 +49,6 @@ public interface ReactionPriority extends ReactionProperty
    * @see #getPriority()
    * @generated
    */
-  void setPriority(long value);
+  void setPriority(int value);
 
 } // ReactionPriority

+ 3 - 3
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/TimeEventSpec.java

@@ -65,12 +65,12 @@ public interface TimeEventSpec extends EventSpec
    * </p>
    * <!-- end-user-doc -->
    * @return the value of the '<em>Value</em>' attribute.
-   * @see #setValue(long)
+   * @see #setValue(int)
    * @see org.yakindu.sct.model.stext.stext.StextPackage#getTimeEventSpec_Value()
    * @model
    * @generated
    */
-  long getValue();
+  int getValue();
 
   /**
    * Sets the value of the '{@link org.yakindu.sct.model.stext.stext.TimeEventSpec#getValue <em>Value</em>}' attribute.
@@ -80,7 +80,7 @@ public interface TimeEventSpec extends EventSpec
    * @see #getValue()
    * @generated
    */
-  void setValue(long value);
+  void setValue(int value);
 
   /**
    * Returns the value of the '<em><b>Unit</b></em>' attribute.

+ 6 - 6
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/IntLiteralImpl.java

@@ -38,7 +38,7 @@ public class IntLiteralImpl extends LiteralImpl implements IntLiteral
    * @generated
    * @ordered
    */
-  protected static final long VALUE_EDEFAULT = 0L;
+  protected static final int VALUE_EDEFAULT = 0;
 
   /**
    * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
@@ -48,7 +48,7 @@ public class IntLiteralImpl extends LiteralImpl implements IntLiteral
    * @generated
    * @ordered
    */
-  protected long value = VALUE_EDEFAULT;
+  protected int value = VALUE_EDEFAULT;
 
   /**
    * <!-- begin-user-doc -->
@@ -76,7 +76,7 @@ public class IntLiteralImpl extends LiteralImpl implements IntLiteral
    * <!-- end-user-doc -->
    * @generated
    */
-  public long getValue()
+  public int getValue()
   {
     return value;
   }
@@ -86,9 +86,9 @@ public class IntLiteralImpl extends LiteralImpl implements IntLiteral
    * <!-- end-user-doc -->
    * @generated
    */
-  public void setValue(long newValue)
+  public void setValue(int newValue)
   {
-    long oldValue = value;
+    int oldValue = value;
     value = newValue;
     if (eNotificationRequired())
       eNotify(new ENotificationImpl(this, Notification.SET, StextPackage.INT_LITERAL__VALUE, oldValue, value));
@@ -121,7 +121,7 @@ public class IntLiteralImpl extends LiteralImpl implements IntLiteral
     switch (featureID)
     {
       case StextPackage.INT_LITERAL__VALUE:
-        setValue((Long)newValue);
+        setValue((Integer)newValue);
         return;
     }
     super.eSet(featureID, newValue);

+ 6 - 6
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/ReactionPriorityImpl.java

@@ -38,7 +38,7 @@ public class ReactionPriorityImpl extends ReactionPropertyImpl implements Reacti
    * @generated
    * @ordered
    */
-  protected static final long PRIORITY_EDEFAULT = 0L;
+  protected static final int PRIORITY_EDEFAULT = 0;
 
   /**
    * The cached value of the '{@link #getPriority() <em>Priority</em>}' attribute.
@@ -48,7 +48,7 @@ public class ReactionPriorityImpl extends ReactionPropertyImpl implements Reacti
    * @generated
    * @ordered
    */
-  protected long priority = PRIORITY_EDEFAULT;
+  protected int priority = PRIORITY_EDEFAULT;
 
   /**
    * <!-- begin-user-doc -->
@@ -76,7 +76,7 @@ public class ReactionPriorityImpl extends ReactionPropertyImpl implements Reacti
    * <!-- end-user-doc -->
    * @generated
    */
-  public long getPriority()
+  public int getPriority()
   {
     return priority;
   }
@@ -86,9 +86,9 @@ public class ReactionPriorityImpl extends ReactionPropertyImpl implements Reacti
    * <!-- end-user-doc -->
    * @generated
    */
-  public void setPriority(long newPriority)
+  public void setPriority(int newPriority)
   {
-    long oldPriority = priority;
+    int oldPriority = priority;
     priority = newPriority;
     if (eNotificationRequired())
       eNotify(new ENotificationImpl(this, Notification.SET, StextPackage.REACTION_PRIORITY__PRIORITY, oldPriority, priority));
@@ -121,7 +121,7 @@ public class ReactionPriorityImpl extends ReactionPropertyImpl implements Reacti
     switch (featureID)
     {
       case StextPackage.REACTION_PRIORITY__PRIORITY:
-        setPriority((Long)newValue);
+        setPriority((Integer)newValue);
         return;
     }
     super.eSet(featureID, newValue);

+ 3 - 3
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/StextPackageImpl.java

@@ -2519,7 +2519,7 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
     initEClass(reactionPropertyEClass, ReactionProperty.class, "ReactionProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 
     initEClass(reactionPriorityEClass, ReactionPriority.class, "ReactionPriority", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-    initEAttribute(getReactionPriority_Priority(), ecorePackage.getELong(), "priority", null, 0, 1, ReactionPriority.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEAttribute(getReactionPriority_Priority(), ecorePackage.getEInt(), "priority", null, 0, 1, ReactionPriority.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
     initEClass(entryPointSpecEClass, EntryPointSpec.class, "EntryPointSpec", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
     initEReference(getEntryPointSpec_Entrypoint(), this.getEntrypoint(), null, "entrypoint", null, 0, 1, EntryPointSpec.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -2534,7 +2534,7 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
 
     initEClass(timeEventSpecEClass, TimeEventSpec.class, "TimeEventSpec", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
     initEAttribute(getTimeEventSpec_Type(), this.getTimeEventType(), "type", null, 0, 1, TimeEventSpec.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-    initEAttribute(getTimeEventSpec_Value(), ecorePackage.getELong(), "value", null, 0, 1, TimeEventSpec.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEAttribute(getTimeEventSpec_Value(), ecorePackage.getEInt(), "value", null, 0, 1, TimeEventSpec.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
     initEAttribute(getTimeEventSpec_Unit(), this.getTimeUnit(), "unit", null, 0, 1, TimeEventSpec.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
     initEClass(builtinEventSpecEClass, BuiltinEventSpec.class, "BuiltinEventSpec", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -2578,7 +2578,7 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
     initEAttribute(getBoolLiteral_Value(), ecorePackage.getEBoolean(), "value", null, 0, 1, BoolLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
     initEClass(intLiteralEClass, IntLiteral.class, "IntLiteral", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-    initEAttribute(getIntLiteral_Value(), ecorePackage.getELong(), "value", null, 0, 1, IntLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEAttribute(getIntLiteral_Value(), ecorePackage.getEInt(), "value", null, 0, 1, IntLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
     initEClass(realLiteralEClass, RealLiteral.class, "RealLiteral", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
     initEAttribute(getRealLiteral_Value(), ecorePackage.getEDouble(), "value", null, 0, 1, RealLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+ 6 - 6
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/TimeEventSpecImpl.java

@@ -62,7 +62,7 @@ public class TimeEventSpecImpl extends EventSpecImpl implements TimeEventSpec
    * @generated
    * @ordered
    */
-  protected static final long VALUE_EDEFAULT = 0L;
+  protected static final int VALUE_EDEFAULT = 0;
 
   /**
    * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
@@ -72,7 +72,7 @@ public class TimeEventSpecImpl extends EventSpecImpl implements TimeEventSpec
    * @generated
    * @ordered
    */
-  protected long value = VALUE_EDEFAULT;
+  protected int value = VALUE_EDEFAULT;
 
   /**
    * The default value of the '{@link #getUnit() <em>Unit</em>}' attribute.
@@ -143,7 +143,7 @@ public class TimeEventSpecImpl extends EventSpecImpl implements TimeEventSpec
    * <!-- end-user-doc -->
    * @generated
    */
-  public long getValue()
+  public int getValue()
   {
     return value;
   }
@@ -153,9 +153,9 @@ public class TimeEventSpecImpl extends EventSpecImpl implements TimeEventSpec
    * <!-- end-user-doc -->
    * @generated
    */
-  public void setValue(long newValue)
+  public void setValue(int newValue)
   {
-    long oldValue = value;
+    int oldValue = value;
     value = newValue;
     if (eNotificationRequired())
       eNotify(new ENotificationImpl(this, Notification.SET, StextPackage.TIME_EVENT_SPEC__VALUE, oldValue, value));
@@ -218,7 +218,7 @@ public class TimeEventSpecImpl extends EventSpecImpl implements TimeEventSpec
         setType((TimeEventType)newValue);
         return;
       case StextPackage.TIME_EVENT_SPEC__VALUE:
-        setValue((Long)newValue);
+        setValue((Integer)newValue);
         return;
       case StextPackage.TIME_EVENT_SPEC__UNIT:
         setUnit((TimeUnit)newValue);

+ 5 - 13
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/SText.xtext

@@ -1,4 +1,4 @@
-grammar org.yakindu.sct.model.stext.SText  hidden(WS, ML_COMMENT, SL_COMMENT)
+grammar org.yakindu.sct.model.stext.SText  with org.eclipse.xtext.common.Terminals
 
 generate stext "http://www.yakindu.org/sct/statechart/SText"
 import "platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore" as sct
@@ -127,7 +127,7 @@ ReactionProperty:
 	ReactionPriority | EntryPointSpec | ExitPointSpec;
 
 ReactionPriority:
-	priority=LONG_INT;
+	priority=INT;
 
 EntryPointSpec:
 	'>' entrypoint=[Entrypoint|FQN];
@@ -143,7 +143,7 @@ RegularEventSpec:
 
 	// TODO: redefine after trigger - we need to use it with clocks
 TimeEventSpec: 
-	type=TimeEventType value=LONG_INT (unit=TimeUnit)?;
+	type=TimeEventType value=INT (unit=TimeUnit)?;
 
 enum TimeEventType: after | every;
 
@@ -317,7 +317,7 @@ BoolLiteral:
 	{BoolLiteral} value=BOOL
 ;
 IntLiteral:
-	{IntLiteral} value = LONG_INT
+	{IntLiteral} value = INT
 ;
 RealLiteral: 
 	{RealLiteral} value = DOUBLE
@@ -326,8 +326,6 @@ HexLiteral:
 	{HexLiteral} value = HEX
 ;
 
-terminal LONG_INT returns ecore::ELong: ('0'..'9')+;
-
 terminal BOOL returns ecore::EBoolean:
 	'true' | 'false' | 'yes' | 'no';
 
@@ -336,13 +334,7 @@ terminal HEX returns ecore::ELong:
 ;
 
 terminal DOUBLE returns ecore::EDouble:
-	(LONG_INT '.' LONG_INT) ('e' ('-' | '+') LONG_INT)? ('f'|'F'|'d'|'D')?
-;
-terminal ID :
-	'^'?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
+	(INT '.' INT) ('e' ('-' | '+') INT)? ('f'|'F'|'d'|'D')?
 ;
-terminal ML_COMMENT	: '/*' -> '*/';
-terminal SL_COMMENT 	: '//' !('\n'|'\r')* ('\r'? '\n')?;
 
-terminal WS			: (' '|'\t'|'\r'|'\n')+;