Handles symbol tokens that begin with a dollar sign. These may end up being system symbols ($ion_*), symbol
    identifiers ('$' DIGITS+), or regular unquoted symbols.
971414
def _symbol_identifier_or_unquoted_symbol_handler(c, ctx, is_field_name=False):
    
    assert c == _DOLLAR_SIGN
    in_sexp = ctx.container.ion_type is IonType.SEXP
    ctx.set_unicode().set_ion_type(IonType.SYMBOL)
    val = ctx.value
    val.append(c)
    prev = c
    c, self = yield
    trans = ctx.immediate_transition(self)
    maybe_ivm = ctx.depth == 0 and not is_field_name and not ctx.annotations
    complete_ivm = False
    maybe_symbol_identifier = True
    match_index = 1
    ivm_post_underscore = False
    while True:
        if c not in _WHITESPACE:
            if prev in _WHITESPACE or _ends_value(c) or c == _COLON or (in_sexp and c in _OPERATORS):
                break
            maybe_symbol_identifier = maybe_symbol_identifier and c in _DIGITS
            if maybe_ivm:
                if match_index == len(_IVM_PREFIX):
                    if c in _DIGITS:
                        if ivm_post_underscore:
                            complete_ivm = True
                    elif c == _UNDERSCORE and not ivm_post_underscore:
                        ivm_post_underscore = True
                    else:
                        maybe_ivm = False
                        complete_ivm = False
                else:
                    maybe_ivm = c == _IVM_PREFIX[match_index]
            if maybe_ivm:
                if match_index < len(_IVM_PREFIX):
                    match_index += 1
            elif not maybe_symbol_identifier:
                yield ctx.immediate_transition(_unquoted_symbol_handler(c, ctx, is_field_name))
            val.append(c)
        elif match_index < len(_IVM_PREFIX):
            maybe_ivm = False
        prev = c
        c, _ = yield trans
    if len(val) == 1:
        assert val[0] == _chr(_DOLLAR_SIGN)
    elif maybe_symbol_identifier:
        assert not maybe_ivm
        sid = int(val[1:])
        val = SymbolToken(None, sid)
    elif complete_ivm:
        val = _IVMToken(*val.as_symbol())
    yield _symbol_token_end(c, ctx, is_field_name, value=val)
432070
function define( $c, $alt = '' ){
		if( ! is_string($c) ){
			trigger_error("symbol $c must be a string", E_USER_WARNING );
			return null;
		}
		if( defined($c) ){
			trigger_error("Conflict on symbol $c, already defined", E_USER_ERROR );
		}
		define( $c, ++ $this->i );
		$this->names[ $this->i ] = $alt ? $alt : $c;
		return $this->i;
	}
783427
private void checkToken(String s) {
		for (int i = 0; i < s.length(); i++) {
			char ch = s.charAt(i);
			if (!TOKEN.get(ch)) {
				throw new IllegalArgumentException("Invalid token character '" + ch + "' in token \"" + s + "\"");
			}
		}
	}
276919
private String pathToKey(String path) {
        if (path.startsWith(ValueConsts.DOLLAR_SIGN)) {
            path = path.substring(1);
        }
        if (!path.startsWith(ValueConsts.DOT_SIGN)) {
            path = ValueConsts.DOT_SIGN + path;
        }
        if (!path.endsWith(ValueConsts.DOT_SIGN)) {
            path += ValueConsts.DOT_SIGN;
        }
        return path;
    }
197608
public boolean isCurrentSpecial() {
	if (!isValidIndex()) return false;
	return lcText[pos] == '_' || lcText[pos] == '$' || lcText[pos] == SystemUtil.SYMBOL_EURO || lcText[pos] == SystemUtil.SYMBOL_POUND;
    }
1367875
def get_currencysymbol(self, code):
        """"""
        if not self._symbols:
            symbolpath = os.path.join(self._dir, 'currencies.json')
            with open(symbolpath, encoding='utf8') as df:
                self._symbols = json.load(df)
        return self._symbols.get(code)
483863
def where_stmt_handle(tokens):
    """"""
    internal_assert(len(tokens) == 2, "invalid where statement tokens", tokens)
    base_stmt, assignment_stmts = tokens
    stmts = list(assignment_stmts) + [base_stmt]
    return "\n".join(stmts) + "\n"
1149717
@Trivial
    public static boolean isSymbol(String s) {
        if (s.length() > 3 && s.charAt(0) == '$' && s.charAt(1) == '{')
            return true;

        return false;
    }
