use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project xtext-core by eclipse.
the class InternalParametersTestLanguageParser method norm1_Scenario2.
// $ANTLR end "ruleScenario2"
// $ANTLR start "norm1_Scenario2"
// InternalParametersTestLanguage.g:662:1: norm1_Scenario2 returns [EObject current=null] : ( (lv_first_0_0= norm1_IdOrKeyword ) ) ;
public final EObject norm1_Scenario2() throws RecognitionException {
EObject current = null;
AntlrDatatypeRuleToken lv_first_0_0 = null;
enterRule();
try {
// InternalParametersTestLanguage.g:668:2: ( ( (lv_first_0_0= norm1_IdOrKeyword ) ) )
// InternalParametersTestLanguage.g:669:2: ( (lv_first_0_0= norm1_IdOrKeyword ) )
{
// InternalParametersTestLanguage.g:669:2: ( (lv_first_0_0= norm1_IdOrKeyword ) )
// InternalParametersTestLanguage.g:670:3: (lv_first_0_0= norm1_IdOrKeyword )
{
// InternalParametersTestLanguage.g:670:3: (lv_first_0_0= norm1_IdOrKeyword )
// InternalParametersTestLanguage.g:671:4: lv_first_0_0= norm1_IdOrKeyword
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getScenario2Access().getFirstIdOrKeywordParserRuleCall_0());
}
pushFollow(FollowSets000.FOLLOW_2);
lv_first_0_0 = norm1_IdOrKeyword();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getScenario2Rule());
}
set(current, "first", lv_first_0_0, "org.eclipse.xtext.parser.parameters.ParametersTestLanguage.IdOrKeyword");
afterParserOrEnumRuleCall();
}
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project xtext-core by eclipse.
the class InternalTwoParametersTestLanguageParser method norm1_IdOrKeyword.
// $ANTLR end "ruleIdOrKeyword"
// $ANTLR start "norm1_IdOrKeyword"
// InternalTwoParametersTestLanguage.g:1072:1: norm1_IdOrKeyword returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= 'keyword' | this_ID_1= RULE_ID ) ;
public final AntlrDatatypeRuleToken norm1_IdOrKeyword() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw = null;
Token this_ID_1 = null;
enterRule();
try {
// InternalTwoParametersTestLanguage.g:1078:2: ( (kw= 'keyword' | this_ID_1= RULE_ID ) )
// InternalTwoParametersTestLanguage.g:1079:2: (kw= 'keyword' | this_ID_1= RULE_ID )
{
// InternalTwoParametersTestLanguage.g:1079:2: (kw= 'keyword' | this_ID_1= RULE_ID )
int alt15 = 2;
int LA15_0 = input.LA(1);
if ((LA15_0 == 20)) {
alt15 = 1;
} else if ((LA15_0 == RULE_ID)) {
alt15 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 15, 0, input);
throw nvae;
}
switch(alt15) {
case 1:
// InternalTwoParametersTestLanguage.g:1080:3: kw= 'keyword'
{
kw = (Token) match(input, 20, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getIdOrKeywordAccess().getKeywordKeyword_0_0());
}
}
break;
case 2:
// InternalTwoParametersTestLanguage.g:1086:3: this_ID_1= RULE_ID
{
this_ID_1 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_ID_1);
}
if (state.backtracking == 0) {
newLeafNode(this_ID_1, grammarAccess.getIdOrKeywordAccess().getIDTerminalRuleCall_1());
}
}
break;
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project xtext-core by eclipse.
the class InternalTwoParametersTestLanguageParser method norm7_IdOrKeyword2.
// $ANTLR end "norm6_IdOrKeyword2"
// $ANTLR start "norm7_IdOrKeyword2"
// InternalTwoParametersTestLanguage.g:1022:1: norm7_IdOrKeyword2 returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= 'keyword' | this_ID_1= RULE_ID ) ;
public final AntlrDatatypeRuleToken norm7_IdOrKeyword2() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw = null;
Token this_ID_1 = null;
enterRule();
try {
// InternalTwoParametersTestLanguage.g:1028:2: ( (kw= 'keyword' | this_ID_1= RULE_ID ) )
// InternalTwoParametersTestLanguage.g:1029:2: (kw= 'keyword' | this_ID_1= RULE_ID )
{
// InternalTwoParametersTestLanguage.g:1029:2: (kw= 'keyword' | this_ID_1= RULE_ID )
int alt14 = 2;
int LA14_0 = input.LA(1);
if ((LA14_0 == 20)) {
alt14 = 1;
} else if ((LA14_0 == RULE_ID)) {
alt14 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 14, 0, input);
throw nvae;
}
switch(alt14) {
case 1:
// InternalTwoParametersTestLanguage.g:1030:3: kw= 'keyword'
{
kw = (Token) match(input, 20, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getIdOrKeyword2Access().getKeywordKeyword_0_0());
}
}
break;
case 2:
// InternalTwoParametersTestLanguage.g:1036:3: this_ID_1= RULE_ID
{
this_ID_1 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_ID_1);
}
if (state.backtracking == 0) {
newLeafNode(this_ID_1, grammarAccess.getIdOrKeyword2Access().getIDTerminalRuleCall_1());
}
}
break;
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project xtext-core by eclipse.
the class InternalTwoParametersTestLanguageParser method norm3_Scenario8.
// $ANTLR end "ruleScenario8"
// $ANTLR start "norm3_Scenario8"
// InternalTwoParametersTestLanguage.g:870:1: norm3_Scenario8 returns [EObject current=null] : ( ( ( ( norm7_IdOrKeyword2 ) )=> (lv_second_0_0= norm7_IdOrKeyword2 ) ) otherlv_1= 'keyword' ) ;
public final EObject norm3_Scenario8() throws RecognitionException {
EObject current = null;
Token otherlv_1 = null;
AntlrDatatypeRuleToken lv_second_0_0 = null;
enterRule();
try {
// InternalTwoParametersTestLanguage.g:876:2: ( ( ( ( ( norm7_IdOrKeyword2 ) )=> (lv_second_0_0= norm7_IdOrKeyword2 ) ) otherlv_1= 'keyword' ) )
// InternalTwoParametersTestLanguage.g:877:2: ( ( ( ( norm7_IdOrKeyword2 ) )=> (lv_second_0_0= norm7_IdOrKeyword2 ) ) otherlv_1= 'keyword' )
{
// InternalTwoParametersTestLanguage.g:877:2: ( ( ( ( norm7_IdOrKeyword2 ) )=> (lv_second_0_0= norm7_IdOrKeyword2 ) ) otherlv_1= 'keyword' )
// InternalTwoParametersTestLanguage.g:878:3: ( ( ( norm7_IdOrKeyword2 ) )=> (lv_second_0_0= norm7_IdOrKeyword2 ) ) otherlv_1= 'keyword'
{
// InternalTwoParametersTestLanguage.g:878:3: ( ( ( norm7_IdOrKeyword2 ) )=> (lv_second_0_0= norm7_IdOrKeyword2 ) )
// InternalTwoParametersTestLanguage.g:879:4: ( ( norm7_IdOrKeyword2 ) )=> (lv_second_0_0= norm7_IdOrKeyword2 )
{
// InternalTwoParametersTestLanguage.g:883:4: (lv_second_0_0= norm7_IdOrKeyword2 )
// InternalTwoParametersTestLanguage.g:884:5: lv_second_0_0= norm7_IdOrKeyword2
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getScenario8Access().getSecondIdOrKeyword2ParserRuleCall_0_0());
}
pushFollow(FollowSets000.FOLLOW_6);
lv_second_0_0 = norm7_IdOrKeyword2();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getScenario8Rule());
}
set(current, "second", lv_second_0_0, "org.eclipse.xtext.parser.parameters.TwoParametersTestLanguage.IdOrKeyword2");
afterParserOrEnumRuleCall();
}
}
}
otherlv_1 = (Token) match(input, 20, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_1, grammarAccess.getScenario8Access().getKeywordKeyword_1());
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project xtext-core by eclipse.
the class InternalTwoParametersTestLanguageParser method norm2_Scenario6.
// $ANTLR end "ruleScenario6"
// $ANTLR start "norm2_Scenario6"
// InternalTwoParametersTestLanguage.g:662:1: norm2_Scenario6 returns [EObject current=null] : ( (lv_first_0_0= norm2_IdOrKeyword2 ) ) ;
public final EObject norm2_Scenario6() throws RecognitionException {
EObject current = null;
AntlrDatatypeRuleToken lv_first_0_0 = null;
enterRule();
try {
// InternalTwoParametersTestLanguage.g:668:2: ( ( (lv_first_0_0= norm2_IdOrKeyword2 ) ) )
// InternalTwoParametersTestLanguage.g:669:2: ( (lv_first_0_0= norm2_IdOrKeyword2 ) )
{
// InternalTwoParametersTestLanguage.g:669:2: ( (lv_first_0_0= norm2_IdOrKeyword2 ) )
// InternalTwoParametersTestLanguage.g:670:3: (lv_first_0_0= norm2_IdOrKeyword2 )
{
// InternalTwoParametersTestLanguage.g:670:3: (lv_first_0_0= norm2_IdOrKeyword2 )
// InternalTwoParametersTestLanguage.g:671:4: lv_first_0_0= norm2_IdOrKeyword2
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getScenario6Access().getFirstIdOrKeyword2ParserRuleCall_0());
}
pushFollow(FollowSets000.FOLLOW_2);
lv_first_0_0 = norm2_IdOrKeyword2();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getScenario6Rule());
}
set(current, "first", lv_first_0_0, "org.eclipse.xtext.parser.parameters.TwoParametersTestLanguage.IdOrKeyword2");
afterParserOrEnumRuleCall();
}
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
Aggregations