convert enum values to integers

Previously the enum values given to the backends were strings of C code.
Luckily the code was simple enough that it was also valid Python. Moving the
conversion to the frontend makes it easier to move enum definitions into the
input files, and cleans up some pyloxi code.
diff --git a/loxi_front_end/parser.py b/loxi_front_end/parser.py
index 974e6cf..d79dd3c 100644
--- a/loxi_front_end/parser.py
+++ b/loxi_front_end/parser.py
@@ -36,6 +36,10 @@
 tag = lambda name: P.Empty().setParseAction(P.replaceWith(name))
 
 word = P.Word(P.alphanums + '_')
+integer = (
+            P.Combine('0x' - P.Word('0123456789abcdefABCDEF') |
+            P.Word('0123456789'))
+          ).setParseAction(lambda x: int(x[0], 0))
 
 identifier = word.copy().setName("identifier")
 
@@ -52,7 +56,7 @@
          s('}') - s(';')
 
 # Enums
-enum_member = P.Group(identifier + s('=') + P.Word(P.alphanums + '_'))
+enum_member = P.Group(identifier + s('=') + integer)
 enum_list = P.Forward()
 enum_list << enum_member + P.Optional(s(',') + P.Optional(enum_list))
 enum = kw('enum') - identifier - s('{') + \