use of org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens in project xtext-core by eclipse.
the class InternalBug317840TestLanguageParser method ruleNAME.
// $ANTLR end "entryRuleNAME"
// $ANTLR start "ruleNAME"
// InternalBug317840TestLanguage.g:249:1: ruleNAME returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) ;
public final AntlrDatatypeRuleToken ruleNAME() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_ID_0 = null;
Token kw = null;
Token this_ID_2 = null;
enterRule();
HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
try {
// InternalBug317840TestLanguage.g:256:2: ( (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) )
// InternalBug317840TestLanguage.g:257:2: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* )
{
// InternalBug317840TestLanguage.g:257:2: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* )
// InternalBug317840TestLanguage.g:258:3: this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )*
{
this_ID_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_6);
current.merge(this_ID_0);
newLeafNode(this_ID_0, grammarAccess.getNAMEAccess().getIDTerminalRuleCall_0());
// InternalBug317840TestLanguage.g:265:3: (kw= '.' this_ID_2= RULE_ID )*
loop4: do {
int alt4 = 2;
int LA4_0 = input.LA(1);
if ((LA4_0 == 12)) {
alt4 = 1;
}
switch(alt4) {
case 1:
// InternalBug317840TestLanguage.g:266:4: kw= '.' this_ID_2= RULE_ID
{
kw = (Token) match(input, 12, FollowSets000.FOLLOW_4);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNAMEAccess().getFullStopKeyword_1_0());
this_ID_2 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_6);
current.merge(this_ID_2);
newLeafNode(this_ID_2, grammarAccess.getNAMEAccess().getIDTerminalRuleCall_1_1());
}
break;
default:
break loop4;
}
} while (true);
}
}
leaveRule();
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
myHiddenTokenState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens in project xtext-core by eclipse.
the class InternalHiddenTerminalsTestLanguageParser method ruleHidingHiddens.
// $ANTLR end "entryRuleHidingHiddens"
// $ANTLR start "ruleHidingHiddens"
// InternalHiddenTerminalsTestLanguage.g:586:1: ruleHidingHiddens returns [EObject current=null] : (otherlv_0= 'hiding' ( (lv_space_1_0= RULE_WS ) ) ( (lv_called_2_0= ruleInheritingHiddensCall ) ) ) ;
public final EObject ruleHidingHiddens() throws RecognitionException {
EObject current = null;
Token otherlv_0 = null;
Token lv_space_1_0 = null;
EObject lv_called_2_0 = null;
enterRule();
HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
try {
// InternalHiddenTerminalsTestLanguage.g:593:2: ( (otherlv_0= 'hiding' ( (lv_space_1_0= RULE_WS ) ) ( (lv_called_2_0= ruleInheritingHiddensCall ) ) ) )
// InternalHiddenTerminalsTestLanguage.g:594:2: (otherlv_0= 'hiding' ( (lv_space_1_0= RULE_WS ) ) ( (lv_called_2_0= ruleInheritingHiddensCall ) ) )
{
// InternalHiddenTerminalsTestLanguage.g:594:2: (otherlv_0= 'hiding' ( (lv_space_1_0= RULE_WS ) ) ( (lv_called_2_0= ruleInheritingHiddensCall ) ) )
// InternalHiddenTerminalsTestLanguage.g:595:3: otherlv_0= 'hiding' ( (lv_space_1_0= RULE_WS ) ) ( (lv_called_2_0= ruleInheritingHiddensCall ) )
{
otherlv_0 = (Token) match(input, 19, FollowSets000.FOLLOW_3);
newLeafNode(otherlv_0, grammarAccess.getHidingHiddensAccess().getHidingKeyword_0());
// InternalHiddenTerminalsTestLanguage.g:599:3: ( (lv_space_1_0= RULE_WS ) )
// InternalHiddenTerminalsTestLanguage.g:600:4: (lv_space_1_0= RULE_WS )
{
// InternalHiddenTerminalsTestLanguage.g:600:4: (lv_space_1_0= RULE_WS )
// InternalHiddenTerminalsTestLanguage.g:601:5: lv_space_1_0= RULE_WS
{
lv_space_1_0 = (Token) match(input, RULE_WS, FollowSets000.FOLLOW_8);
newLeafNode(lv_space_1_0, grammarAccess.getHidingHiddensAccess().getSpaceWSTerminalRuleCall_1_0());
if (current == null) {
current = createModelElement(grammarAccess.getHidingHiddensRule());
}
setWithLastConsumed(current, "space", lv_space_1_0, "org.eclipse.xtext.parser.terminalrules.HiddenTerminalsTestLanguage.WS");
}
}
// InternalHiddenTerminalsTestLanguage.g:617:3: ( (lv_called_2_0= ruleInheritingHiddensCall ) )
// InternalHiddenTerminalsTestLanguage.g:618:4: (lv_called_2_0= ruleInheritingHiddensCall )
{
// InternalHiddenTerminalsTestLanguage.g:618:4: (lv_called_2_0= ruleInheritingHiddensCall )
// InternalHiddenTerminalsTestLanguage.g:619:5: lv_called_2_0= ruleInheritingHiddensCall
{
newCompositeNode(grammarAccess.getHidingHiddensAccess().getCalledInheritingHiddensCallParserRuleCall_2_0());
pushFollow(FollowSets000.FOLLOW_2);
lv_called_2_0 = ruleInheritingHiddensCall();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getHidingHiddensRule());
}
set(current, "called", lv_called_2_0, "org.eclipse.xtext.parser.terminalrules.HiddenTerminalsTestLanguage.InheritingHiddensCall");
afterParserOrEnumRuleCall();
}
}
}
}
leaveRule();
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
myHiddenTokenState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens in project xtext-core by eclipse.
the class InternalHiddenTerminalsTestLanguageParser method ruleOverridingHiddens.
// $ANTLR end "entryRuleOverridingHiddens"
// $ANTLR start "ruleOverridingHiddens"
// InternalHiddenTerminalsTestLanguage.g:266:1: ruleOverridingHiddens returns [EObject current=null] : (otherlv_0= 'overriding' otherlv_1= 'hiddens' otherlv_2= '(' ( (lv_called_3_0= ruleOverridingHiddensCall ) ) otherlv_4= ')' ( (lv_valid_5_0= ';' ) ) ) ;
public final EObject ruleOverridingHiddens() throws RecognitionException {
EObject current = null;
Token otherlv_0 = null;
Token otherlv_1 = null;
Token otherlv_2 = null;
Token otherlv_4 = null;
Token lv_valid_5_0 = null;
EObject lv_called_3_0 = null;
enterRule();
HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
try {
// InternalHiddenTerminalsTestLanguage.g:273:2: ( (otherlv_0= 'overriding' otherlv_1= 'hiddens' otherlv_2= '(' ( (lv_called_3_0= ruleOverridingHiddensCall ) ) otherlv_4= ')' ( (lv_valid_5_0= ';' ) ) ) )
// InternalHiddenTerminalsTestLanguage.g:274:2: (otherlv_0= 'overriding' otherlv_1= 'hiddens' otherlv_2= '(' ( (lv_called_3_0= ruleOverridingHiddensCall ) ) otherlv_4= ')' ( (lv_valid_5_0= ';' ) ) )
{
// InternalHiddenTerminalsTestLanguage.g:274:2: (otherlv_0= 'overriding' otherlv_1= 'hiddens' otherlv_2= '(' ( (lv_called_3_0= ruleOverridingHiddensCall ) ) otherlv_4= ')' ( (lv_valid_5_0= ';' ) ) )
// InternalHiddenTerminalsTestLanguage.g:275:3: otherlv_0= 'overriding' otherlv_1= 'hiddens' otherlv_2= '(' ( (lv_called_3_0= ruleOverridingHiddensCall ) ) otherlv_4= ')' ( (lv_valid_5_0= ';' ) )
{
otherlv_0 = (Token) match(input, 12, FollowSets000.FOLLOW_4);
newLeafNode(otherlv_0, grammarAccess.getOverridingHiddensAccess().getOverridingKeyword_0());
otherlv_1 = (Token) match(input, 9, FollowSets000.FOLLOW_7);
newLeafNode(otherlv_1, grammarAccess.getOverridingHiddensAccess().getHiddensKeyword_1());
otherlv_2 = (Token) match(input, 13, FollowSets000.FOLLOW_8);
newLeafNode(otherlv_2, grammarAccess.getOverridingHiddensAccess().getLeftParenthesisKeyword_2());
// InternalHiddenTerminalsTestLanguage.g:287:3: ( (lv_called_3_0= ruleOverridingHiddensCall ) )
// InternalHiddenTerminalsTestLanguage.g:288:4: (lv_called_3_0= ruleOverridingHiddensCall )
{
// InternalHiddenTerminalsTestLanguage.g:288:4: (lv_called_3_0= ruleOverridingHiddensCall )
// InternalHiddenTerminalsTestLanguage.g:289:5: lv_called_3_0= ruleOverridingHiddensCall
{
newCompositeNode(grammarAccess.getOverridingHiddensAccess().getCalledOverridingHiddensCallParserRuleCall_3_0());
pushFollow(FollowSets000.FOLLOW_9);
lv_called_3_0 = ruleOverridingHiddensCall();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getOverridingHiddensRule());
}
set(current, "called", lv_called_3_0, "org.eclipse.xtext.parser.terminalrules.HiddenTerminalsTestLanguage.OverridingHiddensCall");
afterParserOrEnumRuleCall();
}
}
otherlv_4 = (Token) match(input, 14, FollowSets000.FOLLOW_6);
newLeafNode(otherlv_4, grammarAccess.getOverridingHiddensAccess().getRightParenthesisKeyword_4());
// InternalHiddenTerminalsTestLanguage.g:310:3: ( (lv_valid_5_0= ';' ) )
// InternalHiddenTerminalsTestLanguage.g:311:4: (lv_valid_5_0= ';' )
{
// InternalHiddenTerminalsTestLanguage.g:311:4: (lv_valid_5_0= ';' )
// InternalHiddenTerminalsTestLanguage.g:312:5: lv_valid_5_0= ';'
{
lv_valid_5_0 = (Token) match(input, 10, FollowSets000.FOLLOW_2);
newLeafNode(lv_valid_5_0, grammarAccess.getOverridingHiddensAccess().getValidSemicolonKeyword_5_0());
if (current == null) {
current = createModelElement(grammarAccess.getOverridingHiddensRule());
}
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.HiddenTokens in project xtext-core by eclipse.
the class InternalHiddenTerminalsTestLanguageParser method ruleInheritingHiddens.
// $ANTLR end "entryRuleInheritingHiddens"
// $ANTLR start "ruleInheritingHiddens"
// InternalHiddenTerminalsTestLanguage.g:407:1: ruleInheritingHiddens returns [EObject current=null] : (otherlv_0= 'inheriting' otherlv_1= 'hiddens' otherlv_2= '(' ( ( (lv_called_3_0= ruleInheritingHiddensCall ) ) | ( (lv_hidingCalled_4_0= ruleHidingHiddens ) ) ) otherlv_5= ')' ( (lv_valid_6_0= ';' ) ) ) ;
public final EObject ruleInheritingHiddens() throws RecognitionException {
EObject current = null;
Token otherlv_0 = null;
Token otherlv_1 = null;
Token otherlv_2 = null;
Token otherlv_5 = null;
Token lv_valid_6_0 = null;
EObject lv_called_3_0 = null;
EObject lv_hidingCalled_4_0 = null;
enterRule();
HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
try {
// InternalHiddenTerminalsTestLanguage.g:414:2: ( (otherlv_0= 'inheriting' otherlv_1= 'hiddens' otherlv_2= '(' ( ( (lv_called_3_0= ruleInheritingHiddensCall ) ) | ( (lv_hidingCalled_4_0= ruleHidingHiddens ) ) ) otherlv_5= ')' ( (lv_valid_6_0= ';' ) ) ) )
// InternalHiddenTerminalsTestLanguage.g:415:2: (otherlv_0= 'inheriting' otherlv_1= 'hiddens' otherlv_2= '(' ( ( (lv_called_3_0= ruleInheritingHiddensCall ) ) | ( (lv_hidingCalled_4_0= ruleHidingHiddens ) ) ) otherlv_5= ')' ( (lv_valid_6_0= ';' ) ) )
{
// InternalHiddenTerminalsTestLanguage.g:415:2: (otherlv_0= 'inheriting' otherlv_1= 'hiddens' otherlv_2= '(' ( ( (lv_called_3_0= ruleInheritingHiddensCall ) ) | ( (lv_hidingCalled_4_0= ruleHidingHiddens ) ) ) otherlv_5= ')' ( (lv_valid_6_0= ';' ) ) )
// InternalHiddenTerminalsTestLanguage.g:416:3: otherlv_0= 'inheriting' otherlv_1= 'hiddens' otherlv_2= '(' ( ( (lv_called_3_0= ruleInheritingHiddensCall ) ) | ( (lv_hidingCalled_4_0= ruleHidingHiddens ) ) ) otherlv_5= ')' ( (lv_valid_6_0= ';' ) )
{
otherlv_0 = (Token) match(input, 16, FollowSets000.FOLLOW_4);
newLeafNode(otherlv_0, grammarAccess.getInheritingHiddensAccess().getInheritingKeyword_0());
otherlv_1 = (Token) match(input, 9, FollowSets000.FOLLOW_7);
newLeafNode(otherlv_1, grammarAccess.getInheritingHiddensAccess().getHiddensKeyword_1());
otherlv_2 = (Token) match(input, 13, FollowSets000.FOLLOW_10);
newLeafNode(otherlv_2, grammarAccess.getInheritingHiddensAccess().getLeftParenthesisKeyword_2());
// InternalHiddenTerminalsTestLanguage.g:428:3: ( ( (lv_called_3_0= ruleInheritingHiddensCall ) ) | ( (lv_hidingCalled_4_0= ruleHidingHiddens ) ) )
int alt4 = 2;
int LA4_0 = input.LA(1);
if ((LA4_0 == 15)) {
alt4 = 1;
} else if ((LA4_0 == 19)) {
alt4 = 2;
} else {
NoViableAltException nvae = new NoViableAltException("", 4, 0, input);
throw nvae;
}
switch(alt4) {
case 1:
// InternalHiddenTerminalsTestLanguage.g:429:4: ( (lv_called_3_0= ruleInheritingHiddensCall ) )
{
// InternalHiddenTerminalsTestLanguage.g:429:4: ( (lv_called_3_0= ruleInheritingHiddensCall ) )
// InternalHiddenTerminalsTestLanguage.g:430:5: (lv_called_3_0= ruleInheritingHiddensCall )
{
// InternalHiddenTerminalsTestLanguage.g:430:5: (lv_called_3_0= ruleInheritingHiddensCall )
// InternalHiddenTerminalsTestLanguage.g:431:6: lv_called_3_0= ruleInheritingHiddensCall
{
newCompositeNode(grammarAccess.getInheritingHiddensAccess().getCalledInheritingHiddensCallParserRuleCall_3_0_0());
pushFollow(FollowSets000.FOLLOW_9);
lv_called_3_0 = ruleInheritingHiddensCall();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getInheritingHiddensRule());
}
set(current, "called", lv_called_3_0, "org.eclipse.xtext.parser.terminalrules.HiddenTerminalsTestLanguage.InheritingHiddensCall");
afterParserOrEnumRuleCall();
}
}
}
break;
case 2:
// InternalHiddenTerminalsTestLanguage.g:449:4: ( (lv_hidingCalled_4_0= ruleHidingHiddens ) )
{
// InternalHiddenTerminalsTestLanguage.g:449:4: ( (lv_hidingCalled_4_0= ruleHidingHiddens ) )
// InternalHiddenTerminalsTestLanguage.g:450:5: (lv_hidingCalled_4_0= ruleHidingHiddens )
{
// InternalHiddenTerminalsTestLanguage.g:450:5: (lv_hidingCalled_4_0= ruleHidingHiddens )
// InternalHiddenTerminalsTestLanguage.g:451:6: lv_hidingCalled_4_0= ruleHidingHiddens
{
newCompositeNode(grammarAccess.getInheritingHiddensAccess().getHidingCalledHidingHiddensParserRuleCall_3_1_0());
pushFollow(FollowSets000.FOLLOW_9);
lv_hidingCalled_4_0 = ruleHidingHiddens();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getInheritingHiddensRule());
}
set(current, "hidingCalled", lv_hidingCalled_4_0, "org.eclipse.xtext.parser.terminalrules.HiddenTerminalsTestLanguage.HidingHiddens");
afterParserOrEnumRuleCall();
}
}
}
break;
}
otherlv_5 = (Token) match(input, 14, FollowSets000.FOLLOW_6);
newLeafNode(otherlv_5, grammarAccess.getInheritingHiddensAccess().getRightParenthesisKeyword_4());
// InternalHiddenTerminalsTestLanguage.g:473:3: ( (lv_valid_6_0= ';' ) )
// InternalHiddenTerminalsTestLanguage.g:474:4: (lv_valid_6_0= ';' )
{
// InternalHiddenTerminalsTestLanguage.g:474:4: (lv_valid_6_0= ';' )
// InternalHiddenTerminalsTestLanguage.g:475:5: lv_valid_6_0= ';'
{
lv_valid_6_0 = (Token) match(input, 10, FollowSets000.FOLLOW_2);
newLeafNode(lv_valid_6_0, grammarAccess.getInheritingHiddensAccess().getValidSemicolonKeyword_5_0());
if (current == null) {
current = createModelElement(grammarAccess.getInheritingHiddensRule());
}
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.HiddenTokens in project xtext-core by eclipse.
the class InternalHiddenTerminalsTestLanguageParser method entryRuleWithHiddens.
// $ANTLR end "ruleWithoutHiddens"
// $ANTLR start "entryRuleWithHiddens"
// InternalHiddenTerminalsTestLanguage.g:204:1: entryRuleWithHiddens returns [EObject current=null] : iv_ruleWithHiddens= ruleWithHiddens EOF ;
public final EObject entryRuleWithHiddens() throws RecognitionException {
EObject current = null;
EObject iv_ruleWithHiddens = null;
HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
try {
// InternalHiddenTerminalsTestLanguage.g:206:2: (iv_ruleWithHiddens= ruleWithHiddens EOF )
// InternalHiddenTerminalsTestLanguage.g:207:2: iv_ruleWithHiddens= ruleWithHiddens EOF
{
newCompositeNode(grammarAccess.getWithHiddensRule());
pushFollow(FollowSets000.FOLLOW_1);
iv_ruleWithHiddens = ruleWithHiddens();
state._fsp--;
current = iv_ruleWithHiddens;
match(input, EOF, FollowSets000.FOLLOW_2);
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
myHiddenTokenState.restore();
}
return current;
}
Aggregations