 
 $(document).ready ->
   PARSE.onclick = main
-
-
 
 Object.constructor::error = (message, t) ->
   t = t or this

          value: value
          left: block()
        match ";"
      else # Error!
        throw "Syntax Error. Expected ID but found " + 
              (if lookahead then lookahead.value else "end of input") + 
              " near '#{input.substr(lookahead.from)}'"


  factor = ->
    result = null

    if lookahead.type is "NUM"
      result =
        type: "NUM"
        value: lookahead.value
      match "NUM"

    else if lookahead.type is "ID"
      result =
        type: "ID"
        value: lookahead.value
      match "ID"

    else if lookahead.type is "("
      match "("
      result = expression()
      match ")"

    else
      throw "Syntax Error. Expected number or identifier or '(' but found " + 
            (if lookahead then lookahead.value else "end of input") + 
            " near '" + input.substr(lookahead.from) + "'"
