diff --git a/css-lexer.lisp b/css-lexer.lisp
index 4ca8bb7..9cf5a04 100644
--- a/css-lexer.lisp
+++ b/css-lexer.lisp
@@ -3,40 +3,40 @@
(defclass css-lexer (lexer) ())
-(defgeneric comment-token (lexer))
-(defgeneric match-newline (lexer))
-(defgeneric match-whitespace (lexer))
-(defgeneric match-hex-digit (lexer))
-(defgeneric match-escape (lexer))
-(defgeneric whitespace-token (lexer))
-(defgeneric match-ws* (lexer))
-(defgeneric match-ident-char (lexer))
-(defgeneric match-ident-char* (lexer))
-(defgeneric ident-token (lexer))
-(defgeneric function-token (lexer))
-(defgeneric at-keyword-token (lexer))
-(defgeneric match-string-char (lexer end-char))
-(defgeneric match-string (lexer end-char))
-(defgeneric string-token (lexer))
-(defgeneric match-non-printable (lexer))
-(defgeneric match-url-unquoted-char (lexer))
-(defgeneric match-url-unquoted (lexer))
-(defgeneric url-token (lexer))
-(defgeneric match-digit (lexer))
-(defgeneric match-digit+ (lexer))
-(defgeneric number-token (lexer))
-(defgeneric dimension-token (lexer))
-(defgeneric percentage-token (lexer))
-(defgeneric unicode-range-token (lexer))
-(defgeneric include-match-token (lexer))
-(defgeneric dash-match-token (lexer))
-(defgeneric prefix-match-token (lexer))
-(defgeneric suffix-match-token (lexer))
-(defgeneric substring-match-token (lexer))
-(defgeneric column-token (lexer))
-(defgeneric cdo-token (lexer))
-(defgeneric cdc-token (lexer))
-(defgeneric consume-token (lexer))
+(defgeneric comment-token (css-lexer))
+(defgeneric match-newline (css-lexer))
+(defgeneric match-whitespace (css-lexer))
+(defgeneric match-hex-digit (css-lexer))
+(defgeneric match-escape (css-lexer))
+(defgeneric whitespace-token (css-lexer))
+(defgeneric match-ws* (css-lexer))
+(defgeneric match-ident-char (css-lexer))
+(defgeneric match-ident-char* (css-lexer))
+(defgeneric ident-token (css-lexer))
+(defgeneric function-token (css-lexer))
+(defgeneric at-keyword-token (css-lexer))
+(defgeneric match-string-char (css-lexer end-char))
+(defgeneric match-string (css-lexer end-char))
+(defgeneric string-token (css-lexer))
+(defgeneric match-non-printable (css-lexer))
+(defgeneric match-url-unquoted-char (css-lexer))
+(defgeneric match-url-unquoted (css-lexer))
+(defgeneric url-token (css-lexer))
+(defgeneric match-digit (css-lexer))
+(defgeneric match-digit+ (css-lexer))
+(defgeneric number-token (css-lexer))
+(defgeneric dimension-token (css-lexer))
+(defgeneric percentage-token (css-lexer))
+(defgeneric unicode-range-token (css-lexer))
+(defgeneric include-match-token (css-lexer))
+(defgeneric dash-match-token (css-lexer))
+(defgeneric prefix-match-token (css-lexer))
+(defgeneric suffix-match-token (css-lexer))
+(defgeneric substring-match-token (css-lexer))
+(defgeneric column-token (css-lexer))
+(defgeneric cdo-token (css-lexer))
+(defgeneric cdc-token (css-lexer))
+(defgeneric consume-token (css-lexer))
(defclass css-token (token) ())
(defclass printable (token) ())
@@ -89,7 +89,7 @@
(defclass eof-token (css-token) ())
(defclass delim-token (printable css-token) ())
-(defmethod comment-token ((lx lexer))
+(defmethod comment-token ((lx css-lexer))
(push-token lx)
(or (and (match lx "/*")
(match-until lx "*/")
@@ -97,25 +97,25 @@
(discard-token lx)))
(let ((rn (coerce '(#\Return #\Newline) 'string)))
- (defmethod match-newline ((lx lexer))
+ (defmethod match-newline ((lx css-lexer))
(or (match lx #\Newline)
(match lx rn)
(match lx #\Return)
(match lx #\Linefeed))))
-(defmethod match-whitespace ((lx lexer))
+(defmethod match-whitespace ((lx css-lexer))
(or (match lx #\Space)
(match lx #\Tab)
(match-newline lx)))
-(defmethod match-hex-digit ((lx lexer))
+(defmethod match-hex-digit ((lx css-lexer))
(let ((c (the fixnum (lexer-match-char lx 0))))
(when (or (<= (char-code #\0) c (char-code #\9))
(<= (char-code #\a) c (char-code #\f))
(<= (char-code #\A) c (char-code #\F)))
(incf (the fixnum (lexer-match-start lx))))))
-(defmethod match-escape ((lx lexer))
+(defmethod match-escape ((lx css-lexer))
(match-sequence lx
(and (match lx #\\)
(or (when (match-times lx #'match-hex-digit 1 6)
@@ -124,16 +124,16 @@
(when (not (match-newline lx))
(lexer-match-start lx))))))
-(defmethod whitespace-token ((lx lexer))
+(defmethod whitespace-token ((lx css-lexer))
(push-token lx)
(if (match-times lx #'match-whitespace 1 nil)
(make-token lx 'whitespace-token)
(discard-token lx)))
-(defmethod match-ws* ((lx lexer))
+(defmethod match-ws* ((lx css-lexer))
(match-option lx #'whitespace-token))
-(defmethod match-ident-char ((lx lexer))
+(defmethod match-ident-char ((lx css-lexer))
(or (match-escape lx)
(let ((c (the character (lexer-match-char lx 0))))
(when (or (char<= #\a c #\z)
@@ -144,10 +144,10 @@
(< #x007F (char-code c)))
(incf (the fixnum (lexer-match-start lx)))))))
-(defmethod match-ident-char* ((lx lexer))
+(defmethod match-ident-char* ((lx css-lexer))
(match-times lx #'match-ident-char 0 nil))
-(defmethod ident-token ((lx lexer))
+(defmethod ident-token ((lx css-lexer))
(match-sequence lx
(push-token lx)
(match lx #\-)
@@ -163,7 +163,7 @@
(t
(discard-token lx)))))
-(defmethod function-token ((lx lexer))
+(defmethod function-token ((lx css-lexer))
(match-sequence lx
(push-token lx)
(let ((ident (ident-token lx)))
@@ -171,7 +171,7 @@
(make-token lx 'function-token :ident ident)
(discard-token lx)))))
-(defmethod at-keyword-token ((lx lexer))
+(defmethod at-keyword-token ((lx css-lexer))
(match-sequence lx
(push-token lx)
(if (match lx #\@)
@@ -181,7 +181,7 @@
(discard-token lx)))
(discard-token lx))))
-(defmethod hash-token ((lx lexer))
+(defmethod hash-token ((lx css-lexer))
(match-sequence lx
(push-token lx)
(if (match lx #\#)
@@ -196,7 +196,7 @@
(declare (type (vector character) string))
(subseq string 1 (1- (length string)))))
-(defmethod match-string-char ((lx lexer) (end-char character))
+(defmethod match-string-char ((lx css-lexer) (end-char character))
(or (match-sequence lx
(and (match lx #\\)
(match-newline lx)))
@@ -206,19 +206,19 @@
(match lx #\\)
(match-newline lx))))))
-(defmethod match-string ((lx lexer) (end-char character))
+(defmethod match-string ((lx css-lexer) (end-char character))
(match-sequence lx
(and (match lx end-char)
(match-times lx (lambda (lx) (match-string-char lx end-char)) 0 nil)
(match lx end-char))))
-(defmethod string-token ((lx lexer))
+(defmethod string-token ((lx css-lexer))
(push-token lx)
(if (or (match-string lx #\")
(match-string lx #\'))
(make-token lx 'string-token)))
-(defmethod match-non-printable ((lx lexer))
+(defmethod match-non-printable ((lx css-lexer))
(let ((c (the fixnum (lexer-match-char lx 0))))
(when (or (<= #x0000 c #x0008)
(= #x000B c)
@@ -226,7 +226,7 @@
(= #x007F c))
(incf (the fixnum (lexer-match-start lx))))))
-(defmethod match-url-unquoted-char ((lx lexer))
+(defmethod match-url-unquoted-char ((lx css-lexer))
(or (match-escape lx)
(match-not lx
(or (match lx #\")
@@ -237,13 +237,13 @@
(match-whitespace lx)
(match-non-printable lx)))))
-(defmethod match-url-unquoted ((lx lexer))
+(defmethod match-url-unquoted ((lx css-lexer))
(push-token lx)
(if (match-times lx #'match-url-unquoted-char 1 nil)
(make-token lx 'token)
(discard-token lx)))
-(defmethod url-token ((lx lexer))
+(defmethod url-token ((lx css-lexer))
(push-token lx)
(or (match-sequence lx
(let ((ident (ident-token lx)))
@@ -258,15 +258,15 @@
(make-token lx 'url-token :ident ident :url url))))))
(discard-token lx)))
-(defmethod match-digit ((lx lexer))
+(defmethod match-digit ((lx css-lexer))
(let ((c (the character (lexer-match-char lx 0))))
(when (char<= #\0 c #\9)
(incf (the fixnum (lexer-match-start lx))))))
-(defmethod match-digit+ ((lx lexer))
+(defmethod match-digit+ ((lx css-lexer))
(match-times lx #'match-digit 1 nil))
-(defmethod number-token ((lx lexer))
+(defmethod number-token ((lx css-lexer))
(push-token lx)
(if (match-sequence lx
(and (or (match lx #\-)
@@ -291,7 +291,7 @@
(make-token lx 'number-token)
(discard-token lx)))
-(defmethod dimension-token ((lx lexer))
+(defmethod dimension-token ((lx css-lexer))
(push-token lx)
(or (match-sequence lx
(let ((number (number-token lx)))
@@ -303,7 +303,7 @@
:ident ident))))))
(discard-token lx)))
-(defmethod percentage-token ((lx lexer))
+(defmethod percentage-token ((lx css-lexer))
(push-token lx)
(or (match-sequence lx
(let ((number (number-token lx)))
@@ -313,7 +313,7 @@
:number number)))))
(discard-token lx)))
-(defmethod unicode-range-token ((lx lexer))
+(defmethod unicode-range-token ((lx css-lexer))
(push-token lx)
(or (match-sequence lx
(and (or (match lx #\u)
@@ -336,109 +336,109 @@
(make-token lx 'unicode-range-token)))
(discard-token lx)))
-(defmethod include-match-token ((lx lexer))
+(defmethod include-match-token ((lx css-lexer))
(push-token lx)
(if (match lx "~=")
(make-token lx 'include-match-token)
(discard-token lx)))
-(defmethod dash-match-token ((lx lexer))
+(defmethod dash-match-token ((lx css-lexer))
(push-token lx)
(if (match lx "|=")
(make-token lx 'dash-match-token)
(discard-token lx)))
-(defmethod prefix-match-token ((lx lexer))
+(defmethod prefix-match-token ((lx css-lexer))
(push-token lx)
(if (match lx "^=")
(make-token lx 'prefix-match-token)
(discard-token lx)))
-(defmethod suffix-match-token ((lx lexer))
+(defmethod suffix-match-token ((lx css-lexer))
(push-token lx)
(if (match lx "$=")
(make-token lx 'suffix-match-token)
(discard-token lx)))
-(defmethod substring-match-token ((lx lexer))
+(defmethod substring-match-token ((lx css-lexer))
(push-token lx)
(if (match lx "*=")
(make-token lx 'substring-match-token)
(discard-token lx)))
-(defmethod column-token ((lx lexer))
+(defmethod column-token ((lx css-lexer))
(push-token lx)
(if (match lx "||")
(make-token lx 'column-token)
(discard-token lx)))
-(defmethod cdo-token ((lx lexer))
+(defmethod cdo-token ((lx css-lexer))
(push-token lx)
(if (match lx "<!--")
(make-token lx 'cdo-token)
(discard-token lx)))
-(defmethod cdc-token ((lx lexer))
+(defmethod cdc-token ((lx css-lexer))
(push-token lx)
(if (match lx "-->")
(make-token lx 'cdc-token)
(discard-token lx)))
-(defmethod left-paren-token ((lx lexer))
+(defmethod left-paren-token ((lx css-lexer))
(push-token lx)
(if (match lx #\()
(make-token lx 'left-paren-token)
(discard-token lx)))
-(defmethod right-paren-token ((lx lexer))
+(defmethod right-paren-token ((lx css-lexer))
(push-token lx)
(if (match lx #\))
(make-token lx 'right-paren-token)
(discard-token lx)))
-(defmethod comma-token ((lx lexer))
+(defmethod comma-token ((lx css-lexer))
(push-token lx)
(if (match lx #\,)
(make-token lx 'comma-token)
(discard-token lx)))
-(defmethod colon-token ((lx lexer))
+(defmethod colon-token ((lx css-lexer))
(push-token lx)
(if (match lx #\:)
(make-token lx 'colon-token)
(discard-token lx)))
-(defmethod semicolon-token ((lx lexer))
+(defmethod semicolon-token ((lx css-lexer))
(push-token lx)
(if (match lx #\;)
(make-token lx 'semicolon-token)
(discard-token lx)))
-(defmethod [-token ((lx lexer))
+(defmethod [-token ((lx css-lexer))
(push-token lx)
(if (match lx #\[)
(make-token lx '[-token)
(discard-token lx)))
-(defmethod ]-token ((lx lexer))
+(defmethod ]-token ((lx css-lexer))
(push-token lx)
(if (match lx #\])
(make-token lx ']-token)
(discard-token lx)))
-(defmethod {-token ((lx lexer))
+(defmethod {-token ((lx css-lexer))
(push-token lx)
(if (match lx #\{)
(make-token lx '{-token)
(discard-token lx)))
-(defmethod }-token ((lx lexer))
+(defmethod }-token ((lx css-lexer))
(push-token lx)
(if (match lx #\})
(make-token lx '}-token)
(discard-token lx)))
-(defmethod eof-token ((lx lexer))
+(defmethod eof-token ((lx css-lexer))
(unless (lexer-input-n lx 1)
(push-token lx)
(cond ((and (lexer-input-ended lx)
@@ -449,7 +449,7 @@
(t
(discard-token lx)))))
-(defmethod delim-token ((lx lexer))
+(defmethod delim-token ((lx css-lexer))
(push-token lx)
(lexer-input-n lx 1)
(incf (the fixnum (lexer-match-start lx)))