use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project xtext-core by eclipse.
the class InternalBug297105TestLanguageParser method entryRuleIntValue.
// $ANTLR end "ruleRealLiteral"
// $ANTLR start "entryRuleIntValue"
// InternalBug297105TestLanguage.g:281:1: entryRuleIntValue returns [String current=null] : iv_ruleIntValue= ruleIntValue EOF ;
public final String entryRuleIntValue() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleIntValue = null;
try {
// InternalBug297105TestLanguage.g:281:48: (iv_ruleIntValue= ruleIntValue EOF )
// InternalBug297105TestLanguage.g:282:2: iv_ruleIntValue= ruleIntValue EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getIntValueRule());
}
pushFollow(FollowSets000.FOLLOW_1);
iv_ruleIntValue = ruleIntValue();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleIntValue.getText();
}
match(input, EOF, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
}
} 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 InternalBug297105TestLanguageParser method ruleRealValue.
// $ANTLR end "entryRuleRealValue"
// $ANTLR start "ruleRealValue"
// InternalBug297105TestLanguage.g:312:1: ruleRealValue returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : this_Real_0= ruleReal ;
public final AntlrDatatypeRuleToken ruleRealValue() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
AntlrDatatypeRuleToken this_Real_0 = null;
enterRule();
try {
// InternalBug297105TestLanguage.g:318:2: (this_Real_0= ruleReal )
// InternalBug297105TestLanguage.g:319:2: this_Real_0= ruleReal
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getRealValueAccess().getRealParserRuleCall());
}
pushFollow(FollowSets000.FOLLOW_2);
this_Real_0 = ruleReal();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_Real_0);
}
if (state.backtracking == 0) {
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 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.AntlrDatatypeRuleToken in project xtext-core by eclipse.
the class InternalBug378967TestLanguageParser method entryRuleAfter.
// $ANTLR end "ruleSObj"
// $ANTLR start "entryRuleAfter"
// InternalBug378967TestLanguage.g:495:1: entryRuleAfter returns [String current=null] : iv_ruleAfter= ruleAfter EOF ;
public final String entryRuleAfter() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleAfter = null;
try {
// InternalBug378967TestLanguage.g:495:45: (iv_ruleAfter= ruleAfter EOF )
// InternalBug378967TestLanguage.g:496:2: iv_ruleAfter= ruleAfter EOF
{
newCompositeNode(grammarAccess.getAfterRule());
pushFollow(FollowSets000.FOLLOW_1);
iv_ruleAfter = ruleAfter();
state._fsp--;
current = iv_ruleAfter.getText();
match(input, EOF, FollowSets000.FOLLOW_2);
}
} 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 InternalBug406914TestLanguageParser method ruleBS_ESCAPE.
// $ANTLR end "entryRuleBS_ESCAPE"
// $ANTLR start "ruleBS_ESCAPE"
// InternalBug406914TestLanguage.g:115:1: ruleBS_ESCAPE returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= '\\b' | kw= '\\f' | kw= '\\n' | kw= 'lineFeed' | kw= '\\r' | kw= '\\t' | kw= '\\\\' ) ;
public final AntlrDatatypeRuleToken ruleBS_ESCAPE() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw = null;
enterRule();
try {
// InternalBug406914TestLanguage.g:121:2: ( (kw= '\\b' | kw= '\\f' | kw= '\\n' | kw= 'lineFeed' | kw= '\\r' | kw= '\\t' | kw= '\\\\' ) )
// InternalBug406914TestLanguage.g:122:2: (kw= '\\b' | kw= '\\f' | kw= '\\n' | kw= 'lineFeed' | kw= '\\r' | kw= '\\t' | kw= '\\\\' )
{
// InternalBug406914TestLanguage.g:122:2: (kw= '\\b' | kw= '\\f' | kw= '\\n' | kw= 'lineFeed' | kw= '\\r' | kw= '\\t' | kw= '\\\\' )
int alt1 = 7;
switch(input.LA(1)) {
case 7:
{
alt1 = 1;
}
break;
case 8:
{
alt1 = 2;
}
break;
case 9:
{
alt1 = 3;
}
break;
case 10:
{
alt1 = 4;
}
break;
case 11:
{
alt1 = 5;
}
break;
case 12:
{
alt1 = 6;
}
break;
case 13:
{
alt1 = 7;
}
break;
default:
NoViableAltException nvae = new NoViableAltException("", 1, 0, input);
throw nvae;
}
switch(alt1) {
case 1:
// InternalBug406914TestLanguage.g:123:3: kw= '\\b'
{
kw = (Token) match(input, 7, FollowSets000.FOLLOW_2);
current.merge(kw);
newLeafNode(kw, grammarAccess.getBS_ESCAPEAccess().getBackspaceKeyword_0());
}
break;
case 2:
// InternalBug406914TestLanguage.g:129:3: kw= '\\f'
{
kw = (Token) match(input, 8, FollowSets000.FOLLOW_2);
current.merge(kw);
newLeafNode(kw, grammarAccess.getBS_ESCAPEAccess().getFormFeedKeyword_1());
}
break;
case 3:
// InternalBug406914TestLanguage.g:135:3: kw= '\\n'
{
kw = (Token) match(input, 9, FollowSets000.FOLLOW_2);
current.merge(kw);
newLeafNode(kw, grammarAccess.getBS_ESCAPEAccess().getLineFeedKeyword_2());
}
break;
case 4:
// InternalBug406914TestLanguage.g:141:3: kw= 'lineFeed'
{
kw = (Token) match(input, 10, FollowSets000.FOLLOW_2);
current.merge(kw);
newLeafNode(kw, grammarAccess.getBS_ESCAPEAccess().getLineFeedKeyword_3());
}
break;
case 5:
// InternalBug406914TestLanguage.g:147:3: kw= '\\r'
{
kw = (Token) match(input, 11, FollowSets000.FOLLOW_2);
current.merge(kw);
newLeafNode(kw, grammarAccess.getBS_ESCAPEAccess().getCarriageReturnKeyword_4());
}
break;
case 6:
// InternalBug406914TestLanguage.g:153:3: kw= '\\t'
{
kw = (Token) match(input, 12, FollowSets000.FOLLOW_2);
current.merge(kw);
newLeafNode(kw, grammarAccess.getBS_ESCAPEAccess().getTabKeyword_5());
}
break;
case 7:
// InternalBug406914TestLanguage.g:159:3: kw= '\\\\'
{
kw = (Token) match(input, 13, FollowSets000.FOLLOW_2);
current.merge(kw);
newLeafNode(kw, grammarAccess.getBS_ESCAPEAccess().getBackslashKeyword_6());
}
break;
}
}
leaveRule();
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
Aggregations