1224164
public static SymbolToken systemSymbol(final int sid) {
        if (sid < 1 || sid > ION_1_0_MAX_ID)
        {
            throw new IllegalArgumentException("No such system SID: " + sid);
        }
        return SYSTEM_TOKENS.get(sid - 1);
    }
325489
def symbol_key(x)
      HTMLEntities.new.decode(x.text).gsub(/_/, ":").gsub(/`/, "").
        gsub(/[0-9]+/, "þ\\1")
    end
948629
public boolean isCurrentSpecial() {
	if (!isValidIndex()) return false;
	return lcText[pos] == '_' || lcText[pos] == '$' || lcText[pos] == SystemUtil.CHAR_EURO || lcText[pos] == SystemUtil.CHAR_POUND;
    }
645520
function handleToken(tokens, name) {
		var value = tokens[name];

		var type = Prism.util.type(value);
		switch (type) {
			case 'RegExp':
				var inside = {};
				tokens[name] = {
					pattern: value,
					inside: inside
				};
				addInvisibles(inside);
				break;

			case 'Array':
				for (var i = 0, l = value.length; i < l; i++) {
					handleToken(value, i);
				}
				break;

			default: // 'Object'
				var inside = value.inside || (value.inside = {});
				addInvisibles(inside);
				break;
		}
	}
895942
private String getToken(MonetaryAmount amount) {
        switch (style) {
            case NUMERIC_CODE:
                return String.valueOf(amount.getCurrency().getNumericCode());
            case NAME:
                return getCurrencyName(amount.getCurrency());
            case SYMBOL:
                return getCurrencySymbol(amount.getCurrency());
            case CODE:
                return amount.getCurrency().getCurrencyCode();
            default:
                throw new UnsupportedOperationException("Unexpected style " + style);
        }
    }
599527
def currency_format(cents):
    
    try:
        cents = int(cents)
    except ValueError:
        return cents

    negative = (cents < 0)
    if negative:
        cents = -1 * cents

    if cents < 100:
        dollars = 0
    else:
        dollars = cents / 100
        cents = cents % 100

    centstr = str(cents)
    if len(centstr) < 2:
        centstr = '0' + centstr

    if negative:
        return "- $%s.%s" % (intcomma(dollars), centstr)
    return "$%s.%s" % (intcomma(dollars), centstr)
741491
def convert_value(self, value):
        
        if isinstance(value, str):
            assert value.startswith(self.symbol), "Currency does not start with " + self.symbol
            value = value.lstrip(self.symbol)
        return super().convert_value(value)
427368
function token_name ( $t ){
		$t = self::token_to_symbol( $t );
		if( ! is_int($t) ){
			return $t;
		}
		return $this->Lex->name( $t );
	}
226885
async function inputSymbol(symbol) {
    if (typeof symbol === 'undefined') {
        STSymbol = readlineSync.question(chalk.yellow(`Enter the symbol of a registered security token or press 'Enter' to exit: `));
    } else {
        STSymbol = symbol;
    }

    if (STSymbol == "") process.exit();

    STAddress = await securityTokenRegistry.methods.getSecurityTokenAddress(STSymbol).call();
    if (STAddress == "0x0000000000000000000000000000000000000000") {
        console.log(`Token symbol provided is not a registered Security Token. Please enter another symbol.`);
    } else {
        let securityTokenABI = abis.securityToken();
        securityToken = new web3.eth.Contract(securityTokenABI, STAddress);

        await showTokenInfo();

        let gtmModule = await securityToken.methods.getModulesByName(web3.utils.toHex('GeneralTransferManager')).call();
        let generalTransferManagerABI = abis.generalTransferManager();
        generalTransferManager = new web3.eth.Contract(generalTransferManagerABI, gtmModule[0]);

        let stoModules = await securityToken.methods.getModulesByType(gbl.constants.MODULES_TYPES.STO).call();
        if (stoModules.length == 0) {
            console.log(chalk.red(`There is no STO module attached to the ${STSymbol.toUpperCase()} Token. No further actions can be taken.`));
            process.exit(0);
        } else {
            STOAddress = stoModules[0];
            let stoModuleData = await securityToken.methods.getModule(STOAddress).call();
            selectedSTO = web3.utils.toAscii(stoModuleData[0]).replace(/\u0000/g, '');
            let interfaceSTOABI = abis.stoInterface();
            currentSTO = new web3.eth.Contract(interfaceSTOABI, STOAddress);
        }
    }
}