use of org.eclipse.xtext.parser.antlr.XtextTokenStream in project xtext-core by eclipse.
the class InternalHiddenTerminalsTestLanguageParser method ruleOverridingHiddensCall.
// $ANTLR end "entryRuleOverridingHiddensCall"
// $ANTLR start "ruleOverridingHiddensCall"
// InternalHiddenTerminalsTestLanguage.g:343:1: ruleOverridingHiddensCall returns [EObject current=null] : (otherlv_0= 'call' ( (lv_spaces_1_0= RULE_WS ) )? ( (lv_valid_2_0= ';' ) ) ) ;
public final EObject ruleOverridingHiddensCall() throws RecognitionException {
EObject current = null;
Token otherlv_0 = null;
Token lv_spaces_1_0 = null;
Token lv_valid_2_0 = null;
enterRule();
HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
try {
// InternalHiddenTerminalsTestLanguage.g:350:2: ( (otherlv_0= 'call' ( (lv_spaces_1_0= RULE_WS ) )? ( (lv_valid_2_0= ';' ) ) ) )
// InternalHiddenTerminalsTestLanguage.g:351:2: (otherlv_0= 'call' ( (lv_spaces_1_0= RULE_WS ) )? ( (lv_valid_2_0= ';' ) ) )
{
// InternalHiddenTerminalsTestLanguage.g:351:2: (otherlv_0= 'call' ( (lv_spaces_1_0= RULE_WS ) )? ( (lv_valid_2_0= ';' ) ) )
// InternalHiddenTerminalsTestLanguage.g:352:3: otherlv_0= 'call' ( (lv_spaces_1_0= RULE_WS ) )? ( (lv_valid_2_0= ';' ) )
{
otherlv_0 = (Token) match(input, 15, FollowSets000.FOLLOW_5);
newLeafNode(otherlv_0, grammarAccess.getOverridingHiddensCallAccess().getCallKeyword_0());
// InternalHiddenTerminalsTestLanguage.g:356:3: ( (lv_spaces_1_0= RULE_WS ) )?
int alt3 = 2;
int LA3_0 = input.LA(1);
if ((LA3_0 == RULE_WS)) {
alt3 = 1;
}
switch(alt3) {
case 1:
// InternalHiddenTerminalsTestLanguage.g:357:4: (lv_spaces_1_0= RULE_WS )
{
// InternalHiddenTerminalsTestLanguage.g:357:4: (lv_spaces_1_0= RULE_WS )
// InternalHiddenTerminalsTestLanguage.g:358:5: lv_spaces_1_0= RULE_WS
{
lv_spaces_1_0 = (Token) match(input, RULE_WS, FollowSets000.FOLLOW_6);
newLeafNode(lv_spaces_1_0, grammarAccess.getOverridingHiddensCallAccess().getSpacesWSTerminalRuleCall_1_0());
if (current == null) {
current = createModelElement(grammarAccess.getOverridingHiddensCallRule());
}
addWithLastConsumed(current, "spaces", lv_spaces_1_0, "org.eclipse.xtext.parser.terminalrules.HiddenTerminalsTestLanguage.WS");
}
}
break;
}
// InternalHiddenTerminalsTestLanguage.g:374:3: ( (lv_valid_2_0= ';' ) )
// InternalHiddenTerminalsTestLanguage.g:375:4: (lv_valid_2_0= ';' )
{
// InternalHiddenTerminalsTestLanguage.g:375:4: (lv_valid_2_0= ';' )
// InternalHiddenTerminalsTestLanguage.g:376:5: lv_valid_2_0= ';'
{
lv_valid_2_0 = (Token) match(input, 10, FollowSets000.FOLLOW_2);
newLeafNode(lv_valid_2_0, grammarAccess.getOverridingHiddensCallAccess().getValidSemicolonKeyword_2_0());
if (current == null) {
current = createModelElement(grammarAccess.getOverridingHiddensCallRule());
}
setWithLastConsumed(current, "valid", true, ";");
}
}
}
}
leaveRule();
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
myHiddenTokenState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.XtextTokenStream in project xtext-core by eclipse.
the class InternalHiddenTerminalsTestLanguageParser method entryRuleHidingHiddens.
// $ANTLR end "ruleDatatypeRule"
// $ANTLR start "entryRuleHidingHiddens"
// InternalHiddenTerminalsTestLanguage.g:574:1: entryRuleHidingHiddens returns [EObject current=null] : iv_ruleHidingHiddens= ruleHidingHiddens EOF ;
public final EObject entryRuleHidingHiddens() throws RecognitionException {
EObject current = null;
EObject iv_ruleHidingHiddens = null;
HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
try {
// InternalHiddenTerminalsTestLanguage.g:576:2: (iv_ruleHidingHiddens= ruleHidingHiddens EOF )
// InternalHiddenTerminalsTestLanguage.g:577:2: iv_ruleHidingHiddens= ruleHidingHiddens EOF
{
newCompositeNode(grammarAccess.getHidingHiddensRule());
pushFollow(FollowSets000.FOLLOW_1);
iv_ruleHidingHiddens = ruleHidingHiddens();
state._fsp--;
current = iv_ruleHidingHiddens;
match(input, EOF, FollowSets000.FOLLOW_2);
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
myHiddenTokenState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.XtextTokenStream in project xtext-core by eclipse.
the class InternalSimpleBeeLangTestLanguageParser method entryRulePath.
// $ANTLR end "ruleRequiredCapability"
// $ANTLR start "entryRulePath"
// InternalSimpleBeeLangTestLanguage.g:1414:1: entryRulePath returns [String current=null] : iv_rulePath= rulePath EOF ;
public final String entryRulePath() throws RecognitionException {
String current = null;
int entryRulePath_StartIndex = input.index();
AntlrDatatypeRuleToken iv_rulePath = null;
HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 13)) {
return current;
}
// InternalSimpleBeeLangTestLanguage.g:1416:2: (iv_rulePath= rulePath EOF )
// InternalSimpleBeeLangTestLanguage.g:1417:2: iv_rulePath= rulePath EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getPathRule());
}
pushFollow(FollowSets000.FOLLOW_1);
iv_rulePath = rulePath();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_rulePath.getText();
}
match(input, EOF, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
if (state.backtracking > 0) {
memoize(input, 13, entryRulePath_StartIndex);
}
myHiddenTokenState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.XtextTokenStream in project xtext-core by eclipse.
the class InternalExBeeLangTestLanguageParser method rulePath.
// $ANTLR end "entryRulePath"
// $ANTLR start "rulePath"
// InternalExBeeLangTestLanguageParser.g:1419:1: rulePath returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_STRING_0= RULE_STRING | ( (kw= Solidus )? this_QID_2= ruleQID (kw= Solidus this_QID_4= ruleQID )* (kw= Solidus )? ) ) ;
public final AntlrDatatypeRuleToken rulePath() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
int rulePath_StartIndex = input.index();
Token this_STRING_0 = null;
Token kw = null;
AntlrDatatypeRuleToken this_QID_2 = null;
AntlrDatatypeRuleToken this_QID_4 = null;
enterRule();
HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 14)) {
return current;
}
// InternalExBeeLangTestLanguageParser.g:1426:2: ( (this_STRING_0= RULE_STRING | ( (kw= Solidus )? this_QID_2= ruleQID (kw= Solidus this_QID_4= ruleQID )* (kw= Solidus )? ) ) )
// InternalExBeeLangTestLanguageParser.g:1427:2: (this_STRING_0= RULE_STRING | ( (kw= Solidus )? this_QID_2= ruleQID (kw= Solidus this_QID_4= ruleQID )* (kw= Solidus )? ) )
{
// InternalExBeeLangTestLanguageParser.g:1427:2: (this_STRING_0= RULE_STRING | ( (kw= Solidus )? this_QID_2= ruleQID (kw= Solidus this_QID_4= ruleQID )* (kw= Solidus )? ) )
int alt25 = 2;
int LA25_0 = input.LA(1);
if ((LA25_0 == RULE_STRING)) {
alt25 = 1;
} else if ((LA25_0 == Solidus || LA25_0 == RULE_ID)) {
alt25 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 25, 0, input);
throw nvae;
}
switch(alt25) {
case 1:
// InternalExBeeLangTestLanguageParser.g:1428:3: this_STRING_0= RULE_STRING
{
this_STRING_0 = (Token) match(input, RULE_STRING, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_STRING_0);
}
if (state.backtracking == 0) {
newLeafNode(this_STRING_0, grammarAccess.getPathAccess().getSTRINGTerminalRuleCall_0());
}
}
break;
case 2:
// InternalExBeeLangTestLanguageParser.g:1436:3: ( (kw= Solidus )? this_QID_2= ruleQID (kw= Solidus this_QID_4= ruleQID )* (kw= Solidus )? )
{
// InternalExBeeLangTestLanguageParser.g:1436:3: ( (kw= Solidus )? this_QID_2= ruleQID (kw= Solidus this_QID_4= ruleQID )* (kw= Solidus )? )
// InternalExBeeLangTestLanguageParser.g:1437:4: (kw= Solidus )? this_QID_2= ruleQID (kw= Solidus this_QID_4= ruleQID )* (kw= Solidus )?
{
// InternalExBeeLangTestLanguageParser.g:1437:4: (kw= Solidus )?
int alt22 = 2;
int LA22_0 = input.LA(1);
if ((LA22_0 == Solidus)) {
alt22 = 1;
}
switch(alt22) {
case 1:
// InternalExBeeLangTestLanguageParser.g:1438:5: kw= Solidus
{
kw = (Token) match(input, Solidus, FollowSets000.FOLLOW_13);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getPathAccess().getSolidusKeyword_1_0());
}
}
break;
}
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getPathAccess().getQIDParserRuleCall_1_1());
}
pushFollow(FollowSets000.FOLLOW_25);
this_QID_2 = ruleQID();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_QID_2);
}
if (state.backtracking == 0) {
afterParserOrEnumRuleCall();
}
// InternalExBeeLangTestLanguageParser.g:1454:4: (kw= Solidus this_QID_4= ruleQID )*
loop23: do {
int alt23 = 2;
int LA23_0 = input.LA(1);
if ((LA23_0 == Solidus)) {
int LA23_1 = input.LA(2);
if ((LA23_1 == RULE_ID)) {
alt23 = 1;
}
}
switch(alt23) {
case 1:
// InternalExBeeLangTestLanguageParser.g:1455:5: kw= Solidus this_QID_4= ruleQID
{
kw = (Token) match(input, Solidus, FollowSets000.FOLLOW_13);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getPathAccess().getSolidusKeyword_1_2_0());
}
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getPathAccess().getQIDParserRuleCall_1_2_1());
}
pushFollow(FollowSets000.FOLLOW_25);
this_QID_4 = ruleQID();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_QID_4);
}
if (state.backtracking == 0) {
afterParserOrEnumRuleCall();
}
}
break;
default:
break loop23;
}
} while (true);
// InternalExBeeLangTestLanguageParser.g:1471:4: (kw= Solidus )?
int alt24 = 2;
int LA24_0 = input.LA(1);
if ((LA24_0 == Solidus)) {
alt24 = 1;
}
switch(alt24) {
case 1:
// InternalExBeeLangTestLanguageParser.g:1472:5: kw= Solidus
{
kw = (Token) match(input, Solidus, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getPathAccess().getSolidusKeyword_1_3());
}
}
break;
}
}
}
break;
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
if (state.backtracking > 0) {
memoize(input, 14, rulePath_StartIndex);
}
myHiddenTokenState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.XtextTokenStream in project xtext-core by eclipse.
the class InternalExBeeLangTestLanguageParser method ruleQID.
// $ANTLR end "entryRuleQID"
// $ANTLR start "ruleQID"
// InternalExBeeLangTestLanguageParser.g:5417:1: ruleQID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )* (kw= FullStop this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )* ) ;
public final AntlrDatatypeRuleToken ruleQID() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
int ruleQID_StartIndex = input.index();
Token this_ID_0 = null;
Token this_INT_1 = null;
Token this_HEX_2 = null;
Token this_ID_3 = null;
Token kw = null;
Token this_ID_5 = null;
Token this_INT_6 = null;
Token this_HEX_7 = null;
Token this_ID_8 = null;
enterRule();
HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 114)) {
return current;
}
// InternalExBeeLangTestLanguageParser.g:5424:2: ( (this_ID_0= RULE_ID (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )* (kw= FullStop this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )* ) )
// InternalExBeeLangTestLanguageParser.g:5425:2: (this_ID_0= RULE_ID (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )* (kw= FullStop this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )* )
{
// InternalExBeeLangTestLanguageParser.g:5425:2: (this_ID_0= RULE_ID (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )* (kw= FullStop this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )* )
// InternalExBeeLangTestLanguageParser.g:5426:3: this_ID_0= RULE_ID (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )* (kw= FullStop this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )*
{
this_ID_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_76);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_ID_0);
}
if (state.backtracking == 0) {
newLeafNode(this_ID_0, grammarAccess.getQIDAccess().getIDTerminalRuleCall_0());
}
// InternalExBeeLangTestLanguageParser.g:5433:3: (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )*
loop93: do {
int alt93 = 4;
switch(input.LA(1)) {
case RULE_INT:
{
alt93 = 1;
}
break;
case RULE_HEX:
{
alt93 = 2;
}
break;
case RULE_ID:
{
alt93 = 3;
}
break;
}
switch(alt93) {
case 1:
// InternalExBeeLangTestLanguageParser.g:5434:4: this_INT_1= RULE_INT
{
this_INT_1 = (Token) match(input, RULE_INT, FollowSets000.FOLLOW_76);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_INT_1);
}
if (state.backtracking == 0) {
newLeafNode(this_INT_1, grammarAccess.getQIDAccess().getINTTerminalRuleCall_1_0());
}
}
break;
case 2:
// InternalExBeeLangTestLanguageParser.g:5442:4: this_HEX_2= RULE_HEX
{
this_HEX_2 = (Token) match(input, RULE_HEX, FollowSets000.FOLLOW_76);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_HEX_2);
}
if (state.backtracking == 0) {
newLeafNode(this_HEX_2, grammarAccess.getQIDAccess().getHEXTerminalRuleCall_1_1());
}
}
break;
case 3:
// InternalExBeeLangTestLanguageParser.g:5450:4: this_ID_3= RULE_ID
{
this_ID_3 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_76);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_ID_3);
}
if (state.backtracking == 0) {
newLeafNode(this_ID_3, grammarAccess.getQIDAccess().getIDTerminalRuleCall_1_2());
}
}
break;
default:
break loop93;
}
} while (true);
// InternalExBeeLangTestLanguageParser.g:5458:3: (kw= FullStop this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )*
loop95: do {
int alt95 = 2;
int LA95_0 = input.LA(1);
if ((LA95_0 == FullStop)) {
alt95 = 1;
}
switch(alt95) {
case 1:
// InternalExBeeLangTestLanguageParser.g:5459:4: kw= FullStop this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )*
{
kw = (Token) match(input, FullStop, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getQIDAccess().getFullStopKeyword_2_0());
}
this_ID_5 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_76);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_ID_5);
}
if (state.backtracking == 0) {
newLeafNode(this_ID_5, grammarAccess.getQIDAccess().getIDTerminalRuleCall_2_1());
}
// InternalExBeeLangTestLanguageParser.g:5471:4: (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )*
loop94: do {
int alt94 = 4;
switch(input.LA(1)) {
case RULE_INT:
{
alt94 = 1;
}
break;
case RULE_HEX:
{
alt94 = 2;
}
break;
case RULE_ID:
{
alt94 = 3;
}
break;
}
switch(alt94) {
case 1:
// InternalExBeeLangTestLanguageParser.g:5472:5: this_INT_6= RULE_INT
{
this_INT_6 = (Token) match(input, RULE_INT, FollowSets000.FOLLOW_76);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_INT_6);
}
if (state.backtracking == 0) {
newLeafNode(this_INT_6, grammarAccess.getQIDAccess().getINTTerminalRuleCall_2_2_0());
}
}
break;
case 2:
// InternalExBeeLangTestLanguageParser.g:5480:5: this_HEX_7= RULE_HEX
{
this_HEX_7 = (Token) match(input, RULE_HEX, FollowSets000.FOLLOW_76);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_HEX_7);
}
if (state.backtracking == 0) {
newLeafNode(this_HEX_7, grammarAccess.getQIDAccess().getHEXTerminalRuleCall_2_2_1());
}
}
break;
case 3:
// InternalExBeeLangTestLanguageParser.g:5488:5: this_ID_8= RULE_ID
{
this_ID_8 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_76);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_ID_8);
}
if (state.backtracking == 0) {
newLeafNode(this_ID_8, grammarAccess.getQIDAccess().getIDTerminalRuleCall_2_2_2());
}
}
break;
default:
break loop94;
}
} while (true);
}
break;
default:
break loop95;
}
} while (true);
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
if (state.backtracking > 0) {
memoize(input, 114, ruleQID_StartIndex);
}
myHiddenTokenState.restore();
}
return current;
}
Aggregations