use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project dsl-devkit by dsldevkit.
the class InternalExpressionParser method ruleInfixExpression.
// $ANTLR end "entryRuleInfixExpression"
// $ANTLR start "ruleInfixExpression"
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1340:1: ruleInfixExpression returns [EObject current=null] : (this_PrimaryExpression_0= rulePrimaryExpression ( ( () otherlv_2= '.' ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= '(' ( ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )* )? otherlv_8= ')' ) | ( () otherlv_10= '.' ( (lv_type_11_0= ruleType ) ) ) | ( () otherlv_13= '.' ( (lv_name_14_0= 'typeSelect' ) ) otherlv_15= '(' ( (lv_type_16_0= ruleType ) ) otherlv_17= ')' ) | ( () otherlv_19= '.' ( ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) ) ) otherlv_21= '(' ( ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|' )? ( (lv_exp_24_0= ruleExpression ) ) otherlv_25= ')' ) )* ) ;
public final EObject ruleInfixExpression() throws RecognitionException {
EObject current = null;
Token otherlv_2 = null;
Token otherlv_4 = null;
Token otherlv_6 = null;
Token otherlv_8 = null;
Token otherlv_10 = null;
Token otherlv_13 = null;
Token lv_name_14_0 = null;
Token otherlv_15 = null;
Token otherlv_17 = null;
Token otherlv_19 = null;
Token lv_name_20_1 = null;
Token lv_name_20_2 = null;
Token lv_name_20_3 = null;
Token lv_name_20_4 = null;
Token lv_name_20_5 = null;
Token lv_name_20_6 = null;
Token lv_name_20_7 = null;
Token lv_name_20_8 = null;
Token otherlv_21 = null;
Token otherlv_23 = null;
Token otherlv_25 = null;
EObject this_PrimaryExpression_0 = null;
AntlrDatatypeRuleToken lv_name_3_0 = null;
EObject lv_params_5_0 = null;
EObject lv_params_7_0 = null;
EObject lv_type_11_0 = null;
EObject lv_type_16_0 = null;
AntlrDatatypeRuleToken lv_var_22_0 = null;
EObject lv_exp_24_0 = null;
enterRule();
try {
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1343:28: ( (this_PrimaryExpression_0= rulePrimaryExpression ( ( () otherlv_2= '.' ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= '(' ( ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )* )? otherlv_8= ')' ) | ( () otherlv_10= '.' ( (lv_type_11_0= ruleType ) ) ) | ( () otherlv_13= '.' ( (lv_name_14_0= 'typeSelect' ) ) otherlv_15= '(' ( (lv_type_16_0= ruleType ) ) otherlv_17= ')' ) | ( () otherlv_19= '.' ( ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) ) ) otherlv_21= '(' ( ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|' )? ( (lv_exp_24_0= ruleExpression ) ) otherlv_25= ')' ) )* ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1344:1: (this_PrimaryExpression_0= rulePrimaryExpression ( ( () otherlv_2= '.' ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= '(' ( ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )* )? otherlv_8= ')' ) | ( () otherlv_10= '.' ( (lv_type_11_0= ruleType ) ) ) | ( () otherlv_13= '.' ( (lv_name_14_0= 'typeSelect' ) ) otherlv_15= '(' ( (lv_type_16_0= ruleType ) ) otherlv_17= ')' ) | ( () otherlv_19= '.' ( ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) ) ) otherlv_21= '(' ( ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|' )? ( (lv_exp_24_0= ruleExpression ) ) otherlv_25= ')' ) )* )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1344:1: (this_PrimaryExpression_0= rulePrimaryExpression ( ( () otherlv_2= '.' ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= '(' ( ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )* )? otherlv_8= ')' ) | ( () otherlv_10= '.' ( (lv_type_11_0= ruleType ) ) ) | ( () otherlv_13= '.' ( (lv_name_14_0= 'typeSelect' ) ) otherlv_15= '(' ( (lv_type_16_0= ruleType ) ) otherlv_17= ')' ) | ( () otherlv_19= '.' ( ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) ) ) otherlv_21= '(' ( ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|' )? ( (lv_exp_24_0= ruleExpression ) ) otherlv_25= ')' ) )* )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1345:5: this_PrimaryExpression_0= rulePrimaryExpression ( ( () otherlv_2= '.' ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= '(' ( ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )* )? otherlv_8= ')' ) | ( () otherlv_10= '.' ( (lv_type_11_0= ruleType ) ) ) | ( () otherlv_13= '.' ( (lv_name_14_0= 'typeSelect' ) ) otherlv_15= '(' ( (lv_type_16_0= ruleType ) ) otherlv_17= ')' ) | ( () otherlv_19= '.' ( ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) ) ) otherlv_21= '(' ( ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|' )? ( (lv_exp_24_0= ruleExpression ) ) otherlv_25= ')' ) )*
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInfixExpressionAccess().getPrimaryExpressionParserRuleCall_0());
}
pushFollow(FOLLOW_rulePrimaryExpression_in_ruleInfixExpression3018);
this_PrimaryExpression_0 = rulePrimaryExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = this_PrimaryExpression_0;
afterParserOrEnumRuleCall();
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1353:1: ( ( () otherlv_2= '.' ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= '(' ( ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )* )? otherlv_8= ')' ) | ( () otherlv_10= '.' ( (lv_type_11_0= ruleType ) ) ) | ( () otherlv_13= '.' ( (lv_name_14_0= 'typeSelect' ) ) otherlv_15= '(' ( (lv_type_16_0= ruleType ) ) otherlv_17= ')' ) | ( () otherlv_19= '.' ( ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) ) ) otherlv_21= '(' ( ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|' )? ( (lv_exp_24_0= ruleExpression ) ) otherlv_25= ')' ) )*
loop23: do {
int alt23 = 5;
int LA23_0 = input.LA(1);
if ((LA23_0 == 41)) {
switch(input.LA(2)) {
case 58:
case 59:
case 60:
{
alt23 = 2;
}
break;
case RULE_ID:
{
int LA23_4 = input.LA(3);
if ((LA23_4 == EOF || LA23_4 == 14 || (LA23_4 >= 16 && LA23_4 <= 18) || (LA23_4 >= 20 && LA23_4 <= 21) || (LA23_4 >= 24 && LA23_4 <= 39) || (LA23_4 >= 41 && LA23_4 <= 42) || LA23_4 == 63)) {
alt23 = 2;
} else if ((LA23_4 == 15)) {
alt23 = 1;
}
}
break;
case 43:
{
alt23 = 3;
}
break;
case 44:
case 45:
case 46:
case 47:
case 48:
case 49:
case 50:
case 51:
{
alt23 = 4;
}
break;
}
}
switch(alt23) {
case 1:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1353:2: ( () otherlv_2= '.' ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= '(' ( ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )* )? otherlv_8= ')' )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1353:2: ( () otherlv_2= '.' ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= '(' ( ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )* )? otherlv_8= ')' )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1353:3: () otherlv_2= '.' ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= '(' ( ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )* )? otherlv_8= ')'
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1353:3: ()
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1354:5:
{
if (state.backtracking == 0) {
current = forceCreateModelElementAndSet(grammarAccess.getInfixExpressionAccess().getOperationCallTargetAction_1_0_0(), current);
}
}
otherlv_2 = (Token) match(input, 41, FOLLOW_41_in_ruleInfixExpression3040);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_2, grammarAccess.getInfixExpressionAccess().getFullStopKeyword_1_0_1());
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1363:1: ( (lv_name_3_0= ruleIdentifier ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1364:1: (lv_name_3_0= ruleIdentifier )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1364:1: (lv_name_3_0= ruleIdentifier )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1365:3: lv_name_3_0= ruleIdentifier
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInfixExpressionAccess().getNameIdentifierParserRuleCall_1_0_2_0());
}
pushFollow(FOLLOW_ruleIdentifier_in_ruleInfixExpression3061);
lv_name_3_0 = ruleIdentifier();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInfixExpressionRule());
}
set(current, "name", lv_name_3_0, "Identifier");
afterParserOrEnumRuleCall();
}
}
}
otherlv_4 = (Token) match(input, 15, FOLLOW_15_in_ruleInfixExpression3073);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_4, grammarAccess.getInfixExpressionAccess().getLeftParenthesisKeyword_1_0_3());
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1385:1: ( ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )* )?
int alt20 = 2;
int LA20_0 = input.LA(1);
if (((LA20_0 >= RULE_INT && LA20_0 <= RULE_ID) || LA20_0 == 12 || LA20_0 == 15 || LA20_0 == 19 || (LA20_0 >= 22 && LA20_0 <= 23) || LA20_0 == 37 || LA20_0 == 40 || (LA20_0 >= 43 && LA20_0 <= 51) || (LA20_0 >= 53 && LA20_0 <= 60))) {
alt20 = 1;
}
switch(alt20) {
case 1:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1385:2: ( (lv_params_5_0= ruleExpression ) ) (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )*
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1385:2: ( (lv_params_5_0= ruleExpression ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1386:1: (lv_params_5_0= ruleExpression )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1386:1: (lv_params_5_0= ruleExpression )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1387:3: lv_params_5_0= ruleExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInfixExpressionAccess().getParamsExpressionParserRuleCall_1_0_4_0_0());
}
pushFollow(FOLLOW_ruleExpression_in_ruleInfixExpression3095);
lv_params_5_0 = ruleExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInfixExpressionRule());
}
add(current, "params", lv_params_5_0, "Expression");
afterParserOrEnumRuleCall();
}
}
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1403:2: (otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) ) )*
loop19: do {
int alt19 = 2;
int LA19_0 = input.LA(1);
if ((LA19_0 == 42)) {
alt19 = 1;
}
switch(alt19) {
case 1:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1403:4: otherlv_6= ',' ( (lv_params_7_0= ruleExpression ) )
{
otherlv_6 = (Token) match(input, 42, FOLLOW_42_in_ruleInfixExpression3108);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_6, grammarAccess.getInfixExpressionAccess().getCommaKeyword_1_0_4_1_0());
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1407:1: ( (lv_params_7_0= ruleExpression ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1408:1: (lv_params_7_0= ruleExpression )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1408:1: (lv_params_7_0= ruleExpression )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1409:3: lv_params_7_0= ruleExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInfixExpressionAccess().getParamsExpressionParserRuleCall_1_0_4_1_1_0());
}
pushFollow(FOLLOW_ruleExpression_in_ruleInfixExpression3129);
lv_params_7_0 = ruleExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInfixExpressionRule());
}
add(current, "params", lv_params_7_0, "Expression");
afterParserOrEnumRuleCall();
}
}
}
}
break;
default:
break loop19;
}
} while (true);
}
break;
}
otherlv_8 = (Token) match(input, 16, FOLLOW_16_in_ruleInfixExpression3145);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_8, grammarAccess.getInfixExpressionAccess().getRightParenthesisKeyword_1_0_5());
}
}
}
break;
case 2:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1430:6: ( () otherlv_10= '.' ( (lv_type_11_0= ruleType ) ) )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1430:6: ( () otherlv_10= '.' ( (lv_type_11_0= ruleType ) ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1430:7: () otherlv_10= '.' ( (lv_type_11_0= ruleType ) )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1430:7: ()
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1431:5:
{
if (state.backtracking == 0) {
current = forceCreateModelElementAndSet(grammarAccess.getInfixExpressionAccess().getFeatureCallTargetAction_1_1_0(), current);
}
}
otherlv_10 = (Token) match(input, 41, FOLLOW_41_in_ruleInfixExpression3174);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_10, grammarAccess.getInfixExpressionAccess().getFullStopKeyword_1_1_1());
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1440:1: ( (lv_type_11_0= ruleType ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1441:1: (lv_type_11_0= ruleType )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1441:1: (lv_type_11_0= ruleType )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1442:3: lv_type_11_0= ruleType
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInfixExpressionAccess().getTypeTypeParserRuleCall_1_1_2_0());
}
pushFollow(FOLLOW_ruleType_in_ruleInfixExpression3195);
lv_type_11_0 = ruleType();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInfixExpressionRule());
}
set(current, "type", lv_type_11_0, "Type");
afterParserOrEnumRuleCall();
}
}
}
}
}
break;
case 3:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1459:6: ( () otherlv_13= '.' ( (lv_name_14_0= 'typeSelect' ) ) otherlv_15= '(' ( (lv_type_16_0= ruleType ) ) otherlv_17= ')' )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1459:6: ( () otherlv_13= '.' ( (lv_name_14_0= 'typeSelect' ) ) otherlv_15= '(' ( (lv_type_16_0= ruleType ) ) otherlv_17= ')' )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1459:7: () otherlv_13= '.' ( (lv_name_14_0= 'typeSelect' ) ) otherlv_15= '(' ( (lv_type_16_0= ruleType ) ) otherlv_17= ')'
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1459:7: ()
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1460:5:
{
if (state.backtracking == 0) {
current = forceCreateModelElementAndSet(grammarAccess.getInfixExpressionAccess().getTypeSelectExpressionTargetAction_1_2_0(), current);
}
}
otherlv_13 = (Token) match(input, 41, FOLLOW_41_in_ruleInfixExpression3224);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_13, grammarAccess.getInfixExpressionAccess().getFullStopKeyword_1_2_1());
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1469:1: ( (lv_name_14_0= 'typeSelect' ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1470:1: (lv_name_14_0= 'typeSelect' )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1470:1: (lv_name_14_0= 'typeSelect' )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1471:3: lv_name_14_0= 'typeSelect'
{
lv_name_14_0 = (Token) match(input, 43, FOLLOW_43_in_ruleInfixExpression3242);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_14_0, grammarAccess.getInfixExpressionAccess().getNameTypeSelectKeyword_1_2_2_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInfixExpressionRule());
}
setWithLastConsumed(current, "name", lv_name_14_0, "typeSelect");
}
}
}
otherlv_15 = (Token) match(input, 15, FOLLOW_15_in_ruleInfixExpression3267);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_15, grammarAccess.getInfixExpressionAccess().getLeftParenthesisKeyword_1_2_3());
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1488:1: ( (lv_type_16_0= ruleType ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1489:1: (lv_type_16_0= ruleType )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1489:1: (lv_type_16_0= ruleType )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1490:3: lv_type_16_0= ruleType
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInfixExpressionAccess().getTypeTypeParserRuleCall_1_2_4_0());
}
pushFollow(FOLLOW_ruleType_in_ruleInfixExpression3288);
lv_type_16_0 = ruleType();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInfixExpressionRule());
}
set(current, "type", lv_type_16_0, "Type");
afterParserOrEnumRuleCall();
}
}
}
otherlv_17 = (Token) match(input, 16, FOLLOW_16_in_ruleInfixExpression3300);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_17, grammarAccess.getInfixExpressionAccess().getRightParenthesisKeyword_1_2_5());
}
}
}
break;
case 4:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1511:6: ( () otherlv_19= '.' ( ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) ) ) otherlv_21= '(' ( ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|' )? ( (lv_exp_24_0= ruleExpression ) ) otherlv_25= ')' )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1511:6: ( () otherlv_19= '.' ( ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) ) ) otherlv_21= '(' ( ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|' )? ( (lv_exp_24_0= ruleExpression ) ) otherlv_25= ')' )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1511:7: () otherlv_19= '.' ( ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) ) ) otherlv_21= '(' ( ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|' )? ( (lv_exp_24_0= ruleExpression ) ) otherlv_25= ')'
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1511:7: ()
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1512:5:
{
if (state.backtracking == 0) {
current = forceCreateModelElementAndSet(grammarAccess.getInfixExpressionAccess().getCollectionExpressionTargetAction_1_3_0(), current);
}
}
otherlv_19 = (Token) match(input, 41, FOLLOW_41_in_ruleInfixExpression3329);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_19, grammarAccess.getInfixExpressionAccess().getFullStopKeyword_1_3_1());
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1521:1: ( ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1522:1: ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1522:1: ( (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1523:1: (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1523:1: (lv_name_20_1= 'collect' | lv_name_20_2= 'select' | lv_name_20_3= 'selectFirst' | lv_name_20_4= 'reject' | lv_name_20_5= 'exists' | lv_name_20_6= 'notExists' | lv_name_20_7= 'sortBy' | lv_name_20_8= 'forAll' )
int alt21 = 8;
switch(input.LA(1)) {
case 44:
{
alt21 = 1;
}
break;
case 45:
{
alt21 = 2;
}
break;
case 46:
{
alt21 = 3;
}
break;
case 47:
{
alt21 = 4;
}
break;
case 48:
{
alt21 = 5;
}
break;
case 49:
{
alt21 = 6;
}
break;
case 50:
{
alt21 = 7;
}
break;
case 51:
{
alt21 = 8;
}
break;
default:
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 21, 0, input);
throw nvae;
}
switch(alt21) {
case 1:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1524:3: lv_name_20_1= 'collect'
{
lv_name_20_1 = (Token) match(input, 44, FOLLOW_44_in_ruleInfixExpression3349);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_20_1, grammarAccess.getInfixExpressionAccess().getNameCollectKeyword_1_3_2_0_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInfixExpressionRule());
}
setWithLastConsumed(current, "name", lv_name_20_1, null);
}
}
break;
case 2:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1536:8: lv_name_20_2= 'select'
{
lv_name_20_2 = (Token) match(input, 45, FOLLOW_45_in_ruleInfixExpression3378);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_20_2, grammarAccess.getInfixExpressionAccess().getNameSelectKeyword_1_3_2_0_1());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInfixExpressionRule());
}
setWithLastConsumed(current, "name", lv_name_20_2, null);
}
}
break;
case 3:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1548:8: lv_name_20_3= 'selectFirst'
{
lv_name_20_3 = (Token) match(input, 46, FOLLOW_46_in_ruleInfixExpression3407);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_20_3, grammarAccess.getInfixExpressionAccess().getNameSelectFirstKeyword_1_3_2_0_2());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInfixExpressionRule());
}
setWithLastConsumed(current, "name", lv_name_20_3, null);
}
}
break;
case 4:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1560:8: lv_name_20_4= 'reject'
{
lv_name_20_4 = (Token) match(input, 47, FOLLOW_47_in_ruleInfixExpression3436);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_20_4, grammarAccess.getInfixExpressionAccess().getNameRejectKeyword_1_3_2_0_3());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInfixExpressionRule());
}
setWithLastConsumed(current, "name", lv_name_20_4, null);
}
}
break;
case 5:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1572:8: lv_name_20_5= 'exists'
{
lv_name_20_5 = (Token) match(input, 48, FOLLOW_48_in_ruleInfixExpression3465);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_20_5, grammarAccess.getInfixExpressionAccess().getNameExistsKeyword_1_3_2_0_4());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInfixExpressionRule());
}
setWithLastConsumed(current, "name", lv_name_20_5, null);
}
}
break;
case 6:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1584:8: lv_name_20_6= 'notExists'
{
lv_name_20_6 = (Token) match(input, 49, FOLLOW_49_in_ruleInfixExpression3494);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_20_6, grammarAccess.getInfixExpressionAccess().getNameNotExistsKeyword_1_3_2_0_5());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInfixExpressionRule());
}
setWithLastConsumed(current, "name", lv_name_20_6, null);
}
}
break;
case 7:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1596:8: lv_name_20_7= 'sortBy'
{
lv_name_20_7 = (Token) match(input, 50, FOLLOW_50_in_ruleInfixExpression3523);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_20_7, grammarAccess.getInfixExpressionAccess().getNameSortByKeyword_1_3_2_0_6());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInfixExpressionRule());
}
setWithLastConsumed(current, "name", lv_name_20_7, null);
}
}
break;
case 8:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1608:8: lv_name_20_8= 'forAll'
{
lv_name_20_8 = (Token) match(input, 51, FOLLOW_51_in_ruleInfixExpression3552);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_20_8, grammarAccess.getInfixExpressionAccess().getNameForAllKeyword_1_3_2_0_7());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInfixExpressionRule());
}
setWithLastConsumed(current, "name", lv_name_20_8, null);
}
}
break;
}
}
}
otherlv_21 = (Token) match(input, 15, FOLLOW_15_in_ruleInfixExpression3580);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_21, grammarAccess.getInfixExpressionAccess().getLeftParenthesisKeyword_1_3_3());
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1627:1: ( ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|' )?
int alt22 = 2;
int LA22_0 = input.LA(1);
if ((LA22_0 == RULE_ID)) {
int LA22_1 = input.LA(2);
if ((LA22_1 == 52)) {
alt22 = 1;
}
}
switch(alt22) {
case 1:
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1627:2: ( (lv_var_22_0= ruleIdentifier ) ) otherlv_23= '|'
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1627:2: ( (lv_var_22_0= ruleIdentifier ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1628:1: (lv_var_22_0= ruleIdentifier )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1628:1: (lv_var_22_0= ruleIdentifier )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1629:3: lv_var_22_0= ruleIdentifier
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInfixExpressionAccess().getVarIdentifierParserRuleCall_1_3_4_0_0());
}
pushFollow(FOLLOW_ruleIdentifier_in_ruleInfixExpression3602);
lv_var_22_0 = ruleIdentifier();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInfixExpressionRule());
}
set(current, "var", lv_var_22_0, "Identifier");
afterParserOrEnumRuleCall();
}
}
}
otherlv_23 = (Token) match(input, 52, FOLLOW_52_in_ruleInfixExpression3614);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_23, grammarAccess.getInfixExpressionAccess().getVerticalLineKeyword_1_3_4_1());
}
}
break;
}
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1649:3: ( (lv_exp_24_0= ruleExpression ) )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1650:1: (lv_exp_24_0= ruleExpression )
{
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1650:1: (lv_exp_24_0= ruleExpression )
// ../com.avaloq.tools.ddk.xtext.expression/src-gen/com/avaloq/tools/ddk/xtext/expression/parser/antlr/internal/InternalExpression.g:1651:3: lv_exp_24_0= ruleExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInfixExpressionAccess().getExpExpressionParserRuleCall_1_3_5_0());
}
pushFollow(FOLLOW_ruleExpression_in_ruleInfixExpression3637);
lv_exp_24_0 = ruleExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInfixExpressionRule());
}
set(current, "exp", lv_exp_24_0, "Expression");
afterParserOrEnumRuleCall();
}
}
}
otherlv_25 = (Token) match(input, 16, FOLLOW_16_in_ruleInfixExpression3649);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_25, grammarAccess.getInfixExpressionAccess().getRightParenthesisKeyword_1_3_6());
}
}
}
break;
default:
break loop23;
}
} while (true);
}
}
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 dsl-devkit by dsldevkit.
the class InternalFormatParser method ruleDottedID.
// $ANTLR end "entryRuleDottedID"
// $ANTLR start "ruleDottedID"
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2257:1: ruleDottedID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_Identifier_0= ruleIdentifier (kw= '.' this_Identifier_2= ruleIdentifier )* ) ;
public final AntlrDatatypeRuleToken ruleDottedID() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw = null;
AntlrDatatypeRuleToken this_Identifier_0 = null;
AntlrDatatypeRuleToken this_Identifier_2 = null;
enterRule();
try {
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2260:28: ( (this_Identifier_0= ruleIdentifier (kw= '.' this_Identifier_2= ruleIdentifier )* ) )
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2261:1: (this_Identifier_0= ruleIdentifier (kw= '.' this_Identifier_2= ruleIdentifier )* )
{
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2261:1: (this_Identifier_0= ruleIdentifier (kw= '.' this_Identifier_2= ruleIdentifier )* )
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2262:5: this_Identifier_0= ruleIdentifier (kw= '.' this_Identifier_2= ruleIdentifier )*
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getDottedIDAccess().getIdentifierParserRuleCall_0());
}
pushFollow(FOLLOW_ruleIdentifier_in_ruleDottedID5095);
this_Identifier_0 = ruleIdentifier();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_Identifier_0);
}
if (state.backtracking == 0) {
afterParserOrEnumRuleCall();
}
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2272:1: (kw= '.' this_Identifier_2= ruleIdentifier )*
loop42: do {
int alt42 = 2;
int LA42_0 = input.LA(1);
if ((LA42_0 == 36)) {
alt42 = 1;
}
switch(alt42) {
case 1:
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2273:2: kw= '.' this_Identifier_2= ruleIdentifier
{
kw = (Token) match(input, 36, FOLLOW_36_in_ruleDottedID5114);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getDottedIDAccess().getFullStopKeyword_1_0());
}
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getDottedIDAccess().getIdentifierParserRuleCall_1_1());
}
pushFollow(FOLLOW_ruleIdentifier_in_ruleDottedID5136);
this_Identifier_2 = ruleIdentifier();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_Identifier_2);
}
if (state.backtracking == 0) {
afterParserOrEnumRuleCall();
}
}
break;
default:
break loop42;
}
} while (true);
}
}
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 dsl-devkit by dsldevkit.
the class InternalFormatParser method ruleParameterizedString.
// $ANTLR end "entryRuleParameterizedString"
// $ANTLR start "ruleParameterizedString"
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2155:1: ruleParameterizedString returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_STRING_0= RULE_STRING (kw= '(' this_INT_2= RULE_INT kw= ',' this_INT_4= RULE_INT kw= ')' )? ) ;
public final AntlrDatatypeRuleToken ruleParameterizedString() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_STRING_0 = null;
Token kw = null;
Token this_INT_2 = null;
Token this_INT_4 = null;
enterRule();
try {
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2158:28: ( (this_STRING_0= RULE_STRING (kw= '(' this_INT_2= RULE_INT kw= ',' this_INT_4= RULE_INT kw= ')' )? ) )
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2159:1: (this_STRING_0= RULE_STRING (kw= '(' this_INT_2= RULE_INT kw= ',' this_INT_4= RULE_INT kw= ')' )? )
{
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2159:1: (this_STRING_0= RULE_STRING (kw= '(' this_INT_2= RULE_INT kw= ',' this_INT_4= RULE_INT kw= ')' )? )
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2159:6: this_STRING_0= RULE_STRING (kw= '(' this_INT_2= RULE_INT kw= ',' this_INT_4= RULE_INT kw= ')' )?
{
this_STRING_0 = (Token) match(input, RULE_STRING, FOLLOW_RULE_STRING_in_ruleParameterizedString4774);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_STRING_0);
}
if (state.backtracking == 0) {
newLeafNode(this_STRING_0, grammarAccess.getParameterizedStringAccess().getSTRINGTerminalRuleCall_0());
}
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2166:1: (kw= '(' this_INT_2= RULE_INT kw= ',' this_INT_4= RULE_INT kw= ')' )?
int alt40 = 2;
int LA40_0 = input.LA(1);
if ((LA40_0 == 33)) {
alt40 = 1;
}
switch(alt40) {
case 1:
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2167:2: kw= '(' this_INT_2= RULE_INT kw= ',' this_INT_4= RULE_INT kw= ')'
{
kw = (Token) match(input, 33, FOLLOW_33_in_ruleParameterizedString4793);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getParameterizedStringAccess().getLeftParenthesisKeyword_1_0());
}
this_INT_2 = (Token) match(input, RULE_INT, FOLLOW_RULE_INT_in_ruleParameterizedString4808);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_INT_2);
}
if (state.backtracking == 0) {
newLeafNode(this_INT_2, grammarAccess.getParameterizedStringAccess().getINTTerminalRuleCall_1_1());
}
kw = (Token) match(input, 28, FOLLOW_28_in_ruleParameterizedString4826);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getParameterizedStringAccess().getCommaKeyword_1_2());
}
this_INT_4 = (Token) match(input, RULE_INT, FOLLOW_RULE_INT_in_ruleParameterizedString4841);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(this_INT_4);
}
if (state.backtracking == 0) {
newLeafNode(this_INT_4, grammarAccess.getParameterizedStringAccess().getINTTerminalRuleCall_1_3());
}
kw = (Token) match(input, 34, FOLLOW_34_in_ruleParameterizedString4859);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getParameterizedStringAccess().getRightParenthesisKeyword_1_4());
}
}
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 dsl-devkit by dsldevkit.
the class InternalFormatParser method entryRuleRuleSelfIdentifier.
// $ANTLR end "ruleIntObject"
// $ANTLR start "entryRuleRuleSelfIdentifier"
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2353:1: entryRuleRuleSelfIdentifier returns [String current=null] : iv_ruleRuleSelfIdentifier= ruleRuleSelfIdentifier EOF ;
public final String entryRuleRuleSelfIdentifier() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleRuleSelfIdentifier = null;
try {
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2354:2: (iv_ruleRuleSelfIdentifier= ruleRuleSelfIdentifier EOF )
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2355:2: iv_ruleRuleSelfIdentifier= ruleRuleSelfIdentifier EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getRuleSelfIdentifierRule());
}
pushFollow(FOLLOW_ruleRuleSelfIdentifier_in_entryRuleRuleSelfIdentifier5374);
iv_ruleRuleSelfIdentifier = ruleRuleSelfIdentifier();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleRuleSelfIdentifier.getText();
}
match(input, EOF, FOLLOW_EOF_in_entryRuleRuleSelfIdentifier5385);
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 dsl-devkit by dsldevkit.
the class InternalFormatParser method ruleArrayBrackets.
// $ANTLR end "entryRuleArrayBrackets"
// $ANTLR start "ruleArrayBrackets"
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7970:1: ruleArrayBrackets returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= '[' kw= ']' ) ;
public final AntlrDatatypeRuleToken ruleArrayBrackets() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw = null;
enterRule();
try {
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7973:28: ( (kw= '[' kw= ']' ) )
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7974:1: (kw= '[' kw= ']' )
{
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7974:1: (kw= '[' kw= ']' )
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7975:2: kw= '[' kw= ']'
{
kw = (Token) match(input, 27, FOLLOW_27_in_ruleArrayBrackets19018);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getArrayBracketsAccess().getLeftSquareBracketKeyword_0());
}
kw = (Token) match(input, 29, FOLLOW_29_in_ruleArrayBrackets19031);
if (state.failed)
return current;
if (state.backtracking == 0) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getArrayBracketsAccess().getRightSquareBracketKeyword_1());
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
Aggregations