(string)
return globals()[string]
Uses a token in the grammar (e.g. `'+'` or `'and'`returns the corresponding
    ID for it. The strings are part of the grammar file.
Uses a token in the grammar (e.g. `'+'` or `'and'`returns the corresponding
    ID for it. The strings are part of the grammar file.
Uses a token in the grammar ( e . g . + or and returns the corresponding ID for it . The strings are part of the grammar file .
def generate_token_id(string):
    """
    Uses a token in the grammar (e.g. `'+'` or `'and'`returns the corresponding
    ID for it. The strings are part of the grammar file.
    """
    try:
        return opmap[string]
    except KeyError:
        pass
    return globals()[string]
def generate_token_id ( string ) : try : return opmap [ string ] except KeyError : pass return globals ( ) [ string ]