Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/OperatorTable.cc

    rbff227f r5809461  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 13 14:33:05 2016
    13 // Update Count     : 10
     12// Last Modified On : Sat Jul 15 17:12:22 2017
     13// Update Count     : 15
    1414//
    1515
     
    1919
    2020#include "OperatorTable.h"
     21#include "Common/utility.h"
    2122
    2223namespace CodeGen {
     
    3637                        {       "++?",          "++",   "_operator_preincr",                    OT_PREFIXASSIGN         },
    3738                        {       "--?",          "--",   "_operator_predecr",                    OT_PREFIXASSIGN         },
     39                        {       "?\\?",         "\\",   "_operator_exponential",                OT_INFIX                        },
    3840                        {       "?*?",          "*",    "_operator_multiply",                   OT_INFIX                        },
    3941                        {       "?/?",          "/",    "_operator_divide",                             OT_INFIX                        },
     
    5355                        {       "?|?",          "|",    "_operator_bitor",                              OT_INFIX                        },
    5456                        {       "?=?",          "=",    "_operator_assign",                             OT_INFIXASSIGN          },
     57                        {       "?\\=?",        "\\=",  "_operator_expassign",                  OT_INFIXASSIGN          },
    5558                        {       "?*=?",         "*=",   "_operator_multassign",                 OT_INFIXASSIGN          },
    5659                        {       "?/=?",         "/=",   "_operator_divassign",                  OT_INFIXASSIGN          },
     
    6366                        {       "?^=?",         "^=",   "_operator_bitxorassign",               OT_INFIXASSIGN          },
    6467                        {       "?|=?",         "|=",   "_operator_bitorassign",                OT_INFIXASSIGN          },
    65                         {       "&&",           "&&",   "&&",                                                   OT_LABELADDRESS         },
    66                         {       "0",            "0",    "_constant_zero",                               OT_CONSTANT                     },
    67                         {       "1",            "1",    "_constant_one",                                OT_CONSTANT                     }
    6868                };
    6969
     
    8484                        initialize();
    8585                } // if
     86
    8687                std::map< std::string, OperatorInfo >::const_iterator i = table.find( funcName );
    8788                if ( i == table.end() ) {
     89                        if ( isPrefix( funcName, "?`" ) ) {
     90                                // handle literal suffixes, which are user-defined postfix operators
     91                                info.inputName = funcName;
     92                                info.symbol = funcName.substr(2);
     93                                info.outputName = toString( "__operator_literal_", info.symbol );
     94                                info.type = OT_POSTFIX;
     95                                return true;
     96                        }
    8897                        return false;
    8998                } else {
Note: See TracChangeset for help on using the changeset viewer.