Parser rule for parsing a literal atom.
<p>
An literal atom is a numeric constant.

@return an atom parsed from the given input
962193
@SuppressWarnings("squid:S1698")
    private Expression literalAtom() {
        if (tokenizer.current().isSymbol("+") && tokenizer.next().isNumber()) {
            // Parse numbers with a leading + sign like +2.02 by simply ignoring the +
            tokenizer.consume();
        }
        if (tokenizer.current().isNumber()) {
            double value = Double.parseDouble(tokenizer.consume().getContents());
            if (tokenizer.current().is(Token.TokenType.ID)) {
                String quantifier = tokenizer.current().getContents().intern();
                if ("n" == quantifier) {
                    value /= 1000000000d;
                    tokenizer.consume();
                } else if ("u" == quantifier) {
                    value /= 1000000d;
                    tokenizer.consume();
                } else if ("m" == quantifier) {
                    value /= 1000d;
                    tokenizer.consume();
                } else if ("K" == quantifier || "k" == quantifier) {
                    value *= 1000d;
                    tokenizer.consume();
                } else if ("M" == quantifier) {
                    value *= 1000000d;
                    tokenizer.consume();
                } else if ("G" == quantifier) {
                    value *= 1000000000d;
                    tokenizer.consume();
                } else {
                    Token token = tokenizer.consume();
                    errors.add(ParseError.error(token,
                                                String.format("Unexpected token: '%s'. Expected a valid quantifier.",
                                                              token.getSource())));
                }
            }
            return new Constant(value);
        }
        Token token = tokenizer.consume();
        errors.add(ParseError.error(token,
                                    String.format("Unexpected token: '%s'. Expected an expression.",
                                                  token.getSource())));
        return Constant.EMPTY;
    }
484485
private Parser getSyntaxParser(Syntax syntax) throws MacroExecutionException
    {
        try {
            return this.componentManager.getInstance(Parser.class, syntax.toIdString());
        } catch (ComponentLookupException e) {
            throw new MacroExecutionException("Failed to find source parser for syntax [" + syntax + "]", e);
        }
    }
394147
Expr atom() {
		Tok tok = peek();
		switch (tok.sym) {
		case LPAREN:
			move();
			Expr expr = expr();
			match(Sym.RPAREN);
			return expr;
		case ID:
			move();
			return new Id(tok.value());
		case STR:
			move();
			return new Const(tok.sym, tok.value());
		case INT:
		case LONG:
		case FLOAT:
		case DOUBLE:
			move();
			return new Const(tok.sym, ((NumTok)tok).getNumberValue());
		case TRUE:
			move();
			return Const.TRUE;
		case FALSE:
			move();
			return Const.FALSE;
		case NULL:
			move();
			return Const.NULL;
		case COMMA:
		case SEMICOLON:
		case QUESTION:	// support "c ?? ? a : b"
		case AND: case OR: case EQUAL: case NOTEQUAL:	// support "a.b ?? && expr"
		case RPAREN:	// support "(a.b ??)"
		case RBRACK:	// support "[start .. end ??]"
		case RBRACE:	// support "{key : value ??}"
		case RANGE:		// support "[start ?? .. end]"
		case COLON:		// support "c ? a ?? : b"
		case EOF:
			return null;
		default :
			throw new ParseException("Expression error: can not match the symbol \"" + tok.value() + "\"", location);
		}
	}
