// $ANTLR start "ruleconstant"
// ../org.xvr.S3DEditor/src-gen/org/xvr/parser/antlr/internal/InternalS3DParser.g:3610:1: ruleconstant returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_STRING_0= RULE_STRING | this_FLOAT_1= RULE_FLOAT | this_INT_2= RULE_INT | kw= KEYWORD_45 | kw= KEYWORD_48 ) ;
public final AntlrDatatypeRuleToken ruleconstant() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_STRING_0=null;
Token this_FLOAT_1=null;
Token this_INT_2=null;
Token kw=null;
enterRule();
try {
// ../org.xvr.S3DEditor/src-gen/org/xvr/parser/antlr/internal/InternalS3DParser.g:3614:6: ( (this_STRING_0= RULE_STRING | this_FLOAT_1= RULE_FLOAT | this_INT_2= RULE_INT | kw= KEYWORD_45 | kw= KEYWORD_48 ) )
// ../org.xvr.S3DEditor/src-gen/org/xvr/parser/antlr/internal/InternalS3DParser.g:3615:1: (this_STRING_0= RULE_STRING | this_FLOAT_1= RULE_FLOAT | this_INT_2= RULE_INT | kw= KEYWORD_45 | kw= KEYWORD_48 )
{
// ../org.xvr.S3DEditor/src-gen/org/xvr/parser/antlr/internal/InternalS3DParser.g:3615:1: (this_STRING_0= RULE_STRING | this_FLOAT_1= RULE_FLOAT | this_INT_2= RULE_INT | kw= KEYWORD_45 | kw= KEYWORD_48 )
int alt50=5;
switch ( input.LA(1) ) {
case RULE_STRING:
{
alt50=1;
}
break;
case RULE_FLOAT:
{
alt50=2;
}
break;
case RULE_INT:
{
alt50=3;
}
break;
case KEYWORD_45:
{
alt50=4;
}
break;
case KEYWORD_48:
{
alt50=5;
}
break;
default:
if (state.backtracking>0) {state.failed=true; return current;}
NoViableAltException nvae =
new NoViableAltException("", 50, 0, input);
throw nvae;
}
switch (alt50) {
case 1 :
// ../org.xvr.S3DEditor/src-gen/org/xvr/parser/antlr/internal/InternalS3DParser.g:3615:6: this_STRING_0= RULE_STRING
{
this_STRING_0=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleconstant7893); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(this_STRING_0);
}
if ( state.backtracking==0 ) {
newLeafNode(this_STRING_0, grammarAccess.getConstantAccess().getSTRINGTerminalRuleCall_0());
}
}
break;
case 2 :
// ../org.xvr.S3DEditor/src-gen/org/xvr/parser/antlr/internal/InternalS3DParser.g:3623:10: this_FLOAT_1= RULE_FLOAT
{
this_FLOAT_1=(Token)match(input,RULE_FLOAT,FOLLOW_RULE_FLOAT_in_ruleconstant7919); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(this_FLOAT_1);
}
if ( state.backtracking==0 ) {
newLeafNode(this_FLOAT_1, grammarAccess.getConstantAccess().getFLOATTerminalRuleCall_1());
}
}
break;
case 3 :
// ../org.xvr.S3DEditor/src-gen/org/xvr/parser/antlr/internal/InternalS3DParser.g:3631:10: this_INT_2= RULE_INT
{
this_INT_2=(Token)match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleconstant7945); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(this_INT_2);
}
if ( state.backtracking==0 ) {
newLeafNode(this_INT_2, grammarAccess.getConstantAccess().getINTTerminalRuleCall_2());
}
}
break;
case 4 :
// ../org.xvr.S3DEditor/src-gen/org/xvr/parser/antlr/internal/InternalS3DParser.g:3640:2: kw= KEYWORD_45
{
kw=(Token)match(input,KEYWORD_45,FOLLOW_KEYWORD_45_in_ruleconstant7969); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getConstantAccess().getTrueKeyword_3());
}
}
break;
case 5 :
// ../org.xvr.S3DEditor/src-gen/org/xvr/parser/antlr/internal/InternalS3DParser.g:3647:2: kw= KEYWORD_48
{
kw=(Token)match(input,KEYWORD_48,FOLLOW_KEYWORD_48_in_ruleconstant7988); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getConstantAccess().getFalseKeyword_4());
}
}