X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/1f1d88f5234188f70548a04fd117ac6e251fe8de..77027cca31175841c42fb14ac5549d789eea8cfe:/lex.lisp diff --git a/lex.lisp b/lex.lisp index cd0a5a8..2df0605 100644 --- a/lex.lisp +++ b/lex.lisp @@ -31,20 +31,12 @@ ;; Class definition. (defclass lexer () - ((stream :initarg :stream - :type stream - :reader lexer-stream) - (char :initform nil - :type (or character null) - :reader lexer-char) - (pushback-chars :initform nil - :type list) - (token-type :initform nil - :accessor token-type) - (token-value :initform nil - :accessor token-value) - (pushback-tokens :initform nil - :type list)) + ((stream :initarg :stream :type stream :reader lexer-stream) + (char :initform nil :type (or character null) :reader lexer-char) + (pushback-chars :initform nil :type list) + (token-type :initform nil :accessor token-type) + (token-value :initform nil :accessor token-value) + (pushback-tokens :initform nil :type list)) (:documentation "Base class for lexical analysers. @@ -245,10 +237,8 @@ "struct" "union" "enum")) (defclass sod-lexer (lexer) - ((keywords :initarg :keywords - :initform *sod-keywords* - :type hash-table - :reader lexer-keywords)) + ((keywords :initarg :keywords :initform *sod-keywords* + :type hash-table :reader lexer-keywords)) (:documentation "Lexical analyser for the SOD lanuage. @@ -433,12 +423,9 @@ ;;; C fragments. (defclass c-fragment () - ((location :initarg :location - :type file-location + ((location :initarg :location :type file-location :accessor c-fragment-location) - (text :initarg :text - :type string - :accessor c-fragment-text)) + (text :initarg :text :type string :accessor c-fragment-text)) (:documentation "Represents a fragment of C code to be written to an output file.