551126
public final void elementValue() throws RecognitionException {
		int elementValue_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 69) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:629:5: ( conditionalExpression | annotation | elementValueArrayInitializer )
			int alt91=3;
			switch ( input.LA(1) ) {
			case CharacterLiteral:
			case DecimalLiteral:
			case FloatingPointLiteral:
			case HexLiteral:
			case Identifier:
			case OctalLiteral:
			case StringLiteral:
			case 29:
			case 36:
			case 40:
			case 41:
			case 44:
			case 45:
			case 53:
			case 65:
			case 67:
			case 70:
			case 71:
			case 77:
			case 79:
			case 80:
			case 82:
			case 85:
			case 92:
			case 94:
			case 97:
			case 98:
			case 105:
			case 108:
			case 111:
			case 115:
			case 118:
			case 126:
				{
				alt91=1;
				}
				break;
			case 58:
				{
				alt91=2;
				}
				break;
			case 121:
				{
				alt91=3;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 91, 0, input);
				throw nvae;
			}
			switch (alt91) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:629:7: conditionalExpression
					{
					pushFollow(FOLLOW_conditionalExpression_in_elementValue2406);
					conditionalExpression();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:630:9: annotation
					{
					pushFollow(FOLLOW_annotation_in_elementValue2416);
					annotation();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 3 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:631:9: elementValueArrayInitializer
					{
					pushFollow(FOLLOW_elementValueArrayInitializer_in_elementValue2426);
					elementValueArrayInitializer();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 69, elementValue_StartIndex); }

		}
	}
1037898
@Override
    public boolean matches(IAtom atom) {
        boolean val = false;
        boolean matchesLeft = left.matches(atom);
        if (right != null) {
            if ("and".equals(operator) && matchesLeft) {
                boolean matchesRight = right.matches(atom);
                val = matchesLeft && matchesRight;
            } else if ("or".equals(operator)) {
                boolean matchesRight = right.matches(atom);
                val = matchesLeft || matchesRight;
            }
        } else {
            if ("not".equals(operator)) {
                val = (!matchesLeft);
            } else {
                val = matchesLeft;
            }
        }
        return val;
    }
386617
private Expression parseAtom() {
        // Parse a number
        if (tokenizer.current().isNumber()) {
            return new Number(tokenizer.consume().getContents());
        }
        // Parse a color
        if (tokenizer.current().isSpecialIdentifier("#")) {
            return new Color(tokenizer.consume().getSource());
        }

        // Parse an identifier or function call
        if (tokenizer.current().isIdentifier() || tokenizer.current().isString()) {
            return parseIdentifierOrFunctionCall();
        }

        // Parse as variable reference
        if (tokenizer.current().isSpecialIdentifier("$")) {
            return new VariableReference(tokenizer.consume().getContents());
        }

        // Parse as expression in braces
        if (tokenizer.current().isSymbol("(")) {
            tokenizer.consumeExpectedSymbol("(");
            Expression expression = parseExpression(true);
            tokenizer.consumeExpectedSymbol(")");
            if (expression instanceof Operation) {
                ((Operation) expression).protect();
            }
            return expression;
        }

        // Attribute values can be followed by things like "!import" -> make a value list
        if (tokenizer.current().isSymbol("!") && tokenizer.next().isIdentifier()) {
            tokenizer.consumeExpectedSymbol("!");
            return new Value("!" + tokenizer.consume().getContents());
        }

        // We failed! Report an error and return "" as value (we will fail anyway...)
        tokenizer.addError(tokenizer.current(),
                           "Unexpected token: '" + tokenizer.consume().getSource() + "'. Expected an expression.");
        return new Value("");
    }
911291
static Selector parseFloatingLiteral(String val) {
    // Determine if this is a float constant by checking the suffix
    Number value; // was NumericValue
    char tag = val.charAt(val.length()-1);
    if (tag == 'f' || tag == 'F')
      value = new Float(val);
    else
      value = new Double(val);
    return new LiteralImpl(value);
  }
8242
@Override
    public boolean matches(IAtom atom) {
        String symbol = atom.getSymbol();
        return !(symbol.equals("C") || symbol.equals("H"));

    }
22928
private Entry loadAtomEntry(final InputStream in) {
        try {
            return Atom10Parser.parseEntry(new BufferedReader(new InputStreamReader(in, "UTF-8")), null, Locale.US);
        } catch (final Exception e) {
            e.printStackTrace();
            return null;
        }
    }
579306
public AbstractType<?> parse() throws SyntaxException, ConfigurationException
    {
        skipBlank();
        String name = readNextIdentifier();

        skipBlank();
        if (!isEOS() && str.charAt(idx) == '(')
            return getAbstractType(name, this);
        else
            return getAbstractType(name);
    }
788258
Rule Literal() {
        return Sequence(
                FirstOf(
                        FloatLiteral(),
                        IntegerLiteral(),
                        CharLiteral(),
                        StringLiteral(),
                        Sequence("true", TestNot(LetterOrDigit())),
                        Sequence("false", TestNot(LetterOrDigit())),
                        Sequence("null", TestNot(LetterOrDigit()))
                ),
                Spacing()
        );
    }
412801
public T getMin() {
    if (StringUtils.isEmpty(getInputElement().getMin())) {
      return null;
    }
    try {
      return this.numberParser.parse(getInputElement().getMin());
    } catch (final ParseException e) {
      return null;
    }
  }
258774
final Parser<T> asDelimiter() {
    return new Parser<T>() {
      @Override boolean apply(ParseContext ctxt) {
        return ctxt.applyAsDelimiter(Parser.this);
      }
      @Override public String toString() {
        return Parser.this.toString();
      }
    };
  }
959080
public final void ruleAtom() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:708:2: ( ( ( rule__Atom__Alternatives ) ) )
            // InternalXtext.g:709:2: ( ( rule__Atom__Alternatives ) )
            {
            // InternalXtext.g:709:2: ( ( rule__Atom__Alternatives ) )
            // InternalXtext.g:710:3: ( rule__Atom__Alternatives )
            {
             before(grammarAccess.getAtomAccess().getAlternatives()); 
            // InternalXtext.g:711:3: ( rule__Atom__Alternatives )
            // InternalXtext.g:711:4: rule__Atom__Alternatives
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__Atom__Alternatives();

            state._fsp--;


            }

             after(grammarAccess.getAtomAccess().getAlternatives()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
303321
public static <T> Parser<T> constant(final T v) {
    return new Parser<T>() {
      @Override boolean apply(ParseContext ctxt) {
        ctxt.result = v;
        return true;
      }
      @Override public String toString() {
        return String.valueOf(v);
      }
    };
  }
549508
public final void enumConstant() throws RecognitionException {
		int enumConstant_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:330:5: ( ( annotations )? Identifier ( arguments )? ( classBody )? )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:330:7: ( annotations )? Identifier ( arguments )? ( classBody )?
			{
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:330:7: ( annotations )?
			int alt23=2;
			int LA23_0 = input.LA(1);
			if ( (LA23_0==58) ) {
				alt23=1;
			}
			switch (alt23) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:330:7: annotations
					{
					pushFollow(FOLLOW_annotations_in_enumConstant491);
					annotations();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			match(input,Identifier,FOLLOW_Identifier_in_enumConstant494); if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:330:31: ( arguments )?
			int alt24=2;
			int LA24_0 = input.LA(1);
			if ( (LA24_0==36) ) {
				alt24=1;
			}
			switch (alt24) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:330:32: arguments
					{
					pushFollow(FOLLOW_arguments_in_enumConstant497);
					arguments();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:330:44: ( classBody )?
			int alt25=2;
			int LA25_0 = input.LA(1);
			if ( (LA25_0==121) ) {
				alt25=1;
			}
			switch (alt25) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:330:45: classBody
					{
					pushFollow(FOLLOW_classBody_in_enumConstant502);
					classBody();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 14, enumConstant_StartIndex); }

		}
	}
925797
private int element(IAtom atom) {
        Integer element = atom.getAtomicNumber();
        if (element != null) return element;
        if (atom instanceof IPseudoAtom) return 0;
        throw new IllegalArgumentException("Aromaiticty model requires atomic numbers to be set");
    }