use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project n4js by eclipse.
the class InternalTypesParser method ruleTObjectPrototype.
// $ANTLR end "entryRuleTObjectPrototype"
// $ANTLR start "ruleTObjectPrototype"
// InternalTypesParser.g:1202:1: ruleTObjectPrototype returns [EObject current=null] : ( ( (lv_declaredTypeAccessModifier_0_0= ruleTypeAccessModifier ) ) ( (lv_declaredProvidedByRuntime_1_0= ProvidedByRuntime ) )? ( (lv_declaredFinal_2_0= Final ) )? otherlv_3= Object ( (lv_name_4_0= ruleBindingTypesIdentifier ) ) (this_TypeVariables_5= ruleTypeVariables[$current] )? (otherlv_6= Extends ( (lv_superType_7_0= ruleParameterizedTypeRefNominal ) ) )? (otherlv_8= Indexed ( (lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal ) ) )? ( ( ( CommercialAt ( ( RULE_IDENTIFIER ) ) ) )=> (lv_annotations_10_0= ruleTAnnotation ) )* otherlv_11= LeftCurlyBracket ( (lv_ownedMembers_12_0= ruleTMember ) )* ( ( (lv_callableCtor_13_0= ruleCallableCtor ) ) ( (lv_ownedMembers_14_0= ruleTMember ) )* )? otherlv_15= RightCurlyBracket ) ;
public final EObject ruleTObjectPrototype() throws RecognitionException {
EObject current = null;
Token lv_declaredProvidedByRuntime_1_0 = null;
Token lv_declaredFinal_2_0 = null;
Token otherlv_3 = null;
Token otherlv_6 = null;
Token otherlv_8 = null;
Token otherlv_11 = null;
Token otherlv_15 = null;
Enumerator lv_declaredTypeAccessModifier_0_0 = null;
AntlrDatatypeRuleToken lv_name_4_0 = null;
EObject this_TypeVariables_5 = null;
EObject lv_superType_7_0 = null;
EObject lv_declaredElementType_9_0 = null;
EObject lv_annotations_10_0 = null;
EObject lv_ownedMembers_12_0 = null;
EObject lv_callableCtor_13_0 = null;
EObject lv_ownedMembers_14_0 = null;
enterRule();
try {
// InternalTypesParser.g:1208:2: ( ( ( (lv_declaredTypeAccessModifier_0_0= ruleTypeAccessModifier ) ) ( (lv_declaredProvidedByRuntime_1_0= ProvidedByRuntime ) )? ( (lv_declaredFinal_2_0= Final ) )? otherlv_3= Object ( (lv_name_4_0= ruleBindingTypesIdentifier ) ) (this_TypeVariables_5= ruleTypeVariables[$current] )? (otherlv_6= Extends ( (lv_superType_7_0= ruleParameterizedTypeRefNominal ) ) )? (otherlv_8= Indexed ( (lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal ) ) )? ( ( ( CommercialAt ( ( RULE_IDENTIFIER ) ) ) )=> (lv_annotations_10_0= ruleTAnnotation ) )* otherlv_11= LeftCurlyBracket ( (lv_ownedMembers_12_0= ruleTMember ) )* ( ( (lv_callableCtor_13_0= ruleCallableCtor ) ) ( (lv_ownedMembers_14_0= ruleTMember ) )* )? otherlv_15= RightCurlyBracket ) )
// InternalTypesParser.g:1209:2: ( ( (lv_declaredTypeAccessModifier_0_0= ruleTypeAccessModifier ) ) ( (lv_declaredProvidedByRuntime_1_0= ProvidedByRuntime ) )? ( (lv_declaredFinal_2_0= Final ) )? otherlv_3= Object ( (lv_name_4_0= ruleBindingTypesIdentifier ) ) (this_TypeVariables_5= ruleTypeVariables[$current] )? (otherlv_6= Extends ( (lv_superType_7_0= ruleParameterizedTypeRefNominal ) ) )? (otherlv_8= Indexed ( (lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal ) ) )? ( ( ( CommercialAt ( ( RULE_IDENTIFIER ) ) ) )=> (lv_annotations_10_0= ruleTAnnotation ) )* otherlv_11= LeftCurlyBracket ( (lv_ownedMembers_12_0= ruleTMember ) )* ( ( (lv_callableCtor_13_0= ruleCallableCtor ) ) ( (lv_ownedMembers_14_0= ruleTMember ) )* )? otherlv_15= RightCurlyBracket )
{
// InternalTypesParser.g:1209:2: ( ( (lv_declaredTypeAccessModifier_0_0= ruleTypeAccessModifier ) ) ( (lv_declaredProvidedByRuntime_1_0= ProvidedByRuntime ) )? ( (lv_declaredFinal_2_0= Final ) )? otherlv_3= Object ( (lv_name_4_0= ruleBindingTypesIdentifier ) ) (this_TypeVariables_5= ruleTypeVariables[$current] )? (otherlv_6= Extends ( (lv_superType_7_0= ruleParameterizedTypeRefNominal ) ) )? (otherlv_8= Indexed ( (lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal ) ) )? ( ( ( CommercialAt ( ( RULE_IDENTIFIER ) ) ) )=> (lv_annotations_10_0= ruleTAnnotation ) )* otherlv_11= LeftCurlyBracket ( (lv_ownedMembers_12_0= ruleTMember ) )* ( ( (lv_callableCtor_13_0= ruleCallableCtor ) ) ( (lv_ownedMembers_14_0= ruleTMember ) )* )? otherlv_15= RightCurlyBracket )
// InternalTypesParser.g:1210:3: ( (lv_declaredTypeAccessModifier_0_0= ruleTypeAccessModifier ) ) ( (lv_declaredProvidedByRuntime_1_0= ProvidedByRuntime ) )? ( (lv_declaredFinal_2_0= Final ) )? otherlv_3= Object ( (lv_name_4_0= ruleBindingTypesIdentifier ) ) (this_TypeVariables_5= ruleTypeVariables[$current] )? (otherlv_6= Extends ( (lv_superType_7_0= ruleParameterizedTypeRefNominal ) ) )? (otherlv_8= Indexed ( (lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal ) ) )? ( ( ( CommercialAt ( ( RULE_IDENTIFIER ) ) ) )=> (lv_annotations_10_0= ruleTAnnotation ) )* otherlv_11= LeftCurlyBracket ( (lv_ownedMembers_12_0= ruleTMember ) )* ( ( (lv_callableCtor_13_0= ruleCallableCtor ) ) ( (lv_ownedMembers_14_0= ruleTMember ) )* )? otherlv_15= RightCurlyBracket
{
// InternalTypesParser.g:1210:3: ( (lv_declaredTypeAccessModifier_0_0= ruleTypeAccessModifier ) )
// InternalTypesParser.g:1211:4: (lv_declaredTypeAccessModifier_0_0= ruleTypeAccessModifier )
{
// InternalTypesParser.g:1211:4: (lv_declaredTypeAccessModifier_0_0= ruleTypeAccessModifier )
// InternalTypesParser.g:1212:5: lv_declaredTypeAccessModifier_0_0= ruleTypeAccessModifier
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getTObjectPrototypeAccess().getDeclaredTypeAccessModifierTypeAccessModifierEnumRuleCall_0_0());
}
pushFollow(FOLLOW_24);
lv_declaredTypeAccessModifier_0_0 = ruleTypeAccessModifier();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getTObjectPrototypeRule());
}
set(current, "declaredTypeAccessModifier", lv_declaredTypeAccessModifier_0_0, "org.eclipse.n4js.ts.Types.TypeAccessModifier");
afterParserOrEnumRuleCall();
}
}
}
// InternalTypesParser.g:1229:3: ( (lv_declaredProvidedByRuntime_1_0= ProvidedByRuntime ) )?
int alt19 = 2;
int LA19_0 = input.LA(1);
if ((LA19_0 == ProvidedByRuntime)) {
alt19 = 1;
}
switch(alt19) {
case 1:
// InternalTypesParser.g:1230:4: (lv_declaredProvidedByRuntime_1_0= ProvidedByRuntime )
{
// InternalTypesParser.g:1230:4: (lv_declaredProvidedByRuntime_1_0= ProvidedByRuntime )
// InternalTypesParser.g:1231:5: lv_declaredProvidedByRuntime_1_0= ProvidedByRuntime
{
lv_declaredProvidedByRuntime_1_0 = (Token) match(input, ProvidedByRuntime, FOLLOW_25);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_declaredProvidedByRuntime_1_0, grammarAccess.getTObjectPrototypeAccess().getDeclaredProvidedByRuntimeProvidedByRuntimeKeyword_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getTObjectPrototypeRule());
}
setWithLastConsumed(current, "declaredProvidedByRuntime", true, "providedByRuntime");
}
}
}
break;
}
// InternalTypesParser.g:1243:3: ( (lv_declaredFinal_2_0= Final ) )?
int alt20 = 2;
int LA20_0 = input.LA(1);
if ((LA20_0 == Final)) {
alt20 = 1;
}
switch(alt20) {
case 1:
// InternalTypesParser.g:1244:4: (lv_declaredFinal_2_0= Final )
{
// InternalTypesParser.g:1244:4: (lv_declaredFinal_2_0= Final )
// InternalTypesParser.g:1245:5: lv_declaredFinal_2_0= Final
{
lv_declaredFinal_2_0 = (Token) match(input, Final, FOLLOW_26);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_declaredFinal_2_0, grammarAccess.getTObjectPrototypeAccess().getDeclaredFinalFinalKeyword_2_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getTObjectPrototypeRule());
}
setWithLastConsumed(current, "declaredFinal", true, "final");
}
}
}
break;
}
otherlv_3 = (Token) match(input, Object, FOLLOW_10);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_3, grammarAccess.getTObjectPrototypeAccess().getObjectKeyword_3());
}
// InternalTypesParser.g:1261:3: ( (lv_name_4_0= ruleBindingTypesIdentifier ) )
// InternalTypesParser.g:1262:4: (lv_name_4_0= ruleBindingTypesIdentifier )
{
// InternalTypesParser.g:1262:4: (lv_name_4_0= ruleBindingTypesIdentifier )
// InternalTypesParser.g:1263:5: lv_name_4_0= ruleBindingTypesIdentifier
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getTObjectPrototypeAccess().getNameBindingTypesIdentifierParserRuleCall_4_0());
}
pushFollow(FOLLOW_27);
lv_name_4_0 = ruleBindingTypesIdentifier();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getTObjectPrototypeRule());
}
set(current, "name", lv_name_4_0, "org.eclipse.n4js.ts.Types.BindingTypesIdentifier");
afterParserOrEnumRuleCall();
}
}
}
// InternalTypesParser.g:1280:3: (this_TypeVariables_5= ruleTypeVariables[$current] )?
int alt21 = 2;
int LA21_0 = input.LA(1);
if ((LA21_0 == LessThanSign)) {
alt21 = 1;
}
switch(alt21) {
case 1:
// InternalTypesParser.g:1281:4: this_TypeVariables_5= ruleTypeVariables[$current]
{
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getTObjectPrototypeRule());
}
newCompositeNode(grammarAccess.getTObjectPrototypeAccess().getTypeVariablesParserRuleCall_5());
}
pushFollow(FOLLOW_28);
this_TypeVariables_5 = ruleTypeVariables(current);
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = this_TypeVariables_5;
afterParserOrEnumRuleCall();
}
}
break;
}
// InternalTypesParser.g:1293:3: (otherlv_6= Extends ( (lv_superType_7_0= ruleParameterizedTypeRefNominal ) ) )?
int alt22 = 2;
int LA22_0 = input.LA(1);
if ((LA22_0 == Extends)) {
alt22 = 1;
}
switch(alt22) {
case 1:
// InternalTypesParser.g:1294:4: otherlv_6= Extends ( (lv_superType_7_0= ruleParameterizedTypeRefNominal ) )
{
otherlv_6 = (Token) match(input, Extends, FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_6, grammarAccess.getTObjectPrototypeAccess().getExtendsKeyword_6_0());
}
// InternalTypesParser.g:1298:4: ( (lv_superType_7_0= ruleParameterizedTypeRefNominal ) )
// InternalTypesParser.g:1299:5: (lv_superType_7_0= ruleParameterizedTypeRefNominal )
{
// InternalTypesParser.g:1299:5: (lv_superType_7_0= ruleParameterizedTypeRefNominal )
// InternalTypesParser.g:1300:6: lv_superType_7_0= ruleParameterizedTypeRefNominal
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getTObjectPrototypeAccess().getSuperTypeParameterizedTypeRefNominalParserRuleCall_6_1_0());
}
pushFollow(FOLLOW_29);
lv_superType_7_0 = ruleParameterizedTypeRefNominal();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getTObjectPrototypeRule());
}
set(current, "superType", lv_superType_7_0, "org.eclipse.n4js.ts.TypeExpressions.ParameterizedTypeRefNominal");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
// InternalTypesParser.g:1318:3: (otherlv_8= Indexed ( (lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal ) ) )?
int alt23 = 2;
int LA23_0 = input.LA(1);
if ((LA23_0 == Indexed)) {
alt23 = 1;
}
switch(alt23) {
case 1:
// InternalTypesParser.g:1319:4: otherlv_8= Indexed ( (lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal ) )
{
otherlv_8 = (Token) match(input, Indexed, FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_8, grammarAccess.getTObjectPrototypeAccess().getIndexedKeyword_7_0());
}
// InternalTypesParser.g:1323:4: ( (lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal ) )
// InternalTypesParser.g:1324:5: (lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal )
{
// InternalTypesParser.g:1324:5: (lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal )
// InternalTypesParser.g:1325:6: lv_declaredElementType_9_0= ruleParameterizedTypeRefNominal
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getTObjectPrototypeAccess().getDeclaredElementTypeParameterizedTypeRefNominalParserRuleCall_7_1_0());
}
pushFollow(FOLLOW_30);
lv_declaredElementType_9_0 = ruleParameterizedTypeRefNominal();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getTObjectPrototypeRule());
}
set(current, "declaredElementType", lv_declaredElementType_9_0, "org.eclipse.n4js.ts.TypeExpressions.ParameterizedTypeRefNominal");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
// InternalTypesParser.g:1343:3: ( ( ( CommercialAt ( ( RULE_IDENTIFIER ) ) ) )=> (lv_annotations_10_0= ruleTAnnotation ) )*
loop24: do {
int alt24 = 2;
int LA24_0 = input.LA(1);
if ((LA24_0 == CommercialAt) && (synpred3_InternalTypesParser())) {
alt24 = 1;
}
switch(alt24) {
case 1:
// InternalTypesParser.g:1344:4: ( ( CommercialAt ( ( RULE_IDENTIFIER ) ) ) )=> (lv_annotations_10_0= ruleTAnnotation )
{
// InternalTypesParser.g:1353:4: (lv_annotations_10_0= ruleTAnnotation )
// InternalTypesParser.g:1354:5: lv_annotations_10_0= ruleTAnnotation
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getTObjectPrototypeAccess().getAnnotationsTAnnotationParserRuleCall_8_0());
}
pushFollow(FOLLOW_30);
lv_annotations_10_0 = ruleTAnnotation();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getTObjectPrototypeRule());
}
add(current, "annotations", lv_annotations_10_0, "org.eclipse.n4js.ts.Types.TAnnotation");
afterParserOrEnumRuleCall();
}
}
}
break;
default:
break loop24;
}
} while (true);
otherlv_11 = (Token) match(input, LeftCurlyBracket, FOLLOW_31);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_11, grammarAccess.getTObjectPrototypeAccess().getLeftCurlyBracketKeyword_9());
}
// InternalTypesParser.g:1375:3: ( (lv_ownedMembers_12_0= ruleTMember ) )*
loop25: do {
int alt25 = 2;
int LA25_0 = input.LA(1);
if ((LA25_0 == ProtectedInternal || LA25_0 == PublicInternal || LA25_0 == Protected || (LA25_0 >= Private && LA25_0 <= Project) || LA25_0 == Public)) {
alt25 = 1;
}
switch(alt25) {
case 1:
// InternalTypesParser.g:1376:4: (lv_ownedMembers_12_0= ruleTMember )
{
// InternalTypesParser.g:1376:4: (lv_ownedMembers_12_0= ruleTMember )
// InternalTypesParser.g:1377:5: lv_ownedMembers_12_0= ruleTMember
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getTObjectPrototypeAccess().getOwnedMembersTMemberParserRuleCall_10_0());
}
pushFollow(FOLLOW_31);
lv_ownedMembers_12_0 = ruleTMember();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getTObjectPrototypeRule());
}
add(current, "ownedMembers", lv_ownedMembers_12_0, "org.eclipse.n4js.ts.Types.TMember");
afterParserOrEnumRuleCall();
}
}
}
break;
default:
break loop25;
}
} while (true);
// InternalTypesParser.g:1394:3: ( ( (lv_callableCtor_13_0= ruleCallableCtor ) ) ( (lv_ownedMembers_14_0= ruleTMember ) )* )?
int alt27 = 2;
int LA27_0 = input.LA(1);
if ((LA27_0 == LeftParenthesis)) {
alt27 = 1;
}
switch(alt27) {
case 1:
// InternalTypesParser.g:1395:4: ( (lv_callableCtor_13_0= ruleCallableCtor ) ) ( (lv_ownedMembers_14_0= ruleTMember ) )*
{
// InternalTypesParser.g:1395:4: ( (lv_callableCtor_13_0= ruleCallableCtor ) )
// InternalTypesParser.g:1396:5: (lv_callableCtor_13_0= ruleCallableCtor )
{
// InternalTypesParser.g:1396:5: (lv_callableCtor_13_0= ruleCallableCtor )
// InternalTypesParser.g:1397:6: lv_callableCtor_13_0= ruleCallableCtor
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getTObjectPrototypeAccess().getCallableCtorCallableCtorParserRuleCall_11_0_0());
}
pushFollow(FOLLOW_32);
lv_callableCtor_13_0 = ruleCallableCtor();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getTObjectPrototypeRule());
}
set(current, "callableCtor", lv_callableCtor_13_0, "org.eclipse.n4js.ts.Types.CallableCtor");
afterParserOrEnumRuleCall();
}
}
}
// InternalTypesParser.g:1414:4: ( (lv_ownedMembers_14_0= ruleTMember ) )*
loop26: do {
int alt26 = 2;
int LA26_0 = input.LA(1);
if ((LA26_0 == ProtectedInternal || LA26_0 == PublicInternal || LA26_0 == Protected || (LA26_0 >= Private && LA26_0 <= Project) || LA26_0 == Public)) {
alt26 = 1;
}
switch(alt26) {
case 1:
// InternalTypesParser.g:1415:5: (lv_ownedMembers_14_0= ruleTMember )
{
// InternalTypesParser.g:1415:5: (lv_ownedMembers_14_0= ruleTMember )
// InternalTypesParser.g:1416:6: lv_ownedMembers_14_0= ruleTMember
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getTObjectPrototypeAccess().getOwnedMembersTMemberParserRuleCall_11_1_0());
}
pushFollow(FOLLOW_32);
lv_ownedMembers_14_0 = ruleTMember();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getTObjectPrototypeRule());
}
add(current, "ownedMembers", lv_ownedMembers_14_0, "org.eclipse.n4js.ts.Types.TMember");
afterParserOrEnumRuleCall();
}
}
}
break;
default:
break loop26;
}
} while (true);
}
break;
}
otherlv_15 = (Token) match(input, RightCurlyBracket, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_15, grammarAccess.getTObjectPrototypeAccess().getRightCurlyBracketKeyword_12());
}
}
}
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 n4js by eclipse.
the class InternalTypesParser method entryRuleIdentifierName.
// $ANTLR end "ruleBindingIdentifier"
// $ANTLR start "entryRuleIdentifierName"
// InternalTypesParser.g:6242:1: entryRuleIdentifierName returns [String current=null] : iv_ruleIdentifierName= ruleIdentifierName EOF ;
public final String entryRuleIdentifierName() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleIdentifierName = null;
try {
// InternalTypesParser.g:6242:54: (iv_ruleIdentifierName= ruleIdentifierName EOF )
// InternalTypesParser.g:6243:2: iv_ruleIdentifierName= ruleIdentifierName EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getIdentifierNameRule());
}
pushFollow(FOLLOW_1);
iv_ruleIdentifierName = ruleIdentifierName();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleIdentifierName.getText();
}
match(input, EOF, 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 n4js by eclipse.
the class InternalTypesParser method entryRuleBindingIdentifier.
// $ANTLR end "superTypeVariable"
// $ANTLR start "entryRuleBindingIdentifier"
// InternalTypesParser.g:6199:1: entryRuleBindingIdentifier returns [String current=null] : iv_ruleBindingIdentifier= ruleBindingIdentifier EOF ;
public final String entryRuleBindingIdentifier() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleBindingIdentifier = null;
try {
// InternalTypesParser.g:6199:57: (iv_ruleBindingIdentifier= ruleBindingIdentifier EOF )
// InternalTypesParser.g:6200:2: iv_ruleBindingIdentifier= ruleBindingIdentifier EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getBindingIdentifierRule());
}
pushFollow(FOLLOW_1);
iv_ruleBindingIdentifier = ruleBindingIdentifier();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleBindingIdentifier.getText();
}
match(input, EOF, 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 n4js by eclipse.
the class InternalTypesParser method ruleReservedWord.
// $ANTLR end "entryRuleReservedWord"
// $ANTLR start "ruleReservedWord"
// InternalTypesParser.g:6297:1: ruleReservedWord returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= Break | kw= Case | kw= Catch | kw= Class | kw= Const | kw= Continue | kw= Debugger | kw= Default | kw= Delete | kw= Do | kw= Else | kw= Export | kw= Extends | kw= Finally | kw= For | kw= Function | kw= If | kw= Import | kw= In | kw= Instanceof | kw= New | kw= Return | kw= Super | kw= Switch | kw= This_1 | kw= Throw | kw= Try | kw= Typeof | kw= Var | kw= Void | kw= While | kw= With | kw= Yield | kw= Null | kw= True | kw= False | kw= Enum ) ;
public final AntlrDatatypeRuleToken ruleReservedWord() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw = null;
enterRule();
try {
// InternalTypesParser.g:6303:2: ( (kw= Break | kw= Case | kw= Catch | kw= Class | kw= Const | kw= Continue | kw= Debugger | kw= Default | kw= Delete | kw= Do | kw= Else | kw= Export | kw= Extends | kw= Finally | kw= For | kw= Function | kw= If | kw= Import | kw= In | kw= Instanceof | kw= New | kw= Return | kw= Super | kw= Switch | kw= This_1 | kw= Throw | kw= Try | kw= Typeof | kw= Var | kw= Void | kw= While | kw= With | kw= Yield | kw= Null | kw= True | kw= False | kw= Enum ) )
// InternalTypesParser.g:6304:2: (kw= Break | kw= Case | kw= Catch | kw= Class | kw= Const | kw= Continue | kw= Debugger | kw= Default | kw= Delete | kw= Do | kw= Else | kw= Export | kw= Extends | kw= Finally | kw= For | kw= Function | kw= If | kw= Import | kw= In | kw= Instanceof | kw= New | kw= Return | kw= Super | kw= Switch | kw= This_1 | kw= Throw | kw= Try | kw= Typeof | kw= Var | kw= Void | kw= While | kw= With | kw= Yield | kw= Null | kw= True | kw= False | kw= Enum )
{
// InternalTypesParser.g:6304:2: (kw= Break | kw= Case | kw= Catch | kw= Class | kw= Const | kw= Continue | kw= Debugger | kw= Default | kw= Delete | kw= Do | kw= Else | kw= Export | kw= Extends | kw= Finally | kw= For | kw= Function | kw= If | kw= Import | kw= In | kw= Instanceof | kw= New | kw= Return | kw= Super | kw= Switch | kw= This_1 | kw= Throw | kw= Try | kw= Typeof | kw= Var | kw= Void | kw= While | kw= With | kw= Yield | kw= Null | kw= True | kw= False | kw= Enum )
int alt121 = 37;
switch(input.LA(1)) {
case Break:
{
alt121 = 1;
}
break;
case Case:
{
alt121 = 2;
}
break;
case Catch:
{
alt121 = 3;
}
break;
case Class:
{
alt121 = 4;
}
break;
case Const:
{
alt121 = 5;
}
break;
case Continue:
{
alt121 = 6;
}
break;
case Debugger:
{
alt121 = 7;
}
break;
case Default:
{
alt121 = 8;
}
break;
case Delete:
{
alt121 = 9;
}
break;
case Do:
{
alt121 = 10;
}
break;
case Else:
{
alt121 = 11;
}
break;
case Export:
{
alt121 = 12;
}
break;
case Extends:
{
alt121 = 13;
}
break;
case Finally:
{
alt121 = 14;
}
break;
case For:
{
alt121 = 15;
}
break;
case Function:
{
alt121 = 16;
}
break;
case If:
{
alt121 = 17;
}
break;
case Import:
{
alt121 = 18;
}
break;
case In:
{
alt121 = 19;
}
break;
case Instanceof:
{
alt121 = 20;
}
break;
case New:
{
alt121 = 21;
}
break;
case Return:
{
alt121 = 22;
}
break;
case Super:
{
alt121 = 23;
}
break;
case Switch:
{
alt121 = 24;
}
break;
case This_1:
{
alt121 = 25;
}
break;
case Throw:
{
alt121 = 26;
}
break;
case Try:
{
alt121 = 27;
}
break;
case Typeof:
{
alt121 = 28;
}
break;
case Var:
{
alt121 = 29;
}
break;
case Void:
{
alt121 = 30;
}
break;
case While:
{
alt121 = 31;
}
break;
case With:
{
alt121 = 32;
}
break;
case Yield:
{
alt121 = 33;
}
break;
case Null:
{
alt121 = 34;
}
break;
case True:
{
alt121 = 35;
}
break;
case False:
{
alt121 = 36;
}
break;
case Enum:
{
alt121 = 37;
}
break;
default:
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 121, 0, input);
throw nvae;
}
switch(alt121) {
case 1:
// InternalTypesParser.g:6305:3: kw= Break
{
kw = (Token) match(input, Break, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getBreakKeyword_0());
}
}
break;
case 2:
// InternalTypesParser.g:6311:3: kw= Case
{
kw = (Token) match(input, Case, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getCaseKeyword_1());
}
}
break;
case 3:
// InternalTypesParser.g:6317:3: kw= Catch
{
kw = (Token) match(input, Catch, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getCatchKeyword_2());
}
}
break;
case 4:
// InternalTypesParser.g:6323:3: kw= Class
{
kw = (Token) match(input, Class, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getClassKeyword_3());
}
}
break;
case 5:
// InternalTypesParser.g:6329:3: kw= Const
{
kw = (Token) match(input, Const, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getConstKeyword_4());
}
}
break;
case 6:
// InternalTypesParser.g:6335:3: kw= Continue
{
kw = (Token) match(input, Continue, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getContinueKeyword_5());
}
}
break;
case 7:
// InternalTypesParser.g:6341:3: kw= Debugger
{
kw = (Token) match(input, Debugger, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getDebuggerKeyword_6());
}
}
break;
case 8:
// InternalTypesParser.g:6347:3: kw= Default
{
kw = (Token) match(input, Default, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getDefaultKeyword_7());
}
}
break;
case 9:
// InternalTypesParser.g:6353:3: kw= Delete
{
kw = (Token) match(input, Delete, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getDeleteKeyword_8());
}
}
break;
case 10:
// InternalTypesParser.g:6359:3: kw= Do
{
kw = (Token) match(input, Do, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getDoKeyword_9());
}
}
break;
case 11:
// InternalTypesParser.g:6365:3: kw= Else
{
kw = (Token) match(input, Else, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getElseKeyword_10());
}
}
break;
case 12:
// InternalTypesParser.g:6371:3: kw= Export
{
kw = (Token) match(input, Export, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getExportKeyword_11());
}
}
break;
case 13:
// InternalTypesParser.g:6377:3: kw= Extends
{
kw = (Token) match(input, Extends, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getExtendsKeyword_12());
}
}
break;
case 14:
// InternalTypesParser.g:6383:3: kw= Finally
{
kw = (Token) match(input, Finally, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getFinallyKeyword_13());
}
}
break;
case 15:
// InternalTypesParser.g:6389:3: kw= For
{
kw = (Token) match(input, For, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getForKeyword_14());
}
}
break;
case 16:
// InternalTypesParser.g:6395:3: kw= Function
{
kw = (Token) match(input, Function, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getFunctionKeyword_15());
}
}
break;
case 17:
// InternalTypesParser.g:6401:3: kw= If
{
kw = (Token) match(input, If, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getIfKeyword_16());
}
}
break;
case 18:
// InternalTypesParser.g:6407:3: kw= Import
{
kw = (Token) match(input, Import, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getImportKeyword_17());
}
}
break;
case 19:
// InternalTypesParser.g:6413:3: kw= In
{
kw = (Token) match(input, In, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getInKeyword_18());
}
}
break;
case 20:
// InternalTypesParser.g:6419:3: kw= Instanceof
{
kw = (Token) match(input, Instanceof, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getInstanceofKeyword_19());
}
}
break;
case 21:
// InternalTypesParser.g:6425:3: kw= New
{
kw = (Token) match(input, New, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getNewKeyword_20());
}
}
break;
case 22:
// InternalTypesParser.g:6431:3: kw= Return
{
kw = (Token) match(input, Return, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getReturnKeyword_21());
}
}
break;
case 23:
// InternalTypesParser.g:6437:3: kw= Super
{
kw = (Token) match(input, Super, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getSuperKeyword_22());
}
}
break;
case 24:
// InternalTypesParser.g:6443:3: kw= Switch
{
kw = (Token) match(input, Switch, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getSwitchKeyword_23());
}
}
break;
case 25:
// InternalTypesParser.g:6449:3: kw= This_1
{
kw = (Token) match(input, This_1, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getThisKeyword_24());
}
}
break;
case 26:
// InternalTypesParser.g:6455:3: kw= Throw
{
kw = (Token) match(input, Throw, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getThrowKeyword_25());
}
}
break;
case 27:
// InternalTypesParser.g:6461:3: kw= Try
{
kw = (Token) match(input, Try, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getTryKeyword_26());
}
}
break;
case 28:
// InternalTypesParser.g:6467:3: kw= Typeof
{
kw = (Token) match(input, Typeof, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getTypeofKeyword_27());
}
}
break;
case 29:
// InternalTypesParser.g:6473:3: kw= Var
{
kw = (Token) match(input, Var, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getVarKeyword_28());
}
}
break;
case 30:
// InternalTypesParser.g:6479:3: kw= Void
{
kw = (Token) match(input, Void, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getVoidKeyword_29());
}
}
break;
case 31:
// InternalTypesParser.g:6485:3: kw= While
{
kw = (Token) match(input, While, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getWhileKeyword_30());
}
}
break;
case 32:
// InternalTypesParser.g:6491:3: kw= With
{
kw = (Token) match(input, With, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getWithKeyword_31());
}
}
break;
case 33:
// InternalTypesParser.g:6497:3: kw= Yield
{
kw = (Token) match(input, Yield, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getYieldKeyword_32());
}
}
break;
case 34:
// InternalTypesParser.g:6503:3: kw= Null
{
kw = (Token) match(input, Null, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getNullKeyword_33());
}
}
break;
case 35:
// InternalTypesParser.g:6509:3: kw= True
{
kw = (Token) match(input, True, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getTrueKeyword_34());
}
}
break;
case 36:
// InternalTypesParser.g:6515:3: kw= False
{
kw = (Token) match(input, False, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getFalseKeyword_35());
}
}
break;
case 37:
// InternalTypesParser.g:6521:3: kw= Enum
{
kw = (Token) match(input, Enum, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getReservedWordAccess().getEnumKeyword_36());
}
}
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 n4js by eclipse.
the class InternalTypesParser method rulePrimitiveType.
// $ANTLR end "entryRulePrimitiveType"
// $ANTLR start "rulePrimitiveType"
// InternalTypesParser.g:495:1: rulePrimitiveType returns [EObject current=null] : (otherlv_0= Primitive ( (lv_name_1_0= ruleVoidOrBindingIdentifier ) ) (otherlv_2= LessThanSign ( (lv_typeVars_3_0= ruleTypeVariable ) ) otherlv_4= GreaterThanSign )? (otherlv_5= Indexed ( (lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal ) ) )? otherlv_7= LeftCurlyBracket (otherlv_8= AutoboxedType ( ( ruleTypeReferenceName ) ) )? (otherlv_10= AssignmnentCompatible ( ( ruleTypeReferenceName ) ) )? otherlv_12= RightCurlyBracket ) ;
public final EObject rulePrimitiveType() throws RecognitionException {
EObject current = null;
Token otherlv_0 = null;
Token otherlv_2 = null;
Token otherlv_4 = null;
Token otherlv_5 = null;
Token otherlv_7 = null;
Token otherlv_8 = null;
Token otherlv_10 = null;
Token otherlv_12 = null;
AntlrDatatypeRuleToken lv_name_1_0 = null;
EObject lv_typeVars_3_0 = null;
EObject lv_declaredElementType_6_0 = null;
enterRule();
try {
// InternalTypesParser.g:501:2: ( (otherlv_0= Primitive ( (lv_name_1_0= ruleVoidOrBindingIdentifier ) ) (otherlv_2= LessThanSign ( (lv_typeVars_3_0= ruleTypeVariable ) ) otherlv_4= GreaterThanSign )? (otherlv_5= Indexed ( (lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal ) ) )? otherlv_7= LeftCurlyBracket (otherlv_8= AutoboxedType ( ( ruleTypeReferenceName ) ) )? (otherlv_10= AssignmnentCompatible ( ( ruleTypeReferenceName ) ) )? otherlv_12= RightCurlyBracket ) )
// InternalTypesParser.g:502:2: (otherlv_0= Primitive ( (lv_name_1_0= ruleVoidOrBindingIdentifier ) ) (otherlv_2= LessThanSign ( (lv_typeVars_3_0= ruleTypeVariable ) ) otherlv_4= GreaterThanSign )? (otherlv_5= Indexed ( (lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal ) ) )? otherlv_7= LeftCurlyBracket (otherlv_8= AutoboxedType ( ( ruleTypeReferenceName ) ) )? (otherlv_10= AssignmnentCompatible ( ( ruleTypeReferenceName ) ) )? otherlv_12= RightCurlyBracket )
{
// InternalTypesParser.g:502:2: (otherlv_0= Primitive ( (lv_name_1_0= ruleVoidOrBindingIdentifier ) ) (otherlv_2= LessThanSign ( (lv_typeVars_3_0= ruleTypeVariable ) ) otherlv_4= GreaterThanSign )? (otherlv_5= Indexed ( (lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal ) ) )? otherlv_7= LeftCurlyBracket (otherlv_8= AutoboxedType ( ( ruleTypeReferenceName ) ) )? (otherlv_10= AssignmnentCompatible ( ( ruleTypeReferenceName ) ) )? otherlv_12= RightCurlyBracket )
// InternalTypesParser.g:503:3: otherlv_0= Primitive ( (lv_name_1_0= ruleVoidOrBindingIdentifier ) ) (otherlv_2= LessThanSign ( (lv_typeVars_3_0= ruleTypeVariable ) ) otherlv_4= GreaterThanSign )? (otherlv_5= Indexed ( (lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal ) ) )? otherlv_7= LeftCurlyBracket (otherlv_8= AutoboxedType ( ( ruleTypeReferenceName ) ) )? (otherlv_10= AssignmnentCompatible ( ( ruleTypeReferenceName ) ) )? otherlv_12= RightCurlyBracket
{
otherlv_0 = (Token) match(input, Primitive, FOLLOW_10);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_0, grammarAccess.getPrimitiveTypeAccess().getPrimitiveKeyword_0());
}
// InternalTypesParser.g:507:3: ( (lv_name_1_0= ruleVoidOrBindingIdentifier ) )
// InternalTypesParser.g:508:4: (lv_name_1_0= ruleVoidOrBindingIdentifier )
{
// InternalTypesParser.g:508:4: (lv_name_1_0= ruleVoidOrBindingIdentifier )
// InternalTypesParser.g:509:5: lv_name_1_0= ruleVoidOrBindingIdentifier
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getPrimitiveTypeAccess().getNameVoidOrBindingIdentifierParserRuleCall_1_0());
}
pushFollow(FOLLOW_11);
lv_name_1_0 = ruleVoidOrBindingIdentifier();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getPrimitiveTypeRule());
}
set(current, "name", lv_name_1_0, "org.eclipse.n4js.ts.Types.VoidOrBindingIdentifier");
afterParserOrEnumRuleCall();
}
}
}
// InternalTypesParser.g:526:3: (otherlv_2= LessThanSign ( (lv_typeVars_3_0= ruleTypeVariable ) ) otherlv_4= GreaterThanSign )?
int alt8 = 2;
int LA8_0 = input.LA(1);
if ((LA8_0 == LessThanSign)) {
alt8 = 1;
}
switch(alt8) {
case 1:
// InternalTypesParser.g:527:4: otherlv_2= LessThanSign ( (lv_typeVars_3_0= ruleTypeVariable ) ) otherlv_4= GreaterThanSign
{
otherlv_2 = (Token) match(input, LessThanSign, FOLLOW_4);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_2, grammarAccess.getPrimitiveTypeAccess().getLessThanSignKeyword_2_0());
}
// InternalTypesParser.g:531:4: ( (lv_typeVars_3_0= ruleTypeVariable ) )
// InternalTypesParser.g:532:5: (lv_typeVars_3_0= ruleTypeVariable )
{
// InternalTypesParser.g:532:5: (lv_typeVars_3_0= ruleTypeVariable )
// InternalTypesParser.g:533:6: lv_typeVars_3_0= ruleTypeVariable
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getPrimitiveTypeAccess().getTypeVarsTypeVariableParserRuleCall_2_1_0());
}
pushFollow(FOLLOW_12);
lv_typeVars_3_0 = ruleTypeVariable();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getPrimitiveTypeRule());
}
add(current, "typeVars", lv_typeVars_3_0, "org.eclipse.n4js.ts.Types.TypeVariable");
afterParserOrEnumRuleCall();
}
}
}
otherlv_4 = (Token) match(input, GreaterThanSign, FOLLOW_13);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_4, grammarAccess.getPrimitiveTypeAccess().getGreaterThanSignKeyword_2_2());
}
}
break;
}
// InternalTypesParser.g:555:3: (otherlv_5= Indexed ( (lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal ) ) )?
int alt9 = 2;
int LA9_0 = input.LA(1);
if ((LA9_0 == Indexed)) {
alt9 = 1;
}
switch(alt9) {
case 1:
// InternalTypesParser.g:556:4: otherlv_5= Indexed ( (lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal ) )
{
otherlv_5 = (Token) match(input, Indexed, FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_5, grammarAccess.getPrimitiveTypeAccess().getIndexedKeyword_3_0());
}
// InternalTypesParser.g:560:4: ( (lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal ) )
// InternalTypesParser.g:561:5: (lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal )
{
// InternalTypesParser.g:561:5: (lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal )
// InternalTypesParser.g:562:6: lv_declaredElementType_6_0= ruleParameterizedTypeRefNominal
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getPrimitiveTypeAccess().getDeclaredElementTypeParameterizedTypeRefNominalParserRuleCall_3_1_0());
}
pushFollow(FOLLOW_15);
lv_declaredElementType_6_0 = ruleParameterizedTypeRefNominal();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getPrimitiveTypeRule());
}
set(current, "declaredElementType", lv_declaredElementType_6_0, "org.eclipse.n4js.ts.TypeExpressions.ParameterizedTypeRefNominal");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
otherlv_7 = (Token) match(input, LeftCurlyBracket, FOLLOW_16);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_7, grammarAccess.getPrimitiveTypeAccess().getLeftCurlyBracketKeyword_4());
}
// InternalTypesParser.g:584:3: (otherlv_8= AutoboxedType ( ( ruleTypeReferenceName ) ) )?
int alt10 = 2;
int LA10_0 = input.LA(1);
if ((LA10_0 == AutoboxedType)) {
alt10 = 1;
}
switch(alt10) {
case 1:
// InternalTypesParser.g:585:4: otherlv_8= AutoboxedType ( ( ruleTypeReferenceName ) )
{
otherlv_8 = (Token) match(input, AutoboxedType, FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_8, grammarAccess.getPrimitiveTypeAccess().getAutoboxedTypeKeyword_5_0());
}
// InternalTypesParser.g:589:4: ( ( ruleTypeReferenceName ) )
// InternalTypesParser.g:590:5: ( ruleTypeReferenceName )
{
// InternalTypesParser.g:590:5: ( ruleTypeReferenceName )
// InternalTypesParser.g:591:6: ruleTypeReferenceName
{
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getPrimitiveTypeRule());
}
}
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getPrimitiveTypeAccess().getAutoboxedTypeTClassifierCrossReference_5_1_0());
}
pushFollow(FOLLOW_17);
ruleTypeReferenceName();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
// InternalTypesParser.g:606:3: (otherlv_10= AssignmnentCompatible ( ( ruleTypeReferenceName ) ) )?
int alt11 = 2;
int LA11_0 = input.LA(1);
if ((LA11_0 == AssignmnentCompatible)) {
alt11 = 1;
}
switch(alt11) {
case 1:
// InternalTypesParser.g:607:4: otherlv_10= AssignmnentCompatible ( ( ruleTypeReferenceName ) )
{
otherlv_10 = (Token) match(input, AssignmnentCompatible, FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_10, grammarAccess.getPrimitiveTypeAccess().getAssignmnentCompatibleKeyword_6_0());
}
// InternalTypesParser.g:611:4: ( ( ruleTypeReferenceName ) )
// InternalTypesParser.g:612:5: ( ruleTypeReferenceName )
{
// InternalTypesParser.g:612:5: ( ruleTypeReferenceName )
// InternalTypesParser.g:613:6: ruleTypeReferenceName
{
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getPrimitiveTypeRule());
}
}
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getPrimitiveTypeAccess().getAssignmentCompatiblePrimitiveTypeCrossReference_6_1_0());
}
pushFollow(FOLLOW_18);
ruleTypeReferenceName();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
otherlv_12 = (Token) match(input, RightCurlyBracket, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_12, grammarAccess.getPrimitiveTypeAccess().getRightCurlyBracketKeyword_7());
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
Aggregations