1#!/usr/bin/env python 2# -*- coding: utf-8 -*- 3 4# 5# Copyright 2017, Data61 6# Commonwealth Scientific and Industrial Research Organisation (CSIRO) 7# ABN 41 687 119 230. 8# 9# This software may be distributed and modified according to the terms of 10# the BSD 2-Clause license. Note that NO WARRANTY is provided. 11# See "LICENSE_BSD2.txt" for details. 12# 13# @TAG(DATA61_BSD) 14# 15 16from __future__ import absolute_import, division, print_function, \ 17 unicode_literals 18from camkes.internal.seven import cmp, filter, map, zip 19 20NORMALISATION = { 21 'integer' : 'int', 22 'signed int' : 'int', 23 'unsigned integer' : 'unsigned int', 24 'character' : 'character', 25 'bool' : 'boolean', 26} 27 28def normalise_type(type): 29 try: 30 return NORMALISATION[type] 31 except KeyError: 32 return type 33