@@ -0,0 +1,934 @@
+package com.davidmogar.njc.syntactic;%0A%0Aimport java.lang.reflect.Field;%0A%0Apublic abstract class Tokens %7B%0A%0A    /* Primitive types */%0A    public static final int CHARACTER = 257;%0A    public static final int DOUBLE = 258;%0A    public static final int INTEGER = 259;%0A    public static final int VOID = 260;%0A%0A    /* Control flow */%0A    public static final int IF = 270;%0A    public static final int WHILE = 271;%0A%0A    /* Other reserved words */%0A    public static final int MAIN = 290;%0A    public static final int RETURN = 291;%0A%0A    public static String getTokenNameByValue(int value) %7B%0A        String token = %22%22;%0A%0A        try %7B%0A            for (Field field : Tokens.class.getFields()) %7B%0A                if ((int) field.get(new Integer(0)) == value) %7B%0A                    token = field.getName();%0A                %7D%0A            %7D%0A        %7D catch (IllegalAccessException e) %7B%0A            // Just ignore it%0A        %7D%0A%0A        return token;%0A    %7D%0A%7D%0A

Add a class to hold all possible tokens