druidG.g:265:1: anyValue returns [Object obj] : (a= SINGLE_QUOTE_STRING |b= ( LONG | FLOAT ) );
333973
public final Object anyValue() throws RecognitionException {
		Object obj = null;


		Token a=null;
		Token b=null;

		try {
			// druidG.g:266:2: (a= SINGLE_QUOTE_STRING |b= ( LONG | FLOAT ) )
			int alt128=2;
			int LA128_0 = input.LA(1);
			if ( (LA128_0==SINGLE_QUOTE_STRING) ) {
				alt128=1;
			}
			else if ( (LA128_0==FLOAT||LA128_0==LONG) ) {
				alt128=2;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 128, 0, input);
				throw nvae;
			}

			switch (alt128) {
				case 1 :
					// druidG.g:266:3: a= SINGLE_QUOTE_STRING
					{
					a=(Token)match(input,SINGLE_QUOTE_STRING,FOLLOW_SINGLE_QUOTE_STRING_in_anyValue1912); 
					obj = unquote((a!=null?a.getText():null));
					}
					break;
				case 2 :
					// druidG.g:266:53: b= ( LONG | FLOAT )
					{
					b=input.LT(1);
					if ( input.LA(1)==FLOAT||input.LA(1)==LONG ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					obj = (b!=null?b.getText():null);
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return obj;
	}
846384
@Override
	protected R parseValueFromString(String s)
	{
		Class<R> range = this.getRange();
		R value = null;
		try
		{
			if (range.equals(double.class))
			{
				value= (R) Double.valueOf(s);
			}
			else if (range.equals(float.class))
			{
				value=  (R) Float.valueOf(s);
			}
			else if (range.equals(int.class))
			{
				value= (R) Integer.valueOf(s);
			}
			else if (range.equals(Boolean.class))
			{
				value= (R) Boolean.valueOf(s);
			}
		}

		catch (NumberFormatException e)

		{
			throw new IllegalBioPAXArgumentException(
					"Failed to convert literal " + s +
					" to " + range.getSimpleName()
					+ " for " + property, e);
		}
		return value;
	}
1276203
function getIdentifierForArgumentValue(value: ArgumentValue): mixed {
  switch (value.kind) {
    case 'Variable':
      return {variable: value.variableName};
    case 'Literal':
      return {value: value.value};
    case 'ListValue':
      return {
        list: value.items.map(item => getIdentifierForArgumentValue(item)),
      };
    case 'ObjectValue':
      return {
        object: value.fields.map(field => ({
          name: field.name,
          value: getIdentifierForArgumentValue(field.value),
        })),
      };
    default:
      invariant(
        false,
        'getIdentifierForArgumentValue(): Unsupported AST kind `%s`.',
        value.kind,
      );
  }
}
88089
def _convert_value(self, value_orig):
        
        import ast
        if value_orig is None:
            return value_orig

        if value_orig.startswith("'") and value_orig.endswith("'"):
            value = value_orig[1:-1]
        else:

            try:
                avalue = ast.parse(value_orig).body[0].value
                if isinstance(avalue, ast.BinOp):
                    # this is probably a string that happens to look like
                    # a binary operation, e.g. '25-3'
                    value = value_orig
                else:
                    value = ast.literal_eval(value_orig)
            except Exception:
                value = self._convert_string(value_orig)

            if isinstance(value, int) and '_' in value_orig:
                value = value_orig

        return value
478939
function quote(string) {
  var _Object$assign

  var quoteChar = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '"'

  if (quoteChar.length > 1 && process.env.NODE_ENV !== 'production') {
    console.error('quote: `quoteChar` is recommended as single character, but ' + JSON.stringify(quoteChar) + '.')
  }

  return _quote(
    string,
    quoteChar,
    getEscapable(quoteChar),
    Object.assign(
      {},
      commonMeta,
      ((_Object$assign = {}), (_Object$assign[quoteChar] = '\\' + quoteChar), _Object$assign)
    )
  )
}
765645
function objToString(obj, commentFix = false) {
  const comment = commentFix ? '/**/' : ''

  return Object.keys(obj).reduce((acc, k) => {
    let value = obj[k]

    if (k.startsWith('__spread__')) {
      return acc + '${' + value + '};' + comment
    }

    if (typeof value === 'string') {
      if (value[0] === '$') {
        value = '${' + value.substr(1) + '}'
      }
      return acc + camelToKebab(k) + ':' + value + ';' + comment
    } else {
      value = objToString(value)
      let key = k[0] === ':' ? '&' + k : k
      key = key[0] === '`' ? key.substr(1, key.length - 2) : key
      return acc + camelToKebab(key) + '{' + value + '};' + comment
    }
  }, '')
}
1176226
def _format_obj(self, item=None):
        
        # Order here matters, odd behavior with tuples
        if item is None:
            return getattr(self, 'number')(item)
        elif isinstance(item, self.str_):
            #: String
            return item + " "
        elif isinstance(item, bytes):
            #: Bytes
            return getattr(self, 'bytes')(item)
        elif isinstance(item, self.numeric_):
            #: Float, int, etc.
            return getattr(self, 'number')(item)
        elif isinstance(item, self.dict_):
            #: Dict
            return getattr(self, 'dict')(item)
        elif isinstance(item, self.list_):
            #: List
            return getattr(self, 'list')(item)
        elif isinstance(item, tuple):
            #: Tuple
            return getattr(self, 'tuple')(item)
        elif isinstance(item, types.GeneratorType):
            #: Generator
            return getattr(self, 'generator')(item)
        elif isinstance(item, self.set_):
            #: Set
            return getattr(self, 'set')(item)
        elif isinstance(item, deque):
            #: Deque
            return getattr(self, 'deque')(item)
        elif isinstance(item, Sequence):
            #: Sequence
            return getattr(self, 'sequence')(item)
        #: Any other object
        return getattr(self, 'object')(item)
1005178
private static String joinSetAndGetValue(List<Field> fields,
			List<Object> values, Object obj, boolean withNull) {
		StringBuilder sb = new StringBuilder();
		int fieldSize = fields.size();
		for(int i = 0; i < fieldSize; i++) {
			Column column = fields.get(i).getAnnotation(Column.class);
			Object value = DOInfoReader.getValue(fields.get(i), obj);
			if(column.casVersion()) {
				if(value == null) {
					throw new CasVersionNotMatchException("casVersion column value is null");
				}
				Long _v = null;
				if(value instanceof Long) {
					_v = (Long) value;
				} else if (value instanceof Integer) {
					_v = ((Integer) value).longValue();
				} else {
					throw new CasVersionNotMatchException("casVersion column type must be Integer or Long");
				}
				sb.append(getColumnName(column)).append("=").append(_v + 1).append(",");
			} else {
				if(value != null && column.isJSON()) {
					value = JSON.toJson(value);
				}
				if(withNull || value != null) {
					sb.append(getColumnName(column)).append("=?,");
					values.add(value);
				}
			}
		}
		return sb.length() == 0 ? "" : sb.substring(0, sb.length() - 1);
	}
156671
function shallowValueGetter(obj, fieldName) {
    if (obj == null)
        return '';
    if (!obj || !fieldName)
        return obj;
    var value = obj[fieldName];
    if (value == null)
        return '';
    return value;
}
1096965
def dumps(obj, preserve=False):
    
    f = StringIO()
    dump(obj, f, preserve)
    return f.getvalue()
321617
def convert_to_database_compatible_value(value):
    
    if pd.isnull(value):
        return None
    if isinstance(value, pd.Timestamp):
        return value.to_pydatetime()
    try:
        return value.item()
    except AttributeError:
        return value
175634
def validate(self, value):
        
        if isinstance(value, (str, unicode, int, long)):
            value = float(value)
        value = super(Float, self).validate(value)
        if not isinstance(value, (float)):
            raise ValueError("Not an float: %r" % (value, ))
        return value
179148
private Object getPropertyValue(GDLParser.LiteralContext literalContext) {
    String text;
    if (literalContext.StringLiteral() != null) {
      return parseString(literalContext.StringLiteral().getText());
    } else if (literalContext.BooleanLiteral() != null) {
      return Boolean.parseBoolean(literalContext.BooleanLiteral().getText());
    } else if (literalContext.IntegerLiteral() != null) {
      text = literalContext.IntegerLiteral().getText().toLowerCase();
      if (text.endsWith("l")) {
        return Long.parseLong(text.substring(0, text.length() - 1));
      }
      return Integer.parseInt(text);
    } else if (literalContext.FloatingPointLiteral() != null) {
      text = literalContext.FloatingPointLiteral().getText().toLowerCase();
      if (text.endsWith("f")) {
        return Float.parseFloat(text.substring(0, text.length() - 1));
      } else if (text.endsWith("d")) {
        return Double.parseDouble(text.substring(0, text.length() - 1));
      }
      return Float.parseFloat(text);
    }
    return null;
  }
957132
def safe_eval(value):
    
    if not isinstance(value, (str, unicode)):
        return value

    try:
        return CONSTANT_EVALS[value]
    except KeyError:
        try:
            return ast.literal_eval(value)
        except StandardError:
            return value
1260005
def generate_any_value?(lm, hm)
      (lm.nil? || lm.is_a?(HQMF::AnyValue)) && (hm.nil? || hm.is_a?(HQMF::AnyValue))
    end
1304117
private Object value(Object obj, Element node) throws Exception {
		Object value = null;

		// Get the type
		String type = getAttribute(node, "type");

		// Try a ref lookup
		String ref = getAttribute(node, "ref");
		if (ref != null) {
			value = _idMap.get(ref);
		} else {
			// handle trivial case
			if (getChildren(node).length == 0
					&& (getValue(node) == null || getValue(node).length() == 0)) {
				if ("String".equals(type)) {
					return "";
				}
				return null;
			}

			// Trim values
			int first = 0;
			int last = /*
						 * getChildren(node).length - 1; int valLast =
						 */getValue(node).length() - 1;

			// Handle default trim type
			if (type == null || !"String".equals(type)) {
				// Skip leading white
				Object item = null;
				while (first <= last) {
					item = /*
							 * getChildren(node)[first]; val =
							 */getValue(node);
					if (!(item instanceof String)) {
						break;
					}
					item = ((String) item).trim();
					if (((String) item).length() > 0) {
						break;
					}
					first++;
				}

				// Skip trailing white
				while (first < last) {
					item = getValue(node);
					if (!(item instanceof String)) {
						break;
					}
					item = ((String) item).trim();
					if (((String) item).length() > 0) {
						break;
					}
					last--;
				}

				// All white, so return null
				if (first > last) {
					// first check if there are maybe is another child left
					if (getChildren(node).length == 0) {
						return null;
					} else {
						value = itemValue(obj, getChildren(node)[0]);
					}
				} else {
					value = item;
				}
			} else  if (first == last) {
	            // Single Item value
	            value = itemValue(obj,getChildren(node)[0]);
		    } else {
	            value = getValue(node);
	        }
		}
		
		

		// Untyped or unknown
		if (value == null) {
			if ("String".equals(type)) {
				return "";
			}
			return null;
		}

		// Try to type the object
		if (type == null) {
			if (value != null && value instanceof String) {
				return ((String) value).trim();
			}
			return value;
		}

		if ("String".equals(type) || "java.lang.String".equals(type)) {
			return value.toString();
		}

		Class<?> pClass = TypeUtil.fromName(type);
		if (pClass != null) {
			return TypeUtil.valueOf(pClass, value.toString());
		}

		if ("URL".equals(type) || "java.net.URL".equals(type)) {
			if (value instanceof URL) {
				return value;
			}
			try {
				return new URL(value.toString());
			} catch (MalformedURLException e) {
				throw new InvocationTargetException(e);
			}
		}

		if ("InetAddress".equals(type) || "java.net.InetAddress".equals(type)) {
			if (value instanceof InetAddress) {
				return value;
			}
			try {
				return InetAddress.getByName(value.toString());
			} catch (UnknownHostException e) {
				throw new InvocationTargetException(e);
			}
		}

		throw new IllegalStateException("Unknown type " + type);
	}
273584
def parse_single_value(value):
    
    if isinstance(value, basestring):
        try:
            if value.startswith('"') and value.endswith('"'):
                value = str(value[1:-1])
            elif '.' in value:
                value = float(value)
            else:
                value = int(value)
        except ValueError:
            value = str(value)
    elif not isinstance(value, (int, float)):
        raise ArcanaUsageError(
            "Unrecognised type for single value {}".format(value))
    return value