       stack[stack.length - 1].push token
   stack[0][0]
 
+leftDelims = ['(', '[', '{']
+rightDelims = [')', ']', '}']
+
+constantLabeling = (atom) ->
+  {token} = atom
+  labelMapping atom,
+    ['numerical', /^-?\d+/.test token]
+    ['label', isLabel atom]
+    ['string', /^["']/.test token]
+    ['regex', /^\/[^ \/]/.test token]
+    ['paren', token in ['(', ')']]
+    ['bracket', token in ['[', ']']]
+    ['brace', token in ['{', '}']]
+    ['whitespace', /^\s+$/.test token]
+
 typed = (a, b) ->
   b.type = a.type
   b

binaryMathOpType = ['Num', ['Num', 'Num']]
comparatorOpType = ['a', ['a', 'Bool']]

builtInContext = ->
  newMapWith 'true', 'Bool',
    'false', 'Bool'

;
"""


exports.compile = (source) ->
  library + compileDefinitions source

