   return ret
 
 module.exports = (sami, options) ->
-  errors = []
-  definedLangs = {
-    KRCC: {
-      lang: 'ko'
-      reClassName: new RegExp("class[^=]*?=[\"'\S]*(KRCC)['\"\S]?", 'i')
-    },
-    ENCC: {
-      lang: 'en'
-      reClassName: new RegExp("class[^=]*?=[\"'\S]*(ENCC)['\"\S]?", 'i')
-    },
-    JPCC: {
-      lang: 'ja'
-      reClassName: new RegExp("class[^=]*?=[\"'\S]*(JPCC)['\"\S]?", 'i')
-    }
-  }
 
   parse = () ->
+    error = (error) ->
+      e = new Error(error)
+      e.line = lineNum
+      e.context = element
+      errors.push(e)
+
     lineNum = 1
     ret = []
     tempRet = {}

cssParse = require 'css-parse'
langCodes = require './lang_codes.js'
definedLangs = {}
# from http://coffeescriptcookbook.com/chapters/classes_and_objects/cloning
clone = (obj) ->
  if not obj? or typeof obj isnt 'object'

      else
        element = str.slice(startTagIdx)

      lineNum += str.slice(0, startTagIdx).match(reLineEnding)?.length or 0 
      error('ERROR_BROKEN_TAGS') if isBroken = reBrokenTag.test(element)

      str = str.slice(startTagIdx+nextStartTagIdx)
      startTime = +element.match(reStartTime)?[1]
      error('ERROR_INVALID_TIME') if startTime is null or startTime < 0
      
      lang = getLanguage(element)
      error('ERROR_INVALID_LANGUAGE') if !lang

      lineNum += element.match(reLineEnding)?.length or 0
      element = element.replace(reLineEnding, '')
