X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/3dca7758421664a838c54b273bd9221f02072045..f2ed4293acc558f54f33a04e6bc707edb5a40c03:/src/pset-parse.lisp diff --git a/src/pset-parse.lisp b/src/pset-parse.lisp index 11b4003..ddc34e0 100644 --- a/src/pset-parse.lisp +++ b/src/pset-parse.lisp @@ -7,7 +7,7 @@ ;;;----- Licensing notice --------------------------------------------------- ;;; -;;; This file is part of the Sensble Object Design, an object system for C. +;;; This file is part of the Sensible Object Design, an object system for C. ;;; ;;; SOD is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -83,7 +83,7 @@ term: factor | term `*' factor | term `/' factor factor: primary | `+' factor | `-' factor primary: int | id | string | `(' expression `)' | `{' fragment `}' - | `?' lisp-expression + | `<' declspec+ declarator[empty] `>' | `?' lisp-expression Only operators for dealing with integers are provided." (with-parser-context (token-scanner-context :scanner scanner) @@ -107,6 +107,17 @@ (parse-delimited-fragment scanner #\{ #\})) t t)) + (#\< + (parse (seq (#\< + (ds (parse-c-type scanner)) + (dc (parse-declarator + scanner ds + :kernel (lambda () + (values nil t nil)) + :abstractp t)) + #\>) + (values (cons :type (car dc)) + t t)))) (t (values (list :int :id :char :string #\?) nil nil)))))