Hash :
987e989c
Author :
Thomas de Grivel
Date :
2017-02-13T12:13:55
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
(in-package :parse-css)
(defclass token ()
((string :initarg :string
:accessor token-string
:type string)
(line :initarg :line
:initform 0
:accessor token-line
:type fixnum)
(character :initarg :character
:initform 0
:accessor token-character
:type fixnum)))
(defclass parser-token (token)
((start :initarg :start
:accessor token-start
:type fixnum)))
(defclass parser ()
((input :initarg :stream
:reader parser-input
:type stream)
(input-line :initarg :input-line
:initform 0
:accessor parser-input-line
:type fixnum)
(input-character :initarg :input-character
:initform -1
:accessor parser-input-character
:type fixnum)
(eof :initform nil
:accessor parser-eof)
(ib :initform (make-input-buffer)
:accessor parser-ib
:type array)
(match-start :initform 0
:accessor parser-match-start
:type fixnum)
(token-stack :initform ()
:accessor parser-token-stack
:type list)
(ib :initform (make-item-buffer)
:accessor parser-ib
:type vector)
(item-match-start :initform 0
:accessor parser-item-match-start
:type fixnum)))