coins.ast
Class TypeDecoder

java.lang.Object
  extended bycoins.ast.TypeDecoder
All Implemented Interfaces:
TypeId

public class TypeDecoder
extends java.lang.Object
implements TypeId

Utility methods for interpreting an encoded type.


Field Summary
 
Fields inherited from interface coins.ast.TypeId
ARRAY_T, CHAR_T, CONST_T, DOUBLE_T, ELLIPSIS_T, ENUM_BEGIN, ENUM_END, FLOAT_T, FUNCTION_T, INT_T, LONG_DOUBLE_T, LONG_LONG_T, LONG_T, NO_DIMENSION_T, OFFSET_T, POINTER_T, RESTRICT_T, RETURN_T, S_AUTO, S_EXTERN, S_INLINE, S_NONE, S_REGISTER, S_STATIC, SHORT_T, SIGNED_T, SIZE_T, STRUCT_BEGIN, STRUCT_END, UNION_BEGIN, UNION_END, UNSIGNED_T, VOID_T, VOLATILE_T
 
Constructor Summary
TypeDecoder()
           
 
Method Summary
static boolean isArray(byte[] type, int start)
           
static boolean isArrayOrFunction(byte[] type, int start)
           
static boolean isFunction(byte[] type, int start)
           
static int skipCVSU(byte[] type, int start)
          Skips const, volatile, signed, and unsigned.
static java.lang.String toString(byte[] type, int start)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeDecoder

public TypeDecoder()
Method Detail

skipCVSU

public static int skipCVSU(byte[] type,
                           int start)
Skips const, volatile, signed, and unsigned.

Parameters:
start - the index to start the skiping from.
Returns:
the index of the first character that is not const, volatile, signed, or unsigned.

isArray

public static boolean isArray(byte[] type,
                              int start)

isFunction

public static boolean isFunction(byte[] type,
                                 int start)

isArrayOrFunction

public static boolean isArrayOrFunction(byte[] type,
                                        int start)

toString

public static java.lang.String toString(byte[] type,
                                        int start)