-main = ()->
+main = undefined
+parse = undefined
+main = ->
+  result = undefined
+  source = undefined
   source = INPUT.value
-  
-  try 
+  try
     result = JSON.stringify(parse(source), null, 2)
-  catch result
-    result = """<div class="error">#{result}</div>"""
-    
+  catch _error
+    result = _error
+    result = "<div class=\"error\">" + result + "</div>"
   OUTPUT.innerHTML = result
 
-window.onload = ()-> 
+window.onload = ->
   PARSE.onclick = main
 
 Object.constructor::error = (message, t) ->
   t = t or this
   t.name = "SyntaxError"
   t.message = message
-  throw treturn
+  throw treturnreturn
 
 RegExp::bexec = (str) ->
+  i = undefined
+  m = undefined
   i = @lastIndex
   m = @exec(str)
   return m  if m and m.index is i
   null
 
 String::tokens = ->
-  from = undefined # The index of the start of the token.
-  i = 0 # The index of the current character.
-  n = undefined # The number value.
-  m = undefined # Matching
-  result = [] # An array to hold the results.
+  ID = undefined
+  MULTIPLELINECOMMENT = undefined
+  NUM = undefined
+  ONECHAROPERATORS = undefined
+  ONELINECOMMENT = undefined
+  RESERVED_WORD = undefined
+  STRING = undefined
+  WHITES = undefined
+  from = undefined
+  getTok = undefined
+  i = undefined
+  m = undefined
+  make = undefined
+  n = undefined
+  result = undefined
+  rw = undefined
+  tokens = undefined
+  from = undefined
+  i = 0
+  n = undefined
+  m = undefined
+  result = []
   WHITES = /\s+/g
   ID = /[a-zA-Z_]\w*/g
   NUM = /\b\d+(\.\d*)?([eE][+-]?\d+)?\b/g

    ONECHAROPERATORS
  ]
  RESERVED_WORD = p: "P"
  
  # Make a token object.
  make = (type, value) ->
    type: type
    value: value

      result =
        type: "P"
        value: right
    else
      throw "Syntax Error. Expected identifier but found " + ((if lookahead then lookahead.value else "end of input")) + (" near '" + (input.substr(lookahead.from)) + "'")
    result

  expression = ->
    result = undefined
    right = undefined
    result = term()
    if lookahead and lookahead.type is "+"
      match "+"
