use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project xtext-core by eclipse.
the class InternalXtextGrammarTestLanguageParser method ruleNamedArgument.
// $ANTLR end "entryRuleNamedArgument"
// $ANTLR start "ruleNamedArgument"
// InternalXtextGrammarTestLanguage.g:1660:1: ruleNamedArgument returns [EObject current=null] : ( () ( ( ( (lv_literalValue_1_0= ruleLiteralValue ) )? ( (otherlv_2= RULE_ID ) ) ) | ( ( (otherlv_3= RULE_ID ) ) otherlv_4= '=' ( (otherlv_5= RULE_ID ) ) ) ) ) ;
public final EObject ruleNamedArgument() throws RecognitionException {
EObject current = null;
Token otherlv_2 = null;
Token otherlv_3 = null;
Token otherlv_4 = null;
Token otherlv_5 = null;
AntlrDatatypeRuleToken lv_literalValue_1_0 = null;
enterRule();
try {
// InternalXtextGrammarTestLanguage.g:1666:2: ( ( () ( ( ( (lv_literalValue_1_0= ruleLiteralValue ) )? ( (otherlv_2= RULE_ID ) ) ) | ( ( (otherlv_3= RULE_ID ) ) otherlv_4= '=' ( (otherlv_5= RULE_ID ) ) ) ) ) )
// InternalXtextGrammarTestLanguage.g:1667:2: ( () ( ( ( (lv_literalValue_1_0= ruleLiteralValue ) )? ( (otherlv_2= RULE_ID ) ) ) | ( ( (otherlv_3= RULE_ID ) ) otherlv_4= '=' ( (otherlv_5= RULE_ID ) ) ) ) )
{
// InternalXtextGrammarTestLanguage.g:1667:2: ( () ( ( ( (lv_literalValue_1_0= ruleLiteralValue ) )? ( (otherlv_2= RULE_ID ) ) ) | ( ( (otherlv_3= RULE_ID ) ) otherlv_4= '=' ( (otherlv_5= RULE_ID ) ) ) ) )
// InternalXtextGrammarTestLanguage.g:1668:3: () ( ( ( (lv_literalValue_1_0= ruleLiteralValue ) )? ( (otherlv_2= RULE_ID ) ) ) | ( ( (otherlv_3= RULE_ID ) ) otherlv_4= '=' ( (otherlv_5= RULE_ID ) ) ) )
{
// InternalXtextGrammarTestLanguage.g:1668:3: ()
// InternalXtextGrammarTestLanguage.g:1669:4:
{
current = forceCreateModelElement(grammarAccess.getNamedArgumentAccess().getNamedArgumentAction_0(), current);
}
// InternalXtextGrammarTestLanguage.g:1675:3: ( ( ( (lv_literalValue_1_0= ruleLiteralValue ) )? ( (otherlv_2= RULE_ID ) ) ) | ( ( (otherlv_3= RULE_ID ) ) otherlv_4= '=' ( (otherlv_5= RULE_ID ) ) ) )
int alt40 = 2;
int LA40_0 = input.LA(1);
if ((LA40_0 == 32 || LA40_0 == 38)) {
alt40 = 1;
} else if ((LA40_0 == RULE_ID)) {
int LA40_2 = input.LA(2);
if ((LA40_2 == 34)) {
alt40 = 2;
} else if ((LA40_2 == EOF || LA40_2 == 13 || LA40_2 == 26)) {
alt40 = 1;
} else {
NoViableAltException nvae = new NoViableAltException("", 40, 2, input);
throw nvae;
}
} else {
NoViableAltException nvae = new NoViableAltException("", 40, 0, input);
throw nvae;
}
switch(alt40) {
case 1:
// InternalXtextGrammarTestLanguage.g:1676:4: ( ( (lv_literalValue_1_0= ruleLiteralValue ) )? ( (otherlv_2= RULE_ID ) ) )
{
// InternalXtextGrammarTestLanguage.g:1676:4: ( ( (lv_literalValue_1_0= ruleLiteralValue ) )? ( (otherlv_2= RULE_ID ) ) )
// InternalXtextGrammarTestLanguage.g:1677:5: ( (lv_literalValue_1_0= ruleLiteralValue ) )? ( (otherlv_2= RULE_ID ) )
{
// InternalXtextGrammarTestLanguage.g:1677:5: ( (lv_literalValue_1_0= ruleLiteralValue ) )?
int alt39 = 2;
int LA39_0 = input.LA(1);
if ((LA39_0 == 32 || LA39_0 == 38)) {
alt39 = 1;
}
switch(alt39) {
case 1:
// InternalXtextGrammarTestLanguage.g:1678:6: (lv_literalValue_1_0= ruleLiteralValue )
{
// InternalXtextGrammarTestLanguage.g:1678:6: (lv_literalValue_1_0= ruleLiteralValue )
// InternalXtextGrammarTestLanguage.g:1679:7: lv_literalValue_1_0= ruleLiteralValue
{
newCompositeNode(grammarAccess.getNamedArgumentAccess().getLiteralValueLiteralValueParserRuleCall_1_0_0_0());
pushFollow(FollowSets000.FOLLOW_3);
lv_literalValue_1_0 = ruleLiteralValue();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getNamedArgumentRule());
}
set(current, "literalValue", lv_literalValue_1_0, "org.eclipse.xtext.XtextGrammarTestLanguage.LiteralValue");
afterParserOrEnumRuleCall();
}
}
break;
}
// InternalXtextGrammarTestLanguage.g:1696:5: ( (otherlv_2= RULE_ID ) )
// InternalXtextGrammarTestLanguage.g:1697:6: (otherlv_2= RULE_ID )
{
// InternalXtextGrammarTestLanguage.g:1697:6: (otherlv_2= RULE_ID )
// InternalXtextGrammarTestLanguage.g:1698:7: otherlv_2= RULE_ID
{
if (current == null) {
current = createModelElement(grammarAccess.getNamedArgumentRule());
}
otherlv_2 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_2);
newLeafNode(otherlv_2, grammarAccess.getNamedArgumentAccess().getParameterParameterCrossReference_1_0_1_0());
}
}
}
}
break;
case 2:
// InternalXtextGrammarTestLanguage.g:1711:4: ( ( (otherlv_3= RULE_ID ) ) otherlv_4= '=' ( (otherlv_5= RULE_ID ) ) )
{
// InternalXtextGrammarTestLanguage.g:1711:4: ( ( (otherlv_3= RULE_ID ) ) otherlv_4= '=' ( (otherlv_5= RULE_ID ) ) )
// InternalXtextGrammarTestLanguage.g:1712:5: ( (otherlv_3= RULE_ID ) ) otherlv_4= '=' ( (otherlv_5= RULE_ID ) )
{
// InternalXtextGrammarTestLanguage.g:1712:5: ( (otherlv_3= RULE_ID ) )
// InternalXtextGrammarTestLanguage.g:1713:6: (otherlv_3= RULE_ID )
{
// InternalXtextGrammarTestLanguage.g:1713:6: (otherlv_3= RULE_ID )
// InternalXtextGrammarTestLanguage.g:1714:7: otherlv_3= RULE_ID
{
if (current == null) {
current = createModelElement(grammarAccess.getNamedArgumentRule());
}
otherlv_3 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_36);
newLeafNode(otherlv_3, grammarAccess.getNamedArgumentAccess().getParameterParameterCrossReference_1_1_0_0());
}
}
otherlv_4 = (Token) match(input, 34, FollowSets000.FOLLOW_3);
newLeafNode(otherlv_4, grammarAccess.getNamedArgumentAccess().getEqualsSignKeyword_1_1_1());
// InternalXtextGrammarTestLanguage.g:1729:5: ( (otherlv_5= RULE_ID ) )
// InternalXtextGrammarTestLanguage.g:1730:6: (otherlv_5= RULE_ID )
{
// InternalXtextGrammarTestLanguage.g:1730:6: (otherlv_5= RULE_ID )
// InternalXtextGrammarTestLanguage.g:1731:7: otherlv_5= RULE_ID
{
if (current == null) {
current = createModelElement(grammarAccess.getNamedArgumentRule());
}
otherlv_5 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_2);
newLeafNode(otherlv_5, grammarAccess.getNamedArgumentAccess().getValueParameterCrossReference_1_1_2_0());
}
}
}
}
break;
}
}
}
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 InternalBug296889ExTestLanguageParser method ruleDataTypeExpression.
// $ANTLR end "entryRuleDataTypeExpression"
// $ANTLR start "ruleDataTypeExpression"
// InternalBug296889ExTestLanguage.g:354:1: ruleDataTypeExpression returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_DataTypePostop_0= ruleDataTypePostop | this_DataTypePreop_1= ruleDataTypePreop ) ;
public final AntlrDatatypeRuleToken ruleDataTypeExpression() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
AntlrDatatypeRuleToken this_DataTypePostop_0 = null;
AntlrDatatypeRuleToken this_DataTypePreop_1 = null;
enterRule();
try {
// InternalBug296889ExTestLanguage.g:360:2: ( (this_DataTypePostop_0= ruleDataTypePostop | this_DataTypePreop_1= ruleDataTypePreop ) )
// InternalBug296889ExTestLanguage.g:361:2: (this_DataTypePostop_0= ruleDataTypePostop | this_DataTypePreop_1= ruleDataTypePreop )
{
// InternalBug296889ExTestLanguage.g:361:2: (this_DataTypePostop_0= ruleDataTypePostop | this_DataTypePreop_1= ruleDataTypePreop )
int alt6 = 2;
int LA6_0 = input.LA(1);
if ((LA6_0 == RULE_ID)) {
alt6 = 1;
} else if ((LA6_0 == 13)) {
alt6 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 6, 0, input);
throw nvae;
}
switch(alt6) {
case 1:
// InternalBug296889ExTestLanguage.g:362:3: this_DataTypePostop_0= ruleDataTypePostop
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getDataTypeExpressionAccess().getDataTypePostopParserRuleCall_0());
}
pushFollow(FollowSets000.FOLLOW_2);
this_DataTypePostop_0 = ruleDataTypePostop();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_DataTypePostop_0);
}
if (state.backtracking == 0) {
afterParserOrEnumRuleCall();
}
}
break;
case 2:
// InternalBug296889ExTestLanguage.g:373:3: this_DataTypePreop_1= ruleDataTypePreop
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getDataTypeExpressionAccess().getDataTypePreopParserRuleCall_1());
}
pushFollow(FollowSets000.FOLLOW_2);
this_DataTypePreop_1 = ruleDataTypePreop();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_DataTypePreop_1);
}
if (state.backtracking == 0) {
afterParserOrEnumRuleCall();
}
}
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 InternalBug296889ExTestLanguageParser method ruleDataTypePostop.
// $ANTLR end "entryRuleDataTypePostop"
// $ANTLR start "ruleDataTypePostop"
// InternalBug296889ExTestLanguage.g:428:1: ruleDataTypePostop returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_DataTypeVariable_0= ruleDataTypeVariable (kw= '--' )? ) ;
public final AntlrDatatypeRuleToken ruleDataTypePostop() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw = null;
AntlrDatatypeRuleToken this_DataTypeVariable_0 = null;
enterRule();
try {
// InternalBug296889ExTestLanguage.g:434:2: ( (this_DataTypeVariable_0= ruleDataTypeVariable (kw= '--' )? ) )
// InternalBug296889ExTestLanguage.g:435:2: (this_DataTypeVariable_0= ruleDataTypeVariable (kw= '--' )? )
{
// InternalBug296889ExTestLanguage.g:435:2: (this_DataTypeVariable_0= ruleDataTypeVariable (kw= '--' )? )
// InternalBug296889ExTestLanguage.g:436:3: this_DataTypeVariable_0= ruleDataTypeVariable (kw= '--' )?
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getDataTypePostopAccess().getDataTypeVariableParserRuleCall_0());
}
pushFollow(FollowSets000.FOLLOW_5);
this_DataTypeVariable_0 = ruleDataTypeVariable();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_DataTypeVariable_0);
}
if (state.backtracking == 0) {
afterParserOrEnumRuleCall();
}
// InternalBug296889ExTestLanguage.g:446:3: (kw= '--' )?
int alt7 = 2;
int LA7_0 = input.LA(1);
if ((LA7_0 == 13)) {
int LA7_1 = input.LA(2);
if ((LA7_1 == RULE_ID)) {
int LA7_3 = input.LA(3);
if ((synpred7_InternalBug296889ExTestLanguage())) {
alt7 = 1;
}
} else if ((LA7_1 == EOF || LA7_1 == 13)) {
alt7 = 1;
}
}
switch(alt7) {
case 1:
// InternalBug296889ExTestLanguage.g:447:4: kw= '--'
{
kw = (Token) match(input, 13, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getDataTypePostopAccess().getHyphenMinusHyphenMinusKeyword_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 InternalBug296889ExTestLanguageParser method entryRuleDataTypePostop.
// $ANTLR end "ruleDataTypePreop"
// $ANTLR start "entryRuleDataTypePostop"
// InternalBug296889ExTestLanguage.g:421:1: entryRuleDataTypePostop returns [String current=null] : iv_ruleDataTypePostop= ruleDataTypePostop EOF ;
public final String entryRuleDataTypePostop() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleDataTypePostop = null;
try {
// InternalBug296889ExTestLanguage.g:421:54: (iv_ruleDataTypePostop= ruleDataTypePostop EOF )
// InternalBug296889ExTestLanguage.g:422:2: iv_ruleDataTypePostop= ruleDataTypePostop EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getDataTypePostopRule());
}
pushFollow(FollowSets000.FOLLOW_1);
iv_ruleDataTypePostop = ruleDataTypePostop();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleDataTypePostop.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 InternalBug296889ExTestLanguageParser method ruleDataTypeVariable.
// $ANTLR end "entryRuleDataTypeVariable"
// $ANTLR start "ruleDataTypeVariable"
// InternalBug296889ExTestLanguage.g:464:1: ruleDataTypeVariable returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : this_ID_0= RULE_ID ;
public final AntlrDatatypeRuleToken ruleDataTypeVariable() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_ID_0 = null;
enterRule();
try {
// InternalBug296889ExTestLanguage.g:470:2: (this_ID_0= RULE_ID )
// InternalBug296889ExTestLanguage.g:471:2: this_ID_0= RULE_ID
{
this_ID_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_ID_0);
}
if (state.backtracking == 0) {
newLeafNode(this_ID_0, grammarAccess.getDataTypeVariableAccess().getIDTerminalRuleCall());
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
Aggregations