                       seqtoks))
           ))))
   nil)
+


(defn lex-string
  [^String grammar ;; e.g. "org.mobileink.antlr.sym"
   ^String the-string ;; file to parse
   ;; rule ;; grammar rule symbol
   ]

  ;; TODO:  proxy <grammar>Lexer

  (let [
        lexname (str grammar "Lexer")
        strinput (ANTLRInputStream. the-string)
        lxr (eval `(new ~(Class/forName lexname) nil))
        foo (.setInputStream lxr strinput)
        ;; tokens (do (.reset lxr) (.getAllTokens lxr))
        tokens (CommonTokenStream. lxr)
        ;; parsername (str grammar "Parser")
        ;; parsens (import-by-name parsername)
        ;;lex (.setInputStream (symbol (new (str grammar "Lexer"))) input)
        ]
    (do
      (.fill tokens)
      (let

(ns org.mobileink.antlr.lex
  (:require [criterium.core :as crit]
            [byte-streams :as bs])
  (:import [java.nio.ByteBuffer]
           [java.net URL URLClassLoader]
           [org.antlr.v4.runtime
            ANTLRInputStream
            ANTLRFileStream
            CharStream
