Added random-float and reporter tests
[clnl] / src / main / lex.lisp
index 93343e66e6afc7a730832128ccabd46f24ae775e..c7f082fc3d203f82e0e7d267c40236b77802980b 100644 (file)
 (defun lex (text)
  (if (string= "" text)
      (let
-      ((lex (find-if (lambda (f) (funcall f *state* :eof)) *lexes* :key #'car)))
+      ((lex (find-if (lambda (f) (funcall f *state* :eof)) *lexes* :from-end t :key #'car)))
       (when lex (list (funcall (third lex) :eof))))
      (let
-      ((lex (find-if (lambda (f) (funcall f *state* text)) *lexes* :key #'car)))
+      ((lex (find-if (lambda (f) (funcall f *state* text)) *lexes* :from-end t :key #'car)))
       (when (not lex) (error "Can't lex this: ~S" text))
       (let
        ((val (funcall (third lex) (subseq text 0 (funcall (cadr lex) text)))))
@@ -54,7 +54,7 @@
 (defvar *letter* "\\w")
 (defvar *digit* "\\d")
 ;(defparameter *identifier-char* "[\\w\\d_\\.?=\*!<>:#\+/%\$\^\'&-]")
-(defvar *identifier-char* "[\\w\\d]")
+(defvar *identifier-char* "[\\w\\d-.]")
 
 ;(defvar *extension-literal-depth* 0)
 ;(defstruct extension-literal